Cppcheck
Public Member Functions | Public Attributes | Private Attributes
ErrorLogger::ErrorMessage::FileLocation Class Reference

File name and line number. More...

#include <errorlogger.h>

List of all members.

Public Member Functions

 FileLocation ()
 FileLocation (const std::string &file, unsigned int aline)
 FileLocation (const Token *tok, const TokenList *list)
std::string getfile (bool convert=true) const
 Return the filename.
void setfile (const std::string &file)
 Set the filename.
std::string stringify () const
 Returns the location as a string.

Public Attributes

unsigned int line

Private Attributes

std::string _file

Detailed Description

File name and line number.

Internally paths are stored with / separator. When getting the filename it is by default converted to native separators.

Definition at line 161 of file errorlogger.h.


Constructor & Destructor Documentation

Definition at line 163 of file errorlogger.h.

ErrorLogger::ErrorMessage::FileLocation::FileLocation ( const std::string &  file,
unsigned int  aline 
) [inline]

Definition at line 167 of file errorlogger.h.

Definition at line 362 of file errorlogger.cpp.


Member Function Documentation

std::string ErrorLogger::ErrorMessage::FileLocation::getfile ( bool  convert = true) const

Return the filename.

Parameters:
convertIf true convert path to native separators.
Returns:
filename.

Definition at line 367 of file errorlogger.cpp.

References Path::toNativeSeparators().

void ErrorLogger::ErrorMessage::FileLocation::setfile ( const std::string &  file)

Returns the location as a string.

Format: [file:line]

Definition at line 381 of file errorlogger.cpp.

References Path::toNativeSeparators().

Referenced by TokenList::fileLine().


Member Data Documentation

Definition at line 193 of file errorlogger.h.


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