Remove dynamic exceptions
[anna.git] / include / anna / comm / handler / ClientSocket.hpp
1 // ANNA - Anna is Not Nothingness Anymore                                                         //
2 //                                                                                                //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo                         //
4 //                                                                                                //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite                           //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7
8
9 #ifndef anna_comm_handler_ClientSocket_hpp
10 #define anna_comm_handler_ClientSocket_hpp
11
12 #include <anna/comm/handler/MetaClientSocket.hpp>
13
14 namespace anna {
15
16 namespace comm {
17
18 class ClientSocket;
19
20 namespace handler {
21
22 class ClientSocket : public MetaClientSocket {
23 public:
24   ClientSocket(Communicator* communicator) :
25     MetaClientSocket(communicator, Handler::Type::ClientSocket),
26     a_clientSocket(NULL)
27   {;}
28
29   void setup(comm::ClientSocket* clientSocket) { a_clientSocket = clientSocket; }
30
31   comm::ClientSocket* getClientSocket() { return a_clientSocket; }
32
33 private:
34   comm::ClientSocket* a_clientSocket;
35
36   void initialize() noexcept(false);
37   void finalize() ;
38   void clone() noexcept(false);
39   std::string asString() const ;
40   xml::Node* asXML(xml::Node*) const ;
41 };
42
43 }
44 }
45 }
46
47 #endif
48