CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_6_2_7/src/CondCore/ORA/interface/Version.h

Go to the documentation of this file.
00001 #ifndef INCLUDE_ORA_VERSION_H
00002 #define INCLUDE_ORA_VERSION_H
00003 
00004 //
00005 #include <string>
00006 
00007 namespace ora {
00008 
00009   class Version {
00010   public:
00011    
00012     static Version& poolSchemaVersion();
00013     static Version& thisSchemaVersion();
00014     static Version fromString( const std::string& versionString );
00015 
00016     public:
00017     Version();
00018     ~Version(){
00019     }
00020     Version( const Version& rhs );
00021     Version& operator=( const Version& rhs );
00022 
00023     bool operator==( const Version& rhs ) const;
00024     bool operator!=( const Version& rhs ) const;
00025     bool operator>( const Version& rhs ) const;
00026     bool operator<( const Version& rhs ) const;
00027     bool operator>=( const Version& rhs ) const;
00028     bool operator<=( const Version& rhs ) const;
00029 
00030     std::string toString() const;
00031     void toOutputStream( std::ostream& os ) const;    
00032     
00033   private:
00034     std::string m_label;
00035     int m_main;
00036     int m_release;
00037     int m_patch;
00038   };
00039 
00040 }
00041 inline std::ostream& operator << (std::ostream& os, const ora::Version& ver ){
00042   ver.toOutputStream(os);
00043   return os;
00044 }
00045 
00046 #endif