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

netobject_channel.h

Go to the documentation of this file.
00001 /*
00002         $Id: netobject_channel.h,v 1.7 2001/03/15 12:14:46 mbn 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_channel
00016 #define header_netobject_channel
00017 
00019 
00020 #include <string>
00021 #include "../signals.h"
00022 
00023 class CL_NetObjectChannel
00024 //: Network object replication channel.
00025 //
00026 // Manages a netchannel with netobject replication data. It dispatches incoming
00027 // messages to the correct netobject.
00028 {
00030 public:
00031         CL_NetObjectChannel(const CL_NetObjectChannel &copy);
00032         // Copy constructor.
00033 
00034         CL_NetObjectChannel(class CL_NetSession *netgame, int channel);
00035         // Constructs a netobject channel.
00036 
00037         virtual ~CL_NetObjectChannel();
00038 
00040 public:
00041         CL_Signal_v3<const class CL_NetObject &, int, const std::string &> &sig_create_object();
00042         // CL_Signal_v3<netobject, msgtype, message>.
00043         //
00044         // Signal that is called whenever the netobject channel receives a message for a netobject
00045         // it doesnt know. The application should hook a slot into this signal and determine what
00046         // to do with the message.
00047 
00048         void begin_sync(const class CL_NetGroup *group = NULL);
00049         // Sends a begin_sync message to the netchannel. This is used together with end_sync to
00050         // mark a group of objects. The client can use wait_sync to wait for a full transfer of
00051         // a list of objects.
00052 
00053         void end_sync(const class CL_NetGroup *group = NULL);
00054         // Sends a end_sync message to the netchannel. This is used together with end_sync to
00055         // mark a group of objects. The client can use wait_sync to wait for a full transfer of
00056         // a list of objects.
00057 
00058         bool wait_sync(int timeout = -1);
00059         // Waits for a synced group of objects to arrive. If the whole group havnt been received
00060         // before the timeout, the function will return false.
00061 
00062 public:
00063         class CL_NetObjectChannel_Generic *impl;
00064 };
00065 
00066 #endif

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