#include <vos/corelibs/vos/metaobject.hh>
Inheritance diagram for VOS::MetaObject:
Messages sent to it using sendMessage() and sendUpdateMessage() are propagated to any extension plugins which have been attached to it. Metaobjects allow you to switch between multiple interfaces using meta_cast, allowing you to request a certain C++ class interface such as Property or Talkative from a given Vobject, if the Vobject has that type.
Definition at line 44 of file metaobject.hh.
|
|
|
destructor
|
|
Note that this means you have a handle on the entire logical object!
Reimplemented from VOS::RefCounted. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::acquire(), VOS::VobjectImplementation::getSite(), VOS::Message::getSourceSite(), VOS::Message::setSourceSite(), and VOS::VobjectImplementation::VobjectImplementation(). |
|
Adds some object callback to be notified when the child list changes. The child listener will immediately be issued a notifyChildInserted() for each child.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::addChildListener(). |
|
Referenced by VOS::RemoteMetaObject::addFlag(). |
|
Definition at line 286 of file metaobject.hh. |
|
Add an instantiated extension object to this metaobject. End users generally shouldn't need to do this, use MetaFactory::extendLocalObject() instead.
|
|
Adds some object callback to be notified when the parent set changes.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::addParentListener(). |
|
Referenced by VOS::RemoteMetaObject::addType(). |
|
Adds some object callback to be notified when the type set changes.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::addTypeListener(). |
|
Definition at line 293 of file metaobject.hh. |
|
Referenced by VOS::RemoteMetaObject::checkFlag(). |
|
This is where you put type-handler specific code to respond to an excise(). It will be called exactly once. |
|
This is where you put type-handler specific save state code.
Referenced by VOS::RemoteMetaObject::saveState(). |
|
Reimplemented from VOS::RefCounted. Reimplemented in VOS::LocalMetaObject, VOS::RemoteMetaObject, VOS::RemoteSite, and VOS::RemoteSocketSite. |
|
|
|
Referenced by VOS::Vobject::findObjectFromRoot(). |
|
Find a parent. This tests to see if the supplied Vobject is marked as a parent of this Vobject.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. |
|
Get the set of parent-child relationships in which this object is the parent.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. |
|
Note that this counts for the entire logical object!
Reimplemented from VOS::RefCounted. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::getCount(), VOS::Message::~Message(), and VOS::VobjectImplementation::~VobjectImplementation(). |
|
Get the site name of this object.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::getName(). |
|
Get the set of parent-child relationships in which this object is the child.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. |
|
Get the site this object resides on.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, VOS::LocalSite, VOS::RemoteMetaObject, VOS::RemoteSite, and VOS::Site. Referenced by VOS::RemoteMetaObject::getSite(). |
|
Get the superobject (the object immediately containing this metaobject).
|
|
Get the 'top' superobject, that is, the root of the metaobject tree.
|
|
Reimplemented in VOS::Site. |
|
Get a vector of the extension object contained in this metaobject.
Referenced by VOS::RemoteMetaObject::handleNewType(). |
|
Return a set of type names for the types supported by this object.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. |
|
Get the URL path (in the form "vop://site/name").
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::getURL(), VOS::VobjectImplementation::VobjectImplementation(), and VOS::VobjectImplementation::~VobjectImplementation(). |
|
Returns if the object has a message available to be dequeued by receiveMessage().
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::hasMessageAvailable(). |
|
Returns if the object has a message available to be dequeued by receiveUpdateMessage().
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::hasUpdateMessageAvailable(). |
|
Some MetaObject subclasses provide an initialize method to create required subobjects with default values, to set a default property access control policy, etc. Calling this method on a top level MetaObject will call initialize() on each of it's type extensions. e.g.: MetaObject* foo = site->createMetaObject("foo", typeid(A3DL::Cube).name(), typeid(Hypercard).name(), 0); foo->initialize(); // calls A3DL::Cube::initialize() and Hypercard::initialize() MetaObject::meta_cast<Hypercard*>(foo)->initialize(); // just call Hypercard::initialize(). |
|
Initialize the security policy of a newly created local metaobject.
|
|
|
|
Return true if this object is local, false if not.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, VOS::RemoteMetaObject, and VOS::RemoteStreamSite. Referenced by VOS::RemoteMetaObject::isLocal(). |
|
Return true if this object is remote, false if not.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, VOS::RemoteMetaObject, and VOS::RemoteStreamSite. Referenced by VOS::RemoteMetaObject::isRemote(). |
|
A specialized cast allowing you to switch between different extension plugins in the same logical object. It searches the metaobject type tree of this for an instance of an extension that satisfied the requested type. You can cast any member of a logical object to any other member. For example: LocalMetaObject* l = MetaFactory::createLocalMetaObject(mysite, typeid(Property).name(), typeid(World).name(), 0); Property& p = MetaObject::meta_cast<Property&>(*l); World& w = MetaObject::meta_cast<World&>(p);
Definition at line 264 of file metaobject.hh. |
|
A specialized cast allowing you to switch between different extension plugins in the same logical object. It searches the metaobject type tree of this for an instance of an extension that satisfied the requested type. You can cast any member of a logical object to any other member. For example: LocalMetaObject* l = MetaFactory::createLocalMetaObject(mysite, typeid(Property).name(), typeid(World).name(), 0); Property* p = MetaObject::meta_cast<Property*>(l); World* w = MetaObject::meta_cast<World*>(p);
Definition at line 235 of file metaobject.hh. |
|
A specialized cast allowing you to switch between different extension plugins in the same logical object. It first attempts to dynamic_cast the Vobject into a MetaObject, and then searches the metaobject type tree of this for an instance of an extension that satisfied the requested type.
Definition at line 207 of file metaobject.hh. |
|
A specialized cast allowing you to switch between different extension plugins in the same logical object. It first attempts to dynamic_cast the Vobject into a MetaObject, and then searches the metaobject type tree of this for an instance of an extension that satisfied the requested type.
Definition at line 193 of file metaobject.hh. |
|
Gets the next message the object has received.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. |
|
Gets the next update message the object has received.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. |
|
Note that this means you are releasing the entire logical object!
Reimplemented from VOS::RefCounted. Reimplemented in VOS::LocalMetaObject, VOS::RemoteMetaObject, and VOS::RemoteSite. Referenced by VOS::Vobject::findObjectFromRoot(), VOS::RemoteMetaObject::release(), VOS::Message::setSourceSite(), VOS::Message::~Message(), and VOS::VobjectImplementation::~VobjectImplementation(). |
|
Remove the child at some position. See setChild() for more information on positions.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, VOS::LocalSite, and VOS::RemoteMetaObject. |
|
Removes an existing object callback, previously added with addChildListener().
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::removeChildListener(). |
|
Referenced by VOS::RemoteMetaObject::removeFlag(). |
|
Definition at line 300 of file metaobject.hh. |
|
Removes an existing object callback, previously added with addParentListener().
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::removeParentListener(). |
|
Removes an existing object callback, previously added with addTypeListener().
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, and VOS::RemoteMetaObject. Referenced by VOS::RemoteMetaObject::removeTypeListener(). |
|
Definition at line 305 of file metaobject.hh. |
|
Referenced by VOS::RemoteMetaObject::saveState(). |
|
Sends a block of messages to the object. This may trigger immediate processing of the message if the object is local.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, VOS::LocalSite, VOS::RemoteMetaObject, VOS::RemoteSite, VOS::RemoteSocketSite, VOS::RemoteStreamSite, and VOS::Site. |
|
Sends a message to the object. This may trigger immediate processing of the message if the object is local.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, VOS::LocalSite, VOS::LocalSocketSite, VOS::RemoteMetaObject, VOS::RemoteSite, VOS::RemoteSocketSite, VOS::RemoteStreamSite, and VOS::Site. |
|
Gets the next message the update object has received. Update messages are special in that they consist of messages sent from remote sites to update changes to our local cache.
Implements VOS::Vobject. Reimplemented in VOS::LocalMetaObject, VOS::RemoteMetaObject, and VOS::RemoteSite. |
|
|
|