EtsT_Xml_Import_Postproc_Func

Abstract

Callback: Called on each object in a network model after the model has been created from an XML file.

Syntax

EtsT_Xml_Import_Postproc_Func (xml_data_ptr, attr_lptr, pstate_lptr, client_data_ptr)
Argument Type Description
xml_data_ptr EtsT_Xml_Postproc_Datum * Information about the current object (see Details)
attr_lptr PrgT_List * List of attributes. Contains elements of type EtsT_Xml_Attribute that were found during parsing of the current object.
pstate_lptr PrgT_List * List of pstate elements associated with the given postproc datum.
client_data_ptr void * User-defined state passed to each invocation of the postproc_func.

Return Type

void

No return value.

ets_api_xml.h

Details

xml_data_ptr points to a data structure containing a handle to the affected ETS object that was created in the skeleton model, the XML attribute type, the object name, and the XML attribute processing mode. The structure definition is:

typedef struct EtsT_Xml_Postproc_Datum
		{
		EtsT_Obj_Handle							ets_obj_hndl;
		EtsT_Xml_Attribute_Type							type;
		const char*							object_name;
		EtsT_Xml_Attr_Proc_Mode							attr_proc_mode;
		}	EtsT_Xml_Postproc_Datum;

Definitions for types used in this structure are:

typedef enum EtsT_Xml_Attribute_Type
		{
		EtsC_Xml_Attribute_Type_Child,
		EtsC_Xml_Attribute_Type_Object
		}	EtsT_Xml_Attribute_Type;
typedef enum EtsT_Xml_Attr_Proc_Mode
		{
		EtsC_Xml_Attr_Proc_Mode_Loose,
		EtsC_Xml_Attr_Proc_Mode_Explicit
		}	EtsT_Xml_Attr_Proc_Mode;

The XML attribute processing mode has two options:

  • Loose mode does not require that the attribute XML specification be complete. Unspecified attribute values take the values in the node model's initial value assignment. Use this mode to build a network model from a custom XML specification.
  • Explicit mode implies that the attribute XML specification is complete and exhaustive. If not specified explicitly, the attribute values take their default values from the underlying process model. Use this mode completely preserve a network model between invocations of Ets_Xml_Export() and Ets_Xml_Import().

This callback is registered by Ets_Xml_Import().

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com