The SEDRIS Data Representation Model
APPENDIX D - Functions
SE GeneralGetDRMTypeStructure
extern SE_DRM_Status_Code
SE_GeneralGetDRMTypeStructure
(
SE_Short_Integer_Positive major_drm_version, (notes)
SE_Byte_Unsigned minor_drm_version, (notes)
SE_Short_Integer_Positive drm_type, (notes)
constSE_DRM_Type_Structure **result_out_ptr (notes)
);

Definition

Get all structural info about a type definition (e.g. a struct, a 'base' type, or an enumerated type).

NOTE: The individual pieces of the structural info can be retrieved using the following sample code:

  tc = SE_TypeCount();
  for (type_indx = SE_DRM_TYP_NULL; type_indx < tc; type_indx++)
  {
      switch (SE_GetTypeClassification(type_indx))
      {
          case SE_TYP_CLASSIF_ENUM:
              status_code = SE_FieldCountForType(type_indx, &ec);
              if (status_code == SE_DRM_STAT_CODE_SUCCESS)
              {
                  for (i = 0; i < ec; i++)
                  {
                      status_code = SE_ithEnumerantInType
                                    (type_indx, i, &enum_ptr);
                  }
              }
              break;

          case SE_TYP_CLASSIF_STRUCT:
          case SE_TYP_CLASSIF_BASIC:
              status_code = SE_FieldCountForType(type_indx, &ec);
              if (status_code == SE_DRM_STAT_CODE_SUCCESS)
              {
                  for (i = 0; i < ec; i++)
                  {
                      status_code = SE_ithFieldInType
                                    (type_indx, i, &entry_ptr);
                  }
              }
              break;

          default:
              break;
      }
  }


Returns

SE_DRM_STAT_CODE_SUCCESS and *result_out_ptr is set appropriately, if valid parameters were passed in.
SE_DRM_STAT_CODE_NULL_REQUIRED_PARAMETER and *result_out_ptr is left unchanged, if result_out_ptr is NULL.
SE_DRM_STAT_CODE_INVALID_VERSION and *result_out_ptr is set to NULL, if the specified version of the DRM is not supported.
SE_DRM_STAT_CODE_INVALID_TYPE and *result_out_ptr is set to NULL, if drm_type does not correspond to a valid type definition.


Parameters Notes


major_drm_version

 major DRM version number of the DRM version for
    which this function is being called

minor_drm_version

 minor DRM version number of the DRM version for
    which this function is being called

drm_type

 represents a SEDRIS type, available for use by the DRM.

result_out_ptr

 pointer to a variable in the user's memory space where
    the answer (a pointer) will be stored


Prev: SE_GeneralGetDRMClassString. Next: SE_GeneralGetTypeClassification. Up:Index.

Last updated: July 16, 2004 Copyright © 2004 SEDRIS