HGE System state value class

To change and obtain various HGE internal states the two functions are used: System_SetState and System_GetState. The hgeValue class serves to pass and receive a value of an arbitrary type.

class hgeValue
{
public:
  hgeValue(int value);
  hgeValue(bool value);
  hgeValue(const char *value);
  hgeValue(bool (*value)());

  union
  {
    int         int_value;
    bool        bool_value;
    const char* string_value;
    bool        (*func_value)();
  };
};

So, to pass a value of an arbitrary type to the System_SetState function you may specify it directly in the call. And to receive an arbitrary value returned by System_GetState function, you just access the corresponding member of the returned hgeValue object.

Requirements

Header: hge.h

See also

System_SetState, System_GetState