Sirikata
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
Sirikata::OH::Manual::ObjectQueryHandler Class Reference

#include <ObjectQueryHandler.hpp>

Inheritance diagram for Sirikata::OH::Manual::ObjectQueryHandler:
Collaboration diagram for Sirikata::OH::Manual::ObjectQueryHandler:

List of all members.

Classes

struct  ObjectQueryData
struct  ProximityResultInfo
struct  ReplicatedIndexQueryHandler

Public Types

typedef Prox::Query
< ObjectProxSimulationTraits > 
Query
typedef Prox::QueryEvent
< ObjectProxSimulationTraits > 
QueryEvent

Public Member Functions

 ObjectQueryHandler (ObjectHostContext *ctx, ManualObjectQueryProcessor *parent, const OHDP::SpaceNodeID &space, Network::IOStrandPtr prox_strand)
 ~ObjectQueryHandler ()
virtual void start ()
virtual void stop ()
void createdReplicatedIndex (ProxIndexID iid, ReplicatedLocationServiceCachePtr loc_cache, ServerID objects_from_server, bool dynamic_objects)
void removedReplicatedIndex (ProxIndexID iid)
void updateQuery (HostedObjectPtr ho, const SpaceObjectReference &sporef, const String &params)
void removeQuery (HostedObjectPtr ho, const SpaceObjectReference &sporef)
void presenceConnected (const ObjectReference &sporef)
void presenceDisconnected (const ObjectReference &sporef)
virtual void onObjectAdded (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
virtual void onObjectRemoved (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
virtual void onParentUpdated (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
virtual void onEpochUpdated (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
virtual void onLocationUpdated (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
virtual void onOrientationUpdated (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
virtual void onBoundsUpdated (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
virtual void onMeshUpdated (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
virtual void onPhysicsUpdated (ReplicatedLocationServiceCache *loccache, const ObjectReference &obj)
void handleCreatedReplicatedIndex (Liveness::Token alive, ProxIndexID iid, ReplicatedLocationServiceCachePtr loc_cache, ServerID objects_from_server, bool dynamic_objects)
void handleRemovedReplicatedIndex (Liveness::Token alive, ProxIndexID iid)
void queryHasEvents (Query *query)
virtual void aggregateCreated (ProxAggregator *handler, const ObjectReference &objid)
virtual void aggregateChildAdded (ProxAggregator *handler, const ObjectReference &objid, const ObjectReference &child, const Vector3f &bnds_center, const float32 bnds_center_radius, const float32 max_obj_size)
virtual void aggregateChildRemoved (ProxAggregator *handler, const ObjectReference &objid, const ObjectReference &child, const Vector3f &bnds_center, const float32 bnds_center_radius, const float32 max_obj_size)
virtual void aggregateBoundsUpdated (ProxAggregator *handler, const ObjectReference &objid, const Vector3f &bnds_center, const float32 bnds_center_radius, const float32 max_obj_size)
virtual void aggregateDestroyed (ProxAggregator *handler, const ObjectReference &objid)
virtual void aggregateObserved (ProxAggregator *handler, const ObjectReference &objid, uint32 nobservers, uint32 nchildren)
ProxQueryHandlergetQueryHandler (const String &handler_name)
void commandListInfo (const OHDP::SpaceNodeID &snid, Command::Result &result)
void commandListNodes (const Command::Command &cmd, Command::Commander *cmdr, Command::CommandID cmdid)
void commandListQueriers (const OHDP::SpaceNodeID &snid, Command::Result &result)
void commandForceRebuild (const Command::Command &cmd, Command::Commander *cmdr, Command::CommandID cmdid)

Private Types

typedef Prox::QueryHandler
< ObjectProxSimulationTraits > 
ProxQueryHandler
typedef Prox::Aggregator
< ObjectProxSimulationTraits > 
ProxAggregator
typedef std::set< ObjectReferenceObjectSet
typedef
std::tr1::unordered_map
< ProxIndexID, Query * > 
IndexQueryMap
typedef
std::tr1::unordered_set
< ServerID > 
ServerIDSet
typedef std::tr1::shared_ptr
< ObjectQueryData
ObjectQueryDataPtr
typedef
std::tr1::unordered_map
< ObjectReference,
ObjectQueryDataPtr,
ObjectReference::Hasher
ObjectQueryMap
typedef std::pair
< ObjectReference, ProxIndexID
ObjectIndexQueryKey
typedef
std::tr1::unordered_map< Query
*, ObjectIndexQueryKey
InvertedObjectQueryMap
typedef
std::tr1::unordered_map
< ProxIndexID,
ReplicatedIndexQueryHandler
ReplicatedIndexQueryHandlerMap
typedef
std::tr1::unordered_map
< ProxAggregator
*, ProxIndexID
InverseReplicatedIndexQueryHandlerMap
typedef std::tr1::shared_ptr
< ObjectSet
ObjectSetPtr
typedef
std::tr1::unordered_set
< ObjectReference,
ObjectReference::Hasher
SubscriberSet
typedef std::tr1::shared_ptr
< SubscriberSet
SubscriberSetPtr
typedef
std::tr1::unordered_map
< ObjectReference,
SubscriberSetPtr,
ObjectReference::Hasher
SubscribersMap

Private Member Functions

int32 objectQueries () const
void handleDeliverEvents ()
void handleNotifySubscribersLocUpdate (Liveness::Token alive, ReplicatedLocationServiceCache *loccache, const ObjectReference &oref)
void updateQuery (HostedObjectPtr ho, const SpaceObjectReference &sporef, SolidAngle sa, uint32 max_results)
void updateQuery (const ObjectReference &obj, const TimedMotionVector3f &loc, const BoundingSphere3f &bounds, SolidAngle sa, uint32 max_results)
void registerObjectQueryWithIndex (const ObjectReference &object, ProxIndexID index_id, ProxQueryHandler *handler, const TimedMotionVector3f &loc, const BoundingSphere3f &bounds, const SolidAngle &angle, uint32 max_results)
void registerObjectQueryWithServer (const ObjectReference &object, ServerID sid, const TimedMotionVector3f &loc, const BoundingSphere3f &bounds, const SolidAngle &angle, uint32 max_results)
void unregisterObjectQueryWithIndex (const ObjectReference &object, ProxIndexID index_id)
void unregisterObjectQueryWithServer (const ObjectReference &object, ServerID sid)
void handleUpdateObjectQuery (Liveness::Token alive, const ObjectReference &object, const TimedMotionVector3f &loc, const BoundingSphere3f &bounds, const SolidAngle &angle, uint32 max_results)
void handleRemoveObjectQuery (Liveness::Token alive, const ObjectReference &object, bool notify_main_thread)
void handleDisconnectedObject (Liveness::Token alive, const ObjectReference &object)
void generateObjectQueryEvents (Query *query)
void tickQueryHandler ()

Private Attributes

SubscribersMap mSubscribers
InstanceMethodNotReentrant mQueryHasEventsNotRentrant
ObjectQueryMap mObjectQueries
InvertedObjectQueryMap mInvertedObjectQueries
ReplicatedIndexQueryHandlerMap mObjectQueryHandlers
InverseReplicatedIndexQueryHandlerMap mInverseObjectQueryHandlers
bool mObjectDistance
PollerService mObjectHandlerPoller
Sirikata::ThreadSafeQueueWithNotification
< ProximityResultInfo
mObjectResults

Member Typedef Documentation

typedef std::tr1::unordered_map<ProxIndexID, Query*> Sirikata::OH::Manual::ObjectQueryHandler::IndexQueryMap [private]
typedef std::tr1::shared_ptr<ObjectSet> Sirikata::OH::Manual::ObjectQueryHandler::ObjectSetPtr [private]
typedef Prox::Aggregator<ObjectProxSimulationTraits> Sirikata::OH::Manual::ObjectQueryHandler::ProxAggregator [private]
typedef Prox::QueryHandler<ObjectProxSimulationTraits> Sirikata::OH::Manual::ObjectQueryHandler::ProxQueryHandler [private]
typedef Prox::Query<ObjectProxSimulationTraits> Sirikata::OH::Manual::ObjectQueryHandler::Query
typedef Prox::QueryEvent<ObjectProxSimulationTraits> Sirikata::OH::Manual::ObjectQueryHandler::QueryEvent
typedef std::tr1::unordered_set<ServerID> Sirikata::OH::Manual::ObjectQueryHandler::ServerIDSet [private]

Constructor & Destructor Documentation

Sirikata::OH::Manual::ObjectQueryHandler::ObjectQueryHandler ( ObjectHostContext ctx,
ManualObjectQueryProcessor parent,
const OHDP::SpaceNodeID space,
Network::IOStrandPtr  prox_strand 
)
Sirikata::OH::Manual::ObjectQueryHandler::~ObjectQueryHandler ( )

Member Function Documentation

void Sirikata::OH::Manual::ObjectQueryHandler::aggregateBoundsUpdated ( ProxAggregator handler,
const ObjectReference objid,
const Vector3f &  bnds_center,
const float32  bnds_center_radius,
const float32  max_obj_size 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::aggregateChildAdded ( ProxAggregator handler,
const ObjectReference objid,
const ObjectReference child,
const Vector3f &  bnds_center,
const float32  bnds_center_radius,
const float32  max_obj_size 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::aggregateChildRemoved ( ProxAggregator handler,
const ObjectReference objid,
const ObjectReference child,
const Vector3f &  bnds_center,
const float32  bnds_center_radius,
const float32  max_obj_size 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::aggregateCreated ( ProxAggregator handler,
const ObjectReference objid 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::aggregateDestroyed ( ProxAggregator handler,
const ObjectReference objid 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::aggregateObserved ( ProxAggregator handler,
const ObjectReference objid,
uint32  nobservers,
uint32  nchildren 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::commandForceRebuild ( const Command::Command cmd,
Command::Commander cmdr,
Command::CommandID  cmdid 
)
void Sirikata::OH::Manual::ObjectQueryHandler::commandListInfo ( const OHDP::SpaceNodeID snid,
Command::Result result 
)
void Sirikata::OH::Manual::ObjectQueryHandler::commandListNodes ( const Command::Command cmd,
Command::Commander cmdr,
Command::CommandID  cmdid 
)
void Sirikata::OH::Manual::ObjectQueryHandler::commandListQueriers ( const OHDP::SpaceNodeID snid,
Command::Result result 
)
void Sirikata::OH::Manual::ObjectQueryHandler::createdReplicatedIndex ( ProxIndexID  iid,
ReplicatedLocationServiceCachePtr  loc_cache,
ServerID  objects_from_server,
bool  dynamic_objects 
)
void Sirikata::OH::Manual::ObjectQueryHandler::generateObjectQueryEvents ( Query query) [private]
ObjectQueryHandler::ProxQueryHandler * Sirikata::OH::Manual::ObjectQueryHandler::getQueryHandler ( const String &  handler_name)

References mObjectQueryHandlers.

Referenced by commandListNodes().

void Sirikata::OH::Manual::ObjectQueryHandler::handleCreatedReplicatedIndex ( Liveness::Token  alive,
ProxIndexID  iid,
ReplicatedLocationServiceCachePtr  loc_cache,
ServerID  objects_from_server,
bool  dynamic_objects 
)
void Sirikata::OH::Manual::ObjectQueryHandler::handleDeliverEvents ( ) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::handleDisconnectedObject ( Liveness::Token  alive,
const ObjectReference object 
) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::handleNotifySubscribersLocUpdate ( Liveness::Token  alive,
ReplicatedLocationServiceCache *  loccache,
const ObjectReference oref 
) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::handleRemovedReplicatedIndex ( Liveness::Token  alive,
ProxIndexID  iid 
)
void Sirikata::OH::Manual::ObjectQueryHandler::handleRemoveObjectQuery ( Liveness::Token  alive,
const ObjectReference object,
bool  notify_main_thread 
) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::handleUpdateObjectQuery ( Liveness::Token  alive,
const ObjectReference object,
const TimedMotionVector3f loc,
const BoundingSphere3f &  bounds,
const SolidAngle angle,
uint32  max_results 
) [private]
int32 Sirikata::OH::Manual::ObjectQueryHandler::objectQueries ( ) const [private]

References mObjectQueries.

void Sirikata::OH::Manual::ObjectQueryHandler::onBoundsUpdated ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::onEpochUpdated ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::onLocationUpdated ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::onMeshUpdated ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::onObjectAdded ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::onObjectRemoved ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::onOrientationUpdated ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::onParentUpdated ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::onPhysicsUpdated ( ReplicatedLocationServiceCache *  loccache,
const ObjectReference obj 
) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::presenceConnected ( const ObjectReference sporef)
void Sirikata::OH::Manual::ObjectQueryHandler::presenceDisconnected ( const ObjectReference sporef)
void Sirikata::OH::Manual::ObjectQueryHandler::queryHasEvents ( Query query)
void Sirikata::OH::Manual::ObjectQueryHandler::registerObjectQueryWithIndex ( const ObjectReference object,
ProxIndexID  index_id,
ProxQueryHandler handler,
const TimedMotionVector3f loc,
const BoundingSphere3f &  bounds,
const SolidAngle angle,
uint32  max_results 
) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::registerObjectQueryWithServer ( const ObjectReference object,
ServerID  sid,
const TimedMotionVector3f loc,
const BoundingSphere3f &  bounds,
const SolidAngle angle,
uint32  max_results 
) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::removedReplicatedIndex ( ProxIndexID  iid)
void Sirikata::OH::Manual::ObjectQueryHandler::removeQuery ( HostedObjectPtr  ho,
const SpaceObjectReference sporef 
)
void Sirikata::OH::Manual::ObjectQueryHandler::start ( ) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::stop ( ) [virtual]
void Sirikata::OH::Manual::ObjectQueryHandler::tickQueryHandler ( ) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::unregisterObjectQueryWithIndex ( const ObjectReference object,
ProxIndexID  index_id 
) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::unregisterObjectQueryWithServer ( const ObjectReference object,
ServerID  sid 
) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::updateQuery ( const ObjectReference obj,
const TimedMotionVector3f loc,
const BoundingSphere3f &  bounds,
SolidAngle  sa,
uint32  max_results 
) [private]
void Sirikata::OH::Manual::ObjectQueryHandler::updateQuery ( HostedObjectPtr  ho,
const SpaceObjectReference sporef,
const String &  params 
)
void Sirikata::OH::Manual::ObjectQueryHandler::updateQuery ( HostedObjectPtr  ho,
const SpaceObjectReference sporef,
SolidAngle  sa,
uint32  max_results 
) [private]

Member Data Documentation

Referenced by start(), and stop().

Referenced by queryHasEvents().


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