|
Click
|
A modifiable database mapping names to arbitrary values. More...
Public Member Functions | |
| DynamicNameDB (uint32_t type, const String &context, size_t value_size) | |
| Construct a dynamic name database. | |
| bool | query (const String &name, void *value, size_t value_size) |
| Query this database for a given name. | |
| String | revquery (const void *value, size_t value_size) |
| Query this database for a given value. | |
| bool | define (const String &name, const void *value, size_t value_size) |
| Define a name in this database to a given value. | |
Public Member Functions inherited from NameDB | |
| NameDB (uint32_t type, const String &context, size_t value_size) | |
| Construct a database. | |
| virtual | ~NameDB () |
| Destroy a database. | |
| uint32_t | type () const |
| Return the database type. | |
| const String & | context () const |
| Return the database's compound element context as a string. | |
| NameDB * | context_parent () const |
| Return the contextual parent database, if any. | |
| size_t | value_size () const |
| Return the database's value size. | |
| bool | define_int (const String &name, int32_t value) |
| Define a name in this database to a 32-bit integer value. | |
A modifiable database mapping names to arbitrary values.
DynamicNameDB is a NameDB database that maps names to arbitrary values. The database is initially empty. DynamicNameDB supports define() operations; that's how information is added to it.
DynamicNameDB objects are automatically created by NameInfo::getdb().
|
inline |
Construct a dynamic name database.
| type | database type |
| context | database compound element context, as a String |
| value_size | database value size |
value_size must be greater than 0. The database is initially empty.
|
virtual |
Query this database for a given name.
| name | name to look up |
| value | points to value storage |
| value_size | size of value storage |
The value_size parameter must equal this database's value size.
Implements NameDB.
|
virtual |
Query this database for a given value.
| value | points to value to look up |
| value_size | size of value storage |
The value_size parameter must equal this database's value size.
Reimplemented from NameDB.
|
virtual |
Define a name in this database to a given value.
| name | name to define |
| value | points to value to define |
| value_size | size of value storage |
The value_size parameter must equal this database's value size.
Reimplemented from NameDB.