CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

sharevar.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2002 by Keith Fulton
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __CS_IENGINE_SHAREVAR_H__
00020 #define __CS_IENGINE_SHAREVAR_H__
00021 
00028 #include "cstypes.h"
00029 #include "csutil/scf.h"
00030 #include "csutil/cscolor.h"
00031 #include "csgeom/vector3.h"
00032 
00033 SCF_VERSION (iSharedVariable, 0, 1, 0);
00034 
00039 struct iSharedVariable : public iBase
00040 {
00042   virtual iObject* QueryObject () = 0;
00043 
00045   virtual void SetName (const char *name) = 0;
00046 
00048   virtual const char *GetName () const = 0;
00049 
00051   virtual void Set(float val) = 0;
00052 
00054   virtual float Get () const = 0;
00055 
00057   virtual void SetColor (const csColor& col) = 0;
00058 
00060   virtual const csColor& GetColor () const = 0;
00061 
00063   virtual void SetVector (const csVector3& v) = 0;
00064 
00066   virtual const csVector3& GetVector () const = 0;
00067 
00069   enum SharedVariableType
00070   {
00071       SV_UNKNOWN = 0,
00072       SV_FLOAT   = 1,
00073       SV_COLOR   = 2,
00074       SV_VECTOR  = 3
00075   };
00076 
00078   virtual int GetType () const = 0;
00079 };
00080 
00081 
00082 
00083 SCF_VERSION (iSharedVariableList, 0, 0, 2);
00084 
00088 struct iSharedVariableList : public iBase
00089 {
00091   virtual int GetCount () const = 0;
00092 
00094   virtual iSharedVariable *Get (int n) const = 0;
00095 
00097   virtual int Add (iSharedVariable *obj) = 0;
00098 
00100   virtual bool Remove (iSharedVariable *obj) = 0;
00101 
00103   virtual bool Remove (int n) = 0;
00104 
00106   virtual void RemoveAll () = 0;
00107 
00109   virtual int Find (iSharedVariable *obj) const = 0;
00110 
00112   virtual iSharedVariable *FindByName (const char *Name) const = 0;
00113 
00115   virtual csPtr<iSharedVariable> New() const = 0;
00116 };
00117 
00118 #endif // __CS_IENGINE_SHAREVAR_H__

Generated for Crystal Space by doxygen 1.2.14