


XmRepTypeRegister(3X)					XmRepTypeRegister(3X)
OSF/Motif							    OSF/Motif



NAME
  XXmmRReeppTTyyppeeRReeggiisstteerr - A	representation type manager function that registers a
  representation type resource

SYNOPSIS


  ##iinncclluuddee <<XXmm//RReeppTTyyppee..hh>>
  XXmmRReeppTTyyppeeIIdd XXmmRReeppTTyyppeeRReeggiisstteerr	((_r_e_p__t_y_p_e, _v_a_l_u_e__n_a_m_e_s,	_v_a_l_u_e_s,
		      _n_u_m__v_a_l_u_e_s))
       SSttrriinngg	   _r_e_p__t_y_p_e;;
       SSttrriinngg	   **_v_a_l_u_e__n_a_m_e_s;;
       uunnssiiggnneedd	cchhaarr**_v_a_l_u_e_s;;
       uunnssiiggnneedd	cchhaarr_n_u_m__v_a_l_u_e_s;;

DESCRIPTION
  XXmmRReeppTTyyppeeRReeggiisstteerr registers a	representation type resource with the
  representation type manager.	All features of	the representation type
  management facility become available for the specified representation	type.
  The function installs	a forward type converter to convert string values to
  numerical representation type	values.

  When the _v_a_l_u_e_s argument is NULL, consecutive	numerical values are assumed.
  The order of the strings in the _v_a_l_u_e__n_a_m_e_s array determines the numerical
  values for the resource.  For	example, the first value name is 0; the
  second value name is 1; and so on.

  If it	is non-NULL, the _v_a_l_u_e_s	argument can be	used to	assign values to
  representation types that have nonconsecutive	values or have duplicate
  names	for the	same value.  Representation types registered in	this manner
  will consume additional storage and will be slightly slower than represen-
  tation types with consecutive	values.

  A representation type	can only be registered once; if	the same representa-
  tion type name is registered more than once, the behavior is undefined.

  The function XXmmRReeppTTyyppeeAAddddRReevveerrssee installs a reverse converter	for a
  registered representation type.  The reverse converter takes a representa-
  tion type numerical value and	returns	the corresponding string value.	If
  the list of numerical	values for a representation type contains duplicate
  values, the reverse converter	uses the first name in the _v_a_l_u_e__n_a_m_e_s list
  that matches the specified numeric value.  For example, if a _v_a_l_u_e__n_a_m_e_s
  array	has ccaanncceell, pprroocceeeedd, and aabboorrtt,	and the	corresponding _v_a_l_u_e_s array
  contains 0, 1, and 0,	the reverse converter will return ccaanncceell instead of
  aabboorrtt	for an input value of 0.

  _r_e_p__t_y_p_e    Specifies	the representation type	name.

  _v_a_l_u_e__n_a_m_e_s Specifies	a pointer to an	array of value names associated	with
	      the representation type.	A value	name is	specified in lower-
	      case characters without an "Xm" prefix.  Words within a name
	      are separated with underscores.

  _v_a_l_u_e_s      Specifies	a pointer to an	array of values	associated with	the
	      representation type.  A value in this array is associated	with
	      the value	name in	the corresponding position of the _v_a_l_u_e__n_a_m_e_s
	      array.

  _n_u_m__v_a_l_u_e_s  Specifies	the number of entries in the _v_a_l_u_e__n_a_m_e_s and _v_a_l_u_e_s
	      arrays.

RETURN VALUE
  Returns the identification number for	the specified representation type.

RELATED	INFORMATION
  XXmmRReeppTTyyppeeAAddddRReevveerrssee((33XX)), XXmmRReeppTTyyppeeGGeettIIdd((33XX)), XXmmRReeppTTyyppeeGGeettNNaammeeLLiisstt((33XX)),
  XXmmRReeppTTyyppeeGGeettRReeccoorrdd((33XX)), XXmmRReeppTTyyppeeGGeettRReeggiisstteerreedd((33XX)), and
  XXmmRReeppTTyyppeeVVaalliiddVVaalluuee((33XX)).
























































