GlobalObjects
Loading...
Searching...
No Matches
GloTableInterface.h
Go to the documentation of this file.
1#ifndef INC_GLOTABLEINTERFACE_H
2#define INC_GLOTABLEINTERFACE_H
3//-----------------------------------------------------------------------------
43//-----------------------------------------------------------------------------
44#include <string>
45#include <fstream>
46#include <unordered_map>
47#include "GloTypes.h"
48//-----------------------------------------------------------------------------
49namespace glo
50{
51 //---------------------------------------------------------------------------
52 /* Forwards */
53 class SchemaInterface;
54 class RealIndexPool;
55 class ObjIDRecordAttribute;
56 class BaseRecordAttribute;
57 //---------------------------------------------------------------------------
58 #ifdef _MSC_VER
59 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
60 #pragma warning( disable : 4251 )
61 #endif
62 //---------------------------------------------------------------------------
94 {
95
96 protected:
97 //-----------------------------------------------------------------------
98 // >>>>>>>>>>>>>>>>>>>>> TableInterfaceTable >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
99 //-----------------------------------------------------------------------
113 {
114 private:
115 //============== Attribute
116 //---------------------------------------------------------------------
126 std::fstream * m_pTabelle;
127 //---------------------------------------------------------------------
137 std::string m_sTableName;
138 //---------------------------------------------------------------------
148 std::ios_base::openmode m_OpenMode;
149 //---------------------------------------------------------------------
167 //---------------------------------------------------------------------
168
169 //============== Konstruktoren
170 //---------------------------------------------------------------------
181 //---------------------------------------------------------------------
182
183 public:
184 //============== Konstruktoren
185 //---------------------------------------------------------------------
201 TableInterfaceTable( std::fstream * pTable,
202 const std::string & m_sTableName,
203 std::ios_base::openmode OpenMode );
204 //---------------------------------------------------------------------
215 //---------------------------------------------------------------------
216
217 private:
218 //============== Konstruktoren
219 //---------------------------------------------------------------------
230 //---------------------------------------------------------------------
231
232 public:
233 //============== Methoden
234 //---------------------------------------------------------------------
246 std::fstream * getTable() const;
247 //---------------------------------------------------------------------
259 std::ios_base::openmode getOpenMode() const;
260 //---------------------------------------------------------------------
272 std::string getTableName() const;
273 //---------------------------------------------------------------------
286 //---------------------------------------------------------------------
297 //---------------------------------------------------------------------
308 //---------------------------------------------------------------------
309
310 private:
311 //---------------------------------------------------------------------
322 //---------------------------------------------------------------------
323 };
324 //-----------------------------------------------------------------------
325 // <<<<<<<<<<<<<<<<<<<<<< TableInterfaceTable <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
326 //-----------------------------------------------------------------------
327
328 //============== Attribute
329 //-----------------------------------------------------------------------
339 std::unordered_map< std::string, TableInterfaceTable * > m_OpenTableMap;
340 //-----------------------------------------------------------------------
351 //-----------------------------------------------------------------------
363 //-----------------------------------------------------------------------
364
365 protected:
366 //============== Konstruktoren
367 //-----------------------------------------------------------------------
378 //-----------------------------------------------------------------------
379
380 public:
381 //============== De- und Konstruktoren
382 //-----------------------------------------------------------------------
399 RealIndexPool * pRealIndexPool);
400 //-----------------------------------------------------------------------
412 //-----------------------------------------------------------------------
413
414 private:
415 //============== Konstruktoren
416 //-----------------------------------------------------------------------
427 //-----------------------------------------------------------------------
428
429 public:
430 //============== Methoden
431 //-----------------------------------------------------------------------
447 virtual int openTable( const std::string & sTableName ) = 0;
448 //-----------------------------------------------------------------------
462 virtual int closeTable( const std::string & sTable );
463 //-----------------------------------------------------------------------
480 //-----------------------------------------------------------------------
493 std::string getSchemaPath() const;
494 //-----------------------------------------------------------------------
511 std::string getDataPath() const;
512 //-----------------------------------------------------------------------
535 const std::string & sTable,
536 const ObjID & rObjID );
537 //-----------------------------------------------------------------------
556 int objIDInBase( bool & rPresent, const ObjID & rObjID ) const;
557 //-----------------------------------------------------------------------
558
559 protected:
560 //============== Methoden
561 //-----------------------------------------------------------------------
594 int openFile( std::fstream *& prFStream,
595 const std::string & sFullFileName,
596 std::ios_base::openmode OpenMode );
597 //-----------------------------------------------------------------------
598
599 private:
600 //============== Methoden
601 //-----------------------------------------------------------------------
620 TableInterface::TableInterfaceTable * getTable( const std::string & m_sTableName );
621 //-----------------------------------------------------------------------
626 //-----------------------------------------------------------------------
627
628 private:
629 //============== Operatoren
630 //-----------------------------------------------------------------------
640 TableInterface & operator= ( const TableInterface & );
641 //-----------------------------------------------------------------------
642 };
643 //---------------------------------------------------------------------------
644 #ifdef _MSC_VER
645 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
646 #pragma warning( default : 4251 )
647 #endif
648 //---------------------------------------------------------------------------
649} // namespace glo
650#endif
For each library, here 'GlobalObjects' there is a type file.
#define __glo_export_dll
Definition GloTypes.h:70
An object ID consists of the class ID, a database ID and the actual unique object number (all unsigne...
Definition GloObjID.h:84
A class for the object ID attributes of a Record. Represents an attribute of type 'ObjID'.
Definition GloObjIDRecordAttribute.h:68
The real index as opposed to the TransactionIndexPool, which is created for each transaction
Definition GloRealIndexPool.h:69
This class is the interface to a GlobalObjects schema. It contains all class information to store obj...
Definition GloSchemaInterface.h:91
A file (std::fstream) and its name.
Definition GloTableInterface.h:113
std::ios_base::openmode getOpenMode() const
std::ios_base::openmode m_OpenMode
Definition GloTableInterface.h:148
std::string m_sTableName
Definition GloTableInterface.h:137
int m_iOpenCounter
Definition GloTableInterface.h:166
std::fstream * m_pTabelle
Definition GloTableInterface.h:126
TableInterfaceTable(const TableInterfaceTable &)
TableInterfaceTable(std::fstream *pTable, const std::string &m_sTableName, std::ios_base::openmode OpenMode)
An object of this class or subclass accesses tables and reads or writes data records (Record) and bin...
Definition GloTableInterface.h:94
virtual ~TableInterface()
int getObjIDRecordAttribute(ObjIDRecordAttribute *&prRetVal, const std::string &sTable, const ObjID &rObjID)
std::string getDataPath() const
int openFile(std::fstream *&prFStream, const std::string &sFullFileName, std::ios_base::openmode OpenMode)
virtual int closeTable(const std::string &sTable)
int objIDInBase(bool &rPresent, const ObjID &rObjID) const
RealIndexPool * m_pRealIndexPool
Definition GloTableInterface.h:362
SchemaInterface * m_pSchema
Definition GloTableInterface.h:350
TableInterface(const SchemaInterface &rScheme, RealIndexPool *pRealIndexPool)
TableInterface(const TableInterface &)
SchemaInterface & getSchemaInterface()
std::string getSchemaPath() const
virtual int openTable(const std::string &sTableName)=0
std::unordered_map< std::string, TableInterfaceTable * > m_OpenTableMap
Definition GloTableInterface.h:339
TableInterface::TableInterfaceTable * getTable(const std::string &m_sTableName)
Definition GloAbstractBaseLot.h:49