00001
00002
00003
00004
00005 #ifndef __DBASE_HPP__ // Is it defined already !?
00006 #define __DBASE_HPP__
00007
00008 #include "../Const.hpp"
00009
00010 class DBase {
00011 public:
00012 DBase();
00013
00014 DBase( int pos );
00015 DBase( DBase& db);
00016
00017 DBase& operator= (DBase& db);
00018
00019 virtual ~DBase() { };
00020
00021 const bool operator== (DBase& db);
00022 const bool operator!= (DBase& db);
00023
00024 const char* string() const;
00025
00026
00027 inline void DBase::display() const
00028 {
00029 cout << string() << endl;
00030 }
00031
00032 inline friend ostream& operator<<(ostream& os, DBase& db) {
00033 return os << db.string();
00034 }
00035
00036 inline int pos() const {
00037 return _pos;
00038 }
00039
00040 inline int valid() const {
00041 return ( _pos >= 0 );
00042 }
00043
00044
00045 private:
00046 int _pos;
00047 };
00048
00049 #endif // __DBASE_HPP__