An object can contain other objects, properties and arrays.
More...
#include <Object.h>
|
| | Object () |
| |
| | Object (const Object &other) |
| |
| | Object (Object &&)=delete |
| |
| Object & | operator= (const Object &other) |
| |
| | Object (const PropertyInfo &propinfo) |
| |
| | Object (Object &parent, const PropertyInfo &prop, uint16_t dataRef) |
| |
| | Object (const Object &parent, const PropertyInfo &prop, uint16_t dataRef) |
| |
| | Object (Object &parent, unsigned propIndex, uint16_t dataRef=0) |
| |
| | Object (const Object &parent, unsigned propIndex, uint16_t dataRef=0) |
| |
| | operator bool () const |
| |
| bool | typeIs (ObjectType type) const |
| |
| bool | isArray () const |
| |
| bool | isStore () const |
| | Determine if this object is a store (not just a reference to it) More...
|
| |
| Store & | getStore () |
| |
| const Store & | getStore () const |
| |
| Database & | getDatabase () |
| |
| const Database & | getDatabase () const |
| |
| unsigned | getObjectCount () const |
| | Get number of child objects. More...
|
| |
| Object | getObject (unsigned index) |
| | Get child object by index. More...
|
| |
| const Object | getObject (unsigned index) const |
| |
| Object | findObject (const char *name, size_t length) |
| | Find child object by name. More...
|
| |
| unsigned | getPropertyCount () const |
| | Get number of properties. More...
|
| |
| Property | getProperty (unsigned index) |
| | Get properties. More...
|
| |
| PropertyConst | getProperty (unsigned index) const |
| |
| Property | findProperty (const char *name, size_t length) |
| | Find property by name. More...
|
| |
| void | clear () |
| | Reset contents to defaults (except arrays, which are cleared) More...
|
| |
| void | loadArrayDefaults () |
| | Clear and load all contained arrays with defaults from schema. More...
|
| |
| void | resetToDefaults () |
| | Does a 'clear' followed by 'loadArrayDefaults'. More...
|
| |
| bool | commit () |
| | Commit changes to the store. More...
|
| |
| void | clearDirty () |
| | Clear store dirty flag so changes don't get committed. More...
|
| |
| String | getName () const |
| |
| String | getPath () const |
| |
| size_t | printTo (Print &p) const |
| |
| bool | exportToStream (const Format &format, Print &output) const |
| |
| bool | exportToFile (const Format &format, const String &filename) const |
| |
| Status | importFromStream (const Format &format, Stream &source) |
| |
| Status | importFromFile (const Format &format, const String &filename) |
| |
| const PropertyInfo & | propinfo () const |
| |
| const ObjectInfo & | typeinfo () const |
| |
| PropertyData * | getPropertyData (unsigned index) |
| |
| const PropertyData * | getPropertyData (unsigned index) const |
| |
| void | queueUpdate (UpdateCallback callback) |
| | Called from OuterObjectTemplate::update to queue an update. More...
|
| |
|
| StoreRef | openStore (Database &db, unsigned storeIndex) |
| |
| StoreUpdateRef | openStoreForUpdate (Database &db, unsigned storeIndex) |
| |
| void | disposeArrays () |
| |
| void | initArrays () |
| |
| bool | isWriteable () const |
| |
| StoreUpdateRef | lockStore (StoreRef &store) |
| |
| bool | writeCheck () const |
| |
| void * | getDataPtr () |
| |
| const void * | getDataPtr () const |
| |
| String | getPropertyString (unsigned index, StringId id) const |
| |
| String | getPropertyString (unsigned index) const |
| |
| StringId | getStringId (const PropertyInfo &prop, const char *value, uint16_t valueLength) |
| |
| StringId | getStringId (const PropertyInfo &prop, const String &value) |
| |
| template<typename T > |
| StringId | getStringId (const PropertyInfo &prop, const T &value) |
| |
| int | findStringId (const char *value, uint16_t valueLength) const |
| |
| void | setPropertyValue (unsigned index, const void *value) |
| |
| void | setPropertyValue (unsigned index, const String &value) |
| |
An object can contain other objects, properties and arrays.
- Note
- This class is the base for concrete Object, Array and ObjectArray classes
◆ UpdateCallback
Callback invoked by asynchronous updater.
- Parameters
-
| store | Updatable store instance |
- Note
- The
OuterObjectTemplate::update method template handles this callback so that the caller receives the appropriate Updater object.
◆ Object() [1/8]
| ConfigDB::Object::Object |
( |
| ) |
|
|
inline |
◆ Object() [2/8]
| ConfigDB::Object::Object |
( |
const Object & |
other | ) |
|
|
inline |
◆ Object() [3/8]
| ConfigDB::Object::Object |
( |
Object && |
| ) |
|
|
delete |
◆ Object() [4/8]
◆ Object() [5/8]
◆ Object() [6/8]
| ConfigDB::Object::Object |
( |
const Object & |
parent, |
|
|
const PropertyInfo & |
prop, |
|
|
uint16_t |
dataRef |
|
) |
| |
|
inline |
◆ Object() [7/8]
| ConfigDB::Object::Object |
( |
Object & |
parent, |
|
|
unsigned |
propIndex, |
|
|
uint16_t |
dataRef = 0 |
|
) |
| |
|
inline |
◆ Object() [8/8]
| ConfigDB::Object::Object |
( |
const Object & |
parent, |
|
|
unsigned |
propIndex, |
|
|
uint16_t |
dataRef = 0 |
|
) |
| |
|
inline |
◆ clear()
| void ConfigDB::Object::clear |
( |
| ) |
|
Reset contents to defaults (except arrays, which are cleared)
- Note
- Use caution! All reference objects will be invalidated by this call
◆ clearDirty()
| void ConfigDB::Object::clearDirty |
( |
| ) |
|
Clear store dirty flag so changes don't get committed.
- Note
- Store must be reloaded to roll back any changes
◆ commit()
| bool ConfigDB::Object::commit |
( |
| ) |
|
Commit changes to the store.
◆ disposeArrays()
| void ConfigDB::Object::disposeArrays |
( |
| ) |
|
|
protected |
◆ exportToFile()
| bool ConfigDB::Object::exportToFile |
( |
const Format & |
format, |
|
|
const String & |
filename |
|
) |
| const |
◆ exportToStream()
| bool ConfigDB::Object::exportToStream |
( |
const Format & |
format, |
|
|
Print & |
output |
|
) |
| const |
|
inline |
◆ findObject()
| Object ConfigDB::Object::findObject |
( |
const char * |
name, |
|
|
size_t |
length |
|
) |
| |
Find child object by name.
- Note
- For Union objects this also sets the tag on successful match, which clears the Object to its default value.
◆ findProperty()
| Property ConfigDB::Object::findProperty |
( |
const char * |
name, |
|
|
size_t |
length |
|
) |
| |
◆ findStringId()
| int ConfigDB::Object::findStringId |
( |
const char * |
value, |
|
|
uint16_t |
valueLength |
|
) |
| const |
|
protected |
◆ getDatabase() [1/2]
| Database& ConfigDB::Object::getDatabase |
( |
| ) |
|
◆ getDatabase() [2/2]
| const Database& ConfigDB::Object::getDatabase |
( |
| ) |
const |
|
inline |
◆ getDataPtr() [1/2]
| void* ConfigDB::Object::getDataPtr |
( |
| ) |
|
|
protected |
◆ getDataPtr() [2/2]
| const void* ConfigDB::Object::getDataPtr |
( |
| ) |
const |
|
protected |
◆ getName()
| String ConfigDB::Object::getName |
( |
| ) |
const |
◆ getObject() [1/2]
Get child object by index.
◆ getObject() [2/2]
◆ getObjectCount()
| unsigned ConfigDB::Object::getObjectCount |
( |
| ) |
const |
Get number of child objects.
- Note
- ObjectArray overrides this to return number of items in the array
◆ getPath()
| String ConfigDB::Object::getPath |
( |
| ) |
const |
◆ getProperty() [1/2]
Get properties.
- Note
- Array types override this to return array elements
◆ getProperty() [2/2]
◆ getPropertyCount()
| unsigned ConfigDB::Object::getPropertyCount |
( |
| ) |
const |
Get number of properties.
- Note
- Array types override this to return the number of items in the array.
◆ getPropertyData() [1/2]
◆ getPropertyData() [2/2]
◆ getPropertyString() [1/2]
◆ getPropertyString() [2/2]
◆ getStore() [1/2]
| Store& ConfigDB::Object::getStore |
( |
| ) |
|
◆ getStore() [2/2]
| const Store& ConfigDB::Object::getStore |
( |
| ) |
const |
|
inline |
◆ getStringId() [1/3]
| StringId ConfigDB::Object::getStringId |
( |
const PropertyInfo & |
prop, |
|
|
const char * |
value, |
|
|
uint16_t |
valueLength |
|
) |
| |
|
protected |
◆ getStringId() [2/3]
◆ getStringId() [3/3]
◆ importFromFile()
| Status ConfigDB::Object::importFromFile |
( |
const Format & |
format, |
|
|
const String & |
filename |
|
) |
| |
◆ importFromStream()
◆ initArrays()
| void ConfigDB::Object::initArrays |
( |
| ) |
|
|
protected |
◆ isArray()
| bool ConfigDB::Object::isArray |
( |
| ) |
const |
|
inline |
◆ isStore()
| bool ConfigDB::Object::isStore |
( |
| ) |
const |
|
inline |
Determine if this object is a store (not just a reference to it)
◆ isWriteable()
| bool ConfigDB::Object::isWriteable |
( |
| ) |
const |
|
protected |
◆ loadArrayDefaults()
| void ConfigDB::Object::loadArrayDefaults |
( |
| ) |
|
Clear and load all contained arrays with defaults from schema.
◆ lockStore()
◆ openStore()
◆ openStoreForUpdate()
◆ operator bool()
| ConfigDB::Object::operator bool |
( |
| ) |
const |
|
inlineexplicit |
◆ operator=()
◆ printTo()
| size_t ConfigDB::Object::printTo |
( |
Print & |
p | ) |
const |
◆ propinfo()
◆ queueUpdate()
◆ resetToDefaults()
| void ConfigDB::Object::resetToDefaults |
( |
| ) |
|
Does a 'clear' followed by 'loadArrayDefaults'.
◆ setPropertyValue() [1/2]
| void ConfigDB::Object::setPropertyValue |
( |
unsigned |
index, |
|
|
const String & |
value |
|
) |
| |
|
protected |
◆ setPropertyValue() [2/2]
| void ConfigDB::Object::setPropertyValue |
( |
unsigned |
index, |
|
|
const void * |
value |
|
) |
| |
|
protected |
◆ typeinfo()
| const ObjectInfo& ConfigDB::Object::typeinfo |
( |
| ) |
const |
|
inline |
◆ typeIs()
| bool ConfigDB::Object::typeIs |
( |
ObjectType |
type | ) |
const |
|
inline |
◆ writeCheck()
| bool ConfigDB::Object::writeCheck |
( |
| ) |
const |
|
protected |
◆ dataRef
| uint16_t ConfigDB::Object::dataRef {} |
|
protected |
◆ parent
| Object* ConfigDB::Object::parent {} |
|
protected |
◆ propinfoPtr
◆ streamPos
| uint16_t ConfigDB::Object::streamPos {} |
The documentation for this class was generated from the following file: