#include <dmprovider/SchemaDatabaseNode.h>
Inheritance diagram for BSchemaDatabaseNode:
The schema database must have one or more tables, which are accessed as sub-nodes from this one. You can also create iterators directly from this node by specifying the desired table in the iterator arguments.
This class understands one constructor argument (the args SValue, which is typically passed from InstantiateComponent):
Bookkeeping | |
Creation, destruction, locking, etc. | |
typedef void(* | database_missing_func )(const sptr< BSchemaDatabaseNode > &table) |
Call-back function t create a database when it is missing. | |
BSchemaDatabaseNode (const SContext &context, const SDatabase &database, const SValue &args=B_UNDEFINED_VALUE) | |
Call-back function t create a database when it is missing. | |
BSchemaDatabaseNode (const SContext &context, const SString &dbname, uint32_t creator, DmOpenModeType mode=dmModeReadOnly, DbShareModeType share=dbShareReadWrite, database_missing_func missing=NULL, const SValue &args=B_UNDEFINED_VALUE) | |
Call-back function t create a database when it is missing. | |
SContext | Context () |
Disambiguate. | |
virtual SValue | Inspect (const sptr< IBinder > &caller, const SValue &which, uint32_t flags) |
Make BIndexedDataNode and IReferable accessible. | |
status_t | StatusCheck () |
Returns initialization state of object, such as error code when opening database. | |
virtual void | InitAtom () |
Open and initialize the database. | |
virtual | ~BSchemaDatabaseNode () |
Call-back function t create a database when it is missing. | |
Implementation | |
Provide default implementation based on new capabilities. | |
virtual size_t | CountEntriesLocked () const |
Return number of tables found. | |
SDatabase | DatabaseLocked () const |
Return the underlying opened SDatabase object. | |
virtual ssize_t | EntryIndexOfLocked (const SString &entry) const |
Return index of a table. | |
virtual SString | EntryNameAtLocked (size_t index) const |
Return name of a table. | |
virtual sptr< BSchemaTableNode > | NewSchemaTableNodeLocked (const SString &table, const SString &refPath) |
Create and return a new BSchemaTableNode. | |
virtual status_t | StoreValueAtLocked (size_t index, const SValue &value) |
Return B_UNSUPPORTED, can't change tables. | |
sptr< BSchemaTableNode > | TableAtLocked (size_t index) const |
Return the table object at a particular index. | |
sptr< BSchemaTableNode > | TableForLocked (const SString &name) const |
Return the table object for a particular name. | |
virtual SValue | ValueAtLocked (size_t index) const |
Retrieve a table at an index. | |
IReferable Implementation | |
virtual SString | Reference () const |
Official path to this object. |
|
Call-back function t create a database when it is missing.
|
|
Call-back function t create a database when it is missing.
|
|
Call-back function t create a database when it is missing.
|
|
Call-back function t create a database when it is missing.
|
|
Disambiguate.
Reimplemented from BIndexedDataNode. |
|
Return number of tables found.
Implements BIndexedDataNode. |
|
Return the underlying opened SDatabase object.
|
|
Return index of a table.
Implements BIndexedDataNode. |
|
Return name of a table.
Implements BIndexedDataNode. |
|
Open and initialize the database.
Reimplemented from SAtom. |
|
Make BIndexedDataNode and IReferable accessible.
Reimplemented from BnReferable. |
|
Create and return a new BSchemaTableNode. This is called for each table in the database. The default implementation simply instantiates a BSchemaTableNode with the given arguments (and Context(), Database()). |
|
Official path to this object. This property holds the canonical path at which you can find the object being queried. The returned path is always of the form "/some/path/to/me"; that is, SContext::Lookup() can be used to resolve the path back to the object.
Implements IReferable. |
|
Returns initialization state of object, such as error code when opening database.
|
|
Return B_UNSUPPORTED, can't change tables.
Implements BIndexedDataNode. |
|
Return the table object at a particular index.
|
|
Return the table object for a particular name.
|
|
Retrieve a table at an index.
Implements BIndexedDataNode. |