Class AgentsMeta#

Class Documentation#

class AgentsMeta#

Metadata of Agents

Public Functions

inline AgentsMeta(const EntityHandle handle, const EntityHandle associatedPlacesHandle, const Count globalAgentSlotCount)#
inline EntityHandle handle() const#

Get the unique handle assigned to this Agents

inline EntityHandle associatedPlacesHandle() const#

Get the handle of the Places associated with this Agents

inline Count attributeCount() const#

Get the number of defined attributes on this Agents

inline Count globalAgentSlotCount() const#

Get the total number of Agent slots across all devices

inline const std::vector<AttributeMeta> &attributeMetas() const#

Get the list of metadata of all the defined attributes

inline bool hasAttribute(const AttrTag tag) const#

Check whether an attribute with the given tag exists

inline const AttributeMeta &getAttribute(const AttrTag tag) const#

Get the metadata of the attribute specified with the tag

inline bool hasSharedAttribute(const AttrTag tag) const#

Check whether an attribute with the given tag exists

inline const SharedAttributeMeta &getSharedAttribute(const AttrTag tag) const#

Get the metadata of the attribute specified with the tag

inline void addAttribute(const AttrTag tag, const ByteCount32 typeSize, const Count32 elementCount, std::shared_ptr<void> initialValue)#

Record a newly defined attribute into the metadata

Parameters:
  • tag – the unique tag of the attribute

  • typeSize – the size in byte of the type of the attribute value

  • elementCount – the number of elements of the attribute

  • initialValue – the initial value of the attribute, represented as a type erased void pointer

inline void addSharedAttribute(const AttrTag tag, const ByteCount32 typeSize, const Count32 elementCount)#

Record a newly defined shared attribute into the metadata

Parameters:
  • tag – the unique tag of the shared attribute

  • typeSize – the size in byte of the type of the attribute value

  • elementCount – the number of elements of the attribute