|
PEARL
Parallel Event Access and Replay Library
|
Representation of a source-code location definition. More...
#include <pearl/SourceLocation.h>
Public Types | |
| typedef uint32_t | IdType |
| Source-code location definition identifier type. More... | |
Public Member Functions | |
Constructors & destructor | |
| SourceLocation (IdType id, const String &filename, const uint32_t line) | |
| Constructor. More... | |
Access definition data | |
| IdType | getId () const |
| Get global identifier. More... | |
| const String & | getFilename () const |
| Get filename. More... | |
| uint32_t | getLine () const |
| Get line number. More... | |
Static Public Attributes | |
| static const IdType | NO_ID = (~static_cast<IdType>(0)) |
| static const SourceLocation | UNDEFINED |
Related Functions | |
(Note that these are not member functions.) | |
Stream I/O functions | |
| std::ostream & | operator<< (std::ostream &stream, const SourceLocation &item) |
| Stream output operator. More... | |
Comparison operators | |
| bool | operator== (const SourceLocation &lhs, const SourceLocation &rhs) |
| Equality operator. More... | |
| bool | operator!= (const SourceLocation &lhs, const SourceLocation &rhs) |
| Inequality operator. More... | |
Instances of the SourceLocation class provide information about a particular location in the source code with line granularity. Source locations are characterized by a file name and a line number within the corresponding file. The numerical identifiers of the individual source-code locations are globally defined and continuously enumerated, i.e., the ID is element of [0,#sourceLocations-1].
| typedef uint32_t pearl::SourceLocation::IdType |
Creates a new source-code location definition instance and initializes it with the given values.
| id | Global source-code location identifier |
| filename | Name of source file (String::UNDEFINED if unknown) |
| line | Line number within filename (zero if unknown) |
| const String& pearl::SourceLocation::getFilename | ( | ) | const |
Returns the string definition storing the name of the source-code file.
| IdType pearl::SourceLocation::getId | ( | ) | const |
Returns the global identifier of the source-code location definition.
| uint32_t pearl::SourceLocation::getLine | ( | ) | const |
Returns the line number within the source file.
|
related |
Compares two source-code location definition objects lhs and rhs for inequality. Two source-code location definitions are considered unequal if any of their attributes differs.
| lhs | Left-hand operand |
| rhs | Right-hand operand |
|
related |
Prints the contents of the given source-code location definition object item to an output stream in a human-readable form.
| stream | Output stream |
| item | Source-code location definition object |
|
related |
Compares two source-code location definition objects lhs and rhs for equality. Two source-code location definitions are considered equal if all of their attributes are identical.
| lhs | Left-hand operand |
| rhs | Right-hand operand |
Numerical identifier used for undefined source-code location definitions.
|
static |
Static instance of class SourceLocation representing undefined source-code location entries in other definitions.
![]() |
Copyright © 1998–2016 Forschungszentrum Jülich GmbH,
Jülich Supercomputing Centre
Copyright © 2009–2015 German Research School for Simulation Sciences GmbH, Laboratory for Parallel Programming |