Skip to content

Latest commit

 

History

History
29 lines (27 loc) · 1.36 KB

Complex-types.md

File metadata and controls

29 lines (27 loc) · 1.36 KB

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 false
      bool 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();