Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

CNCL Class Reference

The top-level class of the CNCL hierarchy. More...

#include <CNCL.h>

Inheritance diagram for CNCL::

CNObject CNPIO CNReaderTbl CNArray CNArray2 CNArray3 CNAVLNode CNAVLTree CNBaseCompare CNCircle CNCoord CNDiracTabObj CNDouble CNErrorObject CNEventBaseSched CNEventIterator CNEventList CNFClause CNFileStat CNFRule CNGetOpt CNGrid CNHashIterator CNHashListIterator CNHashTable CNICoord CNInt CNJob CNKey CNManager CNNamed CNPair CNParam CNParseArgs CNPipe CNPrioObj CNPrioQueueObj CNProgramContext CNPstream CNPtr CNRandom CNRectangle CNRefObj CNRndInt CNRNG CNSearch CNSelect CNSLIterator CNSLList CNSLObject CNSort CNStack CNStatistics CNString ptest Test List of all members.

Public Types

enum  ErrorType {
  err_fatal, err_abort, err_warning, err_ignore,
  err_default, err_info
}
 Error handler settings: The class CNCL provides common functionality for error handling. More...


Public Methods

 CNCL (void)
 Constructors task is to call the initialization function.

virtual ~CNCL ()
 Defining the destructor virtual provides virtual destructors for all classes derived from CNCL as well as from CNObject.


Static Public Methods

void initialize ()
 Initialization of the CNCL: Sets the new handler.

ErrorType get_error ()
 Get error handler setting.

ErrorType set_error (ErrorType new_error)
 Set error handler setting.

void set_exit_handler (void(*func)())
 To set the function which should be called when the program is terminated, call the function with your exit handler.

void default_exit_handler ()
 This function is the default exit handler when no other exit handler is defined using the method CNCL::set_exit_handler.

ostream & msg ()
 Stream for additional output after error(), ...

Error handler functions
void error (const char *msg1=NIL, const char *msg2=NIL, const char *msg3=NIL, const char *msg4=NIL, const char *msg5=NIL, const char *msg6=NIL)
 The error function is called whenever a general error has been detected.

void fatal (const char *msg1=NIL, const char *msg2=NIL, const char *msg3=NIL, const char *msg4=NIL, const char *msg5=NIL, const char *msg6=NIL)
 The fatal function is called whenever a fatal error has been detected.

void warning (const char *msg1=NIL, const char *msg2=NIL, const char *msg3=NIL, const char *msg4=NIL, const char *msg5=NIL, const char *msg6=NIL)
 The error function is called whenever a general error has been detected.

void info (const char *msg1=NIL, const char *msg2=NIL, const char *msg3=NIL, const char *msg4=NIL, const char *msg5=NIL, const char *msg6=NIL)
 The error function is called whenever a general error has been detected.

void error (ErrorType err, const char *msg1=NIL, const char *msg2=NIL, const char *msg3=NIL, const char *msg4=NIL, const char *msg5=NIL, const char *msg6=NIL)
 This error function is called by the error and warning functions error, fatal, warning and info with different ErrorTypes in dependence on the severity of the occuring error.


Detailed Description

The top-level class of the CNCL hierarchy.

The class cares about

The CNCL class contains only static members and functions for the class library's parameters and error handling. All classes in the CNCL hierarchy can directly access the static member functions, other code can call them via CNCL::func().


Member Enumeration Documentation

enum CNCL::ErrorType
 

Error handler settings: The class CNCL provides common functionality for error handling.

This is used by all classes to issue an error message or warning and terminate the program, if desired. The CNCL library also installs a matherr() handler using CNCL::error for displaying an appropiate error message.


The documentation for this class was generated from the following file:
Generated on Fri Feb 1 19:54:24 2002 for CNCL by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001