File tree Expand file tree Collapse file tree 3 files changed +25
-13
lines changed Expand file tree Collapse file tree 3 files changed +25
-13
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,19 @@ The macro will now be referencable as ``ASSERT(condition...)`` (Lookup of
133
133
be unchanged. In order to be recognized, the explicit directive must be the
134
134
first line of the ``/// ``, and there must be no space in the prefix ``///.. ``
135
135
136
+ Alternatively, you might want to hide a
137
+ `CRTP <https://en.cppreference.com/w/cpp/language/crtp >`_
138
+ base class from documentation:
139
+
140
+ .. code-block :: c++
141
+
142
+ ///.. cpp:class: : template <typename T> Stream<T>
143
+ template <typename T>
144
+ class Stream<T> : impl::StreamMixin<T>
145
+
146
+ ... that base class doesn't appear in the explicit directive, so sphinx will
147
+ never know about it.
148
+
136
149
Configuration
137
150
-------------
138
151
Original file line number Diff line number Diff line change @@ -649,27 +649,27 @@ def run(self) -> list[Node]:
649
649
650
650
def setup (app : Sphinx ) -> ExtensionMetadata :
651
651
app .add_config_value (
652
- "trike_files" ,
653
- [],
654
- "env" ,
655
- types = [list [Path ]],
652
+ name = "trike_files" ,
656
653
description = "All C++ sources which will be scanned for ///" ,
654
+ default = [],
655
+ rebuild = "env" ,
656
+ types = [list [Path ]],
657
657
)
658
658
659
659
app .add_config_value (
660
- "trike_clang_args" ,
661
- [],
662
- "env" ,
663
- types = [list [str ], Mapping [Path , str ]],
660
+ name = "trike_clang_args" ,
664
661
description = "Arguments which will be passed to clang (or per-file mapping)" ,
662
+ default = [],
663
+ rebuild = "env" ,
664
+ types = [list [str ], Mapping [Path , str ]],
665
665
)
666
666
667
- # FIXME an unpickleable value causes the environment to *never* be reloadable
668
667
app .add_config_value (
669
- "trike_get_uri" ,
670
- None ,
671
- "env" ,
668
+ name = "trike_get_uri" ,
672
669
description = "A mapping from scanned C++ source to uri" ,
670
+ default = None ,
671
+ rebuild = "" ,
672
+ # really this should be rebuild="env", but functions are not pickleable
673
673
)
674
674
675
675
app .connect ("builder-inited" , _builder_inited )
Original file line number Diff line number Diff line change 72
72
"sphinx" : ("https://www.sphinx-doc.org/en/master/usage/%s" , None ),
73
73
}
74
74
75
- # TODO get trike files from cmake
76
75
trike_files = [
77
76
* maud .cache .CMAKE_SOURCE_DIR .glob ("*.cxx" ),
78
77
* maud .cache .CMAKE_SOURCE_DIR .glob ("cmake_modules/*.cxx" ),
You can’t perform that action at this time.
0 commit comments