Files
pvAccess/pvAccessApp/ca/pvVersion.cpp
2012-03-28 20:31:33 +02:00

43 lines
1.0 KiB
C++

/**
* 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.
*/
#include <sstream>
#include <pv/pvVersion.h>
using std::stringstream;
using epics::pvData::String;
namespace epics {
namespace pvAccess {
const String Version::getLongVersionString() const {
stringstream ret;
ret<<getProductName()<<" ["<<getImplementationLanguage();
ret<<"] v"<<getMajorVersion()<<"."<<getMinorVersion()<<".";
if(getDevelopmentVersion()>0) {
ret<<"D"<<getDevelopmentVersion();
} else
ret<<getMaintenanceVersion();
return ret.str();
}
const String Version::getVersionString() const {
stringstream ret;
ret<<getProductName()<<" v"<<getMajorVersion()<<".";
ret<<getMinorVersion()<<".";
if(getDevelopmentVersion()>0) {
ret<<"D"<<getDevelopmentVersion();
} else
ret<<getMaintenanceVersion();
return ret.str();
}
}
}