XMLIOSERVER 0.4
Serveur d'Entrées/Sorties parallèles
exception.hpp
Aller à la documentation de ce fichier.
00001 /* ************************************************************************** *
00002  *      Copyright © IPSL/LSCE, XMLIOServer, Avril 2010 - Octobre 2011         *
00003  * ************************************************************************** */
00004 
00005 #ifndef __EXCEPTION_HPP__
00006 #define __EXCEPTION_HPP__
00007 
00008 #ifndef __XIOS_NO_EXTERN
00009 
00010 // C++ standard headers
00011 #  include <sstream>
00012 
00013 #endif // __XIOS_NO_EXTERN
00014 
00015 // XMLIOServer headers
00016 #include "object.hpp"
00017 
00018 
00027 // ////////////////////////////// Déclarations ///////////////////////////// //
00028 
00029 namespace xmlioserver
00030 {
00058    class CException
00059       : private CObject, public std::ostringstream
00060    {
00061          typedef CObject SuperClass;                  
00062          typedef std::ostringstream SuperClassStream; 
00064       public : // Constructeurs
00065 
00067          CException(void);
00068 
00073          explicit CException(const std::string & _id);
00074 
00079          CException(const CException & _exception);
00080 
00085          CException(const CException * const _exception_ptr); // NIY
00086 
00087       public : // Accesseurs
00088 
00093          SuperClassStream & getStream(void);
00094 
00099          const std::string getMessage(void) const;
00100          
00101       public : // Destructeur
00102         
00104          virtual ~CException(void);
00105 
00106       public : // Autre
00107 
00108          virtual std::string toString(void) const;
00109          virtual void fromString(const std::string & _str);
00110 
00111       private : // Propriétés
00112 
00117          bool desc_rethrow;
00118 
00119    }; // CException
00120 
00121 } // namespace xmlioserver
00122 
00123 #endif  // __EXCEPTION_HPP__
00124 
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définition de type Amis Macros