Pack contains few complex types to cover serialization/deserialization types.
Pack type | C++ analogue |
---|---|
Enum<T> | enum class |
ObjectList<T> | std::vector |
ValueList<BasicType> | std::vector |
Map<T> | std::map<std::string, T> |
ValueMap<BasicType> | std::map<std::string, T> |
Node | struct |
Variant | std::variant |
All types are inherited from Attrbute class and have such methods:
- Compare with other attribute, returns true if both attributes are equal. If
other
is different type, returns falsebool compare(const Attribute& other) const;
- Gets human readable type name as, map, list, int32_t etc.
std::string typeName() const;
- Check if this attribute contains non default value
bool hasValue() const;
- Clears the field
void clear();