From 19d2b9a957164a6c3e4aaf015114ed9aced2f8da Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Sat, 27 Jul 2013 13:09:30 +0200 Subject: [PATCH] correct include --- .../.DatagramConnection.hpp.kate-swp | Bin 0 -> 207 bytes lib/cpp_utils/Connection.hpp | 2 +- lib/cpp_utils/DatagramConnection.hpp | 42 ++++++++++++++++++ lib/cpp_utils/StreamConnection.hpp | 2 +- 4 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 lib/cpp_utils/.DatagramConnection.hpp.kate-swp create mode 100644 lib/cpp_utils/DatagramConnection.hpp diff --git a/lib/cpp_utils/.DatagramConnection.hpp.kate-swp b/lib/cpp_utils/.DatagramConnection.hpp.kate-swp new file mode 100644 index 0000000000000000000000000000000000000000..62bc954d19052e83b5de9e37f4400acc0692a012 GIT binary patch literal 207 zcmZQzU=Z?7EJ;-eE>A2_aLdd|RWQ;sU|?WSFg7wZN-|9~O*1!6N={5Qu}n2LvrJ4$ zO-@NNPBSq`3l0LR0s#&n7V`u%AslfR#}G&NAV=SLXMaCGSLYB -#include "string" class Connection { diff --git a/lib/cpp_utils/DatagramConnection.hpp b/lib/cpp_utils/DatagramConnection.hpp new file mode 100644 index 0000000..366d445 --- /dev/null +++ b/lib/cpp_utils/DatagramConnection.hpp @@ -0,0 +1,42 @@ +#ifndef CONNECTION_HPP +#define CONNECTION_HPP + +#include + + +class Connection +{ +public: + + virtual ~Connection(); + virtual Connection* clone(const int socket) = 0; + + virtual bool bind() = 0; + + virtual bool send( const void* message, const size_t length ) = 0; + virtual bool receive() = 0; + + std::string getHost() const; + std::string getPort() const; + + void setHost(const std::string host); + void setPort(const std::string port); + + virtual int getSocket() const = 0; + + +protected: + + Connection(const std::string host, const std::string port); + + std::string m_host; + std::string m_port; + + +private: + + Connection(const Connection &); + Connection& operator= (const Connection &); +}; + +#endif // CONNECTION_HPP diff --git a/lib/cpp_utils/StreamConnection.hpp b/lib/cpp_utils/StreamConnection.hpp index 4d35d3c..516af69 100644 --- a/lib/cpp_utils/StreamConnection.hpp +++ b/lib/cpp_utils/StreamConnection.hpp @@ -4,7 +4,7 @@ #include "Connection.hpp" -#include "string" +#include class StreamConnection : public Connection {