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

gcvalue.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: gcvalue.h,v 1.3 2004/03/22 10:34:42 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 
00023 #ifndef ZEITGEIST_GCVALUE_H
00024 #define ZEITGEIST_GCVALUE_H
00025 
00026 #include <zeitgeist/scriptserver/rubywrapper.h>
00027 
00028 namespace zeitgeist
00029 {
00040 class GCValue
00041 {
00042 public:
00043     GCValue();
00044     GCValue(const GCValue& value);
00045     GCValue(VALUE v);
00046 
00048     GCValue(bool b);
00049 
00051     GCValue(const std::string& str);
00052 
00054     GCValue(const char* str);
00055 
00057     GCValue(float f);
00058 
00060     GCValue(int i);
00061 
00062     ~GCValue();
00063 
00064     void operator = (const GCValue& value);
00065     void operator = (const VALUE& value);
00066 
00068     VALUE Get();
00069 
00073     void Set(VALUE v);
00074 
00076     bool IsNil();
00077 
00081     bool GetInt(int& value);
00082 
00086     bool GetFloat(float& value);
00087 
00091     bool GetBool(bool& value);
00092 
00096     bool GetString(std::string& value);
00097 
00098 protected:
00102     void GC_Unregister();
00103 
00107     void GC_Register();
00108 
00109 protected:
00111     VALUE mValue;
00112 };
00113 
00114 } // namespace zeitgeist
00115 
00116 #endif // ZEITGEIST_GCVALUE_H

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