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 
15 namespace srchilite {
16 
17 class PreFormatter;
18 class CTagsCollector;
20 
22 typedef std::list<std::string> postResults;
23 
29  std::string inlineResult;
30 
32  postResults postLineResult;
33 
35  postResults postDocResult;
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 
61  std::string outputFileExtension;
62 
65 
68 
71 
72 public:
74  CTagsCollector *ctagsC);
75  ~CTagsFormatter();
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_*/
void clear()
Clears all the results.
Definition: ctagsformatter.h:40
Preformats text to be generated.
Definition: preformatter.h:31
std::string outputFile
the output file name
Definition: ctagsformatter.h:58
std::string inlineResult
the result for inline reference or anchor
Definition: ctagsformatter.h:29
CTagsCollector * ctagsCollector
collect information about the tags
Definition: ctagsformatter.h:70
postResults postLineResult
the result for postline references
Definition: ctagsformatter.h:32
Collects the tags information generated by the ctags program for a given word.
Definition: ctagscollector.h:62
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
Formatter for information gathered from ctags.
Definition: ctagsformatter.h:50
void setFileInfo(const std::string &input, const std::string &output)
Sets the information about input file and output file.
Definition: ctagsformatter.cpp:33
std::list< std::string > postResults
collection of strings to be written after (post) a line or a doc
Definition: ctagsformatter.h:19
PreFormatter * preFormatter
the preformatter
Definition: ctagsformatter.h:64
Additional parameters that can be passed to a formatter.
Definition: formatterparams.h:18
bool formatCTags(const std::string &word, CTagsFormatterResults &result, const FormatterParams *params)
Formats an anchor or references concerning the passed word.
Definition: ctagsformatter.cpp:42
The TextStyle objects for reference formatting.
Definition: textstyles.h:54
std::string outputFileExtension
the output file name extension
Definition: ctagsformatter.h:61
TextStyles::RefTextStyle refstyle
for actually formatting anchors and references
Definition: ctagsformatter.h:67
std::string inputFile
the input file name
Definition: ctagsformatter.h:52
postResults postDocResult
the result for postdoc references
Definition: ctagsformatter.h:35
std::string inputFileName
the input file name (without path)
Definition: ctagsformatter.h:55
Stores the result of the CTagsFormatter.
Definition: ctagsformatter.h:27