Rogus_McBogus


A Rogus_McBogus object handles initialization and clean-up of the Rogus Library. If you are using Rogus as an application framework, rather than as a library, then you do not need to worry about this; it is done for you.

class Rogus_McBogus {
public:
  enum { msg, warn, err };
  Rogus_McBogus(void (*func)(const char*, int) = NULL);
  ~Rogus_McBogus();
  void setParser(parserPtr, const char*);
};
Rogus_McBogus(void (*func)(const char*, int) = NULL)
This creates a new Rogus_McBogus object. The constructor initalizes the Rogus Library. Only one Rogus_McBogus object may exist at one time. func is a function which should handle the messages which Rogus McBogus prints. Its first argument is the message to print, and the second argument is one of msg, warn, or err, to indicate the type of message. If func is NULL, then a default output routine is used. Under Windows NT, this default output routine sends the output to the console associated with the process. If no console is associated with the process, one is created.
~Rogus_McBogus()
This destroys the Rogus_McBogus object, and performs all necessary cleanup.
void setParser(parserPtr p, const char* n)
This allows the current parser to be set. p is the new parser, and n is the name of the new parser.

Modified 21 January 1996 pepellet@mit.edu