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

C:/temp/src/j2k/DataType/Parenth.Frd/DBase.hpp

Go to the documentation of this file.
00001 // DBase.hpp - DBase Class Interface
00002 // Define a data class for the String expression 
00003 // and the current location of the char.
00004 
00005 #ifndef __DBASE_HPP__               // Is it defined already !?
00006 #define __DBASE_HPP__
00007 
00008 #include "../Const.hpp"             // All the constants
00009 
00010 class DBase {
00011 public:
00012       DBase();                // Default Constructor
00013 
00014       DBase( int pos );          // Primary Constructor
00015       DBase( DBase&  db);           // Copy Constructor
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 // Inline optimization
00027 inline void DBase::display() const      // Display the DBase content
00028 {                                       // on the Screen.
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;     // Position of the current char
00047 };
00048 
00049 #endif  // __DBASE_HPP__

Generated on Sun Oct 14 18:46:17 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001