#include <sourcefile.h>
Inheritance diagram for _InternalSourceFileNode:
Public Member Functions | |
~_InternalSourceFileNode () | |
SourcePositionArchive * | archive () const |
Get associated source position archive (or NULL):. | |
TLString | path () const |
Get file path:. | |
TLString | IncludeHierarchyStr () const |
Get include hierarchy string. | |
Static Public Member Functions | |
SourceFileNode | CreateSingleNode (const TLString &path) |
Private Member Functions | |
void | _DestroyPosCache () |
Destroy cache: (also done by _DetachArchive()). | |
void | _DetachArchive () |
void | _AddChild (_InternalSourceFileNode *isf) |
void | _DelChild (_InternalSourceFileNode *isf) |
bool | test_equal (const _InternalSourceFileNode &b) const |
Test if two source file nodes are equal; used by operator== and !=. | |
_InternalSourceFileNode (const _InternalSourceFileNode &) | |
NOT "C++-safe"; do not call these. | |
void | operator= (const _InternalSourceFileNode &) |
_InternalSourceFileNode (const TLString &path, _InternalSourceFileNode *parent, SourcePositionArchive *pos_archive) | |
Private Attributes | |
TLString | _path |
Path to the file. | |
SourcePositionArchive * | pos_archive |
_InternalSourceFileNode * | up |
Tree structure: parent pointer. | |
LinkedList< _InternalSourceFileNode > | down |
Tree structure: Child nodes. | |
int | parent_include_line |
Start position of the include statement in the parent node:. | |
int | parent_include_lpos |
filepos_t | include_stmt_pos |
Offset position & size of the include statement in the file:. | |
size_t | include_stmt_len |
SourcePositionCache * | pos_cache |
Friends | |
class | SourcePositionArchive |
class | LinkedList< _InternalSourceFileNode > |
class | RefNode< _InternalSourceFileNode > |
bool | operator== (const SourceFileNode &a, const SourceFileNode &b) |
operator==() returns true for the same file with the same position in the include tree. |
The SourceFileNode class lets you access the public methods of this one via the operator->().
This class represents a read-in file; tree structure for include hierarchy.
Definition at line 66 of file sourcefile.h.
|
NOT "C++-safe"; do not call these.
Referenced by CreateSingleNode(). |
|
Create an _InternalSourceFileNode. Definition at line 69 of file sourcefile.cc. References _AddChild(), include_stmt_len, include_stmt_pos, parent_include_line, parent_include_lpos, pos_archive, pos_cache, and up. |
|
Destroy InternalSourceFileNode. Definition at line 94 of file sourcefile.cc. References _DelChild(), CritAssert, DELETE(), SourcePositionArchive::DestroyingISF(), down, LinkedList< _InternalSourceFileNode >::IsEmpty(), pos_archive, pos_cache, and up. |
|
Use these to add/delete children. Never directly access child list (down). Update ref count since we are "used" (referenced) by child. Definition at line 124 of file sourcefile.h. References InternalRefNodeBase_ThreadSave::_InternalRefNodeBase_aqref(), LinkedList< _InternalSourceFileNode >::append(), and down. Referenced by _InternalSourceFileNode(). |
|
Definition at line 126 of file sourcefile.h. References InternalRefNodeBase_ThreadSave::_InternalRefNodeBase_deref(), LinkedList< _InternalSourceFileNode >::dequeue(), and down. Referenced by ~_InternalSourceFileNode(). |
|
Destroy cache: (also done by _DetachArchive()).
Definition at line 59 of file sourcefile.cc. References DELETE(), and pos_cache. Referenced by _DetachArchive(). |
|
This is called by SourcePositionArchive upon its destruction. Will set our pointer to it (pos_archive) to NULL and destroy us if we're no longer needed.
Definition at line 118 of file sourcefile.h. References _DestroyPosCache(), and pos_archive. Referenced by SourcePositionArchive::_RecursiveDetachArchive(). |
|
Get associated source position archive (or NULL):.
Definition at line 150 of file sourcefile.h. References pos_archive. |
|
Can be used to create a single SourceFileNode with no hierarchy and include position. Only useful if you want to create a _single_ one of these to store a file name. Definition at line 52 of file sourcefile.cc. References _InternalSourceFileNode(), and SourceFileNode. Referenced by SCLocation::SCLocation(). |
|
Get include hierarchy string. Each include statement gets written into a line of its own; (the character is a newline unless hierarchy is empty). Definition at line 23 of file sourcefile.cc. References _path, parent_include_line, parent_include_lpos, TLString::sprintf(), and up. |
|
|
|
Get file path:.
Definition at line 154 of file sourcefile.h. References _path. |
|
Test if two source file nodes are equal; used by operator== and !=.
Definition at line 130 of file sourcefile.h. |
|
Definition at line 71 of file sourcefile.h. |
|
operator==() returns true for the same file with the same position in the include tree. + This means that same file read several times will yield to false if a and b were read at different "times". Definition at line 173 of file sourcefile.h. |
|
Definition at line 72 of file sourcefile.h. |
|
Definition at line 70 of file sourcefile.h. |
|
Path to the file.
Definition at line 82 of file sourcefile.h. Referenced by IncludeHierarchyStr(), and path(). |
|
Tree structure: Child nodes.
Definition at line 91 of file sourcefile.h. Referenced by _AddChild(), _DelChild(), SourcePositionArchive::_RecursiveDetachArchive(), and ~_InternalSourceFileNode(). |
|
Definition at line 99 of file sourcefile.h. Referenced by _InternalSourceFileNode(), and SourcePositionArchive::IncludeFile(). |
|
Offset position & size of the include statement in the file:.
Definition at line 98 of file sourcefile.h. Referenced by _InternalSourceFileNode(), and SourcePositionArchive::IncludeFile(). |
|
Start position of the include statement in the parent node:.
Definition at line 94 of file sourcefile.h. Referenced by _InternalSourceFileNode(), SourcePositionArchive::IncludeFile(), and IncludeHierarchyStr(). |
|
Definition at line 95 of file sourcefile.h. Referenced by _InternalSourceFileNode(), SourcePositionArchive::IncludeFile(), and IncludeHierarchyStr(). |
|
Pointer to associated SourcePositionArchive: Must be set as long as archive exists. Definition at line 86 of file sourcefile.h. Referenced by _DetachArchive(), _InternalSourceFileNode(), archive(), and ~_InternalSourceFileNode(). |
|
This is a SourcePosition cache caching the last few source positions in this file so that positions can be re-used when the same position is requested more than once. (Saves memory, especially when not using lpos.) (Gets deleted when no longer needed.) Definition at line 106 of file sourcefile.h. Referenced by _DestroyPosCache(), _InternalSourceFileNode(), and ~_InternalSourceFileNode(). |
|
Tree structure: parent pointer.
Definition at line 89 of file sourcefile.h. Referenced by _InternalSourceFileNode(), IncludeHierarchyStr(), and ~_InternalSourceFileNode(). |