Structures

Access to XPE structures from external C++ functions
Access to the member of an XPE structure
by name
by position
Performing operations on groups of members of an XPE structure
simple non-optimised access
optimised access
Determining the number of members in a structure
Printing the names and values of all the members in a structure
Creating a new structure
an anonymous structure
a named structure

 

accessing members of an XPE structure

 

Performing operations on groups of members of an XPE structure

 

determining the number of members in a structure

	int	number_of_members;

	number_of_members = XPE::get_variable("fred").get_struct().get_len();

 

printing the names and values of all the members in a structure

	XPE::STRUCTURE
		xstruct;

	XPE::VARIABLE
		member;

	int	len;

	const char
		*name,
		*xstr;


	xstruct = XPE::get_variable("fred").get_struct();

	len = xstruct.get_len();

	for (int j=0; j<len; j++)
	{
		member = xstruct.get_member(j);

		name = member.get_name();
		xstr = member.get_str();

		printf("%d: '%s' = '%s'\n", j, name, xstr);
	}

 

creating a new structure