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

A reference to an object in a space. More...

#include <ObjectReference.hpp>

Inheritance diagram for Sirikata::ObjectReference:
Collaboration diagram for Sirikata::ObjectReference:

List of all members.

Classes

class  Hasher
class  Null
class  Random

Public Types

enum  { static_size = UUID::static_size }

Public Member Functions

 ObjectReference ()
 ObjectReference (const UUID &id)
 ObjectReference (const String &str)
 ObjectReference (const UUID::Data &data)
UUID::Data toRawBytes () const
String toRawHexData () const
String toString () const
size_t hash () const
const UUIDgetObjectUUID () const
 Get the UUID of the object referred to.
UUID getAsUUID () const
 Get this object reference in the form of an UUID.
bool isNull () const
bool operator== (const ObjectReference &rhs) const
bool operator< (const ObjectReference &rhs) const
bool matches (const ObjectReference &rhs) const

Static Public Member Functions

static const ObjectReferencenull ()
static const ObjectReferenceany ()
 Get a reserved ObjectReference which is a sentinal to match any other ObjectReference.
static ObjectReference random ()
static const ObjectReferencespaceServiceID ()

Private Attributes

UUID mID

Detailed Description

A reference to an object in a space.

This can be used as an address to send a message to an object via a space. ObjectReferences are specific to spaces, i.e. they are not guaranteed to work in spaces other than the one they originated in.


Member Enumeration Documentation

anonymous enum
Enumerator:
static_size 

Constructor & Destructor Documentation

Sirikata::ObjectReference::ObjectReference ( )
Sirikata::ObjectReference::ObjectReference ( const UUID id) [explicit]
Sirikata::ObjectReference::ObjectReference ( const String &  str) [explicit]
Sirikata::ObjectReference::ObjectReference ( const UUID::Data data) [explicit]

Member Function Documentation

static const ObjectReference& Sirikata::ObjectReference::any ( ) [inline, static]

Get a reserved ObjectReference which is a sentinal to match any other ObjectReference.

References Sirikata::UUID::max().

Referenced by Sirikata::ODP::Endpoint::any().

UUID Sirikata::ObjectReference::getAsUUID ( ) const [inline]

Get this object reference in the form of an UUID.

This value is space-specific and used in contexts where objects need to be addressed by some form of UUID, e.g. for message routing. Note the contrast with getObjectUUID().

Referenced by Sirikata::LibproxProximityBase::aggregateBoundsUpdated(), Sirikata::LibproxProximityBase::aggregateChildAdded(), Sirikata::LibproxProximityBase::aggregateChildRemoved(), Sirikata::LibproxProximityBase::aggregateCreated(), Sirikata::LibproxProximityBase::aggregateDestroyed(), Sirikata::LibproxProximityBase::aggregateObserved(), Sirikata::createObjectHostMessage(), Sirikata::createObjectMessage(), Sirikata::Server::delegateODPPortSend(), Sirikata::HostedObject::delegateODPPortSend(), Sirikata::LibproxProximity::generateObjectQueryEvents(), Sirikata::OH::Manual::ObjectQueryHandler::generateObjectQueryEvents(), Sirikata::LibproxProximity::generateServerQueryEvents(), Sirikata::HostedObject::handleProximityUpdate(), Sirikata::LocationService::newSession(), Sirikata::LibproxProximity::newSession(), Sirikata::Server::newStream(), Sirikata::SessionManager::openConnectionStartMigration(), Sirikata::SessionManager::openConnectionStartSession(), Sirikata::HostedObject::processLocationUpdate(), Sirikata::LibproxManualProximity::queryHasEvents(), Sirikata::LibproxProximityBase::readFramesFromObjectStream(), Sirikata::SessionManager::sendDisconnectMessage(), Sirikata::LibproxProximity::sessionClosed(), and Sirikata::LibproxProximityBase::updateAggregateLoc().

const UUID& Sirikata::ObjectReference::getObjectUUID ( ) const [inline]

Get the UUID of the object referred to.

This is not necessarily space-specific, it is just the value used to construct this reference. Note the contrast with getAsUUID().

size_t Sirikata::ObjectReference::hash ( ) const [inline]
bool Sirikata::ObjectReference::isNull ( ) const [inline]
bool Sirikata::ObjectReference::matches ( const ObjectReference rhs) const [inline]
static const ObjectReference& Sirikata::ObjectReference::null ( ) [inline, static]
bool Sirikata::ObjectReference::operator< ( const ObjectReference rhs) const [inline]

References mID.

bool Sirikata::ObjectReference::operator== ( const ObjectReference rhs) const [inline]

References mID.

static ObjectReference Sirikata::ObjectReference::random ( ) [inline, static]
static const ObjectReference& Sirikata::ObjectReference::spaceServiceID ( ) [inline, static]
UUID::Data Sirikata::ObjectReference::toRawBytes ( ) const [inline]
String Sirikata::ObjectReference::toRawHexData ( ) const [inline]
String Sirikata::ObjectReference::toString ( ) const [inline]

Member Data Documentation

Referenced by operator<(), and operator==().


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