MTK++ Latest version: 0.2.0

Public Member Functions | Protected Member Functions | Protected Attributes
MTKpp::errorHandler Class Reference

Error Handling within MTK++. More...

#include <mtkpp/src/Log/errorHandler.h>

List of all members.

Public Member Functions

 errorHandler ()
 errorHandler Constructor
virtual ~errorHandler ()
 errorHandler Destructor
void throwError (const std::string &function, const std::string &message, int type=4)
 Throw error message.
void setStream (std::ostream *os)
 Set the output stream.
std::ostream * getStream ()
 Get the output stream.
void flush ()
 Flush output.
void setLogging (bool l)
 Turn logging on/off.
void setLevel (int l)
 Set level of output.
void setmaxMessages (int m)
 Set maximum number of messages.
unsigned int getmaxMessages ()
 Get maximum number of messages.
unsigned int getnMessages ()
 Get total number of messages.

Protected Member Functions

void throwError (error err)
 Throw error message from errorHandler.

Protected Attributes

int level
 Level of output.
std::ostream * stream
 Output stream.
bool log
 Write output boolean.
std::deque< errormessages
 Stored for a total of maxMessages messages.
unsigned int nMessages
 Total number of messages created.
unsigned int maxMessages
 Maximum allowed number of message to store.

Detailed Description

Error Handling within MTK++.

Author:
Martin Peters
Version:
0.1
Date:
2007

Constructor & Destructor Documentation

MTKpp::errorHandler::errorHandler ( )

errorHandler Constructor

References level, log, maxMessages, nMessages, and stream.

MTKpp::errorHandler::~errorHandler ( ) [virtual]

errorHandler Destructor


Member Function Documentation

void MTKpp::errorHandler::throwError ( const std::string &  function,
const std::string &  message,
int  type = 4 
)

Throw error message.

Parameters:
functionFunction where message originates
messageError/warning message
typeerror type

References nMessages.

Referenced by MTKpp::submolecule::addAtom(), MTKpp::molecule::addBond(), MTKpp::molecule::addFunctionalGroup(), MTKpp::proProtonate::addHydrogens(), MTKpp::ligProtonate::addHydrogens(), MTKpp::molecule::addHydrogens(), MTKpp::molecule::addRing(), MTKpp::connections::assignAngles(), MTKpp::connections::assignBonds(), MTKpp::connections::assignDisulfideBonds(), MTKpp::connections::assignImpropers(), MTKpp::collection::assignMetalParameters(), MTKpp::collection::assignMetalPartners(), MTKpp::connections::assignStd(), MTKpp::connections::assignStdAngles(), MTKpp::connections::assignStdBonds(), MTKpp::connections::assignStdBondsAngles(), MTKpp::atomTyper::assignStdFunctionalGroups(), MTKpp::atomTyper::assignStdHydrophobicGroups(), MTKpp::atomTyper::assignStdRings(), MTKpp::connections::assignStdTorsions(), MTKpp::connections::assignTorsions(), MTKpp::atomTyper::atomTypeByLib(), MTKpp::connections::bondByLibrary(), MTKpp::connections::BondExists(), MTKpp::proProtonate::buildDummyAtoms(), MTKpp::proProtonate::buildMissingAtoms(), MTKpp::protonate::buildMissingHeavyAtoms(), MTKpp::mmPotential::calcEnergy(), MTKpp::molecule::delAtom(), MTKpp::molecule::delFunctionalGroup(), MTKpp::rings::determine(), MTKpp::collection::determineMetalEnvironments(), MTKpp::molecule::determineValences(), MTKpp::collection::findMetals(), MTKpp::fingerPrint::generate1DFP(), MTKpp::molecule::generateAdjMatrix(), MTKpp::stdFrag::generateCoordinates(), MTKpp::molecule::generateFeatureDistMatrix(), MTKpp::fingerPrint::generateFragmentFP(), MTKpp::molecule::generateHeavyAdjMatrix(), MTKpp::fingerPrint::generateSimpleFP(), MTKpp::pdbParser::get1LCode(), MTKpp::molecule::getAngleParams(), MTKpp::molecule::getAngles(), MTKpp::molecule::getAtomKinds(), MTKpp::molecule::getAtomSymbols(), MTKpp::molecule::getAtomTypes(), MTKpp::proProtonate::getBestTorsions(), MTKpp::molecule::getBond(), MTKpp::molecule::getBondParams(), MTKpp::molecule::getBonds(), MTKpp::molecule::getCoordinates(), MTKpp::gaussianParser::getForceConstantZMAT(), MTKpp::molecule::getHeavyAtomIndices(), MTKpp::molecule::getHeavyAtomSymbols(), MTKpp::molecule::getHeavyAtomTypes(), MTKpp::molecule::getImpropers(), MTKpp::stdLibrary::getL(), MTKpp::complex::getLigFlags(), MTKpp::collection::getLJParams(), MTKpp::molecule::getMMCharges(), MTKpp::molecule::getMMImpropers(), MTKpp::collection::getMMnonBondedPairs(), MTKpp::molecule::getMMnonBondedPairs(), MTKpp::molecule::getMMResidues(), MTKpp::molecule::getMMTorsions(), MTKpp::collection::getNumExcluded14Atoms(), MTKpp::collection::getNumExcludedAtoms(), MTKpp::molecule::getNumMMImpropers(), MTKpp::collection::getNumMMnonBondedPairs(), MTKpp::molecule::getNumMMTorsions(), MTKpp::collection::getParameters(), MTKpp::rings::getPlaneNormal(), MTKpp::complex::getRecFlags(), MTKpp::molecule::getRotatableBonds(), MTKpp::molecule::getTorsions(), MTKpp::collection::hasMetal(), MTKpp::protonate::initialize(), MTKpp::superimpose::initializeCorrespondences(), MTKpp::seqAlign::initMatchMatrix(), MTKpp::rings::kekulize(), MTKpp::molecule::kekulizeRings(), main(), MTKpp::prepParser::openFile(), MTKpp::protonate::optimizePolarHs(), MTKpp::proProtonate::optimizePolarHs(), MTKpp::paramParser::paramParser(), MTKpp::selection::parse(), MTKpp::pdbParser::pdbParser(), MTKpp::atomTyper::perceiveCysteines(), MTKpp::atomTyper::perceiveHistidines(), MTKpp::seqAlign::printPAM(), MTKpp::seqAlign::printResults(), MTKpp::pamParser::Read(), MTKpp::pdbParser::Read(), MTKpp::prepParser::Read(), MTKpp::prepParser::readFragment(), MTKpp::readInputFile(), MTKpp::hybridize::readParameters(), MTKpp::molecule::removeHydrogens(), MTKpp::seqAlign::run(), MTKpp::watProtonate::run(), MTKpp::pca::run(), MTKpp::connections::run(), MTKpp::functionalize::run(), MTKpp::protonate::runCol(), MTKpp::hybridize::runLabute(), MTKpp::hybridize::runLabute3(), MTKpp::protonate::runMol(), MTKpp::molecule::setInSolution(), MTKpp::seqAlign::setPAMSize(), MTKpp::seqAlign::setPAMValue(), MTKpp::seqAlign::setQuery(), MTKpp::seqAlign::setTemplate(), MTKpp::molecule::setTorsion(), MTKpp::watProtonate::setup(), MTKpp::complex::setup(), MTKpp::molecule::setupConformers(), MTKpp::stdLibParser::stdLibParser(), MTKpp::seqAlign::traceBack(), MTKpp::prepParser::Write(), and MTKpp::molecule::~molecule().

void MTKpp::errorHandler::setStream ( std::ostream *  os) [inline]

Set the output stream.

Parameters:
osStream

References stream.

Referenced by main().

std::ostream* MTKpp::errorHandler::getStream ( ) [inline]

Get the output stream.

References stream.

void MTKpp::errorHandler::flush ( ) [inline]
void MTKpp::errorHandler::setLogging ( bool  l) [inline]

Turn logging on/off.

Parameters:
lOn/off

References log.

void MTKpp::errorHandler::setLevel ( int  l) [inline]

Set level of output.

Parameters:
lLevel

References level.

Referenced by main().

void MTKpp::errorHandler::setmaxMessages ( int  m) [inline]

Set maximum number of messages.

Parameters:
mmaximum number of messages

References maxMessages.

unsigned int MTKpp::errorHandler::getmaxMessages ( ) [inline]

Get maximum number of messages.

References maxMessages.

unsigned int MTKpp::errorHandler::getnMessages ( ) [inline]

Get total number of messages.

References nMessages.

void MTKpp::errorHandler::throwError ( error  err) [protected]

Throw error message from errorHandler.

Parameters:
errerror

References MTKpp::error::getType(), level, log, maxMessages, messages, and stream.


Member Data Documentation

int MTKpp::errorHandler::level [protected]

Level of output.

Referenced by errorHandler(), setLevel(), and throwError().

std::ostream* MTKpp::errorHandler::stream [protected]

Output stream.

Referenced by errorHandler(), flush(), getStream(), setStream(), and throwError().

bool MTKpp::errorHandler::log [protected]

Write output boolean.

Referenced by errorHandler(), setLogging(), and throwError().

std::deque<error> MTKpp::errorHandler::messages [protected]

Stored for a total of maxMessages messages.

Referenced by throwError().

unsigned int MTKpp::errorHandler::nMessages [protected]

Total number of messages created.

Referenced by errorHandler(), getnMessages(), and throwError().

unsigned int MTKpp::errorHandler::maxMessages [protected]

Maximum allowed number of message to store.

Referenced by errorHandler(), getmaxMessages(), setmaxMessages(), and throwError().


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

Generated on Fri Dec 23 2011 09:28:55 for MTK++ by Doxygen 1.7.5.1