00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _LOCALMETAOBJECT_HH_
00024 #define _LOCALMETAOBJECT_HH_
00025
00026
00027
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
00037
00038
00039
00040
00041
00042
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