31 #ifndef __MO_CONFIG_H__ 32 #define __MO_CONFIG_H__ 40 #define MO_PARAM_NOT_SEL -1 41 #define MO_PARAM_NOT_FOUND -1 42 #define MO_CONFIGFILE_NOT_FOUND -1 43 #define MO_CONFIG_OK 0 44 #define MO_SELECTED -1 89 return &m_ParamDefinitions;
107 m_ObjectName = p_objectname;
108 m_ObjectClass = p_objectclass;
126 return m_ObjectClass;
140 bool SetParamIndex(
int defined_array_index,
moParamIndex paramindex );
151 bool Exists(
moText p_name );
176 #define moDefineParamIndex(X,Y) if ( m_Config.GetConfigDefinition()!=NULL) {\ 177 int pidx = (MOint)m_Config.GetParamIndex(Y);\ 179 if (!m_Config.GetConfigDefinition()->SetParamIndex( (int)X, moParamIndex(pidx))) {\ 180 MODebug2->Warning( "<"+m_Config.GetObjectClass()+">["+m_Config.GetObjectName()+"]::Init()_moDefineParamIndex > Config parameter \"" + moText(Y) + moText("\" warning. Bad indexation could cause errors."));\ 182 } else MODebug2->Error( m_Config.GetObjectClass()+": "+m_Config.GetObjectName()+ " parameter \"" + moText(Y) + moText("\" not found."));\ 211 m_ConfigDefinition.Set( p_objectname, p_objectclass);
220 return m_ConfigDefinition.GetObjectName();
229 return m_ConfigDefinition.GetObjectClass();
238 moParams& GetParams();
247 int LoadConfig(
moText p_filename );
296 MOuint GetValuesCount(
int p_paramindex );
308 moValue& GetValue(
int indexparam,
int indexvalue = -1 );
328 moText Text(
int p_param_index );
379 return GetParam( p_paramindex );
386 return GetParam( p_paramname );
393 return GetParam(p_paramindex.
index );
400 return GetParam( m_ConfigDefinition.ParamIndexes().Get(p_paramreference.
reference) );
421 return GetParam(p_paramindex.
index );
428 return GetParam( m_ConfigDefinition.ParamIndexes().Get(p_paramreference.
reference) );
434 int GetParamsCount();
439 int GetCurrentValueIndex(
MOint p_paramindex );
444 int GetParamIndex(
moText p_paramname);
448 int GetCurrentParamIndex()
const;
452 bool SetCurrentParamIndex(
int);
455 return SetCurrentParamIndex( GetParamIndex( p_param_name ) );
470 void SetCurrentValueIndex(
int p_paramindex,
int p_valueindex );
483 bool PreviousValue();
492 MOint GetPreConfCount();
496 MOint GetCurrentPreConf();
500 void SetCurrentPreConf(
MOint p_actual );
516 void AddValue(
int paramindex,
moValue& p_value );
519 void InsertValue(
int paramindex,
int valueindex,
moValue& p_value );
522 void SetValue(
int paramindex,
int valueindex,
moValue& p_value );
525 void DeleteValue(
int paramindex,
int valueindex );
532 void AddPreconfig( moPreconfigIndexes& p_preconfindexes );
535 void AddPreconfig(
int preconfig_index);
538 void InsertPreconfig(
int valueindex, moPreconfigIndexes& p_preconfindexes );
541 void SetPreconfig(
int valueindex, moPreconfigIndexes& p_preconfindexes );
544 void DeletePreconfig(
int valueindex );
moPreConfigs m_PreConfigs
static moMathFunction * m_pFun
static moVector3d * m_pVector3d
const moText & GetName()
Devuelve el nombre del archivo de configuraci�n.
const moText & GetObjectClass()
Devuelve el nombre de la clase del objeto asociado a este config.
const moText & GetObjectClass()
Devuelve el nombre de la clase del objeto asociado a este config.
static moVector3i * m_pVector3i
static moDataMessages * m_pMessages
clase base para una fuente 3d o 2d
void Set(moText p_objectname, moText p_objectclass)
Fija el nombre y la clase del objeto a configurar.
static moTexture * m_pTexture
const moText & GetObjectName()
Devuelve el nombre del objeto asociado a este config.
Clase base abstracta de donde deben derivar los objetos [virtual pura].
moParam & GetParam(moParamIndex p_paramindex)
Devuelve el par�metro por estructura de �ndice (moParamIndex)
moParamIndexes m_ParamIndexes
definici�n de todos los par�metros a encontrar o a crear dentro del moConfig
clase de para manejar textos
moParamIndexes & ParamIndexes()
Devuelve el puntero al arreglo de �ndices de los par�metros.
static moVector4i * m_pVector4i
static moDataMessage * m_pMessage
bool SetCurrentParam(const moText &p_param_name)
Clase Base para Objetos Moldeo ( moEffect, moIODevice, moResource, moConsole )
static moTextureBuffer * m_pTextureBuffer
static moVector4d * m_pVector4d
clase base para el manejo de una textura
void Set(moText p_objectname, moText p_objectclass)
Fija el nombre y la clase del objeto a configurar.
moParam & GetParam(moParamReference p_paramreference)
Devuelve el par�metro por referencia de par�metro (moParamReference)
static moVector2d * m_pVector2d
moConfigDefinition m_ConfigDefinition
static moFont * m_pFont
solo para poder devolver una referencia
const moText & GetObjectName()
Devuelve el nombre del objeto asociado a este config.
static moSound * m_pSound
moParamDefinitions * GetParamDefinitions()
Devuelve el puntero al arreglo de definciones de par�metros.
static moVector2i * m_pVector2i
moParamDefinitions m_ParamDefinitions
static moSceneNode * m_pModel
almacena la configuraci�n de los par�metros de un objeto en un archivo XML