/** * Copyright - See the COPYRIGHT that is included with this distribution. * pvAccessCPP is distributed subject to a Software License Agreement found * in file LICENSE that is included with this distribution. */ #ifndef VERSION_H_ #define VERSION_H_ #ifdef epicsExportSharedSymbols # define pvaVersionEpicsExportSharedSymbols # undef epicsExportSharedSymbols #endif #include #include #ifdef pvaVersionEpicsExportSharedSymbols # define epicsExportSharedSymbols # undef pvaVersionEpicsExportSharedSymbols #endif #include #include "pv/pvaVersionNum.h" namespace epics { namespace pvAccess { class epicsShareClass Version : public epics::pvData::NoDefaultMethods { public: /** * Default constructor. * @param productName product name. * @param implementationLangugage implementation language. * @param majorVersion major version. * @param minorVersion minor version. * @param maintenanceVersion maintenance version. * @param developmentFlag development indicator flag. */ Version(std::string const & productName, std::string const & implementationLangugage, int majorVersion, int minorVersion, int maintenanceVersion, bool developmentFlag); /** The name of the product */ const std::string getProductName() const; /** Implementation Language: C++ */ const std::string getImplementationLanguage() const; /** * Major version number. This changes only when there is a * significant, externally apparent enhancement from the previous release. * 'n' represents the n'th version. * * Clients should carefully consider the implications of new versions as * external interfaces and behaviour may have changed. */ int getMajorVersion() const; /** * Minor version number. This changes when: *
    *
  • a new set of functionality is to be added
  • *
  • API or behaviour change
  • *
  • its designated as a reference release
  • *
*/ int getMinorVersion() const; /** * Maintenance version number. Optional identifier used to designate * maintenance drop applied to a specific release and contains fixes for * defects reported. It maintains compatibility with the release and * contains no API changes. When missing, it designates the final and * complete development drop for a release. */ int getMaintenanceVersion() const; /** * Development flag. * * Development drops are works in progress towards a completed, final * release. A specific development drop may not completely implement all * aspects of a new feature, which may take several development drops to * complete. At the point of the final drop for the release, the -SNAPSHOT suffix * will be omitted. */ bool isDevelopmentVersion() const; /** * Get the long version string. * @return std::string denoting current version */ const std::string getLongVersionString() const; /** * Get the basic version string. * @return std::string denoting current version */ const std::string getVersionString() const; private: std::string _productName; std::string _implementationLanguage; int _majorVersion; int _minorVersion; int _maintenanceVersion; bool _developmentFlag; }; epicsShareFunc std::ostream& operator<<(std::ostream& o, const Version& v); } } #endif /* VERSION_H_ */