Kea 2.5.8
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
11#include <cc/cfg_to_element.h>
12#include <cc/server_tag.h>
13#include <boost/shared_ptr.hpp>
14#include <string>
15
16namespace isc {
17namespace db {
18
19class Server;
20
22typedef boost::shared_ptr<Server> ServerPtr;
23
33public:
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
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
78private:
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
This class represents configuration element which is associated with database identifier and the modi...
Represents a server tag.
Definition: server_tag.h:25
std::string get() const
Returns server tag as string.
Definition: server_tag.h:51
Represents information about a Kea server in the database.
Definition: server.h:32
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
virtual data::ElementPtr toElement() const
Unparses server object.
Definition: server.cc:34
std::string getServerTagAsText() const
Returns server tag as text.
Definition: server.h:61
data::ServerTag getServerTag() const
Returns server tag.
Definition: server.h:54
std::string getDescription() const
Returns the description of the server.
Definition: server.h:69
boost::shared_ptr< Element > ElementPtr
Definition: data.h:28
boost::shared_ptr< Server > ServerPtr
Shared pointer to the Server class.
Definition: server.h:22
Defines the logger used by the top-level component of kea-lfc.
Abstract class for configuration Cfg_* classes.