Skip to content

Commit d903a52

Browse files
committed
corpus references config
1 parent 8f18ab8 commit d903a52

File tree

12 files changed

+15
-42
lines changed

12 files changed

+15
-42
lines changed

include/mrdox/format/FlatWriter.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class FlatWriter
4545
llvm::StringRef filePath_;
4646

4747
Corpus const& corpus_;
48-
Config const& config_;
4948
Reporter& R_;
5049

5150
/** Constructor.
@@ -54,7 +53,6 @@ class FlatWriter
5453
llvm::raw_ostream& os,
5554
llvm::StringRef filePath,
5655
Corpus const& corpus,
57-
Config const& config,
5856
Reporter& R) noexcept;
5957

6058
public:

include/mrdox/format/Generator.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ struct Generator
8383
build(
8484
llvm::StringRef outputPath,
8585
Corpus& corpus,
86-
Config const& config,
8786
Reporter& R) const;
8887

8988
/** Build single-file documentation from the corpus and configuration.
@@ -112,7 +111,6 @@ struct Generator
112111
buildOne(
113112
llvm::StringRef fileName,
114113
Corpus& corpus,
115-
Config const& config,
116114
Reporter& R) const = 0;
117115

118116
/** Build a string containing the single-file documentation.
@@ -141,7 +139,6 @@ struct Generator
141139
buildString(
142140
std::string& dest,
143141
Corpus& corpus,
144-
Config const& config,
145142
Reporter& R) const = 0;
146143
};
147144

include/mrdox/format/RecursiveWriter.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@ class RecursiveWriter
4747
protected:
4848
llvm::raw_ostream& os_;
4949
Corpus const& corpus_;
50-
Config const& config_;
5150
Reporter& R_;
5251

5352
/** Constructor.
5453
*/
5554
RecursiveWriter(
5655
llvm::raw_ostream& os,
5756
Corpus const& corpus,
58-
Config const& config,
5957
Reporter& R) noexcept;
6058

