Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

AIDA_MemoryStore.h

Go to the documentation of this file.
00001 // Emacs -*- C++ -*-
00002 #ifndef ANAPHE_MEMORYSTORE
00003 #define ANAPHE_MEMORYSTORE 1
00004 
00005 #include <vector>
00006 #include <string>
00007 #include <map>
00008 #include "AIDA_Dev/IStore.h"
00009 #include "AIDA_Dev/IBackingStore.h"
00010 
00011 // type ahead declarations 
00012 namespace AIDA {
00013   class IManagedObject;
00014   class ITuple;
00015 }
00016 
00017 namespace Anaphe {
00018   namespace AIDA_MemoryStore {
00019     class MemoryBackingStore;
00020 
00022 
00023 class AIDA_StoreMemory : virtual public AIDA::Dev::IStore,
00024                          virtual public AIDA::Dev::IBackingStore
00025 {
00026 public:
00028   AIDA_StoreMemory( const std::string& name );
00030   ~AIDA_StoreMemory();
00031 
00033   const std::string& name() const;
00034   bool writeObject( const AIDA::IManagedObject& dataObject,
00035                     const std::string& path );
00036   AIDA::IManagedObject* copyAndWrite( const AIDA::IManagedObject& dataObject,
00037                                       const std::string& path );
00038   AIDA::IManagedObject* retrieveObject( const std::string & path );
00039   bool removeObject( const std::string& path );
00040   bool moveObject(const std::string& from, const std::string& to );
00041   bool commit();
00042   bool close();
00043   std::vector< std::string > listObjectPaths( const std::string directory,
00044                                               bool recursive = false ) const;
00045   std::vector< std::string > listObjectTypes( const std::string directory,
00046                                               bool recursive = false ) const;
00047   bool canMoveTuples() const;
00048   bool canCopyTuples() const;
00049 
00051   bool writeTupleHeader( AIDA::Dev::ITupleHeader& header );
00052   bool readTupleHeader( AIDA::Dev::ITupleHeader& header );
00053   bool bindVariable( AIDA::Dev::ITupleHeader& header, int variableIndex );
00054   void* variableAddress( AIDA::Dev::ITupleHeader& header, int variableIndex );
00055   const void* variableAddress( const AIDA::Dev::ITupleHeader& header, int variableIndex ) const;
00056   bool clearBindings( const AIDA::Dev::ITupleHeader& header );
00057   bool writeTupleRow( AIDA::Dev::ITupleHeader& header );
00058   bool readTupleRow( AIDA::Dev::ITupleHeader& header );  
00059   bool resetTuple( AIDA::Dev::ITupleHeader& header );
00060 
00061 private:
00062   std::string m_name;
00063   std::map< std::string, std::string > m_objectTypes;
00064   MemoryBackingStore*                  m_backingStore;
00065 };
00066 
00067   }
00068 }
00069 
00070 #endif /* ifndef ANAPHE_MEMORYSTORE */

Generated on Tue May 20 14:49:33 2003 for AIDA_MemoryStore by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002