A mapping between a series of keys to a FileLineInfo. More...
#include <FileLineInfo.h>
Public Member Functions | |
void | addInfo (const std::string &key0, const std::string &file, int line) |
Associate a key with file/line info. More... | |
void | addInfo (const std::string &key0, const std::string &key1, const std::string &file, int line) |
Associate a key with file/line info. More... | |
void | addInfo (const std::string &key0, const std::string &key1, const std::string &key2, const std::string &file, int line) |
Associate a key with file/line info. More... | |
FileLineInfo | getInfo (const std::string &key0) const |
Get file/line info for a key. More... | |
FileLineInfo | getInfo (const std::string &key0, const std::string &key1) const |
Get file/line info for a pair of keys. More... | |
FileLineInfo | getInfo (const std::string &key0, const std::string &key1, const std::string &key2) const |
Get file/line info for a pair of keys. More... | |
Protected Member Functions | |
std::string | makeKey (const std::string &key0, const std::string &key1) const |
Makes a unique key for the map given two strings. More... | |
std::string | makeKey (const std::string &key0, const std::string &key1, const std::string &key2) const |
Makes a unique key given three strings. More... | |
Protected Attributes | |
std::map< std::string, FileLineInfo > | _map |
A mapping between a series of keys to a FileLineInfo.
This is intended to replace having a std::pair or a std::tuple as a key to a map holding the FileLineInfo.
Definition at line 40 of file FileLineInfo.h.
Associate a key with file/line info.
key0 | Key |
file | file |
line | line number |
Definition at line 35 of file FileLineInfo.C.
Referenced by addInfo(), Factory::reg(), ActionFactory::reg(), and Syntax::registerActionSyntax().
void FileLineInfoMap::addInfo | ( | const std::string & | key0, |
const std::string & | key1, | ||
const std::string & | file, | ||
int | line | ||
) |
Associate a key with file/line info.
key0 | Key |
key1 | Key |
file | file |
line | line number |
Definition at line 43 of file FileLineInfo.C.
void FileLineInfoMap::addInfo | ( | const std::string & | key0, |
const std::string & | key1, | ||
const std::string & | key2, | ||
const std::string & | file, | ||
int | line | ||
) |
Associate a key with file/line info.
key0 | Key |
key1 | Key |
key2 | Key |
file | file |
line | line number |
Definition at line 52 of file FileLineInfo.C.
FileLineInfo FileLineInfoMap::getInfo | ( | const std::string & | key0 | ) | const |
Get file/line info for a key.
key0 | Key |
Definition at line 76 of file FileLineInfo.C.
Referenced by getInfo(), Factory::getLineInfo(), ActionFactory::getLineInfo(), Syntax::getLineInfo(), and Factory::reg().
FileLineInfo FileLineInfoMap::getInfo | ( | const std::string & | key0, |
const std::string & | key1 | ||
) | const |
Get file/line info for a pair of keys.
key0 | Key |
key1 | Key |
Definition at line 85 of file FileLineInfo.C.
FileLineInfo FileLineInfoMap::getInfo | ( | const std::string & | key0, |
const std::string & | key1, | ||
const std::string & | key2 | ||
) | const |
Get file/line info for a pair of keys.
key0 | Key |
key1 | Key |
key2 | Key |
Definition at line 91 of file FileLineInfo.C.
|
protected |
Makes a unique key for the map given two strings.
Definition at line 62 of file FileLineInfo.C.
|
protected |
Makes a unique key given three strings.
Definition at line 68 of file FileLineInfo.C.
|
protected |
Definition at line 111 of file FileLineInfo.h.