CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Message.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_MESSAGE_H 00002 #define CPPUNIT_MESSAGE_H 00003 00004 #include <cppunit/Portability.h> 00005 00006 #if CPPUNIT_NEED_DLL_DECL 00007 #pragma warning( push ) 00008 #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z 00009 #endif 00010 00011 #include <cppunit/portability/CppUnitDeque.h> 00012 #include <string> 00013 00014 00015 CPPUNIT_NS_BEGIN 00016 00017 00018 #if CPPUNIT_NEED_DLL_DECL 00019 // template class CPPUNIT_API std::deque<std::string>; 00020 #endif 00021 00038 class CPPUNIT_API Message 00039 { 00040 public: 00041 Message(); 00042 00043 explicit Message( const std::string &shortDescription ); 00044 00045 Message( const std::string &shortDescription, 00046 const std::string &detail1 ); 00047 00048 Message( const std::string &shortDescription, 00049 const std::string &detail1, 00050 const std::string &detail2 ); 00051 00052 Message( const std::string &shortDescription, 00053 const std::string &detail1, 00054 const std::string &detail2, 00055 const std::string &detail3 ); 00056 00060 const std::string &shortDescription() const; 00061 00065 int detailCount() const; 00066 00072 std::string detailAt( int index ) const; 00073 00087 std::string details() const; 00088 00091 void clearDetails(); 00092 00096 void addDetail( const std::string &detail ); 00097 00102 void addDetail( const std::string &detail1, 00103 const std::string &detail2 ); 00104 00110 void addDetail( const std::string &detail1, 00111 const std::string &detail2, 00112 const std::string &detail3 ); 00113 00117 void addDetail( const Message &message ); 00118 00122 void setShortDescription( const std::string &shortDescription ); 00123 00128 bool operator ==( const Message &other ) const; 00129 00130 00135 bool operator !=( const Message &other ) const; 00136 00137 private: 00138 std::string m_shortDescription; 00139 00140 typedef CppUnitDeque<std::string> Details; 00141 Details m_details; 00142 }; 00143 00144 00145 CPPUNIT_NS_END 00146 00147 #if CPPUNIT_NEED_DLL_DECL 00148 #pragma warning( pop ) 00149 #endif 00150 00151 00152 #endif // CPPUNIT_MESSAGE_H

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers