#include <Point.h>
Public Member Functions | |
| size_t | mem_size () const |
| Point (std::string filename, int line=0, const Point *point=0) | |
| Point (SymbolEntryPtr sentry, int line=0, const Point *point=0) | |
| Point (bytecodeistream &str) | |
| ~Point (void) | |
| SymbolEntryPtr | sentry (void) const |
| std::string | filename (void) const |
| int | line (void) const |
| const Point * | point (void) const |
| std::string | toString (void) const |
| std::ostream & | toStream (std::ostream &str) const |
Private Attributes | |
| SymbolEntryPtr | m_entry |
| int | m_line |
| const Point * | m_point |
This helps in issuing proper error messages like "identifier <name> defined in <file1> at <line1> included from <file2> at <line2> included from <toplevel> at <line>"
A TableEntry (identifier <name>) has a Point which stores the definition point (Point) of this identifier. If its Point is in an include file, the m_point member points to the inclusion point (where the 'include ".."' statement is) of the include file.
Point works as a linked list (file1 -> file2 -> toplevel in the above example) for definition points inside include files. The real structure is a tree since for the next include of file3 inside file2, the list is file3 -> file2 -> toplevel and the latter two nodes are shared.
An identifier has a definition point. A file has a filename and an inclusion point (if its an included file).
| Point::Point | ( | std::string | filename, | |
| int | line = 0, |
|||
| const Point * | point = 0 | |||
| ) |
| Point::Point | ( | SymbolEntryPtr | sentry, | |
| int | line = 0, |
|||
| const Point * | point = 0 | |||
| ) |
| Point::Point | ( | bytecodeistream & | str | ) |
| Point::~Point | ( | void | ) |
| size_t Point::mem_size | ( | ) | const [inline] |
| SymbolEntryPtr Point::sentry | ( | void | ) | const |
| std::string Point::filename | ( | void | ) | const |
| int Point::line | ( | void | ) | const |
| const Point * Point::point | ( | void | ) | const |
| std::string Point::toString | ( | void | ) | const |
| std::ostream & Point::toStream | ( | std::ostream & | str | ) | const |
SymbolEntryPtr Point::m_entry [private] |
int Point::m_line [private] |
const Point* Point::m_point [private] |
1.5.0