6159
/** Destructor.

source/lib/format/FlatWriter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ FlatWriter(
2424
llvm::raw_ostream& os,
2525
llvm::StringRef filePath,
2626
Corpus const& corpus,
27-
Config const& config,
2827
Reporter& R) noexcept
2928
: os_(os)
3029
, filePath_(filePath)
3130
, corpus_(corpus)
32-
, config_(config)
3331
, R_(R)
3432
{
3533
}

source/lib/format/Generator.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ Generator::
2222
build(
2323
StringRef outputPath,
2424
Corpus& corpus,
25-
Config const& config,
2625
Reporter& R) const
2726
{
2827
namespace fs = llvm::sys::fs;
@@ -31,7 +30,7 @@ build(
3130
// If we are given a filename with the correct
3231
// extension then just build the docs as one file.
3332
if(path::extension(outputPath).compare_insensitive(path::extension(outputPath)))
34-
return buildOne(outputPath, corpus, config, R);
33+
return buildOne(outputPath, corpus, R);
3534

3635
// Create the directory if needed
3736
fs::file_status status;
@@ -53,11 +52,11 @@ build(
5352
llvm::SmallString<512> fileName(outputPath);
5453
path::append(fileName, "reference");
5554
path::replace_extension(fileName, extension());
56-
return buildOne(fileName, corpus, config, R);
55+
return buildOne(fileName, corpus, R);
5756
}
5857

5958
// Build as one file
60-
return buildOne(outputPath, corpus, config, R);
59+
return buildOne(outputPath, corpus, R);
6160
}
6261

6362
} // mrdox

source/lib/format/RecursiveWriter.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ RecursiveWriter::
3636
RecursiveWriter(
3737
llvm::raw_ostream& os,
3838
Corpus const& corpus,
39-
Config const& config,
4039
Reporter& R) noexcept
4140
: os_(os)
4241
, corpus_(corpus)
43-
, config_(config)
4442
, R_(R)
4543
{
4644
}

source/lib/format/asciidoc/Asciidoc.cpp

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ namespace {
112112
struct PageBuilder : CorpusVisitor
113113
{
114114
PageBuilder(
115-
Corpus const& corpus,
116-
Config const& config) noexcept
115+
Corpus const& corpus) noexcept
117116
: CorpusVisitor(corpus)
118117
{
119118
}
@@ -179,7 +178,7 @@ void
179178
AsciidocGenerator::
180179
calculatePages() const
181180
{
182-
// PageBuilder builder(corpus_);
181+
//PageBuilder builder(corpus_);
183182

184183

185184
}
@@ -190,7 +189,6 @@ AsciidocGenerator::
190189
build(
191190
llvm::StringRef rootPath,
192191
Corpus& corpus,
193-
Config const& config,
194192
Reporter& R) const
195193
{
196194
namespace path = llvm::sys::path;
@@ -242,7 +240,7 @@ build(
242240

243241
llvm::SmallString<0> fileName(rootPath);
244242
path::append(fileName, "reference.adoc");
245-
return buildOne(fileName, corpus, config, R);
243+
return buildOne(fileName, corpus, R);
246244
#endif
247245
}
248246

@@ -251,7 +249,6 @@ AsciidocGenerator::
251249
buildOne(
252250
llvm::StringRef fileName,
253251
Corpus& corpus,
254-
Config const& config,
255252
Reporter& R) const
256253
{
257254
namespace fs = llvm::sys::fs;
@@ -266,7 +263,7 @@ buildOne(
266263
if(R.error(ec, "open the stream for '", fileName, "'"))
267264
return false;
268265

269-
Writer w(os, fileName, corpus, config, R);
266+
Writer w(os, fileName, corpus, R);
270267
w.beginFile();
271268
w.visitAllSymbols();
272269
w.endFile();
@@ -278,13 +275,12 @@ AsciidocGenerator::
278275
buildString(
279276
std::string& dest,
280277
Corpus& corpus,
281-
Config const& config,
282278
Reporter& R) const
283279
{
284280
dest.clear();
285281
llvm::raw_string_ostream os(dest);
286282

287-
Writer w(os, "", corpus, config, R);
283+
Writer w(os, "", corpus, R);
288284
w.beginFile();
289285
w.visitAllSymbols();
290286
w.endFile();
@@ -339,9 +335,8 @@ Writer(
339335
llvm::raw_ostream& os,
340336
llvm::StringRef filePath,
341337
Corpus const& corpus,
342-
Config const& config,
343338
Reporter& R) noexcept
344-
: FlatWriter(os, filePath, corpus, config, R)
339+
: FlatWriter(os, filePath, corpus, R)
345340
{
346341
}
347342

source/lib/format/asciidoc/Asciidoc.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,21 +54,18 @@ class AsciidocGenerator
5454
build(
5555
llvm::StringRef rootPath,
5656
Corpus& corpus,
57-
Config const& config,
5857
Reporter& R) const override;
5958

6059
bool
6160
buildOne(
6261
llvm::StringRef fileName,
6362
Corpus& corpus,
64-
Config const& config,
6563
Reporter& R) const override;
6664

6765
bool
6866
buildString(
6967
std::string& dest,
7068
Corpus& corpus,
71-
Config const& config,
7269
Reporter& R) const override;
7370
};
7471

@@ -90,7 +87,6 @@ class AsciidocGenerator::Writer
9087
llvm::raw_ostream& os,
9188
llvm::StringRef filePath,
9289
Corpus const& corpus,
93-
Config const& config,
9490
Reporter& R) noexcept;
9591

9692
void write();

source/lib/format/xml/XML.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ XMLGenerator::
110110
buildOne(
111111
llvm::StringRef fileName,
112112
Corpus& corpus,
113-
Config const& config,
114113
Reporter& R) const
115114
{
116115
namespace fs = llvm::sys::fs;
@@ -125,7 +124,7 @@ buildOne(
125124
if(R.error(ec, "open a stream for '", fileName, "'"))
126125
return false;
127126

128-
Writer w(os, corpus, config, R);
127+
Writer w(os, corpus, R);
129128
w.write();
130129
return true;
131130
}
@@ -135,13 +134,12 @@ XMLGenerator::
135134
buildString(
136135
std::string& dest,
137136
Corpus& corpus,
138-
Config const& config,
139137
Reporter& R) const
140138
{
141139
dest.clear();
142140
llvm::raw_string_ostream os(dest);
143141

144-
Writer w(os, corpus, config, R);
142+
Writer w(os, corpus, R);
145143
w.write();
146144
return true;
147145
}
@@ -217,9 +215,8 @@ Writer::
217215
Writer(
218216
llvm::raw_ostream& os,
219217
Corpus const& corpus,
220-
Config const& config,
221218
Reporter& R) noexcept
222-
: RecursiveWriter(os, corpus, config, R)
219+
: RecursiveWriter(os, corpus, R)
223220
{
224221
}
225222

source/lib/format/xml/XML.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,12 @@ struct XMLGenerator : Generator
4141
buildOne(
4242
llvm::StringRef fileName,
4343
Corpus& corpus,
44-
Config const& config,
4544
Reporter& R) const override;
4645

4746
bool
4847
buildString(
4948
std::string& dest,
5049
Corpus& corpus,
51-
Config const& config,
5250
Reporter& R) const override;
5351
};
5452

@@ -74,7 +72,6 @@ class XMLGenerator::Writer
7472
Writer(
7573
llvm::raw_ostream& os,
7674
Corpus const& corpus,
77-
Config const& config,
7875
Reporter& R) noexcept;
7976

8077
void write();

0 commit comments

Comments
 (0)