nl:: Weave:: Profiles:: DataManagement_Legacy:: ProfileDatabase:: ProfileData
This is an abstract class.
#include <src/lib/profiles/data-management/Legacy/ProfileDatabase.h>
The abstract ProfileData auxiliary inner class.
Summary
ProfileDatabase sub-class implementers should implement sub-classes of this auxiliary inner class as well. The function of ProfileData objects is to provide hooks whereby concrete data may be stored, given a its representation as TLV and retrieved as a TLV representation given a TLV-encoded list of paths.
Constructors and Destructors |
|
---|---|
ProfileData(void)
The default constructor for ProfileData.
|
|
~ProfileData(void)
The destructor for ProfileData.
|
Public attributes |
|
---|---|
mVersion
|
uint64_t
Profile data version.
|
Public functions |
|
---|---|
Retrieve(nl::Weave::TLV::TLVReader & aPathReader, nl::Weave::TLV::TLVWriter & aDataWriter)=0
|
virtual WEAVE_ERROR
Write out a data item given a residual WDM path.
|
Store(nl::Weave::TLV::TLVReader & aPathReader, uint64_t aVersion, nl::Weave::TLV::TLVReader & aDataReader)
|
virtual WEAVE_ERROR
Store a data list item being read.
|
StoreItem(const uint64_t & aTag, nl::Weave::TLV::TLVReader & aDataReader)=0
|
virtual WEAVE_ERROR
Store a data item based on its tag.
|
Public attributes
mVersion
uint64_t mVersion
Profile data version.
The version given here in the ProfileData object applies to the whole profile data set for a particular instance.
Public functions
ProfileData
ProfileData( void )
The default constructor for ProfileData.
Initialize a fresh ProfileData item by setting its version to 0.
Retrieve
virtual WEAVE_ERROR Retrieve( nl::Weave::TLV::TLVReader & aPathReader, nl::Weave::TLV::TLVWriter & aDataWriter )=0
Write out a data item given a residual WDM path.
ProfileDatabase subclass implementers must provide a concrete implementation for this method in every case where the individual elements of a ProfileData subclass object are accessible under particular tags.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
WEAVE_NO_ERROR On success. Otherwise return a WEAVE_ERROR reflecting an inability to recognize a residual tag or else to write the corresponding data.
|
Store
virtual WEAVE_ERROR Store( nl::Weave::TLV::TLVReader & aPathReader, uint64_t aVersion, nl::Weave::TLV::TLVReader & aDataReader )
Store a data list item being read.
This virtual method is used to store a particular data list item in an object of a concrete ProfileData subclass. The implementation here in the super-class may be used if the object is simple and "shallow", having only paths that are one element long. For a more complicated schema, implementers should override this method.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Returns |
WEAVE_NO_ERROR On success. Otherwise return a WEAVE_ERROR indicating a failure to store the data of interest.
|
StoreItem
virtual WEAVE_ERROR StoreItem( const uint64_t & aTag, nl::Weave::TLV::TLVReader & aDataReader )=0
Store a data item based on its tag.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
WEAVE_NO_ERROR on success, otherwise return a WEAVE_ERROR reflecting an inability either to recognize the tag or to store the data.
|
~ProfileData
virtual ~ProfileData( void )
The destructor for ProfileData.
Like the constructor this just clears the data verion to 0.