CEL

Public API Reference

tools/parameters.h
00001 /*
00002     Crystal Space Entity Layer
00003     Copyright (C) 2004-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_PARAMETERS__
00021 #define __CEL_PARAMETERS__
00022 
00023 #include "cstypes.h"
00024 #include "csutil/scf.h"
00025 #include "csutil/scf_implementation.h"
00026 #include "csutil/weakref.h"
00027 #include "csutil/hash.h"
00028 #include "csgeom/vector3.h"
00029 #include "csutil/refarr.h"
00030 #include "physicallayer/pl.h"
00031 
00032 class celVariableParameterBlock;
00033 struct iCelDataBuffer;
00034 struct iCelParameterBlock;
00035 
00037 struct celParSpec
00038 {
00040   celDataType type;
00041 
00043   csStringID id;
00044 
00046   csString name;
00047 
00049   csString value;
00050 };
00051 
00052 //---------------------------------------------------------------------------
00060 struct iParameter : public virtual iBase
00061 {
00062   SCF_INTERFACE (iParameter, 0, 0, 2);
00063 
00067   virtual const celData* GetData (iCelParameterBlock* params) = 0;
00068 
00073   virtual const char* Get (iCelParameterBlock* params) = 0;
00074 
00082   virtual const char* Get (iCelParameterBlock* params, bool& changed) = 0;
00083 
00088   virtual int32 GetLong (iCelParameterBlock* params) = 0;
00089 };
00090 
00091 //---------------------------------------------------------------------------
00093 typedef csHash<csStringBase,csStringBase> celParams;
00094 //---------------------------------------------------------------------------
00095 
00101 struct iParameterManager : public virtual iBase
00102 {
00103     SCF_INTERFACE (iParameterManager, 1, 0, 0);
00104 
00109   virtual csPtr<iParameter> GetParameter (
00110         const celParams& params,
00111         const char* param) = 0;
00112 
00121   virtual const char* ResolveParameter (
00122         const celParams& params,
00123         const char* param) = 0;
00124 
00135   virtual csPtr<celVariableParameterBlock> GetParameterBlock (
00136         const celParams& params,
00137         const csArray<celParSpec>& parameters,
00138         csRefArray<iParameter>& quest_parameters) = 0;
00139 
00149   virtual bool FillParameterBlock (
00150     iCelParameterBlock* params,
00151         celVariableParameterBlock* act_params,
00152         const csArray<celParSpec>& parameters,
00153         const csRefArray<iParameter>& quest_parameters) = 0;
00154 
00155 
00156 };
00157 //---------------------------------------------------------------------------
00158 
00159 #endif // __CEL_PARAMETERS__
00160 

Generated for CEL: Crystal Entity Layer 2.0 by doxygen 1.7.6.1