Ets_Client_State_Handlers_Register_Xml()
Note: Requires OPNET Development Kit
Abstract
Registers a client state type and informs the program of the functions to use for copying, deallocating, reading, writing, exporting (XML form) and importing (XML form) the client state.
Syntax
Ets_Client_State_Handlers_Register_Xml (client_state_type, state_copy_create_proc, state_destroy_proc, state_read_proc, state_write_proc, xml_import_proc, xml_export_proc)
| Argument | Type | Description |
|---|---|---|
client_state_type |
const char * |
Unique state registration string |
state_copy_create_proc |
EtsT_Client_State_Copy_Create_Proc |
Handler invoked to copy the state, such as when an object is copied |
state_destroy_proc |
EtsT_Client_State_Destroy_Proc |
Handler invoked when the state needs to be destroyed |
state_read_proc |
EtsT_Client_State_Read_Proc |
Handler invoked when the state needs to be read from disk storage with the scenario |
state_write_proc |
EtsT_Client_State_Write_Proc |
Handler invoked when the state needs to be written to disk with the scenario data |
xml_import_proc |
EtsT_Client_State_Xml_Import_Proc |
Handler invoked when the state is imported from an XML file. |
xml_export_proc |
EtsT_Client_State_Xml_Export_Proc |
Handler invoked when the state is exported to an XML file. |
Return Type
EtsT_Client_State_ID
The state represented by these handlers. An invalid value is returned if the registration failed.
Header
ets_pstate.h
Details
This function is a variant of Ets_Client_State_Handlers_Register(). It lets you additionally specify import/export procedures for serializing client state information from/to XML form. See Ets_Client_State_Handlers_Register() for more information.
The handler prototypes are given in EtsT_Client_State_Copy_Create_Proc, EtsT_Client_State_Destroy_Proc, EtsT_Client_State_Read_Proc, EtsT_Client_State_Write_Proc, EtsT_Client_State_Xml_Import_Proc, and EtsT_Client_State_Xml_Export_Proc.