From 69a0ba60ea0bbd26bad16ef600d614c330d3ff4a Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Fri, 2 Sep 2011 21:44:16 -0300 Subject: [PATCH] Improved Host documentation --- src/config/host.cpp | 20 ++++++++++++++------ src/config/host.h | 9 ++++++--- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/src/config/host.cpp b/src/config/host.cpp index 3f2e3f9..9757205 100644 --- a/src/config/host.cpp +++ b/src/config/host.cpp @@ -29,6 +29,11 @@ using namespace std; // Host //----------------------------------------------------------------------------- +/** + * @brief Parameterized constructor. + * + * @param address The host address + */ Host::Host( string address ) : Address( address ), Port( 0 ), @@ -37,12 +42,15 @@ Host::Host( string address ) : { } +/** + * @brief Destructor. + */ Host::~Host() { } /** - * @return a string representing the host address. + * @return A string representing the host address. */ string Host::get_address() const { @@ -50,7 +58,7 @@ string Host::get_address() const } /** - * @param address a string representing the host address. + * @param address A string representing the host address. */ void Host::set_address( const string &address ) { @@ -60,7 +68,7 @@ void Host::set_address( const string &address ) } /** - * @return the destination port number to ping the host. + * @return The destination port number to ping the host. */ uint16_t Host::get_port() const { @@ -68,7 +76,7 @@ uint16_t Host::get_port() const } /** - * @param port the destination port number to ping the host. + * @param port The destination port number to ping the host. */ void Host::set_port( const uint16_t port ) { @@ -96,7 +104,7 @@ void Host::set_ping_protocol( const PingProtocol ping_protocol ) } /** - * @return the interval between each ping to the host. + * @return The interval between each ping to the host. */ int Host::get_interval_in_sec() const { @@ -104,7 +112,7 @@ int Host::get_interval_in_sec() const } /** - * @param interval_in_sec the interval between each ping to the host. + * @param interval_in_sec The interval between each ping to the host. */ void Host::set_interval_in_sec( const int interval_in_sec ) { diff --git a/src/config/host.h b/src/config/host.h index 8573ed6..4b1eb52 100644 --- a/src/config/host.h +++ b/src/config/host.h @@ -33,6 +33,9 @@ on this file might be covered by the GNU General Public License. // Host //----------------------------------------------------------------------------- +/** + * @brief This class holds the values for one host configured. + */ class Host { public: @@ -52,13 +55,13 @@ public: void set_interval_in_sec( const int interval_in_sec ); private: - /// the address of the host + /// The address of the host std::string Address; - /// the port of the host + /// The port of the host uint16_t Port; /// The protocol to ping PingProtocol Protocol; - /// the interval between each ping to the host + /// The interval between each ping to the host int IntervalInSec; }; -- 1.7.1