Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages | Examples

vos/corelibs/vos/remotemetaobject.hh

Go to the documentation of this file.
00001 /*
00002     This file is part of the Virtual Object System of
00003     the Interreality project (http://interreality.org).
00004 
00005     Copyright (C) 2001-2003 Peter Amstutz
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Lesser General Public
00009     License as published by the Free Software Foundation; either
00010     version 2 of the License, or (at your option) any later version.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015     Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public
00018     License along with this library; if not, write to the Free Software
00019     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
00020 
00021     Peter Amstutz <tetron@interreality.org>
00022 */
00023 #ifndef _REMOTEMETAOBJECT_HH_
00024 #define _REMOTEMETAOBJECT_HH_
00025 
00026 /** @file
00027     Defines RemoteMetaObject.
00028 */
00029 
00030 #include <vos/corelibs/vos/vosdefs.hh>
00031 #include <vos/corelibs/vos/metaobject.hh>
00032 #include <vos/corelibs/vos/remotevobject.hh>
00033 
00034 namespace VOS
00035 {
00036 /** @class RemoteMetaObject remotemetaobject.hh vos/corelibs/vos/remotemetaobject.hh
00037 
00038     A RemoteMetaObject is a Remote Vobject supporting the MetaObject
00039     extension architechture, allowing you to use meta_cast to select
00040     between available C++ interfaces supported by the Vobject type.
00041  */
00042 class VOS_API RemoteMetaObject : public virtual MetaObject, public virtual RemoteVobject
00043 {
00044 protected:
00045     RemoteMetaObject(const string& name, RemoteSite* remotesite);
00046 public:
00047     virtual ~RemoteMetaObject();
00048 
00049     virtual const string& getName();
00050     virtual Site& getSite();
00051     virtual const URL& getURL();
00052     virtual bool isLocal();
00053     virtual bool isRemote();
00054     virtual const TypeSet& getTypes()
00055         throw (AccessControlError, RemoteError);
00056     virtual void addType(const string& s);
00057     virtual const ParentSet& getParents()
00058         throw (AccessControlError, RemoteError);
00059     virtual const ChildList& getChildren()
00060         throw (AccessControlError, RemoteError);
00061 
00062     virtual void sendMessage(Message* m);
00063     virtual void sendMessage(MessageBlock* m);
00064     virtual Message* receiveMessage() throw (MessageQueueEmptyError);
00065     virtual bool hasMessageAvailable();
00066 
00067     virtual void handleNewType(const string& t);
00068 
00069     virtual void sendUpdateMessage(Message* m);
00070     virtual Message* receiveUpdateMessage() throw (MessageQueueEmptyError);
00071     virtual bool hasUpdateMessageAvailable();
00072 
00073     virtual Vobject& findObject(const string& path) throw (NoSuchSiteError, NoSuchObjectError,
00074                                                            URL::BadURLError, AccessControlError, RemoteError);
00075     virtual Vobject::ParentChildRelation& findChild(const string& path)
00076         throw (NoSuchObjectError, AccessControlError, RemoteError);
00077     virtual Vobject::ParentChildRelation& findParent(Vobject& parent)
00078         throw (NoSuchObjectError, AccessControlError, RemoteError);
00079     virtual void setChild(int position, const string& contextual_name, Vobject* child)
00080         throw (AccessControlError, RemoteError);
00081     virtual void insertChild(int position, const string& contextual_name, Vobject* child)
00082         throw (AccessControlError, RemoteError);
00083     virtual void removeChild(int position)
00084         throw (AccessControlError, RemoteError);
00085 
00086     virtual void addTypeListener(TypeChangeListener* tl, bool notifyImmediately = true);
00087     virtual void addParentListener(ParentChangeListener* pl, bool notifyImmediately = true);
00088     virtual void addChildListener(ChildChangeListener* cl, bool notifyImmediately = true);
00089     virtual void removeTypeListener(TypeChangeListener* tl);
00090     virtual void removeParentListener(ParentChangeListener* pl);
00091     virtual void removeChildListener(ChildChangeListener* cl);
00092 
00093     virtual void saveState(MessageBlock& output, set<string>& types, bool portable);
00094 
00095     virtual void addFlag(const string& flag);
00096     virtual void removeFlag(const string& flag);
00097     virtual bool checkFlag(const string& flag);
00098 
00099     virtual void excise();
00100     virtual void acquire();
00101     virtual void release();
00102     virtual int getCount();
00103 
00104     friend class RemoteSite;
00105 };
00106 }
00107 
00108 #endif

Generated on Tue Aug 12 03:55:41 2003 for Interreality Project - VOS by doxygen 1.3.2