xpfEnumerationToString

FUNCTION xpfEnumerationToString(anEnumeration   : GENERIC)
                                resultingString : STRING;

Use this function to ....

Arguments


TypeNameComment
GENERICanEnumerationcomments

Return Value


 

TypeNameComment
STRINGresultingStringcomments

Options


 

Example


-- in EXPRESS schema named XXX:
TYPE model_type = ENUMERATION OF(
   analysis, 
   design, 
   program, 
   project, 
   product, 
   part, 
   document);
END_TYPE;


ENTITY a_model;
   m_type:		  OPTIONAL model_type;
   parent:                 SimDM_repository;
   name:                   STRING;
   description:   OPTIONAL STRING;
   created_by:             STRING;
   created:                STRING;
   locked:                 BOOLEAN;
END_ENTITY;

-- in XPX code
GLOBAL
    DECLARE trg INSTANCE OF XXX;
END_GLOBAL;


VIEW_ENTITY v_model;
   pbs_type,
   parent,
   name,
   description,
   created_by,
   created:       STRING;
   locked:        BOOLEAN;
END_VIEW_ENTITY;
...
FUNCTION model_i2v(inst  : cfg::SimDM_model): v_model;
   LOCAL
      view  : v_model;
   END_LOCAL;
   
   IF NOT EXISTS(inst) THEN RETURN(?); END_IF;
   NEW view;
   view.pbs_type := xpfEnumerationToString(inst.pbs_type);
   view.parent := inst.parent.name;
   view.name := inst.name;
   view.description := inst.description;
   view.created_by := inst.created_by;
   view.created := inst.created;
   view.locked := inst.locked;
   RETURN(view);
END_FUNCTION;



 

See also

Filter by label

There are no items with the selected labels at this time.

Â