nl:: Weave:: Profiles:: DataManagement_Current:: TraitPathStore
Summary
Constructors and Destructors |
|
---|---|
TraitPathStore()
Empty constructor.
|
Public types |
|
---|---|
@153{
|
enum |
Flags
|
typedefuint8_t
|
Public attributes |
|
---|---|
mStore
|
Record *
|
Public functions |
|
---|---|
AddItem(const TraitPath & aItem)
|
Adds a TraitPath to the store.
|
AddItem(const TraitPath & aItem, Flags aFlags)
|
Adds a TraitPath to the store with a given set of flags.
|
AddItemDedup(const TraitPath & aItem, const TraitSchemaEngine *const aSchemaEngine)
|
|
AreFlagsSet(size_t aIndex, Flags aFlags) const
|
bool
|
Clear()
|
void
Empties the store.
|
Compact()
|
void
Compacts the store moving all items in use down towards the start of the array.
|
GetFirstValidItem() const
|
size_t
|
GetFirstValidItem(TraitDataHandle aTraitDataHandle) const
|
size_t
|
GetItemAt(size_t aIndex, TraitPath & aTraitPath)
|
void
|
GetNextValidItem(size_t i) const
|
size_t
|
GetNextValidItem(size_t i, TraitDataHandle aTraitDataHandle) const
|
size_t
|
GetNumItems()
|
size_t
|
GetPathStoreSize()
|
size_t
|
Includes(const TraitPath & aItem, const TraitSchemaEngine *const aSchemaEngine) const
|
bool
Check if any of the TraitPaths in the store includes a given TraitPath.
|
Init(Record *aRecordArray, size_t aNumItems)
|
void
Inits the TraitPathStore.
|
InsertItemAfter(size_t aIndex, const TraitPath & aItem, Flags aFlags)
|
|
InsertItemAt(size_t aIndex, const TraitPath & aItem, Flags aFlags)
|
Adds an TraitPath to the store, inserting it at a given index.
|
Intersects(const TraitPath & aItem, const TraitSchemaEngine *const aSchemaEngine) const
|
bool
Check if any of the TraitPaths in the store intersects a given TraitPath.
|
IsEmpty()
|
bool
|
IsFull()
|
bool
|
IsItemFailed(size_t aIndex) const
|
bool
|
IsItemInUse(size_t aIndex) const
|
bool
|
IsItemValid(size_t aIndex) const
|
bool
|
IsPresent(const TraitPath & aItem) const
|
bool
Checks if a given TraitPath is already in the store.
|
IsTraitPresent(TraitDataHandle aDataHandle) const
|
bool
|
RemoveItem(const TraitPath & aItem)
|
void
|
RemoveItemAt(size_t aIndex)
|
void
|
RemoveTrait(TraitDataHandle aDataHandle)
|
void
Remove all TraitPaths that refer to a given TraitDataHandle.
|
SetFailed(size_t aIndex)
|
void
|
SetFailed()
|
void
Mark all TraitPaths as failed.
|
SetFailedTrait(TraitDataHandle aDataHandle)
|
void
Mark all TraitPaths referring to the given TraitDataHandle as failed.
|
Structs |
|
---|---|
nl:: |
Public types
@153
nl::Weave::Profiles::DataManagement_Current::TraitPathStore::@153
Flags
uint8_t nl::Weave::Profiles::DataManagement_Current::TraitPathStore::Flags
Public attributes
mStore
Record * nl::Weave::Profiles::DataManagement_Current::TraitPathStore::mStore
Public functions
AddItem
WEAVE_ERROR nl::Weave::Profiles::DataManagement_Current::TraitPathStore::AddItem( const TraitPath & aItem )
AddItem
WEAVE_ERROR nl::Weave::Profiles::DataManagement_Current::TraitPathStore::AddItem( const TraitPath & aItem, Flags aFlags )
Adds a TraitPath to the store with a given set of flags.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
AddItemDedup
WEAVE_ERROR nl::Weave::Profiles::DataManagement_Current::TraitPathStore::AddItemDedup( const TraitPath & aItem, const TraitSchemaEngine *const aSchemaEngine )
AreFlagsSet
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::AreFlagsSet( size_t aIndex, Flags aFlags ) const
Clear
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::Clear()
Empties the store.
Compact
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::Compact()
Compacts the store moving all items in use down towards the start of the array.
This is useful to use TraitPathStore to implement a list that can be edited (like the list of in-progress paths maintained by SubscriptionClient).
GetFirstValidItem
size_t nl::Weave::Profiles::DataManagement_Current::TraitPathStore::GetFirstValidItem() const
GetFirstValidItem
size_t nl::Weave::Profiles::DataManagement_Current::TraitPathStore::GetFirstValidItem( TraitDataHandle aTraitDataHandle ) const
GetItemAt
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::GetItemAt( size_t aIndex, TraitPath & aTraitPath )
GetNextValidItem
size_t nl::Weave::Profiles::DataManagement_Current::TraitPathStore::GetNextValidItem( size_t i ) const
GetNextValidItem
size_t nl::Weave::Profiles::DataManagement_Current::TraitPathStore::GetNextValidItem( size_t i, TraitDataHandle aTraitDataHandle ) const
GetNumItems
size_t nl::Weave::Profiles::DataManagement_Current::TraitPathStore::GetNumItems()
Details | |
---|---|
Returns |
Returns the number of TraitPaths in the store.
|
GetPathStoreSize
size_t nl::Weave::Profiles::DataManagement_Current::TraitPathStore::GetPathStoreSize()
Details | |
---|---|
Returns |
Returns the capacity of the store.
|
Includes
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::Includes( const TraitPath & aItem, const TraitSchemaEngine *const aSchemaEngine ) const
Check if any of the TraitPaths in the store includes a given TraitPath.
TraitPath A includes TraitPath B if either:
- the two TraitPaths are the same;
- A is an ancestor of B.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
true if the TraitPath is already included by the paths in the store.
|
Init
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::Init( Record *aRecordArray, size_t aNumItems )
Inits the TraitPathStore.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
InsertItemAfter
WEAVE_ERROR nl::Weave::Profiles::DataManagement_Current::TraitPathStore::InsertItemAfter( size_t aIndex, const TraitPath & aItem, Flags aFlags )
InsertItemAt
WEAVE_ERROR nl::Weave::Profiles::DataManagement_Current::TraitPathStore::InsertItemAt( size_t aIndex, const TraitPath & aItem, Flags aFlags )
Adds an TraitPath to the store, inserting it at a given index.
Assumes the store has no gaps.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
Intersects
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::Intersects( const TraitPath & aItem, const TraitSchemaEngine *const aSchemaEngine ) const
Check if any of the TraitPaths in the store intersects a given TraitPath.
Two TraitPaths intersect each other if any of the following is true:
- the two TraitPaths are the same;
- one of the two TraitPaths is an ancestor of the other TraitPath.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
true if the store intersects the given TraitPath; false otherwise.
|
IsEmpty
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::IsEmpty()
Details | |
---|---|
Returns |
Returns true if the store is empty; false otherwise.
|
IsFull
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::IsFull()
Details | |
---|---|
Returns |
Returns true if the store is full; false otherwise.
|
IsItemFailed
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::IsItemFailed( size_t aIndex ) const
IsItemInUse
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::IsItemInUse( size_t aIndex ) const
IsItemValid
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::IsItemValid( size_t aIndex ) const
IsPresent
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::IsPresent( const TraitPath & aItem ) const
IsTraitPresent
bool nl::Weave::Profiles::DataManagement_Current::TraitPathStore::IsTraitPresent( TraitDataHandle aDataHandle ) const
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
Returns true if the store contains one or more paths referring to the given TraitDataHandle
|
RemoveItem
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::RemoveItem( const TraitPath & aItem )
RemoveItemAt
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::RemoveItemAt( size_t aIndex )
RemoveTrait
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::RemoveTrait( TraitDataHandle aDataHandle )
Remove all TraitPaths that refer to a given TraitDataHandle.
Details | |||
---|---|---|---|
Parameters |
|
SetFailed
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::SetFailed( size_t aIndex )
SetFailed
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::SetFailed()
Mark all TraitPaths as failed.
SetFailedTrait
void nl::Weave::Profiles::DataManagement_Current::TraitPathStore::SetFailedTrait( TraitDataHandle aDataHandle )
Mark all TraitPaths referring to the given TraitDataHandle as failed.
Details | |||
---|---|---|---|
Parameters |
|
TraitPathStore
nl::Weave::Profiles::DataManagement_Current::TraitPathStore::TraitPathStore()
Empty constructor.