Kea
1.9.9-git
|
Embodies a single client class definition. More...
#include <client_class_def.h>
Public Member Functions | |
ClientClassDef (const std::string &name, const ExpressionPtr &match_expr, const CfgOptionPtr &options=CfgOptionPtr()) | |
Constructor. More... | |
ClientClassDef (const ClientClassDef &rhs) | |
Copy constructor. More... | |
virtual | ~ClientClassDef () |
Destructor. More... | |
bool | dependOnClass (const std::string &name) const |
Checks direct dependency. More... | |
bool | equals (const ClientClassDef &other) const |
Compares two ClientClassDef objects for equality. More... | |
const CfgOptionPtr & | getCfgOption () const |
Fetches the class's option collection. More... | |
const CfgOptionDefPtr & | getCfgOptionDef () const |
Fetches the class's option definitions. More... | |
bool | getDependOnKnown () const |
Fetches the depend on known flag aka use host flag. More... | |
const std::string & | getFilename () const |
returns boot-file-name value More... | |
const ExpressionPtr & | getMatchExpr () const |
Fetches the class's match expression. More... | |
std::string | getName () const |
Fetches the class's name. More... | |
const asiolink::IOAddress & | getNextServer () const |
returns next-server value More... | |
bool | getRequired () const |
Fetches the only if required flag. More... | |
const std::string & | getSname () const |
returns server-hostname value More... | |
std::string | getTest () const |
Fetches the class's original match expression. More... | |
Triplet< uint32_t > | getValid () const |
Return valid-lifetime value. More... | |
bool | operator!= (const ClientClassDef &other) const |
Inequality operator. More... | |
bool | operator== (const ClientClassDef &other) const |
Equality operator. More... | |
void | setCfgOption (const CfgOptionPtr &cfg_option) |
Sets the class's option collection. More... | |
void | setCfgOptionDef (const CfgOptionDefPtr &cfg_option_def) |
Sets the class's option definition collection. More... | |
void | setDependOnKnown (bool depend_on_known) |
Sets the depend on known flag aka use host flag. More... | |
void | setFilename (const std::string &filename) |
sets the boot-file-name value More... | |
void | setMatchExpr (const ExpressionPtr &match_expr) |
Sets the class's match expression. More... | |
void | setName (const std::string &name) |
Sets the class's name. More... | |
void | setNextServer (const asiolink::IOAddress &addr) |
sets the next-server value More... | |
void | setRequired (bool required) |
Sets the only if required flag. More... | |
void | setSname (const std::string &sname) |
sets the server-name value More... | |
void | setTest (const std::string &test) |
Sets the class's original match expression. More... | |
void | setValid (const Triplet< uint32_t > &valid) |
Sets new valid lifetime. More... | |
virtual isc::data::ElementPtr | toElement () const |
Unparse a configuration object. More... | |
Public Member Functions inherited from isc::data::UserContext | |
void | contextToElement (data::ElementPtr map) const |
Merge unparse a user_context object. More... | |
data::ConstElementPtr | getContext () const |
Returns const pointer to the user context. More... | |
void | setContext (const data::ConstElementPtr &ctx) |
Sets user context. More... | |
Public Member Functions inherited from isc::data::CfgToElement | |
virtual | ~CfgToElement () |
Destructor. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const ClientClassDef &x) |
Provides a convenient text representation of the class. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from isc::data::UserContext | |
static data::ElementPtr | toElement (data::ConstElementPtr map) |
Copy an Element map. More... | |
Protected Attributes inherited from isc::data::UserContext | |
data::ConstElementPtr | user_context_ |
Pointer to the user context (may be NULL) More... | |
Embodies a single client class definition.
Definition at line 47 of file client_class_def.h.
isc::dhcp::ClientClassDef::ClientClassDef | ( | const std::string & | name, |
const ExpressionPtr & | match_expr, | ||
const CfgOptionPtr & | options = CfgOptionPtr() |
||
) |
Constructor.
name | Name to assign to this class |
match_expr | Expression the class will use to determine membership |
options | Collection of options members should be given |
Definition at line 21 of file client_class_def.cc.
References isc_throw.
isc::dhcp::ClientClassDef::ClientClassDef | ( | const ClientClassDef & | rhs | ) |
Copy constructor.
Definition at line 42 of file client_class_def.cc.
|
virtual |
Destructor.
Definition at line 67 of file client_class_def.cc.
bool isc::dhcp::ClientClassDef::dependOnClass | ( | const std::string & | name | ) | const |
Checks direct dependency.
name | The client class name. |
Definition at line 141 of file client_class_def.cc.
References isc::dhcp::dependOnClass().
bool isc::dhcp::ClientClassDef::equals | ( | const ClientClassDef & | other | ) | const |
Compares two ClientClassDef
objects for equality.
other | Other client class definition to compare to. |
Definition at line 146 of file client_class_def.cc.
Referenced by operator!=(), and operator==().
const CfgOptionPtr & isc::dhcp::ClientClassDef::getCfgOption | ( | ) | const |
Fetches the class's option collection.
Definition at line 131 of file client_class_def.cc.
const CfgOptionDefPtr & isc::dhcp::ClientClassDef::getCfgOptionDef | ( | ) | const |
Fetches the class's option definitions.
Definition at line 121 of file client_class_def.cc.
bool isc::dhcp::ClientClassDef::getDependOnKnown | ( | ) | const |
Fetches the depend on known flag aka use host flag.
Definition at line 111 of file client_class_def.cc.
|
inline |
returns boot-file-name value
Definition at line 190 of file client_class_def.h.
const ExpressionPtr & isc::dhcp::ClientClassDef::getMatchExpr | ( | ) | const |
Fetches the class's match expression.
Definition at line 81 of file client_class_def.cc.
std::string isc::dhcp::ClientClassDef::getName | ( | ) | const |
Fetches the class's name.
Definition at line 71 of file client_class_def.cc.
Referenced by isc::dhcp::operator<<().
|
inline |
returns next-server value
Definition at line 157 of file client_class_def.h.
bool isc::dhcp::ClientClassDef::getRequired | ( | ) | const |
Fetches the only if required flag.
Definition at line 101 of file client_class_def.cc.
|
inline |
returns server-hostname value
Definition at line 177 of file client_class_def.h.
std::string isc::dhcp::ClientClassDef::getTest | ( | ) | const |
Fetches the class's original match expression.
Definition at line 91 of file client_class_def.cc.
|
inline |
Return valid-lifetime value.
Definition at line 197 of file client_class_def.h.
|
inline |
Inequality operator.
other | Other client class definition to compare to. |
Definition at line 148 of file client_class_def.h.
References equals().
|
inline |
Equality operator.
other | Other client class definition to compare to. |
Definition at line 139 of file client_class_def.h.
References equals().
void isc::dhcp::ClientClassDef::setCfgOption | ( | const CfgOptionPtr & | cfg_option | ) |
Sets the class's option collection.
cfg_option | the option collection to assign the class |
Definition at line 136 of file client_class_def.cc.
void isc::dhcp::ClientClassDef::setCfgOptionDef | ( | const CfgOptionDefPtr & | cfg_option_def | ) |
Sets the class's option definition collection.
cfg_option_def | the option definitions to assign the class |
Definition at line 126 of file client_class_def.cc.
void isc::dhcp::ClientClassDef::setDependOnKnown | ( | bool | depend_on_known | ) |
Sets the depend on known flag aka use host flag.
depend_on_known | the value of the depend on known flag |
Definition at line 116 of file client_class_def.cc.
|
inline |
sets the boot-file-name value
filename | the value to be set |
Definition at line 184 of file client_class_def.h.
void isc::dhcp::ClientClassDef::setMatchExpr | ( | const ExpressionPtr & | match_expr | ) |
Sets the class's match expression.
match_expr | the expression to assign the class |
Definition at line 86 of file client_class_def.cc.
void isc::dhcp::ClientClassDef::setName | ( | const std::string & | name | ) |
Sets the class's name.
name | the name to assign the class |
Definition at line 76 of file client_class_def.cc.
|
inline |
sets the next-server value
addr | the value to be set |
Definition at line 164 of file client_class_def.h.
void isc::dhcp::ClientClassDef::setRequired | ( | bool | required | ) |
Sets the only if required flag.
required | the value of the only if required flag |
Definition at line 106 of file client_class_def.cc.
|
inline |
sets the server-name value
sname | the value to be set |
Definition at line 171 of file client_class_def.h.
void isc::dhcp::ClientClassDef::setTest | ( | const std::string & | test | ) |
Sets the class's original match expression.
test | the original expression to assign the class |
Definition at line 96 of file client_class_def.cc.
|
inline |
Sets new valid lifetime.
valid | New valid lifetime in seconds. |
Definition at line 204 of file client_class_def.h.
|
virtual |
Unparse a configuration object.
Implements isc::data::CfgToElement.
Definition at line 165 of file client_class_def.cc.
References isc::data::UserContext::contextToElement(), isc::dhcp::Triplet< T >::get(), isc::dhcp::CfgMgr::getFamily(), isc::dhcp::Triplet< T >::getMax(), isc::dhcp::Triplet< T >::getMin(), isc::dhcp::CfgMgr::instance(), isc::asiolink::IOAddress::toText(), and isc::util::Optional< T >::unspecified().
|
friend |
Provides a convenient text representation of the class.
Definition at line 216 of file client_class_def.cc.