Browse
 
Tools
Rss Categories

LVGrammar_GetMetaDataKey

Reference Number: AA-00840 Views: 1327 0 Rating/ Voters

Return the key of the meta data indicated by the index.

Function

  • int LVGrammar_GetMetaDataKey(HGRAMMAR Grammar, int index)

Parameters

Grammar

A handle to the grammar.

index

Index of the meta data. It should be in the range [ 0, (LVGrammar_GetNumberOfMetaData() -1) ].

Return Values

NULL

The index is not valid

Non-NULL

A pointer to the value string.

Example

If the grammar has following lines:

meta 'description' is 'example grammar';

meta 'date' is '05/12/2005';


You can access meta data as follows:

int count = LVGrammar_GetNumberOfMetaData(grammar); // Returns 2

const char* key = LVGrammar_GetMetaDataKey(grammar, 0); // Returns "description"

const char* value = LVGrammar_GetMetaDataValue(grammar, 1); // Returns "05/12/2005"

See Also