Falcon::ErrorParam Class Reference

Error Parameter class. More...

#include <error.h>

Inheritance diagram for Falcon::ErrorParam:

Inheritance graph
[legend]

List of all members.

Public Member Functions

ErrorParamchr (uint32 c)
ErrorParamcode (int code)
ErrorParamdesc (const String &d)
 ErrorParam (int code, uint32 line=0)
 Standard constructor.
ErrorParamextra (const String &e)
ErrorParamhard ()
ErrorParamline (uint32 line)
ErrorParammodule (const String &mod)
ErrorParamorigin (t_origin orig)
ErrorParampc (uint32 pc)
ErrorParamsymbol (const String &sym)
ErrorParamsysError (uint32 e)

Friends

class Error


Detailed Description

Error Parameter class.

This class provides the main Error class and its subclasses with named parameter idiom. Errors have many parameters and their configuration is bourdensome and also a big "bloaty" exactly in spots when one would want code to be small.

This class, completely inlined, provides the compiler and the programmer with a fast and easy way to configure the needed parameters, preventing the other, unneded details from getting into the way of the coders.

The Error class (and its subclasses) has a constructor accepting an ErrorParameter by reference.

      Error *e = new SomeKindOfError( ErrorParam( ... ).p1().p2()....pn() )

is an acceptable grammar to create an Error.


Constructor & Destructor Documentation

Falcon::ErrorParam::ErrorParam ( int  code,
uint32  line = 0 
) [inline]

Standard constructor.

In the constructor a source line may be provided. This makes possible to use the __LINE__ ansi C macro to indicate the point in the source C++ file where an error is raised.

Parameters:
code error code.
line optional line where error occurs.


Member Function Documentation

ErrorParam& Falcon::ErrorParam::chr ( uint32  c  )  [inline]

ErrorParam& Falcon::ErrorParam::code ( int  code  )  [inline]

ErrorParam& Falcon::ErrorParam::desc ( const String d  )  [inline]

ErrorParam& Falcon::ErrorParam::extra ( const String e  )  [inline]

ErrorParam& Falcon::ErrorParam::hard (  )  [inline]

ErrorParam& Falcon::ErrorParam::line ( uint32  line  )  [inline]

ErrorParam& Falcon::ErrorParam::module ( const String mod  )  [inline]

ErrorParam& Falcon::ErrorParam::origin ( t_origin  orig  )  [inline]

ErrorParam& Falcon::ErrorParam::pc ( uint32  pc  )  [inline]

ErrorParam& Falcon::ErrorParam::symbol ( const String sym  )  [inline]

ErrorParam& Falcon::ErrorParam::sysError ( uint32  e  )  [inline]


Friends And Related Function Documentation

friend class Error [friend]


The documentation for this class was generated from the following file:

Generated on Mon Oct 19 10:11:34 2009 for Falcon_Core by  doxygen 1.5.8