native
SMC_SetReaders
Syntax
native SMC_SetReaders(SMCParser:smc, const kvFunc[], const nsFunc[] = "", const esFunc[] = "");
Description
Sets the three main reader functions.
Parameters
| handle | Handle to an SMC Parse structure. |
|---|---|
| name | String containing section name. |
| data | Handle or value passed in SMC_ParseFile |
| handle | Handle to an SMC Parse structure. |
| key | String containing key name. |
| value | String containing value name. |
| data | Handle or value passed in SMC_ParseFile |
| handle | Handle to an SMC Parse structure. |
| data | Handle or value passed in SMC_ParseFile |
| handle | Handle to an SMC Parse structure. |
| kv | A KeyValue callback. |
| ns | An optional NewSection callback. |
| es | An optional EndSection callback. |
Note
Enclosing quotes are always stripped.
Note
Below is the prototype of callbacks:
-
NewSection:
Called when the parser finds a new section or sub-section.
Return
An SMCResult action to take.
public SMCResult:OnNewSection(SMCParser:handle, const name[], any:data)
KeyValue:
Called when the parser finds a new key/value pair.
Return
An SMCResult action to take.
public SMCResult:OnKeyValue(SMCParser:handle, const key[], const value[], any:data)
EndSection:
Called when the parser finds the end of the current section.
Return
An SMCResult action to take.
public SMCResult:OnEndSection(SMCParser:handle, any:data)
-
Return
This function has no return value.