26#ifndef CASA_LOGORIGIN_H
27#define CASA_LOGORIGIN_H
29#include <casacore/casa/aips.h>
30#include <casacore/casa/BasicSL/String.h>
31#include <casacore/casa/System/ObjectID.h>
32#include <casacore/casa/iosfwd.h>
108 const SourceLocation *where = 0);
115 const ObjectID &
id,
const SourceLocation *where = 0);
203 const char *fileName;
208#define WHERE casacore::SourceLocation::canonicalize(__FILE__, __LINE__)
String location() const
Turns the entire origin except for the ObjectID into a String.
LogOrigin(const String &globalFunctionName, const SourceLocation *where=0)
Use this constructor if the log message origination is from a global function.
LogOrigin & operator=(const LogOrigin &other)
const String & functionName() const
LogOrigin()
The default constructor sets a null class name, function name, object id, source file name,...
Bool isUnset() const
Return true if the line number and file name are not set.
LogOrigin & fileName(const String &fileName)
const String & className() const
LogOrigin & sourceLocation(const SourceLocation *where)
Set the file name and line number at the same time.
const String & fileName() const
const String & taskName() const
Get or set the corresponding element of the source location.
LogOrigin & functionName(const String &funcName)
String toString() const
Turn the entire origin into a String.
void copy_other(const LogOrigin &other)
Provide common implementation for copy constructor and assignment operator.
LogOrigin & className(const String &className)
const ObjectID & objectID() const
LogOrigin & line(uInt which)
LogOrigin & objectID(const ObjectID &id)
LogOrigin(const String &className, const String &memberFuncName, const SourceLocation *where=0)
Use this constructor if the log message origination is from a class member function.
String fullName() const
Returns class::function for a member function, or ::function for a global function.
LogOrigin(const LogOrigin &other)
Make this LogOrigin a copy of other.
String getNode()
Return a String with the MPI rank.
LogOrigin & taskName(const String &funcName)
LogOrigin(const String &className, const String &memberFuncName, const ObjectID &id, const SourceLocation *where=0)
Use this constructor if the log message origination is from a distributed object (don't worry if you ...
String: the storage and methods of handling collections of characters.
this file contains all the compiler specific defines
ostream & operator<<(ostream &os, const IComplex &)
Show on ostream.
bool Bool
Define the standard types used by Casacore.
Write a LogOrigin to an ostream.
ostream & operator<<(ostream &os, const LogOrigin &origin)
static const SourceLocation * canonicalize(const char *file, Int line)
Helper struct to get the source line.