libSBML C API  libSBML 5.8.0 C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
L3ParserSettings.cpp File Reference

Detailed Description

Definition of the level 3 infix-to-mathml parser settings.

Author
Lucian Smith
Include dependency graph for L3ParserSettings.cpp:

Functions

L3ParserSettings_t * L3ParserSettings_create ()
 Creates a new L3ParserSettings_t object and returns a pointer to it. More...
 
void L3ParserSettings_free (L3ParserSettings_t *settings)
 
const Model_t * L3ParserSettings_getModel (L3ParserSettings_t *settings)
 Retrieves the model associated with this L3ParserSettings_t object. More...
 
int L3ParserSettings_getParseAvogadroCsymbol (L3ParserSettings_t *settings)
 Retrieves the avogadro csymbol option associated with this L3ParserSettings_t object. More...
 
int L3ParserSettings_getParseCollapseMinus (L3ParserSettings_t *settings)
 Retrieves the collapse minus option associated with this L3ParserSettings_t object. More...
 
ParseLogType_t L3ParserSettings_getParseLog (L3ParserSettings_t *settings)
 Retrieves the log parsing option associated with this L3ParserSettings_t object. More...
 
int L3ParserSettings_getParseUnits (L3ParserSettings_t *settings)
 Retrieves the units option associated with this L3ParserSettings_t object. More...
 
void L3ParserSettings_setModel (L3ParserSettings_t *settings, const Model_t *model)
 Sets the model associated with this L3ParserSettings_t object to the provided pointer. More...
 
void L3ParserSettings_setParseAvogadroCsymbol (L3ParserSettings_t *settings, int flag)
 Sets the avogadro csymbol option associated with this L3ParserSettings_t object. More...
 
void L3ParserSettings_setParseCollapseMinus (L3ParserSettings_t *settings, int flag)
 Sets the collapse minus option associated with this L3ParserSettings_t object. More...
 
void L3ParserSettings_setParseLog (L3ParserSettings_t *settings, ParseLogType_t type)
 Sets the log parsing option associated with this L3ParserSettings_t object. More...
 
void L3ParserSettings_setParseUnits (L3ParserSettings_t *settings, int flag)
 Sets the units option associated with this L3ParserSettings_t object. More...
 
void L3ParserSettings_unsetModel (L3ParserSettings_t *settings)
 Unsets the model associated with this L3ParserSettings_t object. More...
 

Function Documentation

L3ParserSettings_t* L3ParserSettings_create ( )

Creates a new L3ParserSettings_t object and returns a pointer to it.

Note
This functions sets the Model* to NULL, and other settings to L3P_PARSE_LOG_AS_LOG10, L3P_EXPAND_UNARY_MINUS, L3P_PARSE_UNITS, and L3P_AVOGADRO_IS_CSYMBOL.
Returns
a pointer to the newly created L3ParserSettings_t structure.
void L3ParserSettings_free ( L3ParserSettings_t *  settings)
const Model_t* L3ParserSettings_getModel ( L3ParserSettings_t *  settings)

Retrieves the model associated with this L3ParserSettings_t object.

Parameters
settingsthe L3ParserSettings_t structure from which to get the Model.
Returns
the Model_t* object associated with this L3ParserSettings_t object.
int L3ParserSettings_getParseAvogadroCsymbol ( L3ParserSettings_t *  settings)

Retrieves the avogadro csymbol option associated with this L3ParserSettings_t object.

Parameters
settingsthe L3ParserSettings_t structure from which to get the option.
Returns
an integer indicating whether avogadro should be considered as a csymbol (non-zero) or not (zero).
int L3ParserSettings_getParseCollapseMinus ( L3ParserSettings_t *  settings)

Retrieves the collapse minus option associated with this L3ParserSettings_t object.

This option allows the user to specify how the infix expression '-4' is parsed in a MathML ASTNode.

Parameters
settingsthe L3ParserSettings_t structure from which to get the option.
Returns
an integer indicating whether unary minus should be collapsed (non-zero) or not (zero).
ParseLogType_t L3ParserSettings_getParseLog ( L3ParserSettings_t *  settings)

Retrieves the log parsing option associated with this L3ParserSettings_t object.

This option allows the user to specify how the infix expression 'log(x)' is parsed in a MathML ASTNode. The options are:

  • L3P_PARSE_LOG_AS_LOG10 (0)
  • L3P_PARSE_LOG_AS_LN (1)
  • L3P_PARSE_LOG_AS_ERROR (2)
Parameters
settingsthe L3ParserSettings_t structure on which to set the Model.
Returns
ParseLogType_t log parsing option to associate with this L3ParserSettings_t object.
int L3ParserSettings_getParseUnits ( L3ParserSettings_t *  settings)

Retrieves the units option associated with this L3ParserSettings_t object.

Parameters
settingsthe L3ParserSettings_t structure from which to get the option.
Returns
an integer indicating whether numbers should be considered as a having units (non-zero) or not (zero).
void L3ParserSettings_setModel ( L3ParserSettings_t *  settings,
const Model_t *  model 
)

Sets the model associated with this L3ParserSettings_t object to the provided pointer.

Note
A copy of the Model is not made, so modifications to the Model itself may affect future parsing.
Parameters
settingsthe L3ParserSettings_t structure on which to set the Model.
modelThe Model* object to which infix strings are to be compared.
void L3ParserSettings_setParseAvogadroCsymbol ( L3ParserSettings_t *  settings,
int  flag 
)

Sets the avogadro csymbol option associated with this L3ParserSettings_t object.

Parameters
settingsthe L3ParserSettings_t structure on which to set the option.
flagan integer indicating whether avogadro should be considered as a csymbol (non-zero) or not (zero).
void L3ParserSettings_setParseCollapseMinus ( L3ParserSettings_t *  settings,
int  flag 
)

Sets the collapse minus option associated with this L3ParserSettings_t object.

This option allows the user to specify how the infix expression '-4' is parsed in a MathML ASTNode.

Parameters
settingsthe L3ParserSettings_t structure on which to set the option.
flagan integer indicating whether unary minus should be collapsed (non-zero) or not (zero).
void L3ParserSettings_setParseLog ( L3ParserSettings_t *  settings,
ParseLogType_t  type 
)

Sets the log parsing option associated with this L3ParserSettings_t object.

This option allows the user to specify how the infix expression 'log(x)' is parsed in a MathML ASTNode. The options are:

  • L3P_PARSE_LOG_AS_LOG10 (0)
  • L3P_PARSE_LOG_AS_LN (1)
  • L3P_PARSE_LOG_AS_ERROR (2)
Parameters
settingsthe L3ParserSettings_t structure on which to set the option.
typeParseLogType_t log parsing option to associate with this L3ParserSettings_t object.
void L3ParserSettings_setParseUnits ( L3ParserSettings_t *  settings,
int  flag 
)

Sets the units option associated with this L3ParserSettings_t object.

Parameters
settingsthe L3ParserSettings_t structure on which to set the option.
flagan integer indicating whether numbers should be considered as a having units (non-zero) or not (zero).
void L3ParserSettings_unsetModel ( L3ParserSettings_t *  settings)

Unsets the model associated with this L3ParserSettings_t object.

Parameters
settingsthe L3ParserSettings_t structure on which to unset the Model.