Internal struct that parses a tag-file. Used by the method loadTagFile.
#include <index.hpp>
Public Field Index: | |
| alib::ListMA< TGTDocAnchor * > | actDocAnchors |
| Set by nextLine() in case it finds a <docanchor>. | |
| DoxygenXLinks & | dxl |
| our parent's parent | |
| alib::system::PathString | FilePath |
| The path to the doxygenTagFile. | |
| Index & | index |
| our parent | |
| alib::Substring | line |
| A parser for the currently read line. | |
| alib::String2K | lineBuf |
| The buffer of the line currently read. | |
| int | lineNo = 0 |
| The current line number when reading. | |
| alib::MonoAllocator & | ma |
| A referenced to the allocator of outer class Index. | |
| alib::integer | maxWidth = 0 |
| The maximum line width found. | |
| alib::IStreamReader & | reader |
| A referenced to the ALib text file reader tool. | |
| alib::Substring | tagAttr |
| The current tag attributes. Set by parseTag. | |
| alib::lox::Verbosity | verbosity |
| The log verbosity of the parser (used for performance optimization). | |
Public Method Index: | |
| Parser (Index &parent, alib::IStreamReader &pReader, const alib::String &pFilePath) | |
| void | addDocAnchors (Cursor &parent) |
| alib::String | allocNextTag (const alib::String &tagName) |
| alib::String | allocTag (const alib::String &tagName) |
| alib::String | getAttr (const alib::String &key) |
| void | nextLine () |
| alib::String | nextTag (const alib::String &tagName) |
| alib::String | parseAttr (const alib::String &attrName, bool isOptional=false) |
| alib::String | parseTag (const alib::String &tagName) |
| TGTMember * | readMember (alib::String512 &key, Target::Kinds compoundKind) |
| todo: add parameter parent and if html file is the same, then re-use instead of allocation. | |
| alib::String | tryTag (const alib::String &tagName) |
| alib::ListMA<TGTDocAnchor*> dxl::Index::Parser::actDocAnchors |
| DoxygenXLinks& dxl::Index::Parser::dxl |
| alib::system::PathString dxl::Index::Parser::FilePath |
| alib::Substring dxl::Index::Parser::line |
| alib::String2K dxl::Index::Parser::lineBuf |
| int dxl::Index::Parser::lineNo = 0 |
| alib::MonoAllocator& dxl::Index::Parser::ma |
| alib::integer dxl::Index::Parser::maxWidth = 0 |
| alib::IStreamReader& dxl::Index::Parser::reader |
| alib::Substring dxl::Index::Parser::tagAttr |
| alib::lox::Verbosity dxl::Index::Parser::verbosity |
| dxl::Index::Parser::Parser | ( | Index & | parent, |
| alib::IStreamReader & | pReader, | ||
| const alib::String & | pFilePath ) |
Constructor
| parent | The index this instance belongs to. |
| pReader | The input data. |
| pFilePath | The file path of the tag-file. |
Definition at line 22 of file tagfile.cpp.
| void dxl::Index::Parser::addDocAnchors | ( | Cursor & | parent | ) |
Adds all anchors in actDocAnchors to the given parent node and clears the list.
| parent | The parent node that receives the anchors as children. |
Definition at line 64 of file tagfile.cpp.
|
inline |
|
inline |
|
inline |
| void dxl::Index::Parser::nextLine | ( | ) |
Reads the next line of the file into lineBuf. Increases lineNo and sets line. If it reads a Doxygen <docanchor> text, that anchor is added to the actCompound.
Definition at line 31 of file tagfile.cpp.
|
inline |
| String dxl::Index::Parser::parseAttr | ( | const alib::String & | attrName, |
| bool | isOptional = false ) |
Parses the given attribute from the current string in tagAttr. If not found, an exception is thrown.
| attrName | The name of the attribute to parse. |
| isOptional | if false if given, an error is logged if the attribute was not found. |
Definition at line 146 of file tagfile.cpp.
| String dxl::Index::Parser::parseTag | ( | const alib::String & | tagName | ) |
Parses the given tag from the actual line. If the tag has attributes, that string is copied to the field tagAttr. Otherwise, that field is nulled.
| tagName | The name of the tag to parse. |
Definition at line 98 of file tagfile.cpp.
| TGTMember * dxl::Index::Parser::readMember | ( | alib::String512 & | key, |
| Target::Kinds | compoundKind ) |
todo: add parameter parent and if html file is the same, then re-use instead of allocation.
Reads a member at the actual position. The returned key equals the member name. With function-members, in addition, the argument list is added by using the method PARSE and likewise the field Qualifiers.
If the compoundKind indicates a Doxygen group, then parsing is very tolerant because most members are just references to entities defined elsewhere.
| [out] | key | The key to use for the string tree. |
| compoundKind | The kind of the compound actually parsed. |
Definition at line 187 of file tagfile.cpp.
|
inline |