Stores link information about the file. Link info is stored in two files with two purposes.
The first file stores all links and non-link spans, in a simple text file with one record per line and with spaces as field separators. The fields themselves are encoded using URL-style %FF encoding of non alpha-numeric characters (including spaces, brackers, commas etc). The purpose of this file is for syntax-hightlighting of source files.
The second file stores only cross-reference information, which is a subset of the first file.
| Public Enums Summary: | |
| Context | Reference, Definition, Span, Implementation, UsingDirective, UsingDeclaration, FunctionCall, NumContext Enumeration of record types [Source] |
| Public Member functions Summary: | |
| constructor | LinkStore(FileFilter* filter, SWalker* swalker) Constructor. [Source] |
| destructor | ~LinkStore() Destructor. [Source] |
| void | link(Ptree* node, Context, const ScopedName& name, const std::string& desc, const AST::Declaration* decl = __null) Store a link for the given Ptree node. [Source] |
| void | link(Ptree* node, const AST::Declaration* decl) Store a Definition link for the given Ptree node using the AST node [Source] |
| void | link(Ptree* node, Types::Type*, Context = Reference) Store a link for the given node using the given Context, which defaults to a Reference [Source] |
| void | span(int line, int col, int len, const char* desc) Store a span [Source] |
| void | span(Ptree* node, const char* desc) Store a span for the given Ptree node [Source] |
| void | long_span(Ptree* node, const char* desc) Store a long (possibly multi-line) span [Source] |
| SWalker* | swalker() Returns the SWalker [Source] |
| Protected Member functions Summary: | |
| void | store_syntax_record(AST::SourceFile*, int line, int col, int len, Context context, const ScopedName& name, const std::string& desc) Store a link in the Syntax File [Source] |
| void | store_xref_record(AST::SourceFile*, const AST::Declaration* decl, const std::string& file, int line, Context context) Store a link in the CrossRef File [Source] |
| std::ostream& | get_syntax_stream(AST::SourceFile*) Gets the ostream for a syntax file [Source] |
| std::ostream& | get_xref_stream(AST::SourceFile*) Gets the ostream for a xref file [Source] |
| int | find_col(int line, const char* ptr) Calculates the column number of 'ptr'. [Source] |
| Protected Data members Summary: | |
| Private* | m Compiler firewalled private data [Source] |
| Classes Summary: | |
| encode [Source] | |
| encode_name [Source] | |
| Structs Summary: | |
| Private [Source] | |
| Public Enum Details: |
< General name reference
< Definition of the declaration
< Non-declarative span of text
< Implementation of a declaration
< Referenced in a using directive
< Referenced in a using declaration
< Called as a function
Enumeration of record types
| Public Member function Details: |
Constructor.
Destructor. Closes all opened file streams
Store a link for the given Ptree node. If a decl is given, store an xref too
| Protected Member function Details: |
Calculates the column number of 'ptr'. m_buffer_start is used as a lower bounds, since the function counts backwards until it finds a newline. As an added bonus, the returned column number is adjusted using the link map generated from expanding macros so it can be output straight to the link file :) The adjustment requires the line number.