pvAccessCPP  7.1.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
pvaVersion.h
1 
7 #ifndef VERSION_H_
8 #define VERSION_H_
9 
10 #ifdef epicsExportSharedSymbols
11 # define pvaVersionEpicsExportSharedSymbols
12 # undef epicsExportSharedSymbols
13 #endif
14 
15 #include <pv/pvType.h>
16 #include <pv/noDefaultMethods.h>
17 
18 #ifdef pvaVersionEpicsExportSharedSymbols
19 # define epicsExportSharedSymbols
20 # undef pvaVersionEpicsExportSharedSymbols
21 #endif
22 
23 #include <shareLib.h>
24 
25 #include "pv/pvaVersionNum.h"
26 
27 #ifndef VERSION_INT
28 # define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
29 #endif
30 
31 #define PVACCESS_VERSION_INT VERSION_INT(EPICS_PVA_MAJOR_VERSION, EPICS_PVA_MINOR_VERSION, EPICS_PVA_MAINTENANCE_VERSION, 0)
32 
33 namespace epics {
34 namespace pvAccess {
35 
36 class epicsShareClass Version {
37  EPICS_NOT_COPYABLE(Version)
38 public:
48  Version(std::string const & productName,
49  std::string const & implementationLangugage,
50  int majorVersion, int minorVersion,
51  int maintenanceVersion, bool developmentFlag);
52 
54  const std::string getProductName() const;
55 
58  const std::string getImplementationLanguage() const;
59 
68  int getMajorVersion() const;
69 
78  int getMinorVersion() const;
79 
87  int getMaintenanceVersion() const;
88 
98  bool isDevelopmentVersion() const;
99 
104  const std::string getLongVersionString() const;
105 
110  const std::string getVersionString() const;
111 
112 private:
113  std::string _productName;
114  std::string _implementationLanguage;
115  int _majorVersion;
116  int _minorVersion;
117  int _maintenanceVersion;
118  bool _developmentFlag;
119 };
120 
121 epicsShareFunc std::ostream& operator<<(std::ostream& o, const Version& v);
122 }
123 }
124 
125 #endif /* VERSION_H_ */