Kea 2.7.5
|
Base class for user context. More...
#include <user_context.h>
Public Member Functions | |
void | contextToElement (data::ElementPtr map) const |
Merge unparse a user_context object. | |
data::ConstElementPtr | getContext () const |
Returns const pointer to the user context. | |
void | setContext (const data::ConstElementPtr &ctx) |
Sets user context. | |
Static Public Member Functions | |
static data::ElementPtr | toElement (data::ConstElementPtr map) |
Copy an Element map. | |
Protected Attributes | |
data::ConstElementPtr | user_context_ |
Pointer to the user context (may be NULL) | |
Base class for user context.
Many configuration structures allow attaching and storing arbitrary user data that we call user context. Each of those configuration structures need to derive from this class or include this class to handle user context.
Definition at line 22 of file user_context.h.
void isc::data::UserContext::contextToElement | ( | data::ElementPtr | map | ) | const |
Merge unparse a user_context object.
Add user-context to map, but only if defined. Omit if it was not.
map | A pointer to map where the user context will be unparsed. |
Definition at line 15 of file user_context.cc.
References getContext().
Referenced by isc::dhcp::OptionDefinition::contextToElement(), isc::agent::CtrlAgentCfgContext::toElement(), isc::config::HttpCommandConfig::toElement(), isc::d2::D2CfgContext::toElement(), isc::d2::TSIGKeyInfo::toElement(), isc::d2::DnsServerInfo::toElement(), isc::d2::DdnsDomain::toElement(), isc::dhcp::CfgDUID::toElement(), isc::dhcp::CfgIface::toElement(), isc::dhcp::ClientClassDef::toElement(), isc::dhcp::D2ClientConfig::toElement(), isc::dhcp::Lease4::toElement(), isc::dhcp::Lease6::toElement(), isc::dhcp::Network::toElement(), isc::dhcp::Pool::toElement(), isc::dhcp::SrvConfig::toElement(), isc::dhcp::Subnet::toElement(), isc::http::BasicHttpAuthClient::toElement(), isc::http::BasicHttpAuthConfig::toElement(), isc::process::LoggingInfo::toElement(), isc::netconf::NetconfConfig::toElement(), isc::netconf::CfgControlSocket::toElement(), isc::netconf::CfgServer::toElement(), isc::dhcp::Host::toElement4(), and isc::dhcp::Host::toElement6().
|
inline |
Returns const pointer to the user context.
Definition at line 24 of file user_context.h.
References user_context_.
Referenced by contextToElement(), isc::dhcp::OptionDefinition::getContext(), isc::netconf::NetconfCfgMgr::getNetconfConfig(), isc::dhcp::Lease4::operator==(), isc::dhcp::Lease6::operator==(), isc::dhcp::Lease4::toText(), and isc::dhcp::Lease6::toText().
|
inline |
Sets user context.
ctx | user context to be stored. |
Definition at line 30 of file user_context.h.
References user_context_.
Referenced by isc::http::BasicHttpAuthClient::BasicHttpAuthClient(), isc::http::BasicHttpAuthClient::BasicHttpAuthClient(), isc::config::HttpCommandConfig::HttpCommandConfig(), isc::dhcp::OptionDescriptor::OptionDescriptor(), isc::dhcp::OptionDescriptor::OptionDescriptor(), isc::dhcp::OptionDescriptor::operator=(), isc::http::BasicHttpAuthConfig::parse(), and isc::dhcp::OptionDefinition::setContext().
|
static |
Copy an Element map.
A previous version of this extracted comments.
map | A pointer to map. |
Definition at line 24 of file user_context.cc.
References isc::data::copy().
Referenced by isc::d2::D2SimpleParser::parse(), isc::dhcp::processDhcp4Config(), isc::dhcp::processDhcp6Config(), isc::agent::CtrlAgentCfgContext::toElement(), isc::d2::D2CfgContext::toElement(), and isc::dhcp::SrvConfig::toElement().
|
protected |
Pointer to the user context (may be NULL)
Definition at line 52 of file user_context.h.
Referenced by getContext(), and setContext().