InfinityException Class Reference

#include <InfinityException.h>

Inherits ArithmeticException.

Inheritance diagram for InfinityException:

Inheritance graph
[legend]
Collaboration diagram for InfinityException:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 InfinityException () throw ()
 Default constructor.
 InfinityException (std::string sExpressionToCompute, std::string sZeroValue) throw ()
 This constructor requires 2 parameters :
  • the expression computed which give an infinity value
  • the attribute which is infinity and has done the error.

 InfinityException (std::string sExpressionToCompute, std::string sInfinityValue, std::string sOrigin, std::string sFileName, unsigned int iLineNumber) throw ()
 This constructor requires 5 parameters :
  • the expression computed which give an infinity value
  • the attribute which is infinity and has done the error
  • the method which throw the exception
  • the name of the file where the exception was thrown
  • the line number in the file where the exception was thrown.

virtual ~InfinityException () throw ()
 Destructor.
virtual std::string makeDescription ()
 The description message provides by the infinity exception.
virtual std::string makeReason ()
 The reason message provides by the infinity exception.
virtual std::string makeOrigin (std::string sOrigin)
 The origin message provides by the infinity exception.

Private Attributes

std::string _sExpressionToCompute
std::string _sInfinityValue

Detailed Description

Definition at line 15 of file InfinityException.h.


Constructor & Destructor Documentation

InfinityException::InfinityException  )  throw ()
 

Default constructor.

Definition at line 15 of file InfinityException.cpp.

00016 {
00017 
00018 }

InfinityException::InfinityException std::string  sExpressionToCompute,
std::string  sZeroValue
throw ()
 

This constructor requires 2 parameters :

  • the expression computed which give an infinity value
  • the attribute which is infinity and has done the error.

Definition at line 29 of file InfinityException.cpp.

00029                                                                                                      : 
00030 _sExpressionToCompute(sExpressionToCompute),_sInfinityValue(sInfinityValue)
00031 {       
00032         setLineNumber(0);
00033         setFileName("");
00034         setType("InfinityException");
00035         
00036         setDescription(makeDescription());
00037         setReason(makeReason());
00038         setOrigin("");
00039 
00040 }

InfinityException::InfinityException std::string  sExpressionToCompute,
std::string  sInfinityValue,
std::string  sOrigin,
std::string  sFileName,
unsigned int  iLineNumber
throw ()
 

This constructor requires 5 parameters :

  • the expression computed which give an infinity value
  • the attribute which is infinity and has done the error
  • the method which throw the exception
  • the name of the file where the exception was thrown
  • the line number in the file where the exception was thrown.

Definition at line 48 of file InfinityException.cpp.

00052                                                                                                            : 
00053 _sExpressionToCompute(sExpressionToCompute),_sInfinityValue(sInfinityValue)
00054 {       
00055         setLineNumber(iLineNumber);
00056         setFileName(sFileName);
00057         setType("InfinityException");
00058         
00059         setDescription(makeDescription());
00060         setReason(makeReason());
00061         setOrigin(makeOrigin(sOrigin));
00062 }

InfinityException::~InfinityException  )  throw () [virtual]
 

Destructor.

Definition at line 21 of file InfinityException.cpp.

00022 {
00023 
00024 }


Member Function Documentation

std::string InfinityException::makeDescription  )  [virtual]
 

The description message provides by the infinity exception.

Implements ArithmeticException.

Definition at line 65 of file InfinityException.cpp.

References _sExpressionToCompute, and _sInfinityValue.

00066 {
00067         std::string     sExceptionMessage = "Computing of the ";
00068                                 sExceptionMessage+= _sExpressionToCompute;
00069                                 sExceptionMessage+= " make ";
00070                                 sExceptionMessage+= _sInfinityValue;
00071                                 sExceptionMessage+= " equal to infinity";
00072 
00073         return sExceptionMessage;
00074 }

std::string InfinityException::makeOrigin std::string  sOrigin  )  [virtual]
 

The origin message provides by the infinity exception.

Implements ArithmeticException.

Definition at line 87 of file InfinityException.cpp.

References Exception::getFileName(), Exception::getLineNumber(), and ltos().

00088 {
00089         std::string     sOriginMessage = getFileName();
00090                                 sOriginMessage+= " (l:";
00091                                 sOriginMessage+= ltos(getLineNumber());
00092                                 sOriginMessage+= ") ";
00093                                 sOriginMessage+= sOrigin;
00094                         
00095         return sOriginMessage;
00096 }

Here is the call graph for this function:

std::string InfinityException::makeReason  )  [virtual]
 

The reason message provides by the infinity exception.

Implements ArithmeticException.

Definition at line 77 of file InfinityException.cpp.

References Exception::getType().

00078 {
00079         std::string     sReasonMessage = "OPERATION_NOT_ALLOWED --> ";
00080                                 sReasonMessage+= getType();
00081                         
00082         return sReasonMessage;
00083 }

Here is the call graph for this function:


Member Data Documentation

std::string InfinityException::_sExpressionToCompute [private]
 

Definition at line 37 of file InfinityException.h.

Referenced by makeDescription().

std::string InfinityException::_sInfinityValue [private]
 

Definition at line 38 of file InfinityException.h.

Referenced by makeDescription().


The documentation for this class was generated from the following files:
Generated on Fri Jul 10 10:32:25 2009 for Utils Library by  doxygen 1.4.5