interreality.org [VOS]
[Home] [About]
[Screenshots]
[Download]
[News]
[Community]
[Documentation] [Manual]
[Bugs & Requests] [Wiki]

VOS::SQLPersistance Class Reference

#include <sqlpersist.hh>

Inheritance diagram for VOS::SQLPersistance:

VOS::VobjectExtension VOS::SiteExtension VOS::Persistance VOS::Dispatchable VOS::Dispatchable List of all members.

Detailed Description

Definition at line 39 of file sqlpersist.hh.

Public Member Functions


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: