Browse
 
Tools
Rss Categories

LVSemanticData C API Summary

Reference Number: AA-00886 Views: 1886 0 Rating/ Voters

A 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. A LVSemanticData object can be one of the types specified in the Semantic Data Type page

Function Return Type 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_Release(H_SI_DATA other) void Release the Semantic Data handle.
LVSemanticData_Print(H_SI_DATA h_si_data, int format) const char* Prints the h_si_data in XML or ECMAScript formats.
LVSemanticData_GetType(H_SI_DATA h_si_data) int Returns the type of thedata.
LVSemanticData_GetString(H_SI_DATA h_si_data) const char* If the h_si_data is of type SI_TYPE_STRING, returns the string contents.
LVSemanticData_GetInt(H_SI_DATA h_si_data) int If the h_si_data is of type SI_TYPE_INT, returns the integer.
LVSemanticData_GetDouble(H_SI_DATA h_si_data) double If the h_si_data is of type SI_TYPE_DOUBLE, returns the double.
LVSemanticData_GetBool(H_SI_DATA h_si_data) int If the h_si_data is of type SI_TYPE_BOOL, returns a 1 for true, 0 for false
LVSemanticObject_GetNumberOfProperties(H_SI_DATA h_si_data) int If the h_si_data is of type SI_TYPE_OBJECT, returns the number of properties (member data) it contains.
LVSemanticObject_GetPropertyName(H_SI_DATA h_si_data, int index) const char* If the h_si_data is of type SI_TYPE_OBJECT, returns the name of the property at index
LVSemanticObject_PropertyExists(H_SI_DATA h_si_data, const char* property_id) int If the h_si_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 h_si_data, const char* property_id) H_SI_DATA If the h_si_data is of type SI_TYPE_OBJECT, returns the member data named prop_name.
LVSemanticArray_GetSize(H_SI_DATA h_si_data) int If the h_si_data is of type SI_TYPE_ARRAY, returns the number of elements in the array.
LVSemanticArray_GetElement(H_SI_DATA h_si_data, int index) H_SI_DATA If the h_si_data is of type SI_TYPE_ARRAY, returns the element at index in the array.
 

See Also