CatalogEntry.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (C) 2003-2006 Rational Discovery LLC
00003 //
00004 //  @@ All Rights Reserved @@
00005 //
00006 #ifndef __RD_CATALOGENTRY_H__
00007 #define __RD_CATALOGENTRY_H__
00008 
00009 #include <iostream>
00010 #include <string>
00011 
00012 namespace RDCatalog {
00013   
00014   //! Abstract base class to be used to represent an entry in a Catalog
00015   class CatalogEntry {
00016   public:
00017     virtual ~CatalogEntry() = 0;
00018 
00019     //! sets our bit Id
00020     void setBitId(int bid) {d_bitId = bid;}; 
00021 
00022     //! returns our bit Id
00023     int getBitId() const {return d_bitId;};
00024 
00025     //! returns a text description of this entry
00026     virtual std::string getDescription() const = 0;
00027 
00028     //! serializes (pickles) to a stream
00029     virtual void toStream(std::ostream &ss) const = 0;
00030     //! returns a string with a serialized (pickled) representation
00031     virtual std::string Serialize() const = 0;
00032     //! initializes from a stream pickle
00033     virtual void initFromStream(std::istream &ss) = 0;
00034     //! initializes from a string pickle
00035     virtual void initFromString(const std::string &text) = 0;
00036 
00037 
00038     
00039   private:
00040     int d_bitId; //!< our bit Id. This needs to be signed so that we can mark uninitialized entries.
00041   };
00042 }
00043 
00044 #endif
00045     

Generated on Fri Apr 3 06:03:01 2009 for RDCode by  doxygen 1.5.6