CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Version.h
Go to the documentation of this file.
1 #ifndef INCLUDE_ORA_VERSION_H
2 #define INCLUDE_ORA_VERSION_H
3 
4 //
5 #include <string>
6 
7 namespace ora {
8 
9  class Version {
10  public:
11 
12  static const Version& poolSchemaVersion();
13  static const Version& thisSchemaVersion();
14  static Version fromString( const std::string& versionString );
15 
16  public:
17  Version();
18  Version( const std::string& label, int id );
20  }
21  Version( const Version& rhs );
22  Version& operator=( const Version& rhs );
23 
24  bool operator==( const Version& rhs ) const;
25  bool operator!=( const Version& rhs ) const;
26  bool operator>( const Version& rhs ) const;
27  bool operator<( const Version& rhs ) const;
28  bool operator>=( const Version& rhs ) const;
29  bool operator<=( const Version& rhs ) const;
30 
31  std::string toString() const;
32  void toOutputStream( std::ostream& os ) const;
33 
34  private:
36  int m_main;
37  int m_release;
38  int m_patch;
39  };
40 
41 }
42 inline std::ostream& operator << (std::ostream& os, const ora::Version& ver ){
43  ver.toOutputStream(os);
44  return os;
45 }
46 
47 #endif
int m_release
Definition: Version.h:37
static Version fromString(const std::string &versionString)
Definition: Version.cc:21
static const Version & thisSchemaVersion()
Definition: Version.cc:16
Version & operator=(const Version &rhs)
Definition: Version.cc:52
int m_main
Definition: Version.h:36
bool operator>(const Version &rhs) const
Definition: Version.cc:68
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:188
void toOutputStream(std::ostream &os) const
Definition: Version.cc:116
bool operator<(const Version &rhs) const
Definition: Version.cc:79
std::string m_label
Definition: Version.h:35
bool operator!=(const Version &rhs) const
Definition: Version.cc:64
bool operator<=(const Version &rhs) const
Definition: Version.cc:101
static const Version & poolSchemaVersion()
Definition: Version.cc:11
bool operator==(const Version &rhs) const
Definition: Version.cc:60
int m_patch
Definition: Version.h:38
bool operator>=(const Version &rhs) const
Definition: Version.cc:90
std::string toString() const
Definition: Version.cc:112