rpt_value_error Class Reference

#include <error.h>

Inheritance diagram for rpt_value_error:

rpt_value

Public Member Functions

virtual ~rpt_value_error ()
nstring query () const
void setpos (const rpt_position::pointer &where)
void print () const

Static Public Member Functions

static rpt_value::pointer create (string_ty *what)
static rpt_value::pointer create (const nstring &what)
static rpt_value::pointer create (const rpt_position::pointer &where, string_ty *what)
static rpt_value::pointer create (const rpt_position::pointer &where, const nstring &what)

Protected Member Functions

const char * name () const
bool is_an_error () const

Private Member Functions

 rpt_value_error (const rpt_position::pointer &where, const nstring &what)
 rpt_value_error ()
 rpt_value_error (const rpt_value_error &)
rpt_value_erroroperator= (const rpt_value_error &)

Private Attributes

rpt_position::pointer where
nstring what

Detailed Description

The rpt_value_error class is used to represent a calculation error, including a human readable textual representation.

Definition at line 32 of file error.h.


Constructor & Destructor Documentation

virtual rpt_value_error::~rpt_value_error (  )  [virtual]

The destructor.

rpt_value_error::rpt_value_error ( const rpt_position::pointer where,
const nstring what 
) [private]

The constructor. It is private on purpose, use the "create" class method instead.

Parameters:
where Where the error occurred.
what What went wrong.

rpt_value_error::rpt_value_error (  )  [private]

The default constructor. Do not use.

rpt_value_error::rpt_value_error ( const rpt_value_error  )  [private]

The copy constructor. Do not use.


Member Function Documentation

static rpt_value::pointer rpt_value_error::create ( string_ty what  )  [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
what What went wrong.

static rpt_value::pointer rpt_value_error::create ( const nstring what  )  [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
what What went wrong.

static rpt_value::pointer rpt_value_error::create ( const rpt_position::pointer where,
string_ty what 
) [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
where Where the error occurred.
what What went wrong.

static rpt_value::pointer rpt_value_error::create ( const rpt_position::pointer where,
const nstring what 
) [static]

The create class method is used to create new dynamically allocated instances of this class.

Parameters:
where Where the error occurred.
what What went wrong.

nstring rpt_value_error::query (  )  const

The query method may be used to obtain the human readable representation of the error.

void rpt_value_error::setpos ( const rpt_position::pointer where  ) 

The setpos method may be used to update the recorded position of the error.

void rpt_value_error::print (  )  const

The print method may be used to print the error message, including the position if one has been provided.

const char* rpt_value_error::name (  )  const [protected, virtual]

The name method is used to obtain the name of the type of the value.

Implements rpt_value.

bool rpt_value_error::is_an_error (  )  const [protected, virtual]

The is_an_error method may be used to determine whether or not an object instance is an error instance. This happens often enoygh that the code is clear this way than using a dynamic_cast<rpt_value_error *>

Returns:
true for error instances, false for everything else

Reimplemented from rpt_value.

rpt_value_error& rpt_value_error::operator= ( const rpt_value_error  )  [private]

The assignment operator. Do not use.


Field Documentation

The where instance variable is used to remember the source code location of the error.

Definition at line 126 of file error.h.

The what instance variable is used to remember the human readable text of the error.

Definition at line 132 of file error.h.


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

Generated on Wed Mar 12 23:37:44 2008 for Aegis by  doxygen 1.5.5