GlobalObjects
Lade ...
Suche ...
Keine Treffer
GloTableInterface.h
gehe zur Dokumentation dieser Datei
1#ifndef INC_GLOTABLEINTERFACE_H
2#define INC_GLOTABLEINTERFACE_H
3//-----------------------------------------------------------------------------
36//-----------------------------------------------------------------------------
37#include <string>
38#include <fstream>
39#include <map>
40#include "GloTypes.h"
41//-----------------------------------------------------------------------------
42namespace glo
43{
44 //---------------------------------------------------------------------------
45 /* Forwards */
46 class SchemaInterface;
47 class RealIndexPool;
48 class ObjIDRecordAttribute;
49 class BaseRecordAttribute;
50 //---------------------------------------------------------------------------
51 #ifdef _MSC_VER
52 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
53 #pragma warning( disable : 4251 )
54 #endif
55 //---------------------------------------------------------------------------
87 {
88
89 protected:
90 //-----------------------------------------------------------------------
91 // >>>>>>>>>>>>>>>>>>>>> TableInterfaceTable >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
92 //-----------------------------------------------------------------------
106 {
107 private:
108 //============== Attribute
109 //---------------------------------------------------------------------
119 std::fstream * m_pTabelle;
120 //---------------------------------------------------------------------
130 std::string m_sTableName;
131 //---------------------------------------------------------------------
141 std::ios_base::openmode m_OpenMode;
142 //---------------------------------------------------------------------
160 //---------------------------------------------------------------------
161
162 //============== Konstruktoren
163 //---------------------------------------------------------------------
174 //---------------------------------------------------------------------
175
176 public:
177 //============== Konstruktoren
178 //---------------------------------------------------------------------
194 TableInterfaceTable( std::fstream * pTable,
195 const std::string & m_sTableName,
196 std::ios_base::openmode OpenMode );
197 //---------------------------------------------------------------------
208 //---------------------------------------------------------------------
209
210 private:
211 //============== Konstruktoren
212 //---------------------------------------------------------------------
223 //---------------------------------------------------------------------
224
225 public:
226 //============== Methoden
227 //---------------------------------------------------------------------
239 std::fstream * getTable() const;
240 //---------------------------------------------------------------------
252 std::ios_base::openmode getOpenMode() const;
253 //---------------------------------------------------------------------
265 std::string getTableName() const;
266 //---------------------------------------------------------------------
279 //---------------------------------------------------------------------
290 //---------------------------------------------------------------------
301 //---------------------------------------------------------------------
302
303 private:
304 //---------------------------------------------------------------------
315 //---------------------------------------------------------------------
316 };
317 //-----------------------------------------------------------------------
318 // <<<<<<<<<<<<<<<<<<<<<< TableInterfaceTable <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
319 //-----------------------------------------------------------------------
320
321 //============== Attribute
322 //-----------------------------------------------------------------------
332 std::map< std::string, TableInterfaceTable *, std::less<std::string> > m_OpenTableMap;
333 //-----------------------------------------------------------------------
344 //-----------------------------------------------------------------------
356 //-----------------------------------------------------------------------
357
358 protected:
359 //============== Konstruktoren
360 //-----------------------------------------------------------------------
371 //-----------------------------------------------------------------------
372
373 public:
374 //============== De- und Konstruktoren
375 //-----------------------------------------------------------------------
392 RealIndexPool * pRealIndexPool);
393 //-----------------------------------------------------------------------
405 //-----------------------------------------------------------------------
406
407 private:
408 //============== Konstruktoren
409 //-----------------------------------------------------------------------
420 //-----------------------------------------------------------------------
421
422 public:
423 //============== Methoden
424 //-----------------------------------------------------------------------
440 virtual int openTable( const std::string & sTableName ) = 0;
441 //-----------------------------------------------------------------------
455 virtual int closeTable( const std::string & sTable );
456 //-----------------------------------------------------------------------
473 //-----------------------------------------------------------------------
486 std::string getSchemaPath() const;
487 //-----------------------------------------------------------------------
504 std::string getDataPath() const;
505 //-----------------------------------------------------------------------
528 const std::string & sTable,
529 const ObjID & rObjID );
530 //-----------------------------------------------------------------------
549 int objIDInBase( bool & rPresent, const ObjID & rObjID ) const;
550 //-----------------------------------------------------------------------
551
552 protected:
553 //============== Methoden
554 //-----------------------------------------------------------------------
587 int openFile( std::fstream *& prFStream,
588 const std::string & sFullFileName,
589 std::ios_base::openmode OpenMode );
590 //-----------------------------------------------------------------------
591
592 private:
593 //============== Methoden
594 //-----------------------------------------------------------------------
613 TableInterface::TableInterfaceTable * getTable( const std::string & m_sTableName );
614 //-----------------------------------------------------------------------
619 //-----------------------------------------------------------------------
620
621 private:
622 //============== Operatoren
623 //-----------------------------------------------------------------------
633 TableInterface & operator= ( const TableInterface & );
634 //-----------------------------------------------------------------------
635 };
636 //---------------------------------------------------------------------------
637 #ifdef _MSC_VER
638 /* 'Bezeichner': Klasse 'Typ' benötigt eine DLL-Schnittstelle, die von... */
639 #pragma warning( default : 4251 )
640 #endif
641 //---------------------------------------------------------------------------
642} // namespace glo
643#endif
Für jede Bibliothek, hier 'GlobalObjects' gibt es eine Typen-Datei.
#define __glo_export_dll
Definition GloTypes.h:63
Ein Objekt-ID besteht aus der Klassen-ID, einer Datenbank-ID und der eigentlichen eindeutigen ObjektZ...
Definition GloObjID.h:77
Eine Klasse für die Objekt-ID-Attribute eines Record. Repräsentiert ein Attribut vom Typ 'ObjID'.
Definition GloObjIDRecordAttribute.h:61
Der reale Index im Gegensatz zum TransactionIndexPool, welcher für jede Transaktion erstellt wird.
Definition GloIndexPool.h:5151
Diese Klasse ist die Schnittstelle zu einem GlobalObjects-Schema. Sie beinhaltet alle Klasseninformat...
Definition GloSchemaInterface.h:84
Eine Datei (std::fstream) und deren Bezeichnung.
Definition GloTableInterface.h:106
std::ios_base::openmode getOpenMode() const
std::ios_base::openmode m_OpenMode
Definition GloTableInterface.h:141
std::string m_sTableName
Definition GloTableInterface.h:130
int m_iOpenCounter
Definition GloTableInterface.h:159
std::fstream * m_pTabelle
Definition GloTableInterface.h:119
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:87
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)
std::map< std::string, TableInterfaceTable *, std::less< std::string > > m_OpenTableMap
Definition GloTableInterface.h:332
int objIDInBase(bool &rPresent, const ObjID &rObjID) const
RealIndexPool * m_pRealIndexPool
Definition GloTableInterface.h:355
SchemaInterface * m_pSchema
Definition GloTableInterface.h:343
TableInterface(const SchemaInterface &rScheme, RealIndexPool *pRealIndexPool)
TableInterface(const TableInterface &)
SchemaInterface & getSchemaInterface()
std::string getSchemaPath() const
virtual int openTable(const std::string &sTableName)=0
TableInterface::TableInterfaceTable * getTable(const std::string &m_sTableName)
Definition GloAbstractBaseLot.h:42