Kea 2.5.8
isc::dhcp::IdentifierType< min_size, max_size > Class Template Reference

#include <duid.h>

+ Inheritance diagram for isc::dhcp::IdentifierType< min_size, max_size >:

Public Member Functions

 IdentifierType (const std::vector< uint8_t > &data)
 Constructor from vector.
 
 IdentifierType (const uint8_t *data, size_t len)
 Constructor from array and array size.
 
bool operator!= (const IdentifierType &other) const
 Compares two identifiers for inequality.
 
bool operator== (const IdentifierType &other) const
 Compares two identifiers for equality.
 
std::string toText () const
 Returns textual representation of the identifier (e.g.
 

Static Public Member Functions

static std::vector< uint8_t > fromText (const std::string &text)
 This static function parses an Identifier specified in the textual format.
 
static constexpr size_t getMaxSize ()
 Return the maximum size of the acceptable data.
 
static constexpr size_t getMinSize ()
 Return the minimum size of the acceptable data.
 

Protected Attributes

std::vector< uint8_t > data_
 The actual content of the Identifier.
 

Additional Inherited Members

- Protected Member Functions inherited from isc::dhcp::IdentifierBaseType
virtual ~IdentifierBaseType ()=0
 Pure virtual destructor.
 

Detailed Description

template<size_t min_size, size_t max_size>
class isc::dhcp::IdentifierType< min_size, max_size >

Definition at line 37 of file duid.h.

Constructor & Destructor Documentation

◆ IdentifierType() [1/2]

template<size_t min_size, size_t max_size>
isc::dhcp::IdentifierType< min_size, max_size >::IdentifierType ( const std::vector< uint8_t > &  data)
inline

Constructor from vector.

Parameters
dataThe data used to create the IdentifierType

Definition at line 43 of file duid.h.

References isc::dhcp::IdentifierType< min_size, max_size >::data_, and isc_throw.

◆ IdentifierType() [2/2]

template<size_t min_size, size_t max_size>
isc::dhcp::IdentifierType< min_size, max_size >::IdentifierType ( const uint8_t *  data,
size_t  len 
)
inline

Constructor from array and array size.

Parameters
dataThe data used to create the Identifier
lenThe data len used to create the Identifier

Definition at line 59 of file duid.h.

References isc::dhcp::IdentifierType< min_size, max_size >::data_, and isc_throw.

Member Function Documentation

◆ fromText()

template<size_t min_size, size_t max_size>
static std::vector< uint8_t > isc::dhcp::IdentifierType< min_size, max_size >::fromText ( const std::string &  text)
inlinestatic

This static function parses an Identifier specified in the textual format.

Parameters
textIdentifier in the hexadecimal format with digits representing individual bytes separated by colons.
Returns
The data resulted from parsing the textual format.

Definition at line 108 of file duid.h.

References isc::util::str::decodeFormattedHexString().

Referenced by isc::dhcp::DUID::fromText(), and isc::dhcp::ClientId::fromText().

+ Here is the call graph for this function:

◆ getMaxSize()

template<size_t min_size, size_t max_size>
static constexpr size_t isc::dhcp::IdentifierType< min_size, max_size >::getMaxSize ( )
inlinestaticconstexpr

Return the maximum size of the acceptable data.

Returns
the maximum size of the acceptable data.

Definition at line 81 of file duid.h.

◆ getMinSize()

template<size_t min_size, size_t max_size>
static constexpr size_t isc::dhcp::IdentifierType< min_size, max_size >::getMinSize ( )
inlinestaticconstexpr

Return the minimum size of the acceptable data.

Returns
the minimum size of the acceptable data.

Definition at line 74 of file duid.h.

◆ operator!=()

template<size_t min_size, size_t max_size>
bool isc::dhcp::IdentifierType< min_size, max_size >::operator!= ( const IdentifierType< min_size, max_size > &  other) const
inline

Compares two identifiers for inequality.

Returns
True if the two identifiers are different, false otherwise.

Definition at line 124 of file duid.h.

References isc::dhcp::IdentifierType< min_size, max_size >::data_.

◆ operator==()

template<size_t min_size, size_t max_size>
bool isc::dhcp::IdentifierType< min_size, max_size >::operator== ( const IdentifierType< min_size, max_size > &  other) const
inline

Compares two identifiers for equality.

Returns
True if the two identifiers are equal, false otherwise.

Definition at line 117 of file duid.h.

References isc::dhcp::IdentifierType< min_size, max_size >::data_.

◆ toText()

Member Data Documentation

◆ data_

template<size_t min_size, size_t max_size>
std::vector<uint8_t> isc::dhcp::IdentifierType< min_size, max_size >::data_
protected

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