CppUnit project page FAQ

SourceLine.h
Go to the documentation of this file.
1#ifndef CPPUNIT_SOURCELINE_H
2#define CPPUNIT_SOURCELINE_H
3
5#include <string>
6
13#define CPPUNIT_SOURCELINE() CPPUNIT_NS::SourceLine( __FILE__, __LINE__ )
14
15
17
18
31{
32public:
33 SourceLine();
34
35 // Ensure thread-safe copy by detaching the string buffer.
36 SourceLine( const SourceLine &other );
37
38 SourceLine( const std::string &fileName,
39 int lineNumber );
40
41 SourceLine &operator =( const SourceLine &other );
42
44 virtual ~SourceLine();
45
46 bool isValid() const;
47
48 int lineNumber() const;
49
50 std::string fileName() const;
51
52 bool operator ==( const SourceLine &other ) const;
53 bool operator !=( const SourceLine &other ) const;
54
55private:
56 std::string m_fileName;
58};
59
60
62
63#endif // CPPUNIT_SOURCELINE_H
#define CPPUNIT_API
Definition CppUnitApi.h:27
#define CPPUNIT_NS_END
Definition Portability.h:106
#define CPPUNIT_NS_BEGIN
Definition Portability.h:105
Represents a source line location.
Definition SourceLine.h:31
int m_lineNumber
Definition SourceLine.h:57
std::string m_fileName
Definition SourceLine.h:56

Send comments to:
CppUnit Developers