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

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

Go to the documentation of this file.
00001 // DBase.hpp - DBase Class Interface
00002 // Define all the component ID, Name and telephone informations
00003 // as String class type to ease thier manipulations.
00004 
00005 #ifndef __J2K__DBASE_HPP__           // Is it defined already !?
00006 #define __J2K__DBASE_HPP__
00007 
00008 
00009 #include "Const.hpp"       // All the constants
00010 #include <j2k/String/String.cpp>
00011 #define  String JString    
00012 // My own personnal String class
00013 
00014 class DBase {
00015 public:
00016   DBase();                     // Default Constructor
00017   DBase(const char* cmd);      // Command decoder constructor
00018 
00019   DBase(const char* id, const char* name, const char* tel );
00020   DBase(String& id, String& name, String& tel);
00021 
00022   DBase(DBase&  db);           // Copy Constructor
00023   DBase&    operator=  (DBase& db);
00024 
00025   const bool operator== (DBase& db);
00026   const bool operator!= (DBase& db);
00027   const bool operator<  (DBase& db);
00028   const bool operator>  (DBase& db);
00029 
00030   const bool  CompareID (DBase& db);
00031   const char* string() const;
00032   const bool  valid()  const;
00033 
00034 // Display the DBase content on the Screen.
00035 inline void DBase::display() const {
00036   cout << string() << endl;
00037 }
00038 
00039 inline friend ostream& operator<<(ostream& os, DBase& db) { 
00040    return os << db.string() << endl;
00041 }
00042 
00043 // *** IMPORTANT NOTICE ***
00044 // Instead of using a struct definition,
00045 // since all the embed features are handled by the String class
00046 // and it would be a waste of time and space for nothing
00047 // to put them private in this rare specific case,
00048 // so it's more convenient to put them public.
00049 
00050    String* _id;
00051    String* _name;
00052    String* _tel;
00053 };
00054 
00055 #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