CEL

Public API Reference

tools/expression.h
00001 /*
00002     Crystal Space Entity Layer
00003     Copyright (C) 2006 by Jorrit Tyberghein
00004   
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009   
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014   
00015     You should have received a copy of the GNU Library General Public
00016     License along with this library; if not, write to the Free
00017     Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00018 */
00019 
00020 #ifndef __CEL_TOOLS_EXPRESSION__
00021 #define __CEL_TOOLS_EXPRESSION__
00022 
00023 #include "cstypes.h"
00024 #include "csutil/scf.h"
00025 #include "csutil/stringarray.h"
00026 
00027 #include "physicallayer/datatype.h"
00028 
00029 class csVector2;
00030 class csVector3;
00031 class csColor;
00032 struct iCelParameterBlock;
00033 
00037 struct iCelExpression : virtual public iBase
00038 {
00039   SCF_INTERFACE (iCelExpression, 0, 0, 1);
00040 
00049   virtual bool Execute (iCelEntity* entity, celData& ret, iCelParameterBlock* params = 0) = 0;
00050 
00055   virtual size_t FindLocalVariable (const char* name) const = 0;
00056 
00060   virtual const csStringArray& GetLocalVariables () const = 0;
00061 
00063   virtual void SetLocalVariable (size_t idx, const celData& value) = 0;
00065   virtual void SetLocalVariableLong (size_t idx, int32 value) = 0;
00067   virtual void SetLocalVariableULong (size_t idx, uint32 value) = 0;
00069   virtual void SetLocalVariableFloat (size_t idx, float value) = 0;
00071   virtual void SetLocalVariableBool (size_t idx, bool value) = 0;
00073   virtual void SetLocalVariableString (size_t idx, const char* value) = 0;
00075   virtual void SetLocalVariableVector2 (size_t idx, const csVector2& value) = 0;
00077   virtual void SetLocalVariableVector3 (size_t idx, const csVector3& value) = 0;
00079   virtual void SetLocalVariableColor (size_t idx, const csColor& value) = 0;
00080 };
00081 
00082 
00087 struct iCelExpressionParser : virtual public iBase
00088 {
00089   SCF_INTERFACE (iCelExpressionParser, 0, 0, 1);
00090 
00095   virtual csPtr<iCelExpression> Parse (const char* string) = 0;
00096 };
00097 
00098 #endif // __CEL_TOOLS_EXPRESSION__
00099 

Generated for CEL: Crystal Entity Layer 2.0 by doxygen 1.7.6.1