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

#include <declare.h>

Public Member Functions

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

Friends

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

Detailed Description

Definition at line 86 of file declare.h.

Constructor & Destructor Documentation

NDR_API NdrVersion::NdrVersion ( )
default

Create an invalid version.

NDR_API NdrVersion::NdrVersion ( 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.

NDR_API NdrVersion::NdrVersion ( const std::string x)

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

Member Function Documentation

NDR_API NdrVersion NdrVersion::GetAsDefault ( ) const
inline

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

Definition at line 104 of file declare.h.

NDR_API std::size_t NdrVersion::GetHash ( ) const
inline

Return a hash for the version.

Definition at line 129 of file declare.h.

NDR_API int NdrVersion::GetMajor ( ) const
inline

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

Definition at line 111 of file declare.h.

NDR_API int NdrVersion::GetMinor ( ) const
inline

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

Definition at line 114 of file declare.h.

NDR_API std::string NdrVersion::GetString ( ) const

Return the version as a string.

NDR_API std::string NdrVersion::GetStringSuffix ( ) const

Return the version as a identifier suffix.

NDR_API bool NdrVersion::IsDefault ( ) const
inline

Return true iff this version is marked as default.

Definition at line 117 of file declare.h.

NDR_API NdrVersion::operator bool ( ) const
inlineexplicit

Return true iff the version is valid.

Definition at line 137 of file declare.h.

NDR_API bool NdrVersion::operator! ( void  ) const
inline

Return true iff the version is invalid.

Definition at line 144 of file declare.h.

Friends And Related Function Documentation

NDR_API friend bool operator!= ( const NdrVersion lhs,
const NdrVersion rhs 
)
friend

Return true iff versions are not equal.

Definition at line 158 of file declare.h.

NDR_API friend bool operator< ( const NdrVersion lhs,
const NdrVersion rhs 
)
friend

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

Definition at line 165 of file declare.h.

NDR_API friend bool operator<= ( const NdrVersion lhs,
const NdrVersion rhs 
)
friend

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

Definition at line 173 of file declare.h.

NDR_API friend bool operator== ( const NdrVersion lhs,
const NdrVersion rhs 
)
friend

Return true iff versions are equal.

Definition at line 151 of file declare.h.

NDR_API friend bool operator> ( const NdrVersion lhs,
const NdrVersion rhs 
)
friend

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

Definition at line 181 of file declare.h.

NDR_API friend bool operator>= ( const NdrVersion lhs,
const NdrVersion rhs 
)
friend

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

Definition at line 188 of file declare.h.


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