14 #if !defined(KRATOS_CODE_LOCATION_H_INCLUDED )
15 #define KRATOS_CODE_LOCATION_H_INCLUDED
40 CodeLocation(std::string
const&
FileName, std::string
const& FunctionName, std::size_t LineNumber);
47 mFileName = Other.mFileName;
48 mFunctionName = Other.mFunctionName;
49 mLineNumber = Other.mLineNumber;
59 std::string CleanFileName()
const;
62 std::string CleanFunctionName()
const;
69 const std::string& GetFileName()
const;
71 const std::string& GetFunctionName()
const;
73 int GetLineNumber()
const;
82 std::string mFileName;
83 std::string mFunctionName;
84 std::size_t mLineNumber;
90 static void RemoveNamespace(std::string& FunctionName,
const std::string& Namespace);
92 static void ReduceTemplateArgumentsToFirstN(std::string& FunctionName,
const std::string& TemplateName, std::size_t NumberOfArgumentsToKeep);
94 static std::size_t GetNextPositionSkippingWhiteSpaces(std::string
const& ThisString, std::size_t Position);
96 static bool IsWhiteSpace(
char C);
98 static void ReplaceAll(std::string& ThisString,
const std::string& FromString,
const std::string& ToString);
109 const CodeLocation& rThis);
112 #if defined(KRATOS_CODE_LOCATION)
113 #undef KRATOS_CODE_LOCATION
116 #if defined(KRATOS_CURRENT_FUNCTION)
117 #undef KRATOS_CURRENT_FUNCTION
120 #if defined(__PRETTY_FUNCTION__)
121 #define KRATOS_CURRENT_FUNCTION __PRETTY_FUNCTION__
122 #elif defined(__GNUC__)
123 #define KRATOS_CURRENT_FUNCTION __PRETTY_FUNCTION__
124 #elif defined(__FUNCTION__)
125 #define KRATOS_CURRENT_FUNCTION __FUNCTION__
126 #elif defined(__func__)
127 #define KRATOS_CURRENT_FUNCTION __func__
129 #define KRATOS_CURRENT_FUNCTION "unknown function"
133 #define KRATOS_CODE_LOCATION Kratos::CodeLocation(__FILE__, KRATOS_CURRENT_FUNCTION, __LINE__)
Definition: code_location.h:31
CodeLocation(CodeLocation const &Other)=default
CodeLocation & operator=(CodeLocation const &Other)
Definition: code_location.h:46
CodeLocation(CodeLocation &&rOther) noexcept=default
string FileName
Export to vtk.
Definition: GenerateWind.py:175
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
int C
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:27