gtpc2mh2 | C/C++ Language Support User's Guide |
This function returns a sequence collection of the EBCDIC class names from which the specified class inherits.
Format
#include <c$to2.h> long TO2_getClassTree ( TO2_PID_PTR pid_ptr, TO2_ENV_PTR env_ptr, const long *class_namelength, const char class_name[TO2_MAX_CLASS_NAME]);
Normal Return
The normal return is a positive value.
Error Return
An error return is indicated by a zero. When zero is returned, use the TO2_getErrorCode function to determine the specific error code. For more information, see Error Handling.
Programming Considerations
None.
Examples
The following example retrieves a sequence collection of inherited classes.
#include <c$to2.h> /* Needed for TO2 API functions */ #include <stdio.h> /* APIs for standard I/O functions */ long err_code; TO2_ENV_PTR env_ptr; /* Pointer to TO2 environment */ TO2_PID collect; char *class_name; long class_namelength;
·
·
·
if (TO2_getClassTree(&collect, env_ptr, &classNameLength, className) == TO2_ERROR) { err_code = TO2_getErrorCode(env_ptr); { printf("TO2_getClassTree failed!\n"); process_error(env_ptr); } else { printf("TO2_getClassTree successful!\n"); } }
Related Information