powerd++  0.4.4
Public Member Functions | Public Attributes | List of all members
anonymous_namespace{libloadplay.cpp}::mib_t Struct Reference

Represents MIB, but wraps it to provide the necessary operators to use it as an std::map key. More...

Public Member Functions

template<typename... Ints>
constexpr mib_t (Ints const ... ints)
 Construct a mib with the given number of arguments. More...
 
 mib_t (int const *const mibs, u_int const len)
 Initialise from a pointer to an int array. More...
 
bool operator== (mib_t const &op) const
 Equality operator required by std::map. More...
 
bool operator< (mib_t const &op) const
 Less than operator required by std::map. More...
 
 operator int * ()
 Cast to int * for value access. More...
 
 operator int const * () const
 Cast to int const * for value access. More...
 

Public Attributes

int mibs [CTL_MAXNAME]
 The mib values.
 

Detailed Description

Represents MIB, but wraps it to provide the necessary operators to use it as an std::map key.

Constructor & Destructor Documentation

◆ mib_t() [1/2]

template<typename... Ints>
constexpr anonymous_namespace{libloadplay.cpp}::mib_t::mib_t ( Ints const ...  ints)
inlineconstexpr

Construct a mib with the given number of arguments.

Template Parameters
IntsA list of integer types
Parameters
intsA list of integers to create a mib from

◆ mib_t() [2/2]

anonymous_namespace{libloadplay.cpp}::mib_t::mib_t ( int const *const  mibs,
u_int const  len 
)
inline

Initialise from a pointer to an int array.

Parameters
mibs,lenThe array and its length

Member Function Documentation

◆ operator int *()

anonymous_namespace{libloadplay.cpp}::mib_t::operator int * ( )
inline

Cast to int * for value access.

Returns
A pointer to mibs

◆ operator int const *()

anonymous_namespace{libloadplay.cpp}::mib_t::operator int const * ( ) const
inline

Cast to int const * for value access.

Returns
A pointer to mibs

◆ operator<()

bool anonymous_namespace{libloadplay.cpp}::mib_t::operator< ( mib_t const &  op) const
inline

Less than operator required by std::map.

Parameters
opAnother mib_t instance
Returns
Whether this mib is less than the given one

◆ operator==()

bool anonymous_namespace{libloadplay.cpp}::mib_t::operator== ( mib_t const &  op) const
inline

Equality operator required by std::map.

Parameters
opAnother mib_t instance
Returns
Whether all values in this and the given mib are equal

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