GEL  2
GEL is a library for Geometry and Linear Algebra
/Users/jab/Documents/Teaching/02585/GEL2_and_demos/GEL/src/CGLA/ExceptionStandard.h
00001 #ifndef __CGLA_EXCEPTIONSTANDARD_H__
00002 #define __CGLA_EXCEPTIONSTANDARD_H__
00003 
00004 #include <string>
00005 #include <iostream>
00006 
00007 namespace CGLA
00008 {
00009 
00010         class CGLAMotherException
00011         {
00012                 std::string str;
00013         public:
00014                 CGLAMotherException(const std::string s)
00015                         {
00016                                 str = s;
00017                         }
00018   
00019                 void print(std::ostream& os) const 
00020                 {
00021                         os << str << std::endl; 
00022                 }
00023         };
00024 
00025 #define CGLA_DERIVEEXCEPTION(nameoe)                                                                                                                    \
00026         class nameoe: public CGLAMotherException                                                                        \
00027         {                                                                                                                                                                                                                                       \
00028         public:                                                                                                                                                                                                         \
00029                 nameoe(const std::string& s): CGLAMotherException(s) {} \
00030         };                                                                                                                                                                                                                              \
00031 
00032 }
00033 
00034 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations