Kea
1.9.9-git
|
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. More... | |
data::ConstElementPtr | getContext () const |
Returns const pointer to the user context. More... | |
void | setContext (const data::ConstElementPtr &ctx) |
Sets user context. More... | |
Static Public Member Functions | |
static data::ElementPtr | toElement (data::ConstElementPtr map) |
Copy an Element map. More... | |
Protected Attributes | |
data::ConstElementPtr | user_context_ |
Pointer to the user context (may be NULL) More... | |
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::http::BasicHttpAuthClient::toElement(), isc::netconf::NetconfConfig::toElement(), isc::http::BasicHttpAuthConfig::toElement(), isc::d2::D2CfgContext::toElement(), isc::dhcp::CfgDUID::toElement(), isc::netconf::CfgControlSocket::toElement(), isc::process::LoggingInfo::toElement(), isc::dhcp::Pool::toElement(), isc::dhcp::D2ClientConfig::toElement(), isc::agent::CtrlAgentCfgContext::toElement(), isc::dhcp::ClientClassDef::toElement(), isc::netconf::CfgServer::toElement(), isc::dhcp::CfgIface::toElement(), isc::d2::TSIGKeyInfo::toElement(), isc::dhcp::Subnet::toElement(), isc::dhcp::Lease4::toElement(), isc::d2::DnsServerInfo::toElement(), isc::d2::DdnsDomain::toElement(), isc::dhcp::Lease6::toElement(), isc::dhcp::SrvConfig::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 isc::dhcp::CSVLeaseFile6::append(), isc::dhcp::CSVLeaseFile4::append(), contextToElement(), isc::dhcp::OptionDefinition::getContext(), isc::dhcp::Lease4::Lease4(), isc::dhcp::OptionDescriptor::operator=(), isc::dhcp::Lease4::operator=(), isc::dhcp::Lease4::operator==(), isc::dhcp::Lease6::operator==(), isc::dhcp::OptionDescriptor::OptionDescriptor(), isc::dhcp::CqlHostExchange::prepareExchange(), 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::dhcp::Lease4::Lease4(), isc::dhcp::OptionDescriptor::operator=(), isc::dhcp::Lease4::operator=(), isc::dhcp::OptionDescriptor::OptionDescriptor(), isc::http::BasicHttpAuthConfig::parse(), isc::dhcp::CqlHostExchange::retrieve(), 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().
|
protected |
Pointer to the user context (may be NULL)
Definition at line 52 of file user_context.h.
Referenced by getContext(), and setContext().