Sirikata
Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends
Sirikata::ProxyManager Class Reference

An interface for a class that keeps track of proxy object references. More...

#include <ProxyManager.hpp>

Inheritance diagram for Sirikata::ProxyManager:
Collaboration diagram for Sirikata::ProxyManager:

List of all members.

Classes

struct  ProxyData

Public Types

typedef std::vector
< SpaceObjectReference
ObjectReferenceList

Public Member Functions

virtual ~ProxyManager ()
const SpaceObjectReferenceid () const
VWObjectPtr parent () const
virtual void initialize ()
 Called after providers attached.
virtual void destroy ()
 Called before providers detatched.
virtual ProxyObjectPtr createObject (const SpaceObjectReference &id, const TimedMotionVector3f &tmv, const TimedMotionQuaternion &tmq, const AggregateBoundingInfo &bs, const Transfer::URI &meshuri, const String &phy, bool isAggregate, uint64 seqNo)
 Adds to internal ProxyObject map and calls creation listeners.
virtual void destroyObject (const ProxyObjectPtr &newObj)
 Removes from internal ProxyObject map, calls destruction listeners, and calls newObj->destroy().
int32 size ()
 Get the number of proxies held by this ProxyManager.
int32 activeSize ()
 Get the number of proxies held by this ProxyManager that are active, i.e.
virtual ProxyObjectPtr getProxyObject (const SpaceObjectReference &id) const
 Ask for a proxy object by ID. Returns ProxyObjectPtr() if it doesn't exist.
virtual void getAllObjectReferences (std::vector< SpaceObjectReference > &allObjReferences) const
void resetAllProxies ()
 Resets all ProxyObjects.

Static Public Member Functions

static ProxyManagerPtr construct (VWObjectPtr parent, const SpaceObjectReference &_id)

Private Types

typedef
std::tr1::unordered_map
< ObjectReference, ProxyData,
ObjectReference::Hasher
ProxyMap

Private Member Functions

 ProxyManager (VWObjectPtr parent, const SpaceObjectReference &_id)
void proxyDeleted (const ObjectReference &id)

Private Attributes

VWObjectPtr mParent
SpaceObjectReference mID
ProxyMap mProxyMap
uint32 mActiveCount

Friends

class ProxyObject

Detailed Description

An interface for a class that keeps track of proxy object references.


Member Typedef Documentation


Constructor & Destructor Documentation

Sirikata::ProxyManager::~ProxyManager ( ) [virtual]

References destroy().

Sirikata::ProxyManager::ProxyManager ( VWObjectPtr  parent,
const SpaceObjectReference _id 
) [private]

Referenced by construct().


Member Function Documentation

int32 Sirikata::ProxyManager::activeSize ( )

Get the number of proxies held by this ProxyManager that are active, i.e.

the ProxyManager is holding a strong reference to them rather than just tracking that they are alive.

References mActiveCount.

ProxyManagerPtr Sirikata::ProxyManager::construct ( VWObjectPtr  parent,
const SpaceObjectReference _id 
) [static]

References ProxyManager().

ProxyObjectPtr Sirikata::ProxyManager::createObject ( const SpaceObjectReference id,
const TimedMotionVector3f tmv,
const TimedMotionQuaternion tmq,
const AggregateBoundingInfo bs,
const Transfer::URI meshuri,
const String &  phy,
bool  isAggregate,
uint64  seqNo 
) [virtual]
void Sirikata::ProxyManager::destroy ( ) [virtual]
void Sirikata::ProxyManager::destroyObject ( const ProxyObjectPtr newObj) [virtual]
void Sirikata::ProxyManager::getAllObjectReferences ( std::vector< SpaceObjectReference > &  allObjReferences) const [virtual]
ProxyObjectPtr Sirikata::ProxyManager::getProxyObject ( const SpaceObjectReference id) const [virtual]

Ask for a proxy object by ID. Returns ProxyObjectPtr() if it doesn't exist.

References mID, mProxyMap, PROXYMAN_SERIALIZED, and Sirikata::SpaceObjectReference::space().

const SpaceObjectReference& Sirikata::ProxyManager::id ( ) const [inline]

Referenced by createObject().

void Sirikata::ProxyManager::initialize ( ) [virtual]

Called after providers attached.

VWObjectPtr Sirikata::ProxyManager::parent ( ) const [inline]
void Sirikata::ProxyManager::proxyDeleted ( const ObjectReference id) [private]

References mProxyMap, and PROXYMAN_SERIALIZED.

void Sirikata::ProxyManager::resetAllProxies ( )

Resets all ProxyObjects.

Use this after migration to ensure they are back in a clean state for fresh updates starting from a new base sequence number.

References mProxyMap, and PROXYMAN_SERIALIZED.

int32 Sirikata::ProxyManager::size ( )

Get the number of proxies held by this ProxyManager.

References mProxyMap.


Friends And Related Function Documentation

friend class ProxyObject [friend]

Member Data Documentation


The documentation for this class was generated from the following files: