TipcMtGetGrammar get the grammar of a message type
mt
message type to get grammar from
grammar_return
storage for message type grammar
TRUE
if the grammar was successfully retrieved from the message type, FALSE
otherwise.
If TipcMtGetGrammar fails, it returns FALSE
and sets the global SmartSockets error number to:
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.
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.
TipcMtCreate, TipcMtGetName, TipcMtGetNum
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 |