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 
00026 // ////////////////////////////// Déclarations ///////////////////////////// //
00027 
00028 namespace xmlioserver
00029 {
00057    class CException
00058       : private CObject, public std::ostringstream
00059    {
00060          typedef CObject SuperClass;                  
00061          typedef std::ostringstream SuperClassStream; 
00063       public : // Constructeurs
00064 
00066          CException(void);
00067 
00072          explicit CException(const std::string & _id);
00073 
00078          CException(const CException & _exception);
00079 
00084          CException(const CException * const _exception_ptr); // NIY
00085 
00086       public : // Accesseurs
00087 
00092          SuperClassStream & getStream(void);
00093 
00098          const std::string getMessage(void) const;
00099          
00100       public : // Destructeur
00101         
00103          virtual ~CException(void);
00104 
00105       public : // Autre
00106 
00107          virtual std::string toString(void) const;
00108          virtual void fromString(const std::string & _str);
00109 
00110       private : // Propriétés
00111 
00116          bool desc_rethrow;
00117 
00118    }; // CException
00119 
00120 } // namespace xmlioserver
00121 
00122 #endif  // __EXCEPTION_HPP__
00123 
 Tout Classes Espaces de nommage Fichiers Fonctions Variables Définition de type Énumérations Valeurs énumérées Amis Macros