OMname_to_str and OMstr_to_name


Synopsis


char  *OMname_to_str (
OMobj_name  object_name  );

OMobj_name  OMstr_to_name (
const char  *object_string  );

Description

OMname_to_str returns the character string corresponding to an object name. Do not modify and do not free the string returned by this routine.

OMstr_to_name returns the object name corresponding to a character string.

The Object Manager does not store and manipulate an object's name directly, but rather allocates a unique integer value that maps directly to a particular character string. OMobj_name holds that integer value.

The routines described here convert between the two representations of the string.

Arguments

object_name

An object's name, as a OMobj_name.

object_string

An object's name, as a character string.

Example


OMobj_name object_name; // An integer.
char object_string[30];
...
object_name = OMstr_to_name("My string");
strcpy(object_string, OMname_to_str(object_name));