TipcMtGetGrammar


Name

TipcMtGetGrammar — get the grammar of a message type

Synopsis

T_BOOL TipcMtGetGrammar(mt, grammar_return) 
T_IPC_MT mt; 
T_STR *grammar_return; 

Arguments

mt — message type to get grammar from

grammar_return — storage for message type grammar

Return Values

TRUE if the grammar was successfully retrieved from the message type, FALSE otherwise.

Diagnostics

If TipcMtGetGrammar fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TipcMtGetGrammar gets the grammar of a message type. Message type grammars are lists of field types and are used to write messages to message files in a compact format. See the TIBCO SmartSockets User’s Guide for more information on message type grammars.

Caution

If TipcMtGetGrammar returns FALSE, it does not store a value in grammar_return.

The value stored in grammar_return points directly into an internal data structure and should not be modified.

See Also

TipcMtCreate, TipcMtGetName, TipcMtGetNum

Examples

This example prints the grammar of the NUMERIC_DATA message type:

T_IPC_MT mt; 
T_STR grammar; 
 
mt = TipcMtLookupByNum(T_MT_NUMERIC_DATA); 
if (mt == NULL) { 
  return;  /* error */ 
} 
 
if (!TipcMtGetGrammar(mt, &grammar)) { 
  return;  /* error */ 
}  
TutOut("NUMERIC_DATA msg type has grammar %s\n", grammar); 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com