/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/eformat/eformat-00-00-04/src/Version.cxx

Go to the documentation of this file.
00001 //Dear emacs, this is -*- c++ -*-
00002 
00013 #include "eformat/Version.h"
00014 #include <sstream>
00015 
00016 eformat::helper::Version::Version (uint32_t v) 
00017   : m_minor(0xffff&v), m_major(v>>16)
00018 {
00019 }
00020 
00021 uint32_t eformat::helper::Version::code (void) const 
00022 {
00023   uint32_t retval = m_major;
00024   retval <<= 16;
00025   retval |= m_minor;
00026   return retval;
00027 }
00028 
00029 std::string eformat::helper::Version::human_major (void) const
00030 {
00031   std::ostringstream oss;
00032   oss << (major2() >> 8) << "." << (major2() & 0xff);
00033   return oss.str();
00034 }
00035 
00036 std::string eformat::helper::Version::human_minor (void) const
00037 {
00038   std::ostringstream oss;
00039   oss << (minor2() >> 8) << "." << (minor2() & 0xff);
00040   return oss.str();
00041 }
00042 
00043 std::string eformat::helper::Version::human (void) const
00044 {
00045   std::string retval = human_major();
00046   retval += "-";
00047   retval += human_minor();
00048   return retval;
00049 }
00050 

Generated on Tue Nov 29 22:58:25 2016 for BOSS_7.0.2 by  doxygen 1.4.7