Kea  2.3.5-git
isc::data::ServerTag Class Reference

Represents a server tag. More...

#include <server_tag.h>

Public Member Functions

 ServerTag ()
 Default constructor. More...
 ServerTag (const std::string &tag)
 Constructor. More...
bool amAll () const
 Checks if the server tag is set to "all servers". More...
std::string get () const
 Returns server tag as string. More...
bool operator< (const ServerTag &other) const
 Overload of the less operator for using ServerTag in sets. More...

Static Public Attributes

static std::string ALL = "all"
 Server tag for all servers as text. More...

Detailed Description

Represents a server tag.

The server tag is a label identifying a server or all servers which configuration is stored in the database. The label "all" is reserved and it means "all servers". A configuration object in the database associated with this server tag belongs to all servers. The server tag must not be empty, must not be longer than 256 characters (excluding leading and terminating whitespaces, which are trimmed) and must not be set to "any" which has a special meaning for the server selector.

Definition at line 25 of file server_tag.h.

Constructor & Destructor Documentation

◆ ServerTag() [1/2]

isc::data::ServerTag::ServerTag ( )

Default constructor.

Creates server tag for all servers.

Definition at line 19 of file

◆ ServerTag() [2/2]

isc::data::ServerTag::ServerTag ( const std::string &  tag)


tagserver tag provided as string. The tag is converted to lower case.

Definition at line 23 of file

References isc_throw.

Member Function Documentation

◆ amAll()

bool isc::data::ServerTag::amAll ( ) const

Checks if the server tag is set to "all servers".

true if the server tag is set to all servers, false otherwise.

Definition at line 42 of file

References ALL.

Referenced by isc::db::ServerSelector::MULTIPLE().

◆ get()

std::string isc::data::ServerTag::get ( ) const

Returns server tag as string.

lower case server tag.

Definition at line 51 of file server_tag.h.

Referenced by isc::db::ServerFetcher::get(), isc::db::Server::getServerTagAsText(), and isc::data::operator<<().

◆ operator<()

bool isc::data::ServerTag::operator< ( const ServerTag other) const

Overload of the less operator for using ServerTag in sets.

otherother server tag to compare to.
true if this server tag is less than the other server tag.

Definition at line 59 of file server_tag.h.

References isc::data::operator<<().

+ Here is the call graph for this function:

Member Data Documentation


std::string isc::data::ServerTag::ALL = "all"

Server tag for all servers as text.

Definition at line 29 of file server_tag.h.

Referenced by amAll(), and isc::data::StampedElement::hasAllServerTag().

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