torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::common::DottedVersion Struct Reference

Encapsulation of dotted decimal DottedVersion numbers. More...

#include <DottedVersion.hpp>

Public Types

typedef boost::uint8_t uint8_t
 

Public Member Functions

 DottedVersion (uint8_t inMajor=0, uint8_t inMinor=0, uint8_t inRevision=0, uint8_t inReserved=0)
 
bool operator== (const DottedVersion &rhs) const
 
bool operator> (const DottedVersion &rhs) const
 
bool operator>= (const DottedVersion &rhs) const
 
bool operator< (const DottedVersion &rhs) const
 
bool operator<= (const DottedVersion &rhs) const
 

Data Fields

uint8_t mMajor
 
uint8_t mMinor
 
uint8_t mRevision
 
uint8_t mReserved
 

Detailed Description

Encapsulation of dotted decimal DottedVersion numbers.

Definition at line 28 of file DottedVersion.hpp.

Member Typedef Documentation

typedef boost::uint8_t torc::common::DottedVersion::uint8_t

Definition at line 29 of file DottedVersion.hpp.

Constructor & Destructor Documentation

torc::common::DottedVersion::DottedVersion ( uint8_t  inMajor = 0,
uint8_t  inMinor = 0,
uint8_t  inRevision = 0,
uint8_t  inReserved = 0 
)
inline

Definition at line 35 of file DottedVersion.hpp.

36  : mMajor(inMajor), mMinor(inMinor), mRevision(inRevision),
37  mReserved(inReserved) {}

Member Function Documentation

bool torc::common::DottedVersion::operator< ( const DottedVersion rhs) const
inline

Definition at line 58 of file DottedVersion.hpp.

58  {
59  if(mMajor < rhs.mMajor) return true;
60  if(mMajor > rhs.mMajor) return false;
61  if(mMinor < rhs.mMinor) return true;
62  if(mMinor > rhs.mMinor) return false;
63  if(mRevision < rhs.mRevision) return true;
64  return false;
65  }
bool torc::common::DottedVersion::operator<= ( const DottedVersion rhs) const
inline

Definition at line 66 of file DottedVersion.hpp.

66  {
67  if(mMajor > rhs.mMajor) return false;
68  if(mMajor < rhs.mMajor) return true;
69  if(mMinor > rhs.mMinor) return false;
70  if(mMinor > rhs.mMinor) return true;
71  if(mRevision > rhs.mRevision) return false;
72  return true;
73  }
bool torc::common::DottedVersion::operator== ( const DottedVersion rhs) const
inline

Definition at line 39 of file DottedVersion.hpp.

39  {
40  return mMajor == rhs.mMajor && mMinor == rhs.mMinor && mRevision == rhs.mRevision;
41  }
bool torc::common::DottedVersion::operator> ( const DottedVersion rhs) const
inline

Definition at line 42 of file DottedVersion.hpp.

42  {
43  if(mMajor > rhs.mMajor) return true;
44  if(mMajor < rhs.mMajor) return false;
45  if(mMinor > rhs.mMinor) return true;
46  if(mMinor < rhs.mMinor) return false;
47  if(mRevision > rhs.mRevision) return true;
48  return false;
49  }
bool torc::common::DottedVersion::operator>= ( const DottedVersion rhs) const
inline

Definition at line 50 of file DottedVersion.hpp.

50  {
51  if(mMajor < rhs.mMajor) return false;
52  if(mMajor > rhs.mMajor) return true;
53  if(mMinor < rhs.mMinor) return false;
54  if(mMinor > rhs.mMinor) return true;
55  if(mRevision < rhs.mRevision) return false;
56  return true;
57  }

Field Documentation

uint8_t torc::common::DottedVersion::mMajor

Definition at line 30 of file DottedVersion.hpp.

uint8_t torc::common::DottedVersion::mMinor

Definition at line 31 of file DottedVersion.hpp.

uint8_t torc::common::DottedVersion::mReserved

Definition at line 33 of file DottedVersion.hpp.

uint8_t torc::common::DottedVersion::mRevision

Definition at line 32 of file DottedVersion.hpp.


The documentation for this struct was generated from the following file: