OpenCog Framework  Branch: master, revision 6f0b7fc776b08468cf1b74aa9db028f387b4f0c0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
opencog::SQLBackingStore Class Reference
+ Inheritance diagram for opencog::SQLBackingStore:
+ Collaboration diagram for opencog::SQLBackingStore:

Public Member Functions

 SQLBackingStore ()
 
void set_store (AtomStorage *)
 
virtual NodePtr getNode (Type, const char *) const
 
virtual LinkPtr getLink (Type, const HandleSeq &) const
 
virtual AtomPtr getAtom (Handle) const
 
virtual HandleSeq getIncomingSet (Handle) const
 
virtual void storeAtom (Handle)
 
virtual void loadType (AtomTable &, Type)
 
virtual void barrier ()
 
- Public Member Functions inherited from opencog::BackingStore
virtual ~BackingStore ()
 
virtual bool ignoreType (Type t) const
 
virtual bool ignoreAtom (Handle) const
 

Private Attributes

AtomStorage_store
 

Additional Inherited Members

- Public Attributes inherited from opencog::BackingStore
std::set< Type_ignored_types
 

Detailed Description

Definition at line 34 of file SQLPersistSCM.cc.

Constructor & Destructor Documentation

SQLBackingStore::SQLBackingStore ( )

Definition at line 52 of file SQLPersistSCM.cc.

References _store.

Member Function Documentation

void SQLBackingStore::barrier ( )
virtual

Read-write synchronization barrier. All writes will be completed before this routine returns. This allows the backend to implement asynchronous writes, while still providing some control to those who need it. (Mostly the unit tests, at this time.)

Implements opencog::BackingStore.

Definition at line 92 of file SQLPersistSCM.cc.

References _store, and opencog::AtomStorage::flushStoreQueue().

AtomPtr SQLBackingStore::getAtom ( Handle  ) const
virtual

Return a pointer to an Atom associated with the given handle, if it exists; else return NULL.

Implements opencog::BackingStore.

Definition at line 72 of file SQLPersistSCM.cc.

References _store, and opencog::AtomStorage::getAtom().

HandleSeq SQLBackingStore::getIncomingSet ( Handle  ) const
virtual

Return a vector containing the handles of the entire incoming set of the indicated handle.

Implements opencog::BackingStore.

Definition at line 77 of file SQLPersistSCM.cc.

References _store, and opencog::AtomStorage::getIncomingSet().

LinkPtr SQLBackingStore::getLink ( Type  ,
const HandleSeq  
) const
virtual

Return a pointer to a link of the indicated type and outset, if it exists; else return NULL.

Implements opencog::BackingStore.

Definition at line 67 of file SQLPersistSCM.cc.

References _store, and opencog::AtomStorage::getLink().

NodePtr SQLBackingStore::getNode ( Type  ,
const char *   
) const
virtual

Return a pointer to a node of the indicated type and name, if it exists; else return NULL.

Implements opencog::BackingStore.

Definition at line 62 of file SQLPersistSCM.cc.

References _store, and opencog::AtomStorage::getNode().

void SQLBackingStore::loadType ( AtomTable ,
Type   
)
virtual

Load all atoms of the given type, but only if they are not already in the AtomTable. (This avoids truth value merges between truth values stored in the backend, and truth values in the atomspace.)

Implements opencog::BackingStore.

Definition at line 87 of file SQLPersistSCM.cc.

References _store, and opencog::AtomStorage::loadType().

void SQLBackingStore::set_store ( AtomStorage as)

Definition at line 57 of file SQLPersistSCM.cc.

References _store.

+ Here is the caller graph for this function:

void SQLBackingStore::storeAtom ( Handle  )
virtual

Recursively store the atom and anything in it's outgoing set. If the atom is already in storage, this will update it's truth value, etc.

Implements opencog::BackingStore.

Definition at line 82 of file SQLPersistSCM.cc.

References _store, and opencog::AtomStorage::storeAtom().

Member Data Documentation

AtomStorage* opencog::SQLBackingStore::_store
private

Definition at line 37 of file SQLPersistSCM.cc.


The documentation for this class was generated from the following file: