libmoldeo (Moldeo 1.0 Core)
1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
|
#include <moMathManager.h>
Public Member Functions | |
moMathManager () | |
virtual | ~moMathManager () |
virtual MOboolean | Init () |
virtual MOboolean | Finish () |
moMathFunction * | GetFunction (MOuint p_idx) |
MOint | GetFunctionIdx (const moText &p_expr) |
MOint | AddFunction (const moText &p_expr, MOboolean p_force_new=false, moMoldeoObject *p_pMOB=NULL) |
double | EvalFunction (MOuint p_idx, double x0) |
double | EvalFunction (MOuint p_idx, double x0, double x1) |
double | EvalFunction (MOuint p_idx, double x0, double x1, double x2) |
void | SetFunctionParam (MOuint p_idx, double s0) |
void | SetFunctionParam (MOuint p_idx, double s0, double s1) |
void | SetFunctionParam (MOuint p_idx, double s0, double s1, double s2) |
MOboolean | ValidFunction (MOuint p_idx) |
double | operator() (MOuint p_idx, double x0) |
double | operator() (MOuint p_idx, double x0, double x1) |
double | operator() (MOuint p_idx, double x0, double x1, double x2) |
moMathFunction * | operator[] (MOuint p_idx) |
Public Member Functions inherited from moResource | |
moResource () | |
virtual | ~moResource () |
moResourceType | GetResourceType () |
Public Member Functions inherited from moMoldeoObject | |
moMoldeoObject () | |
moMoldeoObject (moMoldeoObjectType p_type) | |
virtual | ~moMoldeoObject () |
virtual MOboolean | Init (moResourceManager *p_pResources) |
virtual MOboolean | CreateConnectors () |
virtual MOboolean | UpdateConnectors () |
virtual MOboolean | RefreshValue (moParam ¶m, int value_index) |
virtual MOboolean | ResolveValue (moParam ¶m, int value_index, bool p_refresh=false) |
virtual void | Update (moEventList *p_EventList) |
void | SetResourceManager (moResourceManager *p_pResourceManager) |
moResourceManager * | GetResourceManager () |
MOint | GetId () const |
void | SetId (MOint p_id) |
moMoldeoObjectType | GetType () const |
void | SetType (moMoldeoObjectType p_type) |
void | SetName (const moText &p_name) |
void | SetLabelName (const moText &p_labelname) |
void | SetKeyName (const moText &p_keyname) |
const moText & | GetKeyName () const |
const moText & | GetName () const |
const moText & | GetLabelName () const |
moConfig * | GetConfig () |
void | SyncConnections () |
virtual int | Save (const moText &p_save_filename=moText("")) |
void | SetConfigName (const moText &p_configname) |
const moText & | GetConfigName () const |
const moText & | GetDescription () const |
Devuelve al descripción del objeto. More... | |
void | SetDescription (const moText &p_Description) |
Fija la descripción de este objeto. More... | |
const moMobDefinition & | GetMobDefinition () const |
void | SetMobDefinition (const moMobDefinition &p_MobDef) |
virtual moConfigDefinition * | GetDefinition (moConfigDefinition *p_configdefinition=NULL) |
moOutlets * | GetOutlets () |
moInlets * | GetInlets () |
MOint | GetInletIndex (moText p_connector_name) const |
MOint | GetOutletIndex (moText p_connector_name) const |
virtual void | RegisterFunctions () |
beware ! call only once or die!!! More... | |
virtual int | ScriptCalling (moLuaVirtualMachine &vm, int iFunctionNumber) |
virtual void | HandleReturns (moLuaVirtualMachine &vm, const char *strFunc) |
virtual const moMobState & | GetState () const |
virtual bool | SetState (const moMobState &p_MobState) |
virtual void | Activate () |
virtual void | Deactivate () |
virtual bool | Activated () const |
virtual void | Select () |
virtual void | Unselect () |
virtual bool | Selected () const |
virtual void | SetConsoleParamIndex (MOint p_paramindex) |
virtual void | SetConsoleValueIndex (MOint p_valueindex) |
virtual const moText & | ToJSON () |
Public Member Functions inherited from moAbstract | |
moAbstract () | |
virtual | ~moAbstract () |
MOboolean | Initialized () |
Pregunta si está inicializado. More... | |
Public Member Functions inherited from moScript | |
moScript () | |
virtual | ~moScript (void) |
void | InitScript () |
void | FinishScript () |
bool | IsInitialized () |
bool | CompileFile (const char *strFilename) |
bool | CompileBuffer (unsigned char *pbBuffer, size_t szLen) |
int | RegisterFunction (const char *strFuncName, moScript::Function &fun) |
int | RegisterFunction (const char *strFuncName) |
int | RegisterBaseFunction (const char *strFuncName) |
bool | SelectScriptFunction (const char *strFuncName) |
void | AddFunctionParam (int iInt) |
void | AddFunctionParam (float fFloat) |
void | AddFunctionParam (char *string) |
bool | RunSelectedFunction (int nReturns=0) |
bool | ScriptHasFunction (const char *strScriptName) |
int | methods (void) |
virtual int | ResetScriptCalling () |
virtual int | NextScriptCalling () |
moLuaVirtualMachine & | mvm (void) |
Static Public Attributes | |
static moMathd * | mathfd = new moMathd() |
Static Public Attributes inherited from moAbstract | |
static moDebug * | MODebug2 = new moDebug() |
Clase de impresión de errores para depuración More... | |
static moTextHeap * | MODebug = new moTextHeap() |
Lista de textos. More... | |
Protected Attributes | |
moMathFunctionArray | m_functions |
Protected Attributes inherited from moMoldeoObject | |
moText | m_FullJSON |
moText | m_Script |
moMobDefinition | m_MobDefinition |
moMobState | m_MobState |
Moldeo Object State. More... | |
moConfig | m_Config |
Configuración de parámetros del objeto. More... | |
moResourceManager * | m_pResourceManager |
Puntero al administrador de recursos. More... | |
moOutlets | m_Outlets |
Conectores de salida, Arreglo de moOutlet's. More... | |
moInlets | m_Inlets |
Conectores de entrada, Arreglo de moInlet's. More... | |
moInlet * | InletScreenWidth |
moInlet * | InletScreenHeight |
moInlet * | InletTimeabs |
moInlet * | InletPreconfig |
MOboolean | m_bConnectorsLoaded |
int | __iscript |
Protected Attributes inherited from moScript | |
bool | m_initialized |
int | m_nMethods |
int | m_iThisRef |
int | m_nArgs |
const char * | m_strFunctionName |
int | m_iMethodBase |
int | m_iMethodBaseIterator |
actual class index method base More... | |
int | m_iMethodBaseAncestors |
actual class iterator index method base More... | |
int | m_MethodBases [256] |
increment on each call to RegisterFunctions More... | |
Clase que implementa un administrador de funciones matemáticas.
Definition at line 46 of file moMathManager.h.
moMathManager::moMathManager | ( | ) |
Constructor por defecto.
Definition at line 39 of file moMathManager.cpp.
|
virtual |
Destructor por defecto.
Definition at line 48 of file moMathManager.cpp.
MOint moMathManager::AddFunction | ( | const moText & | p_expr, |
MOboolean | p_force_new = false , |
||
moMoldeoObject * | p_pMOB = NULL |
||
) |
Agrega al administrador una nueva función matemática definida por la expresión p_expr. Si la función ya existe, no es agregada a menos de que p_force_new sea true.
p_expr | expresión que define a la función. |
p_force_new | true para forzar la creación de la función, a pesar de que ya exista una instancia de la misma en el administrador. |
Definition at line 92 of file moMathManager.cpp.
double moMathManager::EvalFunction | ( | MOuint | p_idx, |
double | x0 | ||
) |
Evalua la función con índice p_idx.
p_idx | índice de la función |
x0 | primer argumento. |
Definition at line 136 of file moMathManager.cpp.
double moMathManager::EvalFunction | ( | MOuint | p_idx, |
double | x0, | ||
double | x1 | ||
) |
Evalua la función con índice p_idx.
p_idx | índice de la función |
x0 | primer argumento. |
x1 | segundo argumento. |
Definition at line 143 of file moMathManager.cpp.
double moMathManager::EvalFunction | ( | MOuint | p_idx, |
double | x0, | ||
double | x1, | ||
double | x2 | ||
) |
Evalua la función con índice p_idx.
p_idx | índice de la función |
x0 | primer argumento. |
x1 | segundo argumento. |
x2 | segundo argumento. |
Definition at line 149 of file moMathManager.cpp.
|
virtual |
Método de finalización.
Reimplemented from moResource.
Definition at line 60 of file moMathManager.cpp.
moMathFunction * moMathManager::GetFunction | ( | MOuint | p_idx | ) |
Devuelve la función con índice p_idx.
p_idx | índice de la función. |
Definition at line 75 of file moMathManager.cpp.
Devuelve el índice de la función cuya expresión es p_expr.
p_expr | expresión de la función a buscar. |
Definition at line 81 of file moMathManager.cpp.
|
virtual |
Método de inicialización.
Reimplemented from moResource.
Definition at line 53 of file moMathManager.cpp.
|
inline |
Evalua la función con índice p_idx.
p_idx | índice de la función |
x0 | primer argumento. |
Definition at line 153 of file moMathManager.h.
|
inline |
Evalua la función con índice p_idx.
p_idx | índice de la función |
x0 | primer argumento. |
x1 | segundo argumento. |
Definition at line 161 of file moMathManager.h.
|
inline |
Evalua la función con índice p_idx.
p_idx | índice de la función |
x0 | primer argumento. |
x1 | segundo argumento. |
x2 | segundo argumento. |
Definition at line 170 of file moMathManager.h.
|
inline |
Devuelve la función con índice p_idx.
p_idx | índice de la función. |
Definition at line 177 of file moMathManager.h.
void moMathManager::SetFunctionParam | ( | MOuint | p_idx, |
double | s0 | ||
) |
Fija el el valor del primer parámetro de la función con índice p_idx.
p_idx | índice de la función |
s0 | valor del primer parámetro. |
Definition at line 155 of file moMathManager.cpp.
void moMathManager::SetFunctionParam | ( | MOuint | p_idx, |
double | s0, | ||
double | s1 | ||
) |
Fija el el valor de los dos primeros parámetros de la función con índice p_idx.
p_idx | índice de la función |
s0 | valor del primer parámetro. |
s1 | valor del segundo parámetro. |
Definition at line 160 of file moMathManager.cpp.
void moMathManager::SetFunctionParam | ( | MOuint | p_idx, |
double | s0, | ||
double | s1, | ||
double | s2 | ||
) |
Fija el el valor de los tres primeros parámetros de la función con índice p_idx.
p_idx | índice de la función |
s0 | valor del primer parámetro. |
s1 | valor del segundo parámetro. |
s2 | valor del tercer parámetro. |
Definition at line 165 of file moMathManager.cpp.
Verifica que el índice p_idx represente una función válida.
p_idx | índice de la función |
Definition at line 143 of file moMathManager.h.
|
protected |
Definition at line 181 of file moMathManager.h.
Definition at line 179 of file moMathManager.h.