Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

netobject_generic.h

Go to the documentation of this file.
00001 /*
00002         $Id: netobject_generic.h,v 1.4 2001/03/17 07:29:34 vaidhy Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 */
00014 
00015 #ifndef header_netobject_generic
00016 #define header_netobject_generic
00017 
00018 #include <map>
00019 #include <string>
00020 #include "../../API/signals.h"
00021 
00022 class CL_NetObject_Generic
00023 {
00024 public:
00025         CL_NetObject_Generic(class CL_NetObjectChannel_Generic *obj_channel);
00026         CL_NetObject_Generic(int obj_id, class CL_NetObjectChannel_Generic *obj_channel);
00027         ~CL_NetObject_Generic();
00028 
00029         int get_obj_id() const { return obj_id; }
00030 
00031         CL_Slot connect(int msg_type, CL_Slot_v1<class CL_InputSource &> *slot);
00032         CL_Slot connect(int talkback_type, CL_Slot_v2<const class CL_NetComputer &, class CL_InputSource &> *slot);
00033         void send(int msg_type, const std::string &message);
00034         void talkback(int talkback_type, const std::string &message);
00035 
00036         int add_ref();
00037         int release_ref();
00038 
00039 public:
00040         std::map<int, CL_Signal_v1<CL_InputSource &> > msg_signals;
00041         std::map<int, CL_Signal_v2<const CL_NetComputer &, CL_InputSource &> > talkback_signals;
00042         class CL_NetObjectChannel_Generic *obj_channel;
00043         int obj_id;
00044         int ref;
00045 };
00046 
00047 #endif

Generated at Wed Apr 4 19:54:02 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001