VOS::SQLPersistance Class Reference
#include <sqlpersist.hh>
Inheritance diagram for VOS::SQLPersistance:

Detailed Description
Definition at line 39 of file sqlpersist.hh.
Public Member Functions
- SQLPersistance (SQLDatabase *db, const char *dbname)
- virtual void wipeDatabase ()
- virtual void siteExtensionAttachedTo (Site *vb)
- virtual void destroy ()
- virtual void post_createVobject (VobjectState &state, Vobject *requester, VobjectBase *newvobject)
- virtual void post_renameVobject (VobjectState &state, Vobject *requester, const std::string &oldname, const std::string &newname)
- virtual void post_addType (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, const std::string &s)
- virtual void post_removeType (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, const std::string &s)
- virtual void post_insertChild (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, int position, const std::string &contextual_name, Vobject *child)
- virtual void post_setChild (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, int position, const std::string &contextual_name, Vobject *child, const std::string &oldcontextual_name, Vobject *oldchild)
- virtual void post_removeChild (VobjectState &state, boost::recursive_mutex::scoped_lock &state_lock, Vobject *requester, ParentChildRelation *pcr, bool strict)
- virtual void post_addToACL (AccessControlState *acs, Vobject *requester, const std::string &ACLname, Vobject *id, const std::string &oldACLname)
- virtual void post_removeFromACL (AccessControlState *acs, Vobject *requester, const std::string &ACLname, Vobject *id)
- virtual void post_deleteACL (AccessControlState *acs, Vobject *requester, const std::string &policies, AccessControlList *oldacl)
- virtual void post_setDefaultPolicy (AccessControlState *acs, Vobject *requester, const std::string &policy, const std::string &oldpolicy)
- virtual void beginTransaction ()
- Indicate that you want the blocks saved between this call and endTransaction() to be be atomically committed or not at all.
- Indicate that you want the blocks saved between this call and endTransaction() to be be atomically committed or not at all.
- virtual void endTransaction ()
- Commit any blocks saved since the last call to beginTransaction().
- Commit any blocks saved since the last call to beginTransaction().
- virtual bool storeBlock (Vobject *from, const std::string &key, const std::string &data)
- virtual bool getBlock (Vobject *from, const std::string &key, std::string &data)
- virtual bool blockExists (Vobject *from, const std::string &key)
- virtual bool removeBlock (Vobject *from, const std::string &key)
- virtual bool isLoadingDB ()
Constructor & Destructor Documentation
| VOS::SQLPersistance::SQLPersistance | ( | SQLDatabase * | db, | |
| const char * | dbname | |||
| ) |
Member Function Documentation
| virtual void VOS::SQLPersistance::beginTransaction | ( | ) | [virtual] |
Indicate that you want the blocks saved between this call and endTransaction() to be be atomically committed or not at all.
Not actually implemented with all persistance extensions!
Reimplemented from VOS::Persistance.
| virtual bool VOS::SQLPersistance::blockExists | ( | Vobject * | from, | |
| const std::string & | key | |||
| ) | [virtual] |
Test for the existance of a block.
- Parameters:
-
from the Vobject associated with this data key a key used to retrieve this data
- Returns:
- true if key was found, false if not
Implements VOS::Persistance.
| virtual void VOS::SQLPersistance::destroy | ( | ) | [inline, virtual] |
Destry this extension.
By default will do "delete this" but can be overridden if that's not what you want (such as if the extension is shared among several Vobjects.)
Reimplemented from VOS::VobjectExtension.
Definition at line 54 of file sqlpersist.hh.
| virtual void VOS::SQLPersistance::endTransaction | ( | ) | [virtual] |
Commit any blocks saved since the last call to beginTransaction().
Not actually implementsed with all persistance extensions!
Reimplemented from VOS::Persistance.
| virtual bool VOS::SQLPersistance::getBlock | ( | Vobject * | from, | |
| const std::string & | key, | |||
| std::string & | data | |||
| ) | [virtual] |
Retrieve a block to the persistance layer.
- Parameters:
-
from the Vobject associated with this data key a key used to retrieve this data data the data will be stored in this string
- Returns:
- true if key was found and data retrieved, false if not
Implements VOS::Persistance.
| virtual bool VOS::SQLPersistance::isLoadingDB | ( | ) | [inline, virtual] |
- Returns:
- True if the persistance database is currently being loaded; generally during application startup. Code which saves blocks to the database in response to changes should check this flag to ensure that it does not try and save a blocks that was just read in from the database!
Implements VOS::Persistance.
Definition at line 89 of file sqlpersist.hh.
| virtual void VOS::SQLPersistance::post_addToACL | ( | AccessControlState * | acs, | |
| Vobject * | requester, | |||
| const std::string & | ACLname, | |||
| Vobject * | id, | |||
| const std::string & | oldACLname | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual void VOS::SQLPersistance::post_addType | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| const std::string & | s | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual void VOS::SQLPersistance::post_createVobject | ( | VobjectState & | state, | |
| Vobject * | requester, | |||
| VobjectBase * | newvobject | |||
| ) | [virtual] |
Reimplemented from VOS::SiteExtension.
| virtual void VOS::SQLPersistance::post_deleteACL | ( | AccessControlState * | acs, | |
| Vobject * | requester, | |||
| const std::string & | policies, | |||
| AccessControlList * | oldacl | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual void VOS::SQLPersistance::post_insertChild | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| int | position, | |||
| const std::string & | contextual_name, | |||
| Vobject * | child | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual void VOS::SQLPersistance::post_removeChild | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| ParentChildRelation * | pcr, | |||
| bool | strict | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual void VOS::SQLPersistance::post_removeFromACL | ( | AccessControlState * | acs, | |
| Vobject * | requester, | |||
| const std::string & | ACLname, | |||
| Vobject * | id | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual void VOS::SQLPersistance::post_removeType | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| const std::string & | s | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual void VOS::SQLPersistance::post_renameVobject | ( | VobjectState & | state, | |
| Vobject * | requester, | |||
| const std::string & | oldname, | |||
| const std::string & | newname | |||
| ) | [virtual] |
Reimplemented from VOS::SiteExtension.
| virtual void VOS::SQLPersistance::post_setChild | ( | VobjectState & | state, | |
| boost::recursive_mutex::scoped_lock & | state_lock, | |||
| Vobject * | requester, | |||
| int | position, | |||
| const std::string & | contextual_name, | |||
| Vobject * | child, | |||
| const std::string & | oldcontextual_name, | |||
| Vobject * | oldchild | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual void VOS::SQLPersistance::post_setDefaultPolicy | ( | AccessControlState * | acs, | |
| Vobject * | requester, | |||
| const std::string & | policy, | |||
| const std::string & | oldpolicy | |||
| ) | [virtual] |
Reimplemented from VOS::VobjectExtension.
| virtual bool VOS::SQLPersistance::removeBlock | ( | Vobject * | from, | |
| const std::string & | key | |||
| ) | [virtual] |
Delete a block from the persistance layer.
- Parameters:
-
from the Vobject associated with this data key a key used to retrieve this data
- Returns:
- true if key was found and deleted, false if not
Implements VOS::Persistance.
| virtual void VOS::SQLPersistance::siteExtensionAttachedTo | ( | Site * | vb | ) | [virtual] |
Reimplemented from VOS::SiteExtension.
| virtual bool VOS::SQLPersistance::storeBlock | ( | Vobject * | from, | |
| const std::string & | key, | |||
| const std::string & | data | |||
| ) | [virtual] |
Implements VOS::Persistance.
| virtual void VOS::SQLPersistance::wipeDatabase | ( | ) | [virtual] |
The documentation for this class was generated from the following file:
- /home/tetron/hack/vos/libs/vos/extensions/sqlpersist/sqlpersist.hh