Table B.1 lists the topics in this annex:
Objects are created by invoking the relevant creation function for the type of object to be created as depicted in the following code segment:
#include <edcs.h> #include <srm.h> SRM_ORM example_orm; SRM_Celestiocentric example_object;example_orm.orm_code = SRM_ORMCOD_EUROPE_1979; example_orm.value.europe_1979 = SRM_HSRCODEUR1979_MEAN_SOLUTION; SRM_CC_Create(example_orm,&example_object);
When the function returns, example_object will have a properly updated object_state that points to implementation-specific private data that describes the object state and the method_list will contain a list of the methods that may be invoked for this SRF.
Once an object is created, its methods may be invoked to perform operations on the object. The following example continues the code segment above and depicts the creation of a 3D coordinate object:
SRM_Coordinate3D example_coordinate; example_object.methods.CreateCoordinate3D(&example_object, 10.0, 20.0, 30.0, &example_coordinate);
When the method returns, the object example_coordinate will contain a representation of the coordinate.
The following method invocation depicts returning the component values for the coordinate:
SRM_Long_Float component_1; SRM_Long_Float component_2; SRM_Long_Float component_3; example_object.methods.GetCoordinate3DValues(&example_object, &example_coordinate, &component_1, &component_2, &component_3);
When the GetCoordinate3DValues method returns, component_1 will contain 10,0, component_2 will contain 20,0, and component_3 will contain 30,0.
http://www.iso.ch/iso/en/ittf/PubliclyAvailableStandards/ISO_IEC_18042-4_Ed1.html