| Kea 3.0.2-git

server.h
Go to the documentation of this file.
1// Copyright (C) 2019 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7#ifndef DB_SERVER_H
8#define DB_SERVER_H
9
10#include <cc/base_stamped_element.h>
11#include <cc/cfg_to_element.h>
12#include <cc/server_tag.h>
13#include <boost/shared_ptr.hpp>
14#include <string>
15
16 namespace isc {
17 namespace db {
18
19 class Server;
20
22 typedef boost::shared_ptr<Server> ServerPtr;
23
32 class Server : public data::BaseStampedElement, public data::CfgToElement {
33 public:
34
39 Server(const data::ServerTag& tag, const std::string& description);
40
50 static ServerPtr create(const data::ServerTag& tag,
51 const std::string& description = "");
52
54 data::ServerTag getServerTag() const {
55 return (server_tag_);
56 }
57
61 std::string getServerTagAsText() const {
62 return (server_tag_.get());
63 }
64
69 std::string getDescription() const {
70 return (description_);
71 }
72
76 virtual data::ElementPtr toElement() const;
77
78 private:
79
81 data::ServerTag server_tag_;
82
84 std::string description_;
85};
86
87} // end of namespace isc::db
88} // end of namespace isc
89
90#endif // DB_SERVER_H
base_stamped_element.h
cfg_to_element.h
isc::data::BaseStampedElement
This class represents configuration element which is associated with database identifier and the modi...
Definition base_stamped_element.h:30
isc::data::ServerTag
Represents a server tag.
Definition server_tag.h:25
isc::db::Server
Represents information about a Kea server in the database.
Definition server.h:32
isc::db::Server::create
static ServerPtr create(const data::ServerTag &tag, const std::string &description="")
Factory function to be used to create an instance of the Server object.
Definition server.cc:29
isc::db::Server::toElement
virtual data::ElementPtr toElement() const
Unparses server object.
Definition server.cc:34
isc::db::Server::getServerTagAsText
std::string getServerTagAsText() const
Returns server tag as text.
Definition server.h:61
isc::db::Server::getServerTag
data::ServerTag getServerTag() const
Returns server tag.
Definition server.h:54
isc::db::Server::Server
Server(const data::ServerTag &tag, const std::string &description)
Constructor.
Definition server.cc:19
isc::db::Server::getDescription
std::string getDescription() const
Returns the description of the server.
Definition server.h:69
isc::data::ElementPtr
boost::shared_ptr< Element > ElementPtr
Definition data.h:28
isc::db
Definition audit_entry.cc:14
isc::db::ServerPtr
boost::shared_ptr< Server > ServerPtr
Shared pointer to the Server class.
Definition server.h:22
isc
Defines the logger used by the top-level component of kea-lfc.
Definition agent_parser.cc:148
server_tag.h
isc::data::CfgToElement
Abstract class for configuration Cfg_* classes.
Definition cfg_to_element.h:29