//-----------------------------------------------------------------------------
/**
- * @brief Parameterized constructor.
+ * @brief Parameterized constructor. Never called since is private
*
* @param _argc The number of arguments in command line.
* @param _argv A vector containing the command line elements.
}
/**
- * @brief Copy constructor.
+ * @brief Copy constructor. Never called since is private
*
* @param other A object to be copied.
*/
{
public:
ConfigurationCommandLine( const int _argc, const char **_argv );
- ConfigurationCommandLine( const ConfigurationCommandLine &other );
virtual ~ConfigurationCommandLine();
- ConfigurationCommandLine& operator=( const ConfigurationCommandLine &other );
-
bool process( boost::program_options::variables_map *vm );
bool parse(
int argc;
const char **argv;
+ ConfigurationCommandLine( const ConfigurationCommandLine &other );
+ ConfigurationCommandLine& operator=( const ConfigurationCommandLine &other );
+
};
#endif // CONFIGURATION_COMMAND_LINE_H
#define CONFIGURATION_INTERFACE_H
#include <boost/program_options.hpp>
+#include <boost/utility.hpp>
#include "config/configuration.h"
/**
* @brief Abstract class for configuration interfaces.
*/
-class ConfigurationInterface
+class ConfigurationInterface : boost::noncopyable
{
public:
ConfigurationInterface();
#include <string>
#include <boost/program_options.hpp>
+#include <boost/utility.hpp>
#include "config/configuration.h"
#include "config/option/configurationoption.h"
/**
* @brief Options for configuration.
*/
-class ConfigurationOptions
+class ConfigurationOptions : boost::noncopyable
{
public:
ConfigurationOptions();
}
/**
- * @brief Copy constructor.
- */
-Pinger::Pinger( const Pinger & )
-{
-}
-
-/**
* @brief Destructor.
*/
Pinger::~Pinger()
{
}
-
-/**
- * @brief Copy assignment operator.
- */
-Pinger& Pinger::operator=( const Pinger &other )
-{
- // checking for self-assignment (i.e. object1 = object1)
- if ( &other == this ) {
- return *this;
- }
- // TODO: Not implemented at all? Then disable it in the class definition
- return *this;
-}
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/utility.hpp>
//-----------------------------------------------------------------------------
// Pinger
* @brief Abstract class for pingers.
* Scope: one object per host.
*/
-class Pinger
+class Pinger : boost::noncopyable
{
public:
virtual void ping(
protected:
Pinger();
virtual ~Pinger();
-
-private:
- Pinger( const Pinger &other );
- Pinger& operator=( const Pinger &other );
-
};
//-----------------------------------------------------------------------------
}
/**
- * @brief Copy constructor.
- */
-IcmpMessage::IcmpMessage( const IcmpMessage & )
-{
-}
-
-/**
* @brief Destructor.
*/
IcmpMessage::~IcmpMessage()
}
/**
- * @brief Copy assignment operator.
- */
-IcmpMessage& IcmpMessage::operator=( const IcmpMessage &other )
-{
- // checking for self-assignment (i.e. object1 = object1)
- if ( &other == this ) {
- return *this;
- }
-
- // TODO: Not implemented at all. Fix it or disable it
- return *this;
-}
-
-/**
* This method MUST be called to initialize the data member of ICMP Messages.
*/
void IcmpMessage::init( const Icmpv4Type type )
#include <istream>
#include <ostream>
+#include <boost/utility.hpp>
#include "icmp/icmptype.h"
/**
* @brief Abstract class to which the ICMP messages are interpreted.
*/
-class IcmpMessage
+class IcmpMessage : boost::noncopyable
{
public:
void init( const Icmpv4Type type );
IcmpMessage();
virtual ~IcmpMessage();
-private:
- IcmpMessage( const IcmpMessage &other );
- IcmpMessage& operator=( const IcmpMessage &other );
-
};
#endif // ICMP_MESSAGE_H
}
/**
- * @brief Copy constructor.
- */
-IcmpPacket::IcmpPacket( const IcmpPacket & )
-{
-}
-
-/**
* @brief Destructor.
*/
IcmpPacket::~IcmpPacket()
{
}
-
-/**
- * @brief Copy assignment operator.
- */
-IcmpPacket& IcmpPacket::operator=( const IcmpPacket &other )
-{
- // checking for self-assignment (i.e. object1 = object1)
- if ( &other == this ) {
- return *this;
- }
-
- // TODO: Not implemented at all. Fix it or disable it
- return *this;
-}
#include <boost/asio.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/utility.hpp>
//-----------------------------------------------------------------------------
// IcmpPacket
/**
* @brief Abstract class for ICMP Packets.
*/
-class IcmpPacket
+class IcmpPacket : boost::noncopyable
{
public:
virtual bool match_echo_reply(
IcmpPacket();
virtual ~IcmpPacket();
-private:
- IcmpPacket( const IcmpPacket &other );
- IcmpPacket& operator=( const IcmpPacket &other );
-
};
//-----------------------------------------------------------------------------
}
/**
- * @brief Copy constructor.
- */
-TcpSegment::TcpSegment( const TcpSegment & )
-{
-}
-
-/**
* @brief Destructor.
*/
TcpSegment::~TcpSegment()
{
}
-
-/**
- * @brief Copy assignment operator.
- */
-TcpSegment& TcpSegment::operator=( const TcpSegment &other )
-{
- // checking for self-assignment (i.e. object1 = object1)
- if ( &other == this ) {
- return *this;
- }
-
- // TODO: Not implemented at all. Fix it or disable it.
- return *this;
-}
#include <boost/asio.hpp>
#include <boost/shared_ptr.hpp>
+#include <boost/utility.hpp>
//-----------------------------------------------------------------------------
// TcpSegment
/**
* @brief Abstract class for TCP Segments.
*/
-class TcpSegment
+class TcpSegment : boost::noncopyable
{
public:
virtual bool match_rst_reply(
TcpSegment();
virtual ~TcpSegment();
-private:
- TcpSegment( const TcpSegment &other );
- TcpSegment& operator=( const TcpSegment &other );
};
//-----------------------------------------------------------------------------