#include <sparchive.h>
Collaboration diagram for SourcePositionArchive:
Public Member Functions | |
SourcePositionArchive (const TLString &path) | |
~SourcePositionArchive () | |
SourcePosition | GetPos (int line, int lpos=-1) |
Primary function: Request a SourcePosition for the passed location. | |
SourceFileNode | IncludeFile (const TLString &path, int line, int lpos, filepos_t include_stmt_pos=-1, size_t include_stmt_len=0) |
Call when an include directive is read and reading continues in passed file. | |
SourceFileNode | EndFile () |
Call when EOF is reached to return to parent file. | |
SourceFileNode | CurrentFile () const |
Get current file node:. | |
_InternalSourceFileNode * | AllocISF (const TLString &path, SourceFileNode &parent) |
void | DestroyingISF (_InternalSourceFileNode *) |
_InternalSourcePosition * | AllocISPNoCache (const SourceFileNode &fnode, int line, int lpos) |
void | DestroyingISP (_InternalSourcePosition *isp) |
Private Member Functions | |
void | _RecursiveDetachArchive (_InternalSourceFileNode *head) |
Recursively call _DetachArchive() for all InternalSourceFileNodes. | |
SourcePositionArchive (const SourcePositionArchive &) | |
NOT "C++-safe"; do not call these. | |
void | operator= (const SourcePositionArchive &) |
Private Attributes | |
SourceFileNode | head |
Head of the input (include) file hierarchy. | |
SourceFileNode | current |
The currently used SourceFileNode:. | |
int | tot_file_nodes |
int | max_file_nodes |
Max number of file nodes allocated simultaniously:. | |
int | curr_file_nodes |
Current number of file nodes:. | |
size_t | tot_src_pos |
Some statistics about _InternalSourcePosition:. | |
size_t | max_src_pos |
size_t | curr_src_pos |
This class is not 2C++-save", i.e. do not use copy constructor or assignment.
This class is not thread-safe; it is assumed that only one thread does the code scanning and hece needs a SourcePositionArchive to generate position information.
This class may be safely deleted after parsing is over; the generated objects all use reference counting and clean up themselves.
Definition at line 52 of file sparchive.h.
|
NOT "C++-safe"; do not call these.
|
|
Definition at line 150 of file sparchive.cc. References AllocISF(), curr_file_nodes, curr_src_pos, current, head, max_file_nodes, max_src_pos, SourceFileNode, tot_file_nodes, and tot_src_pos. |
|
Definition at line 168 of file sparchive.cc. References _RecursiveDetachArchive(), current, head, max_file_nodes, max_src_pos, SourceFileNode, tot_file_nodes, and tot_src_pos. |
|
Recursively call _DetachArchive() for all InternalSourceFileNodes.
Definition at line 131 of file sparchive.cc. References _InternalSourceFileNode::_DetachArchive(), _InternalSourceFileNode::down, LinkedList< _InternalSourceFileNode >::first(), LinkedListBase< _InternalSourceFileNode >::next, and SourceFileNode. Referenced by ~SourcePositionArchive(). |
|
THESE ARE THOUGHT MAINLY FOR INTERNAL USE: Create an _InternalSourceFileNode / info about destruction. Definition at line 25 of file sparchive.cc. References curr_file_nodes, max_file_nodes, SourceFileNode, and tot_file_nodes. Referenced by IncludeFile(), and SourcePositionArchive(). |
|
THESE ARE THOUGHT MAINLY FOR INTERNAL USE: Create _InternalSourcePosition / info about destruction. Definition at line 54 of file sparchive.cc. References curr_src_pos, max_src_pos, SourceFileNode, and tot_src_pos. Referenced by GetPos(). |
|
Get current file node:.
Definition at line 123 of file sparchive.h. References current, and SourceFileNode. |
|
Definition at line 39 of file sparchive.cc. References curr_file_nodes. Referenced by _InternalSourceFileNode::~_InternalSourceFileNode(). |
|
Definition at line 67 of file sparchive.cc. References curr_src_pos. |
|
Call when EOF is reached to return to parent file.
Definition at line 94 of file sparchive.cc. References Assert, current, and SourceFileNode. |
|
Primary function: Request a SourcePosition for the passed location.
line<0 will return a NULL ref as position. Definition at line 108 of file sparchive.cc. References AllocISPNoCache(), Assert, current, and SourcePosition. Referenced by _InternalFlexScannerBase::_MakeCurrEndLoc(), and _InternalFlexScannerBase::_MakeCurrLoc(). |
|
Call when an include directive is read and reading continues in passed file. Use EndFile() when EOF is reached to return to parent file.
Definition at line 76 of file sparchive.cc. References AllocISF(), Assert, current, filepos_t, _InternalSourceFileNode::include_stmt_len, _InternalSourceFileNode::include_stmt_pos, _InternalSourceFileNode::parent_include_line, _InternalSourceFileNode::parent_include_lpos, and SourceFileNode. |
|
|
|
Current number of file nodes:.
Definition at line 66 of file sparchive.h. Referenced by AllocISF(), DestroyingISF(), and SourcePositionArchive(). |
|
Definition at line 71 of file sparchive.h. Referenced by AllocISPNoCache(), DestroyingISP(), and SourcePositionArchive(). |
|
The currently used SourceFileNode:.
Definition at line 58 of file sparchive.h. Referenced by CurrentFile(), EndFile(), GetPos(), IncludeFile(), SourcePositionArchive(), and ~SourcePositionArchive(). |
|
Head of the input (include) file hierarchy.
Definition at line 56 of file sparchive.h. Referenced by SourcePositionArchive(), and ~SourcePositionArchive(). |
|
Max number of file nodes allocated simultaniously:.
Definition at line 64 of file sparchive.h. Referenced by AllocISF(), SourcePositionArchive(), and ~SourcePositionArchive(). |
|
Definition at line 70 of file sparchive.h. Referenced by AllocISPNoCache(), SourcePositionArchive(), and ~SourcePositionArchive(). |
|
Some statistics about SourceFileNode: Total amount of allocated file nodes: Definition at line 62 of file sparchive.h. Referenced by AllocISF(), SourcePositionArchive(), and ~SourcePositionArchive(). |
|
Some statistics about _InternalSourcePosition:.
Definition at line 69 of file sparchive.h. Referenced by AllocISPNoCache(), SourcePositionArchive(), and ~SourcePositionArchive(). |