Aegis  4.25.D505
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
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:
whereWhere the error occurred.
whatWhat went wrong.

The default constructor. Do not use.

The copy constructor. Do not use.


Member Function Documentation

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

Parameters:
whatWhat 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:
whatWhat 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:
whereWhere the error occurred.
whatWhat 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:
whereWhere the error occurred.
whatWhat went wrong.
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.

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.

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

The assignment operator. Do not use.

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.

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

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


Field Documentation

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

Definition at line 132 of file error.h.

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

Definition at line 126 of file error.h.


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