The DejaVU Framework --
hush 3.1
-
[up]
[top] -
index
make
include
source
logic
grammar
scripts
html
configure
mx
slides
talks
scenes
reports
projects
<body bgcolor="#FFFFFF" text="#000000">
include
include
include
include
// Sample Error class with just a priority and a string error description.
<h4 align=right text=red> Error</h4><hr>
class Error
{
public:
Error(int priority, std::string errMsg) :
mPriority(priority), mError(errMsg) {}
int getPriority() const {return mPriority; }
std::string getErrorString() const {return mError; }
friend bool operator<(const Error& lhs, const Error& rhs);
friend std::ostream& operator<<(std::ostream& str, const Error& err);
protected:
int mPriority;
std::string mError;
};<hr>
// Simple ErrorCorrelator class that returns most recent errors first.
<hr>
ErrorCorrelator</h4>
class ErrorCorrelator
{
public:
ErrorCorrelator() {}
//
// Add an error to be correlated.
//
void addError(const Error& error);
//
// Retrieve the next error to be processed
//
Error getError() throw (std::out_of_range);
protected:
std::stack<Error> mErrors;
private:
// prevent assignment and pass-by-reference
ErrorCorrelator(const ErrorCorrelator& src);
ErrorCorrelator& operator=(const ErrorCorrelator& rhs);
};
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-2780434-1";
urchinTracker();
</script>