Class PlacesMeta#

Class Documentation#

class PlacesMeta#

Metadata of a Places

Public Functions

inline PlacesMeta(const EntityHandle handle, NDSize globalSize, const MemoryOrder majorType = MemoryOrder::ROW_MAJOR)#
inline Count attributeCount() const#

Number of attributes created on this Places

inline Count placeCount() const#

Total number of Place instances in this Places grid

inline EntityHandle handle() const#

Get the unique handle assigned to this Places

inline const NDSize &globalSize() const noexcept#

Get the complete size of this Places grid

inline MemoryOrder majorType() const noexcept#

Get the memory order of the Place instances within the Places grid

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

Get the list of metadata of all the attributes

inline const AttrTagSet &attrsExcludedFromSyncBorder() const#

Get the set of tags of the attribute excluded from the syncPlaceBorder process

inline const AttrTagSet &attrsPermanentlyExcludedFromSyncBorder() const#

Get the set of tags of the attributes permanently excluded from the syncPlacesBorder process

Attributes inside this set will never be able to be included back into the syncPlacesBorder process

inline bool hasAttribute(const AttrTag tag) const#

Check whether an attribute with the given tag is defined in this Places

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

Get the metadata of an attribute specified by the tag

inline bool hasSharedAttribute(const AttrTag tag) const#

Check whether a shared attribute with the given tag is defined in this Places

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

Get the metadata of a shared attribute specified by the tag

inline bool isAttrExcludedFromSyncBorder(const AttrTag tag) const#

Check whether an attribute has been excluded from the syncPlaceBorder process

This also includes those attributes that have been permanently excluded

inline bool isAttrPermanentlyExcludedFromSyncBorder(const AttrTag tag) const#

Check whether an attribute has been permanently excluded from the syncPlaceBorder process

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

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

  • permanentlyExcludeFromSyncBorder – whether this attribute is permanently excluded from the process of syncPlaceBorder

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

inline void removeAttrFromSyncBorder(const AttrTag tag)#

Record the exclusion of an attribute from the process of syncPlaceBorder

Note

If the attribute is already permanently excluded, this operation won’t take any effect

inline void removeAttrsFromSyncBorder(const mass::span<const AttrTag> tags)#

Record the exclusion of a set of attributes from the process of syncPlaceBorder

Note

Attributes that are already permanently excluded won’t take any effect

inline void addAttrForSyncBorder(const AttrTag tag)#

Record the inclusion of an attribute into the process of syncPlaceBorder

Note

If the attribute is already permanently excluded, this operation won’t take any effect

inline void addAttrsForSyncBorder(const mass::span<const AttrTag> tags)#

Record the inclusion of a set of attributes into the process of syncPlaceBorder

Note

Attributes that are already permanently excluded won’t take any effect

inline void clearAllExcludedAttrsForSyncBorder()#

Clear all the attributes excluded from the process of syncPlaceBorder, same as including them back into the process

Note

Attributes permanently excluded won’t be changed

inline void setAttrsForSyncBorder(const mass::span<const AttrTag> tags)#

Record the direct configuration of the set of attributes included for the process of syncPlaceBorder

This will overwrite the existing set of excluded attributes.

Note

Attributes permanently excluded from the process of syncPlaceBorder cannot be configured to be included into the process here