Skip to content

Complex types

etnKlendathu edited this page Sep 23, 2021 · 10 revisions

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 union
Value<BasicType> BasicType

All types inherited from Attrbute class and have methods:

bool        compare(const Attribute& other) const // Compare with other attribute, if other is different type, returns false
std::string typeName() const                      // Human readable type name as, map, list, int32_t etc
bool        hasValue() const                      // Means that this field contains not default value
void        clear()                               // Clears the field

Clone this wiki locally