Squid Web Cache master
Loading...
Searching...
No Matches
SourceLocation Class Reference

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

#include <Here.h>

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
 

Public Attributes

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

Private Member Functions

SourceLocationId calculateId (FileNameHasher) const
 

Private Attributes

FileNameHashCacher * fileNameHashCacher
 

Detailed Description

Definition at line 29 of file Here.h.

Constructor & Destructor Documentation

◆ SourceLocation()

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

Definition at line 32 of file Here.h.

Member Function Documentation

◆ calculateId()

SourceLocationId SourceLocation::calculateId ( FileNameHasher  ) const
private

◆ id()

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().

◆ print()

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

◆ context

const char* SourceLocation::context

Definition at line 45 of file Here.h.

Referenced by print().

◆ fileName

const char* SourceLocation::fileName

Definition at line 46 of file Here.h.

Referenced by id(), and print().

◆ fileNameHashCacher

FileNameHashCacher* SourceLocation::fileNameHashCacher
private

Definition at line 51 of file Here.h.

Referenced by id().

◆ lineNo

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: