[Feat] 增加容器 List, Map, 以及对应Hash

[Impl] Addressable/Unaddressable Error现在内部存储FString而非View
This commit is contained in:
2025-12-25 17:10:12 +08:00
parent ab4024c2bf
commit f056b0ffbe
18 changed files with 583 additions and 179 deletions

View File

@@ -14,6 +14,8 @@ namespace Fig
size_t id;
public:
friend class TypeInfoHash;
FString name;
FString toString() const
@@ -27,7 +29,7 @@ namespace Fig
{
return typeMap.at(_name);
}
size_t getInstanceID(FString _name) const
size_t getInstanceID() const
{
return id;
}
@@ -42,6 +44,15 @@ namespace Fig
}
};
class TypeInfoHash
{
public:
std::size_t operator()(const TypeInfo &ti) const
{
return ti.id;
}
};
// class Value;
namespace ValueType
{
@@ -56,7 +67,7 @@ namespace Fig
extern const TypeInfo StructInstance;
extern const TypeInfo List;
extern const TypeInfo Map;
extern const TypeInfo Tuple;
// extern const TypeInfo Tuple;
using IntClass = int64_t;
using DoubleClass = double;