convert line ends
[canaan.git] / prj / cam / src / object / objproxy.h
blobdcb6699dfcc200daa33100d5e6138b3a36c13ef9
1 /*
2 @Copyright Looking Glass Studios, Inc.
3 1996,1997,1998,1999,2000 Unpublished Work.
4 */
6 // $Header: r:/t2repos/thief2/src/object/objproxy.h,v 1.2 2000/01/29 13:23:57 adurant Exp $
7 //
8 // Proxy object manager
9 //
10 // In a networked environment, each machine "owns" some of the objects in
11 // the game. All of the other machines maintain "proxies" for those objects:
12 // simplified versions of the objects, which have the same archetype and
13 // position information, but which aren't as fully simulated as the real
14 // object.
16 // The proxy manager keeps track of hash tables that map between the real
17 // host objIDs to the local proxies. Conceptually, it is closely related
18 // to objsys.
20 #pragma once
22 #ifndef _OBJPROXY_H
23 #define _OBJPROXY_H
25 #include <hashpp.h>
26 #include <netprops.h> // for sHostObjID
28 //////////
30 class cProxyManager
32 public:
33 cProxyManager();
34 ~cProxyManager();
36 void RegisterProxy(ObjID host, NetObjID netObjID, ObjID proxyID);
37 ObjID GetProxy(ObjID host, NetObjID netObjID);
38 void DeleteProxy(ObjID host, NetObjID netObjID);
40 private:
41 typedef cGenHashFunc<sHostObjID> cHostObjIDFunc;
42 typedef cHashTable<sHostObjID *, ObjID, cHostObjIDFunc> cHashByHostObjID;
44 cHashByHostObjID *m_pTable;
47 #endif // !_OBJPROXY_H