Source-highlight Library
ctagsformatter.h
1//
2// Author: Lorenzo Bettini <http://www.lorenzobettini.it>, (C) 2004-2008
3//
4// Copyright: See COPYING file that comes with this distribution
5//
6
7#ifndef CTAGSFORMATTER_H_
8#define CTAGSFORMATTER_H_
9
10#include <string>
11#include <list>
12
13#include "textstyles.h"
14
15namespace srchilite {
16
17class PreFormatter;
18class CTagsCollector;
19struct FormatterParams;
20
22typedef std::list<std::string> postResults;
23
29 std::string inlineResult;
30
33
36
40 void clear() {
41 inlineResult.clear();
42 postLineResult.clear();
43 postDocResult.clear();
44 }
45};
46
52 std::string inputFile;
53
55 std::string inputFileName;
56
58 std::string outputFile;
59
62
65
68
71
72public:
74 CTagsCollector *ctagsC);
76
77 void setPreFormatter(PreFormatter *pre) {
78 preFormatter = pre;
79 }
80
86 void setFileInfo(const std::string &input, const std::string &output);
87
96 bool formatCTags(const std::string &word, CTagsFormatterResults &result,
97 const FormatterParams *params);
98};
99
100}
101
102#endif /*CTAGSFORMATTER_H_*/
Collects the tags information generated by the ctags program for a given word.
Definition: ctagscollector.h:62
Formatter for information gathered from ctags.
Definition: ctagsformatter.h:50
bool formatCTags(const std::string &word, CTagsFormatterResults &result, const FormatterParams *params)
Formats an anchor or references concerning the passed word.
Definition: ctagsformatter.cpp:42
std::string inputFileName
the input file name (without path)
Definition: ctagsformatter.h:55
void setFileInfo(const std::string &input, const std::string &output)
Sets the information about input file and output file.
Definition: ctagsformatter.cpp:33
std::string outputFile
the output file name
Definition: ctagsformatter.h:58
CTagsCollector * ctagsCollector
collect information about the tags
Definition: ctagsformatter.h:70
TextStyles::RefTextStyle refstyle
for actually formatting anchors and references
Definition: ctagsformatter.h:67
std::string outputFileExtension
the output file name extension
Definition: ctagsformatter.h:61
std::string inputFile
the input file name
Definition: ctagsformatter.h:52
PreFormatter * preFormatter
the preformatter
Definition: ctagsformatter.h:64
Preformats text to be generated.
Definition: preformatter.h:31
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
std::list< std::string > postResults
collection of strings to be written after (post) a line or a doc
Definition: ctagsformatter.h:22
Stores the result of the CTagsFormatter.
Definition: ctagsformatter.h:27
void clear()
Clears all the results.
Definition: ctagsformatter.h:40
postResults postLineResult
the result for postline references
Definition: ctagsformatter.h:32
postResults postDocResult
the result for postdoc references
Definition: ctagsformatter.h:35
std::string inlineResult
the result for inline reference or anchor
Definition: ctagsformatter.h:29
Additional parameters that can be passed to a formatter.
Definition: formatterparams.h:18
The TextStyle objects for reference formatting.
Definition: textstyles.h:54