Using LinkStatusItem type as an alias to the boost::shared_ptr<LinkStatus>.
authorGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 26 Jan 2012 09:43:04 +0000 (07:43 -0200)
committerGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
Thu, 26 Jan 2012 09:43:04 +0000 (07:43 -0200)
src/host/hoststatus.cpp
src/host/hoststatus.h
src/host/pingscheduler.cpp
src/host/pingscheduler.h

index d7634ee..1b8b934 100644 (file)
@@ -24,7 +24,6 @@ on this file might be covered by the GNU General Public License.
 #include <boost/assert.hpp>
 
 using namespace std;
-using boost::shared_ptr;
 
 //-----------------------------------------------------------------------------
 // HostStatus
@@ -39,7 +38,7 @@ using boost::shared_ptr;
 HostStatus::HostStatus(
         const string &host_address,
         const int ping_fail_limit_percentage,
-        const shared_ptr<LinkStatus> link_analyzer
+        const LinkStatusItem link_analyzer
 ) :
     HostAddress( host_address ),
     LinkAnalyzer( link_analyzer ),
index e01deb2..c5f558d 100644 (file)
@@ -22,8 +22,6 @@ on this file might be covered by the GNU General Public License.
 
 #include <string>
 
-#include <boost/shared_ptr.hpp>
-
 #include "link/linkstatus.h"
 
 //-----------------------------------------------------------------------------
@@ -41,7 +39,7 @@ public:
     HostStatus(
             const std::string &host_address,
             const int ping_fail_limit_percentage,
-            const boost::shared_ptr<LinkStatus> link_analyzer
+            const LinkStatusItem link_analyzer
     );
     ~HostStatus();
 
@@ -61,7 +59,7 @@ private:
     /// the DNS address of the host to analyze
     std::string HostAddress;
     /// the object responsible to analyze the link
-    const boost::shared_ptr<LinkStatus> LinkAnalyzer;
+    const LinkStatusItem LinkAnalyzer;
     /// the maximum amount of pings that can fail without warning
     int PingFailLimitPercentage;
     /// the amount of IPs that are aliases to the host DNS
index da3b742..e0c3fba 100644 (file)
@@ -37,7 +37,6 @@ using boost::date_time::time_resolution_traits_adapted64_impl;
 using boost::posix_time::microsec_clock;
 using boost::posix_time::ptime;
 using boost::posix_time::seconds;
-using boost::shared_ptr;
 using boost::thread;
 using I2n::Logger::GlobalLogger;
 
@@ -53,7 +52,7 @@ PingScheduler::PingScheduler(
         const long ping_interval_in_sec,
         const int ping_fail_percentage_limit,
         const string &nameserver,
-        shared_ptr<LinkStatus> link_analyzer
+        LinkStatusItem link_analyzer
 
 ) :
     IoService(),
index f916565..b12b8f2 100644 (file)
@@ -56,7 +56,7 @@ public:
             const long ping_interval_in_sec,
             const int ping_fail_percentage_limit,
             const std::string &nameserver,
-            boost::shared_ptr<LinkStatus> link_analyzer
+            LinkStatusItem link_analyzer
     );
     ~PingScheduler();