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 #ifndef _VOS_HH_
00027 #error Please only include "vos.hh"!
00028 #endif
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
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