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/localmetaobject.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 _LOCALMETAOBJECT_HH_
00024 #define _LOCALMETAOBJECT_HH_
00025 
00026 /** @file
00027     Defines LocalMetaObject.
00028  */
00029 
00030 #include <vos/corelibs/vos/vosdefs.hh>
00031 #include <vos/corelibs/vos/metaobject.hh>
00032 #include <vos/corelibs/vos/localvobject.hh>
00033 
00034 namespace VOS
00035 {
00036 /** @class LocalMetaObject localmetaobject.hh vos/corelibs/vos/localmetaobject.hh
00037  *
00038  * A local object which is extensible using the MetaObject
00039     architechture.  Generally this will be used as the root of a
00040     MetaObject extension tree, because it inherits from LocalVobject
00041     and VobjectImplementation all the relevant Vobject data
00042     structures.
00043 */
00044 class VOS_API LocalMetaObject : public virtual MetaObject, public virtual LocalVobject
00045 {
00046 public:
00047     LocalMetaObject(const string& name, LocalSite* localsite, VobjectAccessControl* ac);
00048 
00049     virtual ~LocalMetaObject();
00050 
00051     virtual const string& getName();
00052     virtual Site& getSite();
00053     virtual const URL& getURL();
00054     virtual bool isLocal();
00055     virtual bool isRemote();
00056     virtual const TypeSet& getTypes() throw (AccessControlError);;
00057     virtual void addType(const string& s);
00058     virtual void addType(const string& s, MetaObject& add_requester);
00059     virtual const ParentSet& getParents()
00060         throw (AccessControlError);
00061     virtual const ChildList& getChildren()
00062         throw (AccessControlError, RemoteError);
00063 
00064     virtual void sendMessage(Message* m);
00065     virtual void sendMessage(MessageBlock* m);
00066     virtual Message* receiveMessage() throw (MessageQueueEmptyError);
00067     virtual bool hasMessageAvailable();
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) throw (NoSuchObjectError, AccessControlError, RemoteError);
00076     virtual Vobject::ParentChildRelation& findParent(Vobject& parent)
00077         throw (NoSuchObjectError, AccessControlError);
00078     virtual void setChild(int position, const string& contextual_name, Vobject* child)
00079         throw (AccessControlError, RemoteError);
00080     virtual void  insertChild(int position, const string& contextual_name, Vobject* child)
00081         throw (AccessControlError, RemoteError);
00082     virtual void removeChild(int position)
00083         throw (AccessControlError, RemoteError);
00084 
00085     virtual void addTypeListener(TypeChangeListener* tl, bool notifyImmediately = true);
00086     virtual void addParentListener(ParentChangeListener* pl, bool notifyImmediately = true);
00087     virtual void addChildListener(ChildChangeListener* cl, bool notifyImmediately = true);
00088     virtual void removeTypeListener(TypeChangeListener* tl);
00089     virtual void removeParentListener(ParentChangeListener* pl);
00090     virtual void removeChildListener(ChildChangeListener* cl);
00091 
00092     virtual void saveState(MessageBlock& output, set<string>& types, bool portable);
00093 
00094     virtual void addFlag(const string& flag);
00095     virtual void removeFlag(const string& flag);
00096     virtual bool checkFlag(const string& flag);
00097 
00098     virtual void excise();
00099     virtual void acquire();
00100     virtual void release();
00101     virtual int getCount();
00102 };
00103 }
00104 
00105 #endif

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