17 #ifndef AGXUNIT_SOURCECODEINFO_H 18 #define AGXUNIT_SOURCECODEINFO_H 20 #include <agx/config.h> 21 #include <agx/config/AGX_USE_UNIT_TESTS.h> 24 #if AGX_USE_UNIT_TESTS() 32 # pragma warning(push) 33 # pragma warning(disable: 4251) // warning C4251: class X needs to have dll-interface to be used by clients of class Y 42 SourceCodeInfo() : m_line(0) {}
43 SourceCodeInfo(
int line,
const agx::String& file,
const agx::String&
function) : m_line(line), m_file(file), m_function(function) {}
45 SourceCodeInfo & operator =(
const SourceCodeInfo &other )
49 m_file = other.m_file.c_str();
50 m_line = other.m_line;
51 m_function = other.m_function.c_str();
56 SourceCodeInfo(
const SourceCodeInfo &other )
57 : m_line( other.m_line ), m_file( other.m_file.c_str() ), m_function( other.m_function.c_str() )
62 bool operator ==(
const SourceCodeInfo &other )
const {
63 return m_line == other.m_line && m_file == other.m_file&& m_function==other.m_function;
66 bool operator !=(
const SourceCodeInfo &other )
const {
return !(*
this == other); }
70 int line()
const {
return m_line; }
72 friend std::ostream&
operator <<( std::ostream& os,
const SourceCodeInfo &info ) {
73 os <<
"File: " << info.filename();
75 os <<
":" << info.line() <<
" ";
77 os <<
"(" << info.line() <<
") ";
79 os <<
"Function: " << info.function();
97 #endif // AGX_USE_UNIT_TESTS() 101 #endif //AGXUNIT_SOURCECODEINFO_H bool operator==(T val, InvalidIndexStruct)
#define AGXPHYSICS_EXPORT
std::ostream & operator<<(std::ostream &o, const agx::Vec6 &v)
bool operator!=(T val, InvalidIndexStruct)