a source code location that is cheap to create, copy, and store

#include <Here.h>

Collaboration diagram for SourceLocation:

Public Member Functions

 SourceLocation (const char *aContext, const char *aFileName, const int aLineNo)
 
SourceLocationId id () const
 
std::ostream & print (std::ostream &os) const
 describes location using a compact but human-friendly format More...
 

Public Attributes

const char * context
 line-independent location description More...
 
const char * fileName
 source file name, often relative to build path More...
 
int lineNo
 line number inside the source file name (if positive) More...
 

Private Member Functions

SourceLocationId calculateId (FileNameHasher) const
 

Private Attributes

FileNameHashCacherfileNameHashCacher
 

Detailed Description

Definition at line 29 of file Here.h.

Constructor & Destructor Documentation

SourceLocation::SourceLocation ( const char *  aContext,
const char *  aFileName,
const int  aLineNo 
)
inline

Definition at line 32 of file Here.h.

Member Function Documentation

SourceLocationId SourceLocation::calculateId ( FileNameHasher  ) const
private
SourceLocationId SourceLocation::id ( ) const
Returns
our location identifier

Definition at line 67 of file Here.cc.

References fileName, FileNameHash(), fileNameHashCacher, and lineNo.

Referenced by TextException::id().

std::ostream & SourceLocation::print ( std::ostream &  os) const

Definition at line 77 of file Here.cc.

References context, fileName, lineNo, and SkipBuildPrefix().

Referenced by operator<<().

Member Data Documentation

const char* SourceLocation::context

Definition at line 45 of file Here.h.

Referenced by print().

const char* SourceLocation::fileName

Definition at line 46 of file Here.h.

Referenced by id(), and print().

FileNameHashCacher* SourceLocation::fileNameHashCacher
private

Definition at line 51 of file Here.h.

Referenced by id().

int SourceLocation::lineNo

Definition at line 47 of file Here.h.

Referenced by id(), and print().


The documentation for this class was generated from the following files:

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors