Storeable Class ReferenceClass that defines objects storeable in Archive using obiject ouytput streams and loadable from Archive using object input streams.
More...
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Public Types | |
| enum | stState { NEW, CHANGED, DELETED, OK } |
| state of storeable object More... | |
Public Member Functions | |
| id | getId () const |
| get object id | |
| const char * | getRootTable () |
| get name of root table | |
| stState | getState () const |
| get object state | |
| bool | isChanged () const |
| Check if object is in CHANGED state. | |
| bool | isDeleted () const |
| Check if object is in DELETED state. | |
| bool | isNew () const |
| Check if object is in NEW state. | |
| bool | isOk () const |
| Check if object is in OK state. | |
| virtual void | lockStid (bool pPreserveState) |
| Lock id. | |
| Storeable & | operator= (const Storeable &pObj) |
| Assignent operator. | |
| void | setChanged () |
| set object state to CHANGED | |
| void | setDeleted () |
| set object state to DELETED | |
| void | setId (id pId) |
| assingn id by hand. | |
| template<typename T> | |
| bool | setMember (T &pMember, const T &pNevVal) |
| helper function to set member of Storeable derived object. | |
| virtual void | setNew () |
| set object to NEW state, reset Id and mStoredTables | |
| void | setOk () |
| set object state to OK | |
| virtual void | setState (stState pState) |
| Set new object state. | |
| Storeable (const Storeable &pObj) | |
| Copy constructor. | |
| Storeable (id pId=InvalidId) | |
| Create new object with id. | |
| virtual void | unlockStid () |
| Unlock state and id of object for copy constructor and assigment operator. | |
| virtual | ~Storeable () |
| Destructor. | |
Static Public Attributes | |
| static const Storeable *const | dba_pointer_place |
| Internal pointer for computing offsets corrections in case of multiple inheritance. | |
| static const id | InvalidId |
| id of object that was now stored in database. | |
| static StoreTableList | sStoreTableList |
| Static list of created tables Responsible for freeing all memory allocated by BEGIN_STORE_TABLE macro. | |
Protected Types | |
| enum | lock_state { UNLOCKED, LOCKED, LOCKED_PRESERVE_STATE } |
| state of lock on object data for assigment operator and copy constructor More... | |
Protected Member Functions | |
| int | countTables () |
| Get number. | |
| void | normalAssigment (const Storeable &pObj) |
| Variant of assigment operator. | |
| void | preserveIdAssigment (const Storeable &pObj) |
| Variant of assigment operator. | |
| virtual const ColTable * | st_getColTable () |
| Get collection table list for object. | |
| virtual const StoreTable * | st_getTable () |
| Get store table list for object. | |
Protected Attributes | |
| id | mId |
| id of object | |
| lock_state | mIdLocked |
| Lock state. | |
| int | mStoredTables |
| number of tables from first one that are already stored for object | |
| stState | mStoreState |
| Store state. | |
Classes | |
| class | StidLocker |
| Helper class for locking Storeable data when doing Archive operations. More... | |
Derived classes must provide default constructor and copy constructor.
|
|
state of lock on object data for assigment operator and copy constructor
|
|
|
state of storeable object
|
|
|
Create new object with id.
|
|
|
Copy constructor. Copies object state if no IdLocker is constructed.
|
|
|
get object id
|
|
|
get name of root table
|
|
|
get object state
|
|
|
Check if object is in CHANGED state.
|
|
|
Check if object is in DELETED state.
|
|
|
Check if object is in NEW state.
|
|
|
Check if object is in OK state.
|
|
|
Lock id. Used by StidLocker to lock object id before assigment.
|
|
|
Variant of assigment operator. Copies state.
|
|
|
Assignent operator. Copies object state if no IdLocker is constructed.
|
|
|
Variant of assigment operator. Calls setChanged()
|
|
|
set object state to CHANGED
|
|
|
set object state to DELETED
|
|
|
assingn id by hand. Allowed only if getId() == InvalidId
|
|
||||||||||||
|
helper function to set member of Storeable derived object. It changes state of object to CHANGED if new value is different from old value
|
|
|
set object state to OK
|
|
|
id of object that was now stored in database.
|
| Documentation |
|---|
| Quick start |
| Examples |
| Search |
| API Documentation |
|---|
| Class hierarchy |
| Member index |
| API Reference |
| Store filters |
| Store table macros |