CppUnit project page FAQ CppUnit home page

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

SourceLine.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_SOURCELINE_H
00002 #define CPPUNIT_SOURCELINE_H
00003 
00004 #include <cppunit/Portability.h>
00005 #include <string>
00006 
00013 #define CPPUNIT_SOURCELINE() ::CppUnit::SourceLine( __FILE__, __LINE__ )
00014 
00015 
00016 namespace CppUnit
00017 {
00018 
00030 class CPPUNIT_API SourceLine
00031 {
00032 public:
00033   SourceLine();
00034 
00035   SourceLine( const std::string &fileName,
00036               int lineNumber );
00037 
00039   virtual ~SourceLine();
00040 
00041   bool isValid() const;
00042 
00043   int lineNumber() const;
00044 
00045   std::string fileName() const;
00046 
00047   bool operator ==( const SourceLine &other ) const;
00048   bool operator !=( const SourceLine &other ) const;
00049 
00050 private:
00051   std::string m_fileName;
00052   int m_lineNumber;
00053 };
00054 
00055 
00056 } // namespace CppUnit
00057 
00058 
00059 
00060 #endif  // CPPUNIT_SOURCELINE_H

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