Entropy Piano Tuner  1.1.3 (documentation not yet complete)
An open-source experimental software for piano tuning by entropy minimization
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
EptException Class Reference

#include <eptexception.h>

+ Inheritance diagram for EptException:
+ Collaboration diagram for EptException:

Public Types

enum  ExceptionCodes {
  ERR_CANNOT_WRITE_TO_FILE, ERR_CANNOT_READ_FROM_FILE, ERR_INVALID_STATE, ERR_INVALIDPARAMS,
  ERR_RENDERINGAPI_ERROR, ERR_DUPLICATE_ITEM, ERR_INTERNAL_ERROR, ERR_RT_ASSERTION_FAILED,
  ERR_NOT_IMPLEMENTED
}
 

Public Member Functions

 EptException (int number, const std::string &description, const std::string &source)
 Default constructor. More...
 
 EptException (int number, const std::string &description, const std::string &source, const char *file, long line)
 Extended constructor. More...
 
 EptException (const EptException &)=default
 Copy constructor. More...
 
 ~EptException () throw ()
 Needed for compatibility with std::exception. More...
 
EptExceptionoperator= (const EptException &)=default
 Assignment operator. More...
 
virtual const std::string & getFullDescription (void) const
 Returns a string with the full description of this error. More...
 
virtual int getNumber (void) const throw ()
 Gets the error code. More...
 
virtual const std::string & getSource () const
 Gets the source function. More...
 
virtual const std::string & getFile () const
 Gets source file name. More...
 
virtual long getLine () const
 Gets line number. More...
 
virtual const std::string & getDescription (void) const
 Returns a string with only the 'description' field of this exception. More...
 
const char * what () const throw ()
 Override std::exception::what. More...
 

Protected Attributes

long mLine
 
int mNumber
 
std::string mTypeName
 
std::string mDescription
 
std::string mSource
 
std::string mFile
 
std::string mFullDesc
 

Static Private Member Functions

static std::string toString (int code)
 

Detailed Description

Definition at line 51 of file eptexception.h.

Member Enumeration Documentation

Enumerator
ERR_CANNOT_WRITE_TO_FILE 
ERR_CANNOT_READ_FROM_FILE 
ERR_INVALID_STATE 
ERR_INVALIDPARAMS 
ERR_RENDERINGAPI_ERROR 
ERR_DUPLICATE_ITEM 
ERR_INTERNAL_ERROR 
ERR_RT_ASSERTION_FAILED 
ERR_NOT_IMPLEMENTED 

Definition at line 63 of file eptexception.h.

Constructor & Destructor Documentation

EptException::EptException ( int  number,
const std::string &  description,
const std::string &  source 
)

Default constructor.

Definition at line 24 of file eptexception.cpp.

+ Here is the call graph for this function:

EptException::EptException ( int  number,
const std::string &  description,
const std::string &  source,
const char *  file,
long  line 
)

Extended constructor.

Definition at line 35 of file eptexception.cpp.

+ Here is the call graph for this function:

EptException::EptException ( const EptException )
default

Copy constructor.

EptException::~EptException ( )
throw (
)
inline

Needed for compatibility with std::exception.

Definition at line 85 of file eptexception.h.

Member Function Documentation

virtual const std::string& EptException::getDescription ( void  ) const
inlinevirtual

Returns a string with only the 'description' field of this exception.

Definition at line 106 of file eptexception.h.

virtual const std::string& EptException::getFile ( ) const
inlinevirtual

Gets source file name.

Definition at line 100 of file eptexception.h.

const std::string & EptException::getFullDescription ( void  ) const
virtual

Returns a string with the full description of this error.

Definition at line 48 of file eptexception.cpp.

virtual long EptException::getLine ( ) const
inlinevirtual

Gets line number.

Definition at line 103 of file eptexception.h.

int EptException::getNumber ( void  ) const
throw (
)
virtual

Gets the error code.

Definition at line 70 of file eptexception.cpp.

virtual const std::string& EptException::getSource ( ) const
inlinevirtual

Gets the source function.

Definition at line 97 of file eptexception.h.

EptException& EptException::operator= ( const EptException )
default

Assignment operator.

std::string EptException::toString ( int  code)
staticprivate

Definition at line 75 of file eptexception.cpp.

const char* EptException::what ( ) const
throw (
)
inline

Override std::exception::what.

Definition at line 109 of file eptexception.h.

+ Here is the call graph for this function:

Member Data Documentation

std::string EptException::mDescription
protected

Definition at line 57 of file eptexception.h.

std::string EptException::mFile
protected

Definition at line 59 of file eptexception.h.

std::string EptException::mFullDesc
mutableprotected

Definition at line 60 of file eptexception.h.

long EptException::mLine
protected

Definition at line 54 of file eptexception.h.

int EptException::mNumber
protected

Definition at line 55 of file eptexception.h.

std::string EptException::mSource
protected

Definition at line 58 of file eptexception.h.

std::string EptException::mTypeName
protected

Definition at line 56 of file eptexception.h.


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