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 Version& poolSchemaVersion();
13  static Version& thisSchemaVersion();
14  static Version fromString( const std::string& versionString );
15 
16  public:
17  Version();
19  }
20  Version( const Version& rhs );
21  Version& operator=( const Version& rhs );
22 
23  bool operator==( const Version& rhs ) const;
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 
30  std::string toString() const;
31  void toOutputStream( std::ostream& os ) const;
32 
33  private:
34  std::string m_label;
35  int m_main;
36  int m_release;
37  int m_patch;
38  };
39 
40 }
41 inline std::ostream& operator << (std::ostream& os, const ora::Version& ver ){
42  ver.toOutputStream(os);
43  return os;
44 }
45 
46 #endif
int m_release
Definition: Version.h:36
static Version fromString(const std::string &versionString)
Definition: Version.cc:24
Version & operator=(const Version &rhs)
Definition: Version.cc:48
int m_main
Definition: Version.h:35
bool operator>(const Version &rhs) const
Definition: Version.cc:64
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
void toOutputStream(std::ostream &os) const
Definition: Version.cc:112
bool operator<(const Version &rhs) const
Definition: Version.cc:75
std::string m_label
Definition: Version.h:34
bool operator!=(const Version &rhs) const
Definition: Version.cc:60
bool operator<=(const Version &rhs) const
Definition: Version.cc:97
bool operator==(const Version &rhs) const
Definition: Version.cc:56
static Version & poolSchemaVersion()
Definition: Version.cc:11
int m_patch
Definition: Version.h:37
bool operator>=(const Version &rhs) const
Definition: Version.cc:86
std::string toString() const
Definition: Version.cc:108
static Version & thisSchemaVersion()
Definition: Version.cc:18