GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloTableInterface.h
gehe zur Dokumentation dieser Datei
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
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:70
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:84
Eine Klasse für die Objekt-ID-Attribute eines Record. Repräsentiert ein Attribut vom Typ 'ObjID'.
Definition GloObjIDRecordAttribute.h:68
Der reale Index im Gegensatz zum TransactionIndexPool, welcher für jede Transaktion erstellt wird.
Definition GloRealIndexPool.h:69
Diese Klasse ist die Schnittstelle zu einem GlobalObjects-Schema. Sie beinhaltet alle Klasseninformat...
Definition GloSchemaInterface.h:91
Eine Datei (std::fstream) und deren Bezeichnung.
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)
Ein Objekt dieser Klasse bzw. der Unterklasse greift auf Tabellen zu und liest bzw....
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