Stream Class ReferenceStream class is base class for Object Output Stream (OStream) and Object Input Stream (IStream) classes.
More...
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Member Functions | |
| void | bind (const char *pTable, const char *pField, StoreableFilterBase *pFilter, Database::StoreType pType=Database::STRING) |
| Bind custom variable to stream. | |
| BindedInt | bindInt (const char *pTable, const char *pField, StoreableFilterBase *pFilter=NULL) |
| Binds int value to database column. | |
| BindedStid | bindStid (const char *pTable, const char *pField, StoreableFilterBase *pFilter=NULL) |
| Bind id value to database column. | |
| BindedString | bindString (const char *pTable, const char *pField, StoreableFilterBase *pFilter=NULL) |
| Binds string value to database column. | |
| virtual void | close ()=0 |
| Close stream. | |
| virtual void | destroy ()=0 |
| Destroy stream. | |
| virtual bool | isOpen () const |
| Check if stream is open. | |
| virtual void | open (Storeable &pObject, const char *pRootTable=NULL) |
| Prepare stream by creating member tree from pObject. | |
| void | setRootTable (const char *pRootTable) |
| Change main table name. | |
| Stream () | |
| Constructor. | |
| void | unbind (const char *pTableName, const char *pField) |
| Unbind one variable. | |
| void | unbindAll (const char *pTableName) |
| Unbind all variables related to sql table. | |
| void | unbindAll () |
| Unbind all variables from stream. | |
| virtual | ~Stream () |
| Desctructor. | |
Protected Types | |
| typedef std::list< _bind_data > | VarMap |
| Type of list variables binded to stream. | |
Protected Member Functions | |
| void | alterId (Storeable *pObject, int pNewId) |
| alter object id. | |
| int | countTables (Storeable *pObject) |
| Get total number of store tables for object. | |
| void | createTree (const StoreTable *pRootTable) |
| Create member tree from store tables and binded variables. | |
| const ColTable * | getColTable (Storeable &pObject) |
| Get root collection table for object. | |
| int | getStoredTables (Storeable *pObject) |
| Get number of tables from bottom of class hierarchy that are already stored in database. | |
| const StoreTable * | getTable (Storeable &pObject) |
| Get root store table for object. | |
| virtual bool | isCollectionFilterSupported () const |
| True if stream can use BIND_COL capability of Storeable object to load and store referenced objects. | |
| void | makeOk (Storeable *pObject) |
| Make object ok. | |
| void | setStoredTables (Storeable *pObject, int pTables) |
| Set number of tables that were stored in database. | |
Static Protected Member Functions | |
| static void | setFilterPtr (StoreableFilterBase &pFilter, void *pMember) |
| Update filter pointer to actual pointer to member of Storeable object Used by applyFilter functions to set pointer to member before using filter. | |
Protected Attributes | |
| VarMap | mBindings |
| List of variables binded to stream. | |
| bool | mIsOpen |
| true if stream is open | |
| shared_ptr< mt_mlist > | mMemberList |
| List of members from store table. | |
| const char * | mRootTable |
| Name of overriden root table. | |
Classes | |
| class | _bind_data |
| Data for binded variables. More... | |
| class | bindMatch |
| Relation between binded variable pointer and store table member identification. More... | |
|
||||||||||||
|
alter object id.
|
|
||||||||||||||||||||
|
Bind custom variable to stream. pFilter should be constructed using reference to variable that holds value that should be stored in database. Lifetime of variable have to be greater than stream where it is binded to. pType is a conversion hint.
|
|
||||||||||||||||
|
Binds int value to database column.
|
|
||||||||||||||||
|
Bind id value to database column.
|
|
||||||||||||||||
|
Binds string value to database column.
|
|
|
Get total number of store tables for object.
|
|
|
Destroy stream. After call to this function stream is destroyed and cannot be opened any more. It usually means that connection to database that this stream represents is closed after this method was called Implemented in CSVIStream, CSVOStream, SQLIStream, and SQLOStream. |
|
|
Get root collection table for object.
|
|
|
Get number of tables from bottom of class hierarchy that are already stored in database.
|
|
|
Get root store table for object.
|
|
|
Check if stream is open.
Reimplemented in SQLOStream. |
|
|
Make object ok.
|
|
||||||||||||
|
Prepare stream by creating member tree from pObject.
Reimplemented in CSVIStream, and SQLIStream. |
|
||||||||||||
|
Update filter pointer to actual pointer to member of Storeable object Used by applyFilter functions to set pointer to member before using filter.
|
|
|
Change main table name. For input stream this must be called before open, for output stream if called before put for object with NULL root table, it changes table name where object is stored
|
|
||||||||||||
|
Set number of tables that were stored in database.
|
|
||||||||||||
|
Unbind one variable.
|
|
|
Unbind all variables related to sql table.
|
|
|
Unbind all variables from stream. They will not be updated when getting next objects from stream |
| Documentation |
|---|
| Quick start |
| Examples |
| Search |
| API Documentation |
|---|
| Class hierarchy |
| Member index |
| API Reference |
| Store filters |
| Store table macros |