aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/bookmaker/bookmaker.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bookmaker/bookmaker.h')
-rw-r--r--tools/bookmaker/bookmaker.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/tools/bookmaker/bookmaker.h b/tools/bookmaker/bookmaker.h
index bc7e0a1b21..7bb743c9cb 100644
--- a/tools/bookmaker/bookmaker.h
+++ b/tools/bookmaker/bookmaker.h
@@ -106,6 +106,7 @@ enum class MarkType {
kFormula,
kFunction,
kHeight,
+ kIllustration,
kImage,
kIn,
kLegend,
@@ -1216,6 +1217,11 @@ public:
kColumnEnd,
};
+ enum class HasTag {
+ kNo,
+ kYes,
+ };
+
#define M(mt) (1LL << (int) MarkType::k##mt)
#define M_D M(Description)
#define M_CS M(Class) | M(Struct)
@@ -1247,7 +1253,7 @@ public:
, { "Code", nullptr, MarkType::kCode, R_O, E_N, M_CSST | M_E | M(Method) }
, { "", nullptr, MarkType::kColumn, R_Y, E_N, M(Row) }
, { "", nullptr, MarkType::kComment, R_N, E_N, 0 }
-, { "Const", &fConstMap, MarkType::kConst, R_Y, E_N, M_E | M_ST }
+, { "Const", &fConstMap, MarkType::kConst, R_Y, E_O, M_E | M_ST }
, { "Define", nullptr, MarkType::kDefine, R_O, E_N, M_ST }
, { "DefinedBy", nullptr, MarkType::kDefinedBy, R_N, E_N, M(Method) }
, { "Deprecated", nullptr, MarkType::kDeprecated, R_Y, E_N, 0 }
@@ -1256,14 +1262,16 @@ public:
, { "Duration", nullptr, MarkType::kDuration, R_N, E_N, M(Example) | M(NoExample) }
, { "Enum", &fEnumMap, MarkType::kEnum, R_Y, E_O, M_CSST | M(Root) }
, { "EnumClass", &fClassMap, MarkType::kEnumClass, R_Y, E_O, M_CSST | M(Root) }
-, { "Example", nullptr, MarkType::kExample, R_O, E_N, M_CSST | M_E | M(Method) }
+, { "Example", nullptr, MarkType::kExample,
+ R_O, E_N, M_CSST | M_E | M(Method) | M(Const) }
, { "Experimental", nullptr, MarkType::kExperimental, R_Y, E_N, 0 }
, { "External", nullptr, MarkType::kExternal, R_Y, E_N, M(Root) }
, { "File", nullptr, MarkType::kFile, R_N, E_N, M(Track) }
, { "Formula", nullptr, MarkType::kFormula, R_O, E_N,
- M(Column) | M_ST | M(Member) | M(Method) | M_D }
+ M(Column) | M_E | M_ST | M(Member) | M(Method) | M_D }
, { "Function", nullptr, MarkType::kFunction, R_O, E_N, M(Example) | M(NoExample) }
, { "Height", nullptr, MarkType::kHeight, R_N, E_N, M(Example) | M(NoExample) }
+, { "Illustration", nullptr, MarkType::kIllustration, R_N, E_N, M(Subtopic) }
, { "Image", nullptr, MarkType::kImage, R_N, E_N, M(Example) | M(NoExample) }
, { "In", nullptr, MarkType::kIn, R_N, E_N,
M_CSST | M_E | M(Method) | M(Typedef) }
@@ -1322,7 +1330,8 @@ public:
~BmhParser() override {}
bool addDefinition(const char* defStart, bool hasEnd, MarkType markType,
- const vector<string>& typeNameBuilder);
+ const vector<string>& typeNameBuilder, HasTag hasTag);
+ bool checkEndMarker(MarkType markType, string name) const;
bool checkExamples() const;
bool checkParamReturn(const Definition* definition) const;
bool dumpExamples(const char* fiddleJsonFileName) const;
@@ -1341,6 +1350,7 @@ public:
}
bool findDefinitions();
+ Definition* findExample(string name) const;
MarkType getMarkType(MarkLookup lookup) const;
bool hasEndToken() const;
string memberName();
@@ -1461,6 +1471,7 @@ public:
, { nullptr, MarkType::kFormula }
, { nullptr, MarkType::kFunction }
, { nullptr, MarkType::kHeight }
+ , { nullptr, MarkType::kIllustration }
, { nullptr, MarkType::kImage }
, { nullptr, MarkType::kIn }
, { nullptr, MarkType::kLegend }
@@ -1954,7 +1965,7 @@ protected:
INHERITED::resetCommon();
}
- Definition* findExample(const string& name) const;
+ Definition* findExample(string name) const { return fBmhParser->findExample(name); }
bool parseFiddles();
virtual bool pngOut(Definition* example) = 0;
virtual bool textOut(Definition* example, const char* stdOutStart,