Fennel: ErrorSource Class Reference (original) (raw)

ErrorSource is a common base for all classes that post row exceptions to an ErrorTarget. More...

#include <[ErrorSource.h](ErrorSource%5F8h-source.html)>

Inheritance diagram for ErrorSource:

List of all members.

Public Member Functions
virtual ~ErrorSource ()
virtual void initErrorSource (SharedErrorTarget pErrorTarget, const std::string &name)
For use when initialization has to be deferred until after construction.
void postError (ErrorLevel level, const std::string &message, void *address, long capacity, int index)
Posts an exception, such as a row exception.
void postError (ErrorLevel level, const std::string &message, const TupleDescriptor &errorDesc, const TupleData &errorTuple, int index)
Posts an exception, such as a row exception.
bool hasTarget () const
**Returns:**true iff an error target has been set
ErrorTarget & getErrorTarget () const
**Returns:**the ErrorTarget for this source
SharedErrorTarget getSharedErrorTarget () const
**Returns:**the SharedErrorTarget for this source
std::string getErrorSourceName () const
Gets the name of this source.
void setErrorSourceName (std::string const &n)
Sets the name of this source.
void disableTarget ()
Protected Member Functions
ErrorSource ()
Constructs a new uninitialized ErrorSource.
ErrorSource (SharedErrorTarget pErrorTarget, const std::string &name)
Constructs a new ErrorSource.
Private Attributes
SharedErrorTarget pErrorTarget
std::string name
TupleAccessor errorAccessor
Tuple accessor for error records handed by this error source.
boost::shared_ptr< FixedBuffer > pErrorBuf
A buffer for error records.

Detailed Description

ErrorSource is a common base for all classes that post row exceptions to an ErrorTarget.

An ErrorSource generally corresponds to an ExecStream. Fennel data is typiclly interpreted as external data via separate metadata, so it is usually required for an ErrorSource to be preregistered with the external system. (For example, a Fennel long might map to a decimal or datetime type.)

Definition at line 42 of file ErrorSource.h.


Constructor & Destructor Documentation

| ErrorSource::ErrorSource | ( | | ) | [explicit, protected] | | ------------------------ | - | | - | ----------------------- |

ErrorSource::ErrorSource ( SharedErrorTarget pErrorTarget,
const std::string & name
) [explicit, protected]

| ErrorSource::~ErrorSource | ( | | ) | [virtual] | | -------------------------- | - | | - | ----------- |


Member Function Documentation

void ErrorSource::initErrorSource ( SharedErrorTarget pErrorTarget,
const std::string & name
) [virtual]
void ErrorSource::postError ( ErrorLevel level,
const std::string & message,
void * address,
long capacity,
int index
)

| bool ErrorSource::hasTarget | ( | | ) | const [inline] | | --------------------------- | - | | - | ---------------- |

| ErrorTarget& ErrorSource::getErrorTarget | ( | | ) | const [inline] | | ----------------------------------------------------------------- | - | | - | ---------------- |

Returns:

the SharedErrorTarget for this source

Definition at line 129 of file ErrorSource.h.

| std::string ErrorSource::getErrorSourceName | ( | | ) | const [inline] | | ------------------------------------------- | - | | - | ---------------- |

Gets the name of this source.

Useful to construct nested names for subcomponents that are also ErrorSources.

Returns:

the name

Definition at line 139 of file ErrorSource.h.

00140 { 00141 return name; 00142 }

void ErrorSource::setErrorSourceName ( std::string const & n ) [inline]

Sets the name of this source.

Useful to construct dynamic names for fine-grained filtering.

Definition at line 148 of file ErrorSource.h.

00149 { 00150 name = n; 00151 }

| void ErrorSource::disableTarget | ( | | ) | | ------------------------------- | - | | - |


Member Data Documentation

Tuple accessor for error records handed by this error source.

Definition at line 50 of file ErrorSource.h.

Referenced by postError().


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


Generated on Mon Jun 22 04:00:30 2009 for Fennel by doxygen 1.5.1