Sirikata
|
A reference to an object in a space. More...
#include <ObjectReference.hpp>
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 UUID & | getObjectUUID () 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 ObjectReference & | null () |
static const ObjectReference & | any () |
Get a reserved ObjectReference which is a sentinal to match any other ObjectReference. | |
static ObjectReference | random () |
static const ObjectReference & | spaceServiceID () |
Private Attributes | |
UUID | mID |
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.
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] |
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] |
Referenced by Sirikata::ObjectReference::Hasher::operator()().
bool Sirikata::ObjectReference::isNull | ( | ) | const [inline] |
bool Sirikata::ObjectReference::matches | ( | const ObjectReference & | rhs | ) | const [inline] |
static const ObjectReference& Sirikata::ObjectReference::null | ( | ) | [inline, static] |
References Sirikata::UUID::null().
Referenced by Sirikata::SpaceObjectReference::null(), Sirikata::ODP::Endpoint::null(), Sirikata::HostedObject::objectHostConnect(), Sirikata::SessionManager::openConnectionStartSession(), Sirikata::ObjectReference::Null::operator()(), Sirikata::LibproxManualProximity::queryHasEvents(), Sirikata::JS::JSUtilObj::ScriptSporef(), and Sirikata::SpaceObjectReference::SpaceObjectReference().
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] |
References Sirikata::UUID::random().
Referenced by Sirikata::ObjectReference::Random::operator()().
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] |
UUID Sirikata::ObjectReference::mID [private] |
Referenced by operator<(), and operator==().