HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SdrVersion Class Reference

SdrVersion. More...

#include <declare.h>

Public Member Functions

SDR_API SdrVersion ()=default
 Create an invalid version. More...
 
SDR_API SdrVersion (int major, int minor=0)
 
SDR_API SdrVersion (const std::string &x)
 
SDR_API SdrVersion GetAsDefault () const
 
SDR_API int GetMajor () const
 Return the major version number or zero for an invalid version. More...
 
SDR_API int GetMinor () const
 Return the minor version number or zero for an invalid version. More...
 
SDR_API bool IsDefault () const
 Return true iff this version is marked as default. More...
 
SDR_API std::string GetString () const
 Return the version as a string. More...
 
SDR_API std::string GetStringSuffix () const
 Return the version as a identifier suffix. More...
 
SDR_API std::size_t GetHash () const
 Return a hash for the version. More...
 
SDR_API operator bool () const
 Return true iff the version is valid. More...
 
SDR_API bool operator! () const
 Return true iff the version is invalid. More...
 

Friends

SDR_API friend bool operator== (const SdrVersion &lhs, const SdrVersion &rhs)
 Return true iff versions are equal. More...
 
SDR_API friend bool operator!= (const SdrVersion &lhs, const SdrVersion &rhs)
 Return true iff versions are not equal. More...
 
SDR_API friend bool operator< (const SdrVersion &lhs, const SdrVersion &rhs)
 Return true iff the left side is less than the right side. More...
 
SDR_API friend bool operator<= (const SdrVersion &lhs, const SdrVersion &rhs)
 Return true iff the left side is less than or equal to the right side. More...
 
SDR_API friend bool operator> (const SdrVersion &lhs, const SdrVersion &rhs)
 Return true iff the left side is greater than the right side. More...
 
SDR_API friend bool operator>= (const SdrVersion &lhs, const SdrVersion &rhs)
 Return true iff the left side is greater than or equal to the right side. More...
 

Detailed Description

SdrVersion.

Definition at line 73 of file declare.h.

Constructor & Destructor Documentation

SDR_API SdrVersion::SdrVersion ( )
default

Create an invalid version.

SDR_API SdrVersion::SdrVersion ( int  major,
int  minor = 0 
)

Create a version with the given major and minor numbers. Numbers must be non-negative, and at least one must be non-zero. On failure generates an error and yields an invalid version.

SDR_API SdrVersion::SdrVersion ( const std::string &  x)

Create a version from a string. On failure generates an error and yields an invalid version.

Member Function Documentation

SDR_API SdrVersion SdrVersion::GetAsDefault ( ) const
inline

Return an equal version marked as default. It's permitted to mark an invalid version as the default.

Definition at line 91 of file declare.h.

SDR_API std::size_t SdrVersion::GetHash ( ) const
inline

Return a hash for the version.

Definition at line 116 of file declare.h.

SDR_API int SdrVersion::GetMajor ( ) const
inline

Return the major version number or zero for an invalid version.

Definition at line 98 of file declare.h.

SDR_API int SdrVersion::GetMinor ( ) const
inline

Return the minor version number or zero for an invalid version.

Definition at line 101 of file declare.h.

SDR_API std::string SdrVersion::GetString ( ) const

Return the version as a string.

SDR_API std::string SdrVersion::GetStringSuffix ( ) const

Return the version as a identifier suffix.

SDR_API bool SdrVersion::IsDefault ( ) const
inline

Return true iff this version is marked as default.

Definition at line 104 of file declare.h.

SDR_API SdrVersion::operator bool ( ) const
inlineexplicit

Return true iff the version is valid.

Definition at line 124 of file declare.h.

SDR_API bool SdrVersion::operator! ( void  ) const
inline

Return true iff the version is invalid.

Definition at line 131 of file declare.h.

Friends And Related Function Documentation

SDR_API friend bool operator!= ( const SdrVersion lhs,
const SdrVersion rhs 
)
friend

Return true iff versions are not equal.

Definition at line 145 of file declare.h.

SDR_API friend bool operator< ( const SdrVersion lhs,
const SdrVersion rhs 
)
friend

Return true iff the left side is less than the right side.

Definition at line 152 of file declare.h.

SDR_API friend bool operator<= ( const SdrVersion lhs,
const SdrVersion rhs 
)
friend

Return true iff the left side is less than or equal to the right side.

Definition at line 160 of file declare.h.

SDR_API friend bool operator== ( const SdrVersion lhs,
const SdrVersion rhs 
)
friend

Return true iff versions are equal.

Definition at line 138 of file declare.h.

SDR_API friend bool operator> ( const SdrVersion lhs,
const SdrVersion rhs 
)
friend

Return true iff the left side is greater than the right side.

Definition at line 168 of file declare.h.

SDR_API friend bool operator>= ( const SdrVersion lhs,
const SdrVersion rhs 
)
friend

Return true iff the left side is greater than or equal to the right side.

Definition at line 175 of file declare.h.


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