#ifndef __JDETECTOR__JVERSION__ #define __JDETECTOR__JVERSION__ #include #include "JLang/JComparable.hh" /** * \author mdejong */ namespace JDETECTOR {} namespace JPP { using namespace JDETECTOR; } namespace JDETECTOR { using JLANG::JComparable; /** * Auxiliary class for version identifier. */ struct JVersion : public JComparable { /** * Default constructor. */ JVersion() : version() {} /** * Constructor. * * \param version version */ JVersion(const std::string& version) : version(version) {} /** * Get version. * * \return version */ const std::string& getVersion() const { return this->version; } /** * Set version. * * \param version version */ void setVersion(const std::string& version) { this->version = version; } /** * Less-than method. * * \param version version * \result true if this version less than given version; else false */ inline bool less(const JVersion& version) const { return this->getVersion() < version.getVersion(); } protected: std::string version; }; } #endif