template <typename T>
class SingleResourceTraitCatalog
Defined at line 44 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/SingleResourceTraitCatalog.h
A Weave provided implementation of the TraitCatalogBase interface for a collection of trait data instances
that all refer to the same resource. It provides an array-backed, bounded storage for these instances.
Public Methods
void SingleResourceTraitCatalog<T> (ResourceIdentifieraResourceIdentifier,CatalogItem *aCatalogStore,uint32_taNumMaxCatalogItems)
Instances a trait catalog given a pointer to the underlying array store.
WEAVE_ERROR Add (uint64_taInstanceId,T *aItem,TraitDataHandle &aHandle)
Add a new trait data instance into the catalog and return a handle to it.
WEAVE_ERROR AddAt (uint64_taInstanceId,T *aItem,TraitDataHandleaHandle)
Add a new trait data instance bound to a user-selected trait handle (which in this particular implementation, denotes the
offset in the array). The handle is to be between 0 and the size of the array. Also, the caller should ensure no gaps form
after every call made to this method.
WEAVE_ERROR Remove (TraitDataHandle aHandle)
Removes a trait instance from the catalog.
WEAVE_ERROR Locate (uint64_taProfileId,uint64_taInstanceId,TraitDataHandle &aHandle)
uint32_t Count ()
Return the number of trait instances in the catalog.
WEAVE_ERROR AddressToHandle (TLV::TLVReader &aReader,TraitDataHandle &aHandle,SchemaVersionRange &aSchemaVersionRange)
WEAVE_ERROR HandleToAddress (TraitDataHandleaHandle,TLV::TLVWriter &aWriter,SchemaVersionRange &aSchemaVersionRange)
WEAVE_ERROR Locate (TraitDataHandle aHandle, T ** aTraitInstance)
WEAVE_ERROR Locate (T * aTraitInstance, TraitDataHandle & aHandle)
WEAVE_ERROR DispatchEvent (uint16_t aEvent, void * aContext)
void Iterate (IteratorCallback aCallback, void * aContext)