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

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