mobile.sys.parser
Methods
Converts a value to a string in the requested format.
Parameters
Name |
Type |
Description |
value |
Any |
Value to convert |
type |
String |
The data type as which to interpret value . Can be one of “float”, “currency”, “autonumber”, “integer”, “long”, “datetime”, “boolean”, “binary”, “string”, “hashstring”, “enum”. |
props |
Object |
Parameters used for conversions of numbers or dates. |
Returns
Type |
Description |
String |
The formatted value |
Converts an MxObject attribute to a string in the requested format.
Parameters
Name |
Type |
Description |
obj |
MxObject |
MxObject to fetch the attribute from. |
attr |
String |
Attribute to fetch. |
props |
Object |
Parameters used for conversions of numbers or dates. |
Returns
Type |
Description |
String |
The formatted attribute |
parseValue(value, type, props)
Converts a string in the given format to a value.
Parameters
Name |
Type |
Description |
value |
String |
String to convert |
type |
String |
The data type as which to interpret value . Can be one of “float”, “currency”, “autonumber”, “integer”, “long”, “datetime”, “boolean”, “binary”, “string”, “hashstring”, “enum”. |
props |
Object |
Parameters used for conversions of numbers or dates. |
Returns
Type |
Description |
Any |
The parsed value |
parseAttribute(obj, attr, props)
Converts an MxObject attribute in the given format to a value.
Parameters
Name |
Type |
Description |
obj |
MxObject |
MxObject to fetch the attribute from. |
attr |
String |
Attribute to fetch. |
props |
Object |
Parameters used for conversions of numbers or dates. |
Returns
Type |
Description |
Any |
The parsed attribute value |
startup(callback)
This method is called to startup the subsystem.
Parameters
Name |
Type |
Description |
callback |
Function |
The function to be called when startup is finished. |
shutdown()
This method is called to shutdown the subsystem.
isLoaded()
This method is called to check whether the subsystem has been started.
Returns
Type |
Description |
Boolean |
true if the subsystem has been started. |