File tree Expand file tree Collapse file tree 3 files changed +28
-7
lines changed Expand file tree Collapse file tree 3 files changed +28
-7
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,6 @@ class MRDOCS_VISIBLE
9999 @param corpus The symbols to emit. The
100100 generator may modify the contents of
101101 the object before returning.
102-
103- @param config The configuration to use.
104102 */
105103 MRDOCS_DECL
106104 virtual
@@ -109,6 +107,22 @@ class MRDOCS_VISIBLE
109107 std::string_view outputPath,
110108 Corpus const & corpus) const ;
111109
110+ /* * Build reference documentation for the corpus.
111+
112+ This function invokes the generator to emit
113+ the documentation using the corpus configuration
114+ options to determine the output location.
115+
116+ @return The error, if any occurred.
117+
118+ @param corpus The symbols to emit. The
119+ generator may modify the contents of
120+ the object before returning.
121+ */
122+ MRDOCS_DECL
123+ Error
124+ build (Corpus const & corpus) const ;
125+
112126 /* * Build reference documentation for the corpus.
113127
114128 This function invokes the generator to emit
Original file line number Diff line number Diff line change @@ -54,6 +54,17 @@ build(
5454 return buildOne (fileName.str (), corpus);
5555}
5656
57+ Error
58+ Generator::
59+ build (Corpus const & corpus) const
60+ {
61+ std::string absOutput = files::normalizePath (
62+ files::makeAbsolute (
63+ corpus.config ->output ,
64+ corpus.config ->configDir ));
65+ return build (absOutput, corpus);
66+ }
67+
5768Error
5869Generator::
5970buildOne (
Original file line number Diff line number Diff line change @@ -200,12 +200,8 @@ DoGenerateAction(
200200 // --------------------------------------------------------------
201201 // Normalize outputPath path
202202 MRDOCS_CHECK (settings.output , " The output path argument is missing" );
203- std::string absOutput = files::normalizePath (
204- files::makeAbsolute (
205- settings.output ,
206- (*config)->configDir ));
207203 report::info (" Generating docs\n " );
208- MRDOCS_TRY (generator.build (absOutput, *corpus));
204+ MRDOCS_TRY (generator.build (*corpus));
209205
210206 // --------------------------------------------------------------
211207 //
You can’t perform that action at this time.
0 commit comments