|
Cppcheck
|
File name and line number. More...
#include <errorlogger.h>
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 |
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.
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.
| ErrorLogger::ErrorMessage::FileLocation::FileLocation | ( | const Token * | tok, |
| const TokenList * | list | ||
| ) |
Definition at line 362 of file errorlogger.cpp.
| std::string ErrorLogger::ErrorMessage::FileLocation::getfile | ( | bool | convert = true | ) | const |
Return the filename.
| convert | If true convert path to native separators. |
Definition at line 367 of file errorlogger.cpp.
References Path::toNativeSeparators().
| void ErrorLogger::ErrorMessage::FileLocation::setfile | ( | const std::string & | file | ) |
Set the filename.
| file | Filename to set. |
Definition at line 374 of file errorlogger.cpp.
References Path::fromNativeSeparators(), and Path::simplifyPath().
Referenced by CppCheck::checkFile(), ErrorLogger::ErrorMessage::deserialize(), Preprocessor::error(), Preprocessor::getcfgs(), Preprocessor::missingInclude(), CppCheck::tooManyConfigsError(), CheckUnusedFunctions::unusedFunctionError(), Preprocessor::validateCfgError(), and Preprocessor::writeError().
| std::string ErrorLogger::ErrorMessage::FileLocation::stringify | ( | ) | const |
Returns the location as a string.
Format: [file:line]
Definition at line 381 of file errorlogger.cpp.
References Path::toNativeSeparators().
Referenced by TokenList::fileLine().
std::string ErrorLogger::ErrorMessage::FileLocation::_file [private] |
Definition at line 193 of file errorlogger.h.
| unsigned int ErrorLogger::ErrorMessage::FileLocation::line |
Definition at line 191 of file errorlogger.h.
Referenced by CppCheck::checkFile(), ErrorLogger::ErrorMessage::deserialize(), Preprocessor::error(), Preprocessor::getcfgs(), Preprocessor::missingInclude(), CheckUnusedFunctions::unusedFunctionError(), Preprocessor::validateCfgError(), and Preprocessor::writeError().
1.7.6.1