/**
* A wrapper class around CTF's Event Definition/Declaration that maps all
* types of Declaration to native Java types.
- *
+ *
* @version 1.0
* @author Alexandre Montplaisir
*/
private static final String NO_STREAM = "No stream"; //$NON-NLS-1$
private static final String EMPTY_CTF_EVENT_NAME = "Empty CTF event"; //$NON-NLS-1$
+ /** Prefix for Context information stored as CtfTmfEventfield */
+ private static final String CONTEXT_FIELD_PREFIX = "context."; //$NON-NLS-1$
// ------------------------------------------------------------------------
// Attributes
fields.add(curField);
}
+ /* Add context information as CtfTmfEventField */
+ StructDefinition structContext = eventDef.getContext();
+ if (structContext != null) {
+ definitions = structContext.getDefinitions();
+ String curContextName;
+ Definition curContextDef;
+ CtfTmfEventField curContext;
+ it = definitions.entrySet().iterator();
+ while(it.hasNext()) {
+ Entry<String, Definition> entry = it.next();
+ /* Prefix field name to */
+ curContextName = CONTEXT_FIELD_PREFIX + entry.getKey();
+ curContextDef = entry.getValue();
+ curContext = CtfTmfEventField.parseField(curContextDef, curContextName);
+ fields.add(curContext);
+ }
+ }
+
return fields.toArray(new CtfTmfEventField[fields.size()]);
}