Go to the documentation of this file.
29 #ifndef CASA_LOGORIGIN_H
30 #define CASA_LOGORIGIN_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/BasicSL/String.h>
34 #include <casacore/casa/System/ObjectID.h>
35 #include <casacore/casa/iosfwd.h>
39 struct SourceLocation;
105 LogOrigin(
const String &globalFunctionName,
const SourceLocation *where = 0);
111 const SourceLocation *where = 0);
118 const ObjectID &
id,
const SourceLocation *where = 0);
206 const char *fileName;
211 #define WHERE casacore::SourceLocation::canonicalize(__FILE__, __LINE__)
Bool isUnset() const
Return true if the line number and file name are not set.
const ObjectID & objectID() const
static const SourceLocation * canonicalize(const char *file, Int line)
ostream & operator<<(ostream &os, const LogOrigin &origin)
const String & className() const
Write a LogOrigin to an ostream. Write a LogOrigin as a string to an ostream. Merely calls LogOrigin:...
LogOrigin()
The default constructor sets a null class name, function name, object id, source file name,...
String toString() const
Turn the entire origin into a String.
LogOrigin & sourceLocation(const SourceLocation *where)
Set the file name and line number at the same time.
const String & fileName() const
LogOrigin: The source code location of the originator of a LogMessage.
ObjectID: A unique identifier for distributed and other objects.
LogOrigin & operator=(const LogOrigin &other)
this file contains all the compiler specific defines
String location() const
Turns the entire origin except for the ObjectID into a String.
String fullName() const
Returns class::function for a member function, or ::function for a global function.
const String & taskName() const
Get or set the corresponding element of the source location.
String: the storage and methods of handling collections of characters.
bool Bool
Define the standard types used by Casacore.
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
Helper struct to get the source line. The user should only use the WHERE macro.
String getNode()
Return a String with the MPI rank.
const String & functionName() const
void copy_other(const LogOrigin &other)
Provide common implementation for copy constructor and assignment operator.