Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

object.h

Go to the documentation of this file.
00001 /* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
00002 
00003    this file is part of rcssserver3D
00004    Fri May 9 2003
00005    Copyright (C) 2002,2003 Koblenz University
00006    Copyright (C) 2003 RoboCup Soccer Server 3D Maintenance Group
00007    $Id: object.h,v 1.5 2004/04/08 14:36:34 rollmark Exp $
00008 
00009    This program is free software; you can redistribute it and/or modify
00010    it under the terms of the GNU General Public License as published by
00011    the Free Software Foundation; version 2 of the License.
00012 
00013    This program is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016    GNU General Public License for more details.
00017 
00018    You should have received a copy of the GNU General Public License
00019    along with this program; if not, write to the Free Software
00020    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00021 
00022    Object
00023 
00024         HISTORY:
00025                 31.08.2002 MK
00026                         - initial version
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     // functions
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     // class object
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     // members
00102     //
00103 private:
00105     boost::shared_ptr<Class>                mClass;
00106 
00108     boost::weak_ptr<Object>                 mSelf;
00109 };
00110 
00111 } //namespace zeitgeist;
00112 
00113 #endif //ZEITGEIST_OBJECT_H

Generated on Thu Apr 6 15:25:39 2006 for rcssserver3d by  doxygen 1.4.4