00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef ZEITGEIST_OBJECT_H
00029 #define ZEITGEIST_OBJECT_H
00030
00031 #include <boost/weak_ptr.hpp>
00032 #include <boost/shared_ptr.hpp>
00033 #include "core.h"
00034 #include "parameterlist.h"
00035
00036 namespace zeitgeist
00037 {
00038
00039 class Class;
00040 class LogServer;
00041 class ScriptServer;
00042
00050 class Object
00051 {
00052
00053
00054
00055 public:
00057 Object();
00058 virtual ~Object();
00059
00064 bool Construct(const boost::shared_ptr<Object>& self, const boost::shared_ptr<Class>& creator);
00065
00066
00068 boost::shared_ptr<Class> GetClass() const;
00069
00071 boost::weak_ptr<Object>& GetSelf();
00072
00074 const boost::weak_ptr<Object>& GetSelf() const;
00075
00077 boost::shared_ptr<Core> GetCore() const;
00078
00080 const boost::shared_ptr<FileServer>& GetFile() const;
00081
00083 const boost::shared_ptr<LogServer>& GetLog() const;
00084
00086 const boost::shared_ptr<ScriptServer>& GetScript() const;
00087
00089 virtual void Dump() const;
00090
00092 void Invoke(const std::string &functionName, const ParameterList& parameter);
00093
00094 protected:
00098 virtual bool ConstructInternal();
00099
00100
00101
00102
00103 private:
00105 boost::shared_ptr<Class> mClass;
00106
00108 boost::weak_ptr<Object> mSelf;
00109 };
00110
00111 }
00112
00113 #endif //ZEITGEIST_OBJECT_H