LVSemanticData Summary

An LVSemanticData object is the result of the semantic interpretation process. A user's spoken input is combined with a grammar containing semantic tag instructions to create a compound object. An LVSemanticData object can be one of the following types:

Function Return Value Description
LVSemanticData_CreateFromCopy(H_SI_DATA other) H_SI_DATA Creates a new object from an old one. The new one will need to be released when no longer in use.
LVSemanticData_Print(H_SI_DATA data, int format) const char* Prints the data in XML or ECMAScript formats.
LVSemanticData_GetType(H_SI_DATA data) int Returns the type of thedata.
LVSemanticData_GetString(H_SI_DATA data) const char* If the data is of type SI_TYPE_STRING, returns the string contents.
LVSemanticData_GetInt(H_SI_DATA data) int If the data is of type SI_TYPE_INT, returns the integer.
LVSemanticData_GetDouble(H_SI_DATA data) double If the data is of type SI_TYPE_DOUBLE, returns the double.
LVSemanticData_GetBool(H_SI_DATA data) int If the data is of type SI_TYPE_BOOL, returns a 1 for true, 0 for false
LVSemanticObject_GetNumberOfProperties(H_SI_DATA data) int If the data is of type SI_TYPE_OBJECT, returns the number of properties (member data) it contains.
LVSemanticObject_GetPropertyName(H_SI_DATA data, int i) const char* If the data is of type SI_TYPE_OBJECT, returns the name of the ith property
LVSemanticObject_PropertyExists (H_SI_DATA ata, const char* prop_name) int If the data is of type SI_TYPE_OBJECT, returns 1 if the object contains a value named prop_name, 0 otherwise.
LVSemanticObject_GetPropertyValue (H_SI_DATA data, const char* prop_name) H_SI_DATA If the data is of type SI_TYPE_OBJECT, returns the member data named prop_name.
LVSemanticArray_GetSize(H_SI_DATA data) int If the data is of type SI_TYPE_ARRAY, returns the number of elements in the array.
LVSemanticArray_GetElement(H_SI_DATA data, int i) H_SI_DATA If the data is of type SI_TYPE_ARRAY, returns the ith element in the array.
© 2010 LumenVox LLC. All rights reserved.