| Name | Description |
|---|---|
mrdocs | Core MrDocs support utilities. |
Core MrDocs support utilities.
| Name | Description |
|---|---|
doc | Doc-comment enums and helpers that describe admonition kinds. |
dom | Objects representing JSON-like values. |
files | Filesystem helpers (join, temp, real-path resolution) used throughout MrDocs. |
helpers | Handlebars helper registry for templates. |
js | JavaScript interop helpers for the embedded runtime. |
lua | Lua interop helpers for the optional scripting/backend integration. |
report | Reporting utilities (messages, statistics, sinks). |
| Name | Description |
|---|---|
AnyFileVisitor | Polymorphic visitor for files discovered during traversal. |
ArrayType | C++ array type (bounded or unbounded). |
ArrayView | A non-owning, read-only view over a contiguous array of T. |
AutoType | Represents auto or decltype(auto) placeholder type. |
BadExpectedAccess | Base class for accessing an empty Expected. |
BadExpectedAccess<void> | Exception thrown when reading the value of an empty Expected. |
BaseInfo | Metadata for a direct base. |
ConceptSymbol | Info for concepts. |
Config | Configuration used to generate the Corpus and Docs |
ConstantExprInfo | Represents an expression with a (possibly known) value |
ConstantTArg | Non-type template argument. |
ConstantTParam | A constant template parameter |
Corpus | The collection of declarations in extracted form. |
DecltypeType | decltype(expr) type wrapper. |
DocComment | A processed documentation comment attached to a declaration. |
DomCorpus | Front-end factory for producing Dom nodes. |
EnumConstantSymbol | Info for enum constants. |
EnumSymbol | Metadata for an enumeration declaration. |
Error | Holds the description of an error, or success. |
Exception | Type of all exceptions thrown by the API. |
ExecutorGroup | A set of execution agents for performing concurrent work. |
ExecutorGroupBase | Base class that owns a pool of execution agents and a shared work queue. |
Expected | A container holding an error or a value. |
Expected<T, E> | Expected specialization for void values. Holds either success (no payload) or an unexpected error E. |
Expected<T&, E> | Expected specialization for lvalue references. Holds either a bound reference to T or an unexpected error E. |
ExplicitInfo | Stores only the operand of the explicit-specifier or noexcept-specifier as a string. The complete expression is not preserved at this time. This is a temporary design and may be improved in the future. |
ExprInfo | Represents an expression |
FormatString | A format string with source location. |
FriendInfo | Info for friend declarations. |
FunctionSymbol | Metadata for a function or method. |
FunctionType | Function type with parameters, qualifiers, and noexcept info. |
Generator | Base class for documentation generators. |
GlobPattern | A glob pattern matcher |
GuideSymbol | Info for deduction guides. |
Handlebars | A handlebars environment |
HandlebarsError | An error thrown or returned by Handlebars |
HandlebarsOptions | Options for handlebars |
IdentifierName | Represents an identifier |
LValueReferenceType | An lvalue reference type. |
Location | Source location of a symbol or entity. |
MemberPointerType | Pointer-to-member type (object or function). |
Name | Represents a name for a named Type |
NamedType | A type identified by name (possibly fundamental). |
NamespaceAliasSymbol | Info for namespace aliases. |
NamespaceSymbol | Describes a namespace and its members. |
NamespaceTranche | Buckets the members that appear inside a namespace. |
NoexceptInfo | Captures a noexcept specification and its evaluated form. |
Optional | A compact optional that automatically uses nullable_traits<T> when available. |
Optional<T&> | Optional reference wrapper that never owns storage. |
OutputRef | Reference to output stream used by handlebars |
Overload | Combines multiple callable types into a single overloaded function object. |
OverloadsSymbol | Represents a set of function overloads. |
Param | Represents a single function parameter |
ParseResult | The result of a parse operation. |
PathGlobPattern | A glob pattern matcher for paths |
PointerType | Pointer type wrapper. |
Polymorphic | A polymorphic value-type. |
RValueReferenceType | An rvalue reference type. |
RangeFor | Range adapter to expose first/last flags inside range-for loops. |
RecordInterface | The aggregated interface for a given struct, class, or union. |
RecordSymbol | Metadata for struct, class, or union. |
RecordTranche | A group of members that have the same access specifier. |
ReferenceDirectories | Reference directories used to resolve paths |
ScopeExit | Execute a callable when the enclosing scope exits unless dismissed. |
ScopeExitRestore | RAII helper that restores a referenced value on scope exit. |
SourceInfo | Stores source information for a declaration. |
SourceLocation | A source location with filename prettification. |
SpecializationName | Represents a (possibly qualified) symbol name with template arguments. |
SplitLinesView | A lazy input range of std::string_view lines split on all known line breaks. |
StringHash | Transparent hash functor for string-like keys. |
StringList | A list of strings that accepts several input forms. |
Symbol | Base class with common properties of all symbols |
SymbolCommonBase | Base class for providing variant discriminator functions. |
SymbolGlobPattern | A glob pattern matcher for C++ symbols |
SymbolID | A unique identifier for a symbol. |
TArg | Base class for any template argument. |
TArgCommonBase | CRTP base that fixes the argument kind. |
TParam | Base class for a template parameter declaration. |
TParamCommonBase | CRTP base that fixes the parameter kind. |
TaskGroup | A subset of possible work in a thread pool. |
TemplateInfo | Information about templates and specializations thereof. |
TemplateTArg | Template template argument. |
TemplateTParam | Template template parameter. |
ThreadPool | A pool of threads for executing work concurrently. |
Type | A possibly qualified type. |
TypeCommonBase | CRTP base that ties a concrete type to a fixed TypeKind. |
TypeTArg | Type template argument. |
TypeTParam | Type template parameter. |
TypedefSymbol | Info for typedef and using declarations. |
Unexpected | Holds an unexpected error value for Expected. |
UsingSymbol | Info for using declarations. |
VariableSymbol | A variable. |
Visitor | A visitor for a type |
YCombinator | Enables recursive lambdas by passing a self-reference as the first argument. |
add_const_from | Propagate const qualification from From to To, keeping references. |
add_cv_from | Propagate both const and volatile qualifiers from From to To. |
add_cvref_from | Propagate cv-qualification and reference category from From to To. |
add_lvalue_reference_from | Propagate lvalue-reference from From to To if present. |
add_reference_from | Propagate reference qualification from From to To. |
add_rvalue_reference_from | Propagate rvalue-reference from From to To if present. |
add_volatile_from | Propagate volatile qualification from From to To, keeping references. |
any_callable | A movable, type-erased function object. |
any_callable<R(Args...)> | Type-erased callable wrapper for signature R(Args...). |
make_dependent | Dependent alias of T, useful for delaying instantiation. |
nullable_traits | nullable_traits<T> defines how to treat a T as “nullable” without an external engaged bit. |
nullable_traits<Location> | nullable_traits specialization for Location. |
nullable_traits<T> | nullable_traits for types with a sentinel. |
nullable_traits<Polymorphic<T>> | nullable_traits for Polymorphic<T>. |
sentinel_traits | Defines a customization point for types that have an intrinsic sentinel value denoting “null”. |
sentinel_traits<std::nullptr_t> | sentinel_traits specialization for std::nullptr_t. |
sentinel_traits<T> | sentinel_traits specialization for unsigned integral types. |
sentinel_traits<T*> | sentinel_traits specialization for raw pointers. |
unexpect_t | Tag type used to select unexpected construction. |
unlock_guard | A scoped guard which unlocks a mutex. |
| Name | Description |
|---|---|
UnorderedStringMap | unordered_map keyed by std::string with transparent hashing. |
UnorderedStringMultiMap | unordered_multimap keyed by std::string with transparent hashing. |
add_const_from_t | Alias for add_const_from<From, To>::type. |
add_cv_from_t | Alias for add_cv_from<From, To>::type. |
add_cvref_from_t | Alias for add_cvref_from<From, To>::type. |
add_lvalue_reference_from_t | Alias for add_lvalue_reference_from<From, To>::type. |
add_reference_from_t | Alias for add_reference_from<From, To>::type. |
add_rvalue_reference_from_t | Alias for add_rvalue_reference_from<From, To>::type. |
add_volatile_from_t | Alias for add_volatile_from<From, To>::type. |
make_dependent_t | Alias for make_dependent<T, U>::type. |
| Name | Description |
|---|---|
AccessKind | Access specifier. |
AutoKind | The kind of auto keyword used in a declaration. |
ConstexprKind | constexpr/consteval specifier kinds |
ExplicitKind | Explicit specifier kinds |
ExtractionMode | Determine why a symbol is extracted |
FileKind | Classifies where a file originates from. |
FunctionClass | Function classifications |
FundamentalTypeKind | Categorically describes a fundamental type. |
ListKind | Classification of list ordering. |
NameKind | Kinds of names that appear in type and symbol metadata. |
NoexceptKind | Exception specification kinds |
OperatorKind | Operator kinds |
QualifierKind | Type qualifiers |
RecordKeyKind | The kind of record: struct, class, or union. |
ReferenceKind | Reference type kinds |
StorageClassKind | Storage class kinds |
SymbolKind | Info variant discriminator |
TArgKind | The kind of template argument. |
TParamKeyKind | The keyword a template parameter was declared with |
TParamKind | Discriminates the different template parameter categories. |
TableAlignmentKind | Horizontal alignment for table columns. |
TemplateSpecKind | The kind of template or specialization. |
TypeKind | Variants of C++ types captured in metadata. |
UsingClass | The class of using declaration. |
| Name | Description |
|---|---|
CompareDerived | Compares two polymorphic objects that have visit functions |
HTMLEscape | HTMLEscape overloads |
addMember | Append a new function overload to the set. |
addMetaObject | Add a $meta object with type information. |
allMembers | allMembers overloads |
assert_failed | Handler invoked when MRDOCS_ASSERT fails. |
bottomUpTraverse | Traverse a DocComment tree bottom-up (post-order). |
canMerge | Check whether two symbols may be merged. |
cast | cast overloads |
cast_or_null | cast_or_null overloads |
compareSymbolNames | Return the result of comparing s0 to s1. |
contains | Determine if a range contains a specific element. |
contains_any | Determine if a range contains any of the specified elements. |
contains_n | Determine if a range contains at least N instances of the specified element. |
contains_n_any | Determine if a range contains at least N instances of any of the specified elements. |
countSymbolKind | Count the number of SymbolKind enumerators. |
createFrame | Create child data objects. |
dyn_cast | dyn_cast overloads |
dyn_cast_or_null | dyn_cast_or_null overloads |
endsWithOneOf | Determine if a string ends with one of the specified characters |
escapeExpression | |
findGenerator | Find a generator by its id. |
find_last_of | Find the last element in a range that matches an element in the specified range. |
forEachFile | forEachFile overloads |
formatError | Return a formatted error. |
fromString | Convert a string to a FundamentalTypeKind. |
getDefaultAccessString | Return the default accessibility for a record key kind. |
getOperatorKind | Return the short name of an operator as a string. |
getOperatorKindFromSuffix | Return the short name of an operator as a string. |
getOperatorName | Return the name of an operator as a string. |
getOperatorReadableName | Return the human-readable name of the operator |
getParents | getParents overloads |
getPrimaryLocation | getPrimaryLocation overloads |
getSafeOperatorName | Return the safe name of an operator as a string. |
getShortOperatorName | Return the short name of an operator as a string. |
getSinglePageFullPath | Return the full path for single page output. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innermostType | innermostType overloads |
installGenerator | Install a custom generator. |
isAlphaNumeric | isAlphaNumeric overloads |
isAlphabetic | isAlphabetic overloads |
isBinaryOperator | Determines whether the operator is potentially binary. |
isCopyAssignment | Check whether a function is a copy assignment operator. |
isCopyConstructor | Check whether a function is a copy constructor. |
isDefaultConstructor | Check whether a function is a default constructor. |
isDigit | isDigit overloads |
isEmpty | Determine if a value is empty |
isLowerCase | isLowerCase overloads |
isMoveAssignment | Check whether a function is a move assignment operator. |
isMoveConstructor | Check whether a function is a move constructor. |
isSpecialMemberFunction | Check whether a function is a special member function. |
isUnaryOperator | Determines whether the operator is potentially unary. |
isUpperCase | isUpperCase overloads |
isWhitespace | isWhitespace overloads |
is_null | is_null helper that uses nullable_traits<T> if available. |
is_one_of | Determine if an element is equal to any of the elements in the specified range. |
isa | Return true if the polymorphic object holds a value of type To. |
isa_or_null | Return true if pointer is non-null and referent is of type To. |
leastSpecific | Compare ExtractionModes and returns the least specific |
ltrim | ltrim overloads |
makeChar | Apply the "char" specifier to the type |
makeLong | Apply the "long" specifier to the type |
makeOverload | Factory function that creates an Overload from the given callables. |
makeShort | Apply the "short" specifier to the type |
makeSigned | Apply the "signed" specifier to the type |
makeUnsigned | Apply the "unsigned" specifier to the type |
makeVisitor | Make a visitor for a base type |
make_array_view | make_array_view overloads |
make_null | make_null helper that uses nullable_traits<T> if available. |
mapReflectedType | mapReflectedType overloads |
match | Applies a set of callables to a std::variant using std::visit and Overload. |
merge | merge overloads |
mostSpecific | Compare ExtractionModes and returns the most specific |
null_of | null_of helper that constructs a null T using nullable_traits<T>. |
operator| | Pipe a contiguous character range into the adaptor. |
overrides | Determine if one function would override the other |
parse | Parse a string view |
readableTypeName | Get the unqualified name of a type. |
reindentCode | Reindent code by removing the common leading spaces and adding the specified indent. |
replace | Return the substring without leading and trailing horizontal whitespace. |
rtrim | rtrim overloads |
safeString | safeString overloads |
splitLines | splitLines overloads |
startsWithOneOf | Determine if a string starts with one of the specified characters |
swap | swap overloads |
tag_invoke | tag_invoke overloads |
toBase16Str | Convert a SymbolID to a string |
toCamelCase | Convert a string to camelCase using ASCII letter rules. |
toKebabCase | Convert a string to kebab-case using ASCII letter rules. |
toLowerCase | toLowerCase overloads |
toPascalCase | Convert a string to PascalCase using ASCII letter rules. |
toSnakeCase | Convert a string to snake_case using ASCII letter rules. |
toString | toString overloads |
toUpperCase | toUpperCase overloads |
to_underlying | Return the value as its underlying type. |
topDownTraverse | Traverse a DocComment tree top-down (pre-order). |
trim | trim overloads |
visit | visit overloads |
visitIndexed | Visits a std::variant and calls the combined callable with the active index and the value. |
yCombinator | Factory that creates a YCombinator from a callable. |
operator<< | Write to output |
operator== | Equality operators |
operator!= | Inequality operators |
operator< | Less-than operators |
operator<= | Less-than-or-equal operators |
operator> | Greater-than operators |
operator>= | Greater-than-or-equal operators |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
htmlEscapeEntities | Character-to-entity table used by HTMLEscape. |
unexpect | Tag object to request unexpected construction. |
| Name | Description |
|---|---|
ClearableContainerLike | Internal concept that matches “empty-clear default-constructible” types. |
DescribedComparable | True if T has described members (for comparison). |
DocCommentNode | Concept to check if a type represents a DocComment node. |
DocCommentNodeTraversable | Types that can be traversed by DocComment helpers. |
HasParse | Concept to determine if there's a parse function for a type. |
HasSentinel | Concept that is satisfied when sentinel_traits<T> declares a usable sentinel. |
SymbolParent | A concept for types that have Symbol members. |
dereferenceable | Determine if a type is dereferenceable |
has_nullable_traits_v | Utility concept that returns true if T has a nullable_traits specialization enabled. |
pair_like | Concept to check if a type is pair-like |
polymorphic_storage_for | Concept to check if a type is representing a polymorphic storage |
range_of | Concept to check if a type is a range of T |
range_of_tuple_like | Concept to check if a range is a range of tuple-like elements |
tuple_like | Concept to check if a type is tuple-like |
| Name | Description |
|---|---|
ArrayView<T> | Deduce ArrayView element type from C-style array. |
ArrayView<T> | Deduce ArrayView element type from pointer and count. |
Overload<Ts...> | Class template argument deduction guide for Overload. |
RangeFor<Container> | Deduction guide for RangeFor. |
ScopeExit<F> | Deduction guide for ScopeExit. |
ScopeExitRestore<T> | Deduction guide for ScopeExitRestore taking a reference. |
ScopeExitRestore<T> | Deduction guide for ScopeExitRestore taking a reference and new value. |
Unexpected<E> | Deduction guide for Unexpected, forwarding the error type. |
| Name | Description |
|---|---|
reference_constructs_from_temporary_v | True when binding To from From would require a temporary conversion. |
reference_converts_from_temporary_v | Like reference_converts_from_temporary_v, but for construction. |
source_location | Alias to std::source_location when available. |
Doc-comment enums and helpers that describe admonition kinds.
| Name | Description |
|---|---|
AdmonitionBlock | A block for side-notes like tips, warnings, notes |
Block | A piece of block content |
BlockCommonBase | Base class for providing variant discriminator functions. |
BlockContainer | A composite block that stores a sequence of child blocks. |
BriefBlock | The brief description |
CodeBlock | Preformatted source code. |
CodeInline | Inline code (monospaced) used for short snippets within text. |
CopyDetailsInline | Documentation copied from another symbol. |
DefinitionListBlock | A list of terms paired with definitions. |
DefinitionListItem | An item in a definition list |
EmphInline | Emphasized text (typically rendered in italics). |
FootnoteDefinitionBlock | Text defining the content of a footnote reference. |
FootnoteReferenceInline | A reference to a symbol. |
HeadingBlock | A manually specified section heading. |
HighlightInline | Highlighted text span used to call out important words. |
ImageInline | An image. |
Inline | A Node containing a string of text. |
InlineCommonBase | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
InlineTextLeaf | A leaf node that stores a string of text. |
LineBreakInline | A hard line break that renders as "" |
LinkInline | A hyperlink. |
ListBlock | A list of list items |
ListItem | An item in a ListBlock |
MathBlock | A block of LaTeX math |
MathInline | An inline LaTeX math expression |
ParagraphBlock | A sequence of text nodes. |
ParamBlock | Documentation for a function parameter |
PostconditionBlock | Text describing conditions guaranteed on successful exit. |
PreconditionBlock | Text describing required conditions before entry. |
QuoteBlock | A quoted block of text. |
ReferenceInline | A reference to a symbol. |
ReturnsBlock | Documentation for a function return type |
SeeBlock | A |
SoftBreakInline | A line break that may render as a space |
StrikethroughInline | Strikethrough span to show removed or deprecated text. |
StrongInline | Strong emphasis span (typically rendered in bold). |
SubscriptInline | Subscript text fragment (lowered baseline). |
SuperscriptInline | Superscript text fragment (raised baseline). |
TParamBlock | Documentation for a template parameter |
TableBlock | A table block |
TableCell | A cell in a table |
TableRow | An item in a list |
TextInline | A Node containing a string of text. |
ThematicBreakBlock | A horizontal thematic break separating sections. |
ThrowsBlock | Documentation for a function exception clause |
| Name | Description |
|---|---|
AdmonitionKind | An admonishment style. |
BlockKind | Enumerates the different kinds of DocComment blocks. |
InlineKind | Enumerates the different kinds of inline nodes. |
ParamDirection | Parameter pass direction. |
Parts | Which parts of the documentation to copy. |
| Name | Description |
|---|---|
getAsPlainText | getAsPlainText overloads |
isBlockCommand | Return true if the given block kind represents a command block. |
isEmpty | Determine if the inline is empty |
ltrim | ltrim overloads |
rtrim | rtrim overloads |
tag_invoke | tag_invoke overloads |
toString | toString overloads |
traverse | Traverse a list of inlines. |
trim | trim overloads |
visit | visit overloads |
operator== | Equality delegates to the three-way comparison. |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
operator<=> | Three-way comparison for any described type. |
operator== | Equality for any described type. |
Objects representing JSON-like values.
| Name | Description |
|---|---|
JSON | JSON serialization helpers for DOM values. |
| Name | Description |
|---|---|
Array | An array of values |
ArrayImpl | Abstract array interface. |
DefaultArrayImpl | The default array implementation. |
DefaultFunctionImpl | Function implementation that wraps a fixed-arity callable. |
DefaultObjectImpl | The default Object implementation. |
Function | Value-semantic wrapper over a callable exposed to the DOM layer. |
FunctionImpl | Value-semantic wrapper over a callable exposed to the DOM layer. |
LazyArrayImpl | Lazy array implementation |
LazyArrayImpl | Lazy array implementation |
LazyObjectImpl | Lazy object implementation. |
LazyObjectImpl | Lazy object implementation. |
LazyObjectMapTag | Customization point tag. |
Object | A container of key and value pairs. |
ObjectImpl | Abstract object interface. |
String | UTF-8 string value used by the DOM. |
Value | A variant container for any kind of Dom value. |
ValueFromTag | Customization point tag. |
VariadicFunctionImpl | Function implementation that forwards the entire Array to a callable. |
function_traits | Helper traits to extract return and argument types from callables. |
function_traits<F> | Traits specialization for functors/lambdas. |
function_traits<R(*)(Args...)> | Traits specialization for function pointers. |
function_traits<R(Args...)> | Traits specialization for free functions. |
function_traits<R const volatile(C::*)(Args...)> | Traits specialization for member functions. |
| Name | Description |
|---|---|
Kind | The type of data in a Value. |
| Name | Description |
|---|---|
LazyArray | LazyArray overloads |
LazyObject | LazyObject overloads |
TransformArray | Return a new dom::Array based on a transformed lazy array implementation. |
ValueFrom | ValueFrom overloads |
makeInvocable | Create a Function from a fixed-arity invocable. |
makeVariadicInvocable | Create a Function that receives the argument Array directly. |
newArray | Return a new array using a custom implementation. |
newFunction | Return a diagnostic string. |
newObject | Return a new object using a custom implementation. |
operator&& | Return the first dom::Value that is not truthy, or the last one. |
operator+ | Addition operators |
operator|| | Return the first dom::Value that is truthy, or the last one. |
stringOrNull | Return a non-empty string, or a null. |
swap | swap overloads |
toString | toString overloads |
operator== | Equality operators |
operator!= | Return the result of comparing two strings. |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
HasLazyObjectMap | Determine if T can be converted to dom::Value. |
HasLazyObjectMapWithContext | Concept to determine if a type can be mapped to a dom::LazyObjectImpl with a user-provided conversion. |
HasLazyObjectMapWithoutContext | Concept to determine if a type can be mapped to a dom::LazyObjectImpl with a user-provided conversion. |
HasStandaloneValueFrom | Determine if T can be converted to dom::Value without a context. |
HasValueFrom | Determine if T can be converted to dom::Value. |
HasValueFromWithContext | Concept to determine if a type can be converted to a dom::Value with a user-provided conversion. |
HasValueFromWithoutContext | Concept to determine if a type can be converted to a dom::Value with a user-provided conversion. |
StringLikeTy | Satisfied if StringTy is convertible to String but not a String. |
function_traits_convertible_to_value | Concept selecting callables convertible to dom::Value. |
has_function_args_for_default_function_impl | Concept requiring all arguments be convertible to dom::Value. |
has_function_traits | Concept true when function_traits is defined for F. |
has_function_traits_for_default_function_impl | Concept combining argument and return constraints for default wrapper. |
has_invoke_expected_result_convertible_to_dom_value | Concept true when F returns Expected<dom::Value> or Expected<void>. |
has_invoke_result_convertible_to_dom_value | Concept true when F returns a dom::Value or void. |
has_invoke_result_for_default_function_impl | Concept enabling default function wrapper for supported return types. |
JSON serialization helpers for DOM values.
| Name | Description |
|---|---|
stringify | Stringify a value as JSON |
Filesystem helpers (join, temp, real-path resolution) used throughout MrDocs.
| Name | Description |
|---|---|
FileType | The type of a file. |
| Name | Description |
|---|---|
appendPath | appendPath overloads |
createDirectory | Create a directory. |
exists | Determine if a path exists |
getFileName | Return the filename part of the path. |
getFileText | Return the contents of a file as a string. |
getFileType | Return the file type or an error |
getParentDir | Return the parent directory. |
getSourceFilename | Return the relevant suffix of a source file path. |
isAbsolute | Return true if pathName is absolute. |
isDirectory | Determine if a path is a directory. |
isDirsy | Return true if pathName ends in a separator. |
isLexicalDirectory | Determine lexically if a path is a directory. |
isPosixStyle | Check if the path is posix style. |
isResolvedSubpathOf | Checks whether the given path lies within the specified prefix, tolerating symlinks. |
isSubpathOf | Checks whether the given path lies within the specified prefix. |
makeAbsolute | Return an absolute path from a possibly relative path. |
makeDirsy | Append a trailing native separator if not already present. |
makePosixStyle | Convert all backward slashes to forward slashes. |
makeRealPath | Return the real, symlink-resolved form of a path. |
normalizeDir | Return a normalized directory. |
normalizePath | Return a normalized path. |
requireAbsolute | Return an error if pathName is not absolute. |
requireDirectory | Return an error if the path is not a directory. |
withExtension | Return the filename with a new or different extension. |
Handlebars helper registry for templates.
| Name | Description |
|---|---|
and_fn | "and" helper function |
detag_fn | "detag" helper function |
eq_fn | "eq" helper function |
increment_fn | "increment" helper function |
ne_fn | "ne" helper function |
not_fn | "not" helper function |
or_fn | "or" helper function |
registerAntoraHelpers | Register all the Antora helpers into a Handlebars instance |
registerBuiltinHelpers | Register all the built-in helpers into a Handlebars instance |
registerConstructorHelpers | Register contructor helpers into a Handlebars instance |
registerContainerHelpers | Register helpers to manipulate composite data types |
registerLogicalHelpers | Register logical helpers into a Handlebars instance |
registerMathHelpers | Register math helpers into a Handlebars instance |
registerStringHelpers | Register string helpers into a Handlebars instance |
registerTypeHelpers | Register type helpers into a Handlebars instance |
relativize_fn | "relativize" helper function |
select_fn | "select" helper function |
year_fn | "year" helper function |
JavaScript interop helpers for the embedded runtime.
| Name | Description |
|---|---|
Array | Lightweight handle to a JavaScript array. |
Boolean | Boolean wrapper for JavaScript values. |
Context | An isolated JavaScript interpreter instance. |
Object | Object wrapper for JavaScript values. |
Scope | A JavaScript scope for value lifetime management. |
String | String wrapper for JavaScript values. |
Value | An ECMAScript value. |
| Name | Description |
|---|---|
Type | Types of values. |
| Name | Description |
|---|---|
operator&& | Return the first Value that is not truthy, or the last one. |
operator|| | Return the first Value that is truthy, or the last one. |
registerHelper | Register a JavaScript helper function |
swap | Swap two values. |
toString | Return value as a string. |
operator== | Compare two values for equality. |
operator!= | Inequality operators |
operator<=> | Compare two values for inequality. |
Lua interop helpers for the optional scripting/backend integration.
| Name | Description |
|---|---|
Access | Internal tag granting access to lua internals. |
Context | A reference to an instance of a Lua interpreter. |
Function | A Lua function. |
Param | A lazy container to push values to the Lua stack. |
Scope | Stack scope guard for Lua calls. |
String | A Lua string. |
Table | A Lua table. |
Value | A Lua value. |
zstring | A null-terminated string. |
| Name | Description |
|---|---|
FunctionPtr | Pointer to a Lua-callable function returning Value. |
| Name | Description |
|---|---|
Type | Types of values. |
| Name | Description |
|---|---|
registerHelper | Register a Lua helper function |
Reporting utilities (messages, statistics, sinks).
| Name | Description |
|---|---|
Located | Parameter type that adds a source location to a value. |
Results | Provides statistics on the number of reported messages. |
| Name | Description |
|---|---|
Level | Severity levels attached to reported messags. |
| Name | Description |
|---|---|
debug | Emit a debug-level diagnostic for troubleshooting. |
error | Emit an error that indicates failure but allows continuation. |
fatal | Emit a fatal error and mark the report as the highest severity. |
getMinimumLevel | Get the minimum threshold level for reporting. |
info | Emit an informational message for users. |
log | Format a message to the console. |
print | Report a message to the console. |
setMinimumLevel | Set the minimum threshold level for reporting. |
setSourceLocationWarnings | If true, source location information will be printed with warnings, errors, and fatal messages. |
trace | Emit a trace-level diagnostic (verbose, off by default). |
warn | Emit a warning that does not stop execution. |
| Name | Description |
|---|---|
results | Holds current statistics on reported messages. |
Core MrDocs support utilities.
The public mrdocs namespace here centralizes assert/assume hooks so we can swap behavior (terminate, throw, debugbreak) in one place without leaking platform specifics into the rest of the codebase.
Doc-comment enums and helpers that describe admonition kinds.
Reporting utilities (messages, statistics, sinks).
The report namespace owns severity enums, message structs, and output sinks so tooling and libraries emit diagnostics in a uniform, testable format regardless of UI.
| Name | Description |
|---|---|
doc | Doc-comment enums and helpers that describe admonition kinds. |
dom | Objects representing JSON-like values. |
files | Filesystem helpers (join, temp, real-path resolution) used throughout MrDocs. |
helpers | Handlebars helper registry for templates. |
js | JavaScript interop helpers for the embedded runtime. |
lua | Lua interop helpers for the optional scripting/backend integration. |
report | Reporting utilities (messages, statistics, sinks). |
| Name | Description |
|---|---|
AnyFileVisitor | Polymorphic visitor for files discovered during traversal. |
ArrayType | C++ array type (bounded or unbounded). |
ArrayView | A non-owning, read-only view over a contiguous array of T. |
AutoType | Represents auto or decltype(auto) placeholder type. |
BadExpectedAccess | Base class for accessing an empty Expected. |
BadExpectedAccess<void> | Exception thrown when reading the value of an empty Expected. |
BaseInfo | Metadata for a direct base. |
ConceptSymbol | Info for concepts. |
Config | Configuration used to generate the Corpus and Docs |
ConstantExprInfo | Represents an expression with a (possibly known) value |
ConstantTArg | Non-type template argument. |
ConstantTParam | A constant template parameter |
Corpus | The collection of declarations in extracted form. |
DecltypeType | decltype(expr) type wrapper. |
DocComment | A processed documentation comment attached to a declaration. |
DomCorpus | Front-end factory for producing Dom nodes. |
EnumConstantSymbol | Info for enum constants. |
EnumSymbol | Metadata for an enumeration declaration. |
Error | Holds the description of an error, or success. |
Exception | Type of all exceptions thrown by the API. |
ExecutorGroup | A set of execution agents for performing concurrent work. |
ExecutorGroupBase | Base class that owns a pool of execution agents and a shared work queue. |
Expected | A container holding an error or a value. |
Expected<T, E> | Expected specialization for void values. Holds either success (no payload) or an unexpected error E. |
Expected<T&, E> | Expected specialization for lvalue references. Holds either a bound reference to T or an unexpected error E. |
ExplicitInfo | Stores only the operand of the explicit-specifier or noexcept-specifier as a string. The complete expression is not preserved at this time. This is a temporary design and may be improved in the future. |
ExprInfo | Represents an expression |
FormatString | A format string with source location. |
FriendInfo | Info for friend declarations. |
FunctionSymbol | Metadata for a function or method. |
FunctionType | Function type with parameters, qualifiers, and noexcept info. |
Generator | Base class for documentation generators. |
GlobPattern | A glob pattern matcher |
GuideSymbol | Info for deduction guides. |
Handlebars | A handlebars environment |
HandlebarsError | An error thrown or returned by Handlebars |
HandlebarsOptions | Options for handlebars |
IdentifierName | Represents an identifier |
LValueReferenceType | An lvalue reference type. |
Location | Source location of a symbol or entity. |
MemberPointerType | Pointer-to-member type (object or function). |
Name | Represents a name for a named Type |
NamedType | A type identified by name (possibly fundamental). |
NamespaceAliasSymbol | Info for namespace aliases. |
NamespaceSymbol | Describes a namespace and its members. |
NamespaceTranche | Buckets the members that appear inside a namespace. |
NoexceptInfo | Captures a noexcept specification and its evaluated form. |
Optional | A compact optional that automatically uses nullable_traits<T> when available. |
Optional<T&> | Optional reference wrapper that never owns storage. |
OutputRef | Reference to output stream used by handlebars |
Overload | Combines multiple callable types into a single overloaded function object. |
OverloadsSymbol | Represents a set of function overloads. |
Param | Represents a single function parameter |
ParseResult | The result of a parse operation. |
PathGlobPattern | A glob pattern matcher for paths |
PointerType | Pointer type wrapper. |
Polymorphic | A polymorphic value-type. |
RValueReferenceType | An rvalue reference type. |
RangeFor | Range adapter to expose first/last flags inside range-for loops. |
RecordInterface | The aggregated interface for a given struct, class, or union. |
RecordSymbol | Metadata for struct, class, or union. |
RecordTranche | A group of members that have the same access specifier. |
ReferenceDirectories | Reference directories used to resolve paths |
ScopeExit | Execute a callable when the enclosing scope exits unless dismissed. |
ScopeExitRestore | RAII helper that restores a referenced value on scope exit. |
SourceInfo | Stores source information for a declaration. |
SourceLocation | A source location with filename prettification. |
SpecializationName | Represents a (possibly qualified) symbol name with template arguments. |
SplitLinesView | A lazy input range of std::string_view lines split on all known line breaks. |
StringHash | Transparent hash functor for string-like keys. |
StringList | A list of strings that accepts several input forms. |
Symbol | Base class with common properties of all symbols |
SymbolCommonBase | Base class for providing variant discriminator functions. |
SymbolGlobPattern | A glob pattern matcher for C++ symbols |
SymbolID | A unique identifier for a symbol. |
TArg | Base class for any template argument. |
TArgCommonBase | CRTP base that fixes the argument kind. |
TParam | Base class for a template parameter declaration. |
TParamCommonBase | CRTP base that fixes the parameter kind. |
TaskGroup | A subset of possible work in a thread pool. |
TemplateInfo | Information about templates and specializations thereof. |
TemplateTArg | Template template argument. |
TemplateTParam | Template template parameter. |
ThreadPool | A pool of threads for executing work concurrently. |
Type | A possibly qualified type. |
TypeCommonBase | CRTP base that ties a concrete type to a fixed TypeKind. |
TypeTArg | Type template argument. |
TypeTParam | Type template parameter. |
TypedefSymbol | Info for typedef and using declarations. |
Unexpected | Holds an unexpected error value for Expected. |
UsingSymbol | Info for using declarations. |
VariableSymbol | A variable. |
Visitor | A visitor for a type |
YCombinator | Enables recursive lambdas by passing a self-reference as the first argument. |
add_const_from | Propagate const qualification from From to To, keeping references. |
add_cv_from | Propagate both const and volatile qualifiers from From to To. |
add_cvref_from | Propagate cv-qualification and reference category from From to To. |
add_lvalue_reference_from | Propagate lvalue-reference from From to To if present. |
add_reference_from | Propagate reference qualification from From to To. |
add_rvalue_reference_from | Propagate rvalue-reference from From to To if present. |
add_volatile_from | Propagate volatile qualification from From to To, keeping references. |
any_callable | A movable, type-erased function object. |
any_callable<R(Args...)> | Type-erased callable wrapper for signature R(Args...). |
make_dependent | Dependent alias of T, useful for delaying instantiation. |
nullable_traits | nullable_traits<T> defines how to treat a T as “nullable” without an external engaged bit. |
nullable_traits<Location> | nullable_traits specialization for Location. |
nullable_traits<T> | nullable_traits for types with a sentinel. |
nullable_traits<Polymorphic<T>> | nullable_traits for Polymorphic<T>. |
sentinel_traits | Defines a customization point for types that have an intrinsic sentinel value denoting “null”. |
sentinel_traits<std::nullptr_t> | sentinel_traits specialization for std::nullptr_t. |
sentinel_traits<T> | sentinel_traits specialization for unsigned integral types. |
sentinel_traits<T*> | sentinel_traits specialization for raw pointers. |
unexpect_t | Tag type used to select unexpected construction. |
unlock_guard | A scoped guard which unlocks a mutex. |
| Name | Description |
|---|---|
UnorderedStringMap | unordered_map keyed by std::string with transparent hashing. |
UnorderedStringMultiMap | unordered_multimap keyed by std::string with transparent hashing. |
add_const_from_t | Alias for add_const_from<From, To>::type. |
add_cv_from_t | Alias for add_cv_from<From, To>::type. |
add_cvref_from_t | Alias for add_cvref_from<From, To>::type. |
add_lvalue_reference_from_t | Alias for add_lvalue_reference_from<From, To>::type. |
add_reference_from_t | Alias for add_reference_from<From, To>::type. |
add_rvalue_reference_from_t | Alias for add_rvalue_reference_from<From, To>::type. |
add_volatile_from_t | Alias for add_volatile_from<From, To>::type. |
make_dependent_t | Alias for make_dependent<T, U>::type. |
| Name | Description |
|---|---|
AccessKind | Access specifier. |
AutoKind | The kind of auto keyword used in a declaration. |
ConstexprKind | constexpr/consteval specifier kinds |
ExplicitKind | Explicit specifier kinds |
ExtractionMode | Determine why a symbol is extracted |
FileKind | Classifies where a file originates from. |
FunctionClass | Function classifications |
FundamentalTypeKind | Categorically describes a fundamental type. |
ListKind | Classification of list ordering. |
NameKind | Kinds of names that appear in type and symbol metadata. |
NoexceptKind | Exception specification kinds |
OperatorKind | Operator kinds |
QualifierKind | Type qualifiers |
RecordKeyKind | The kind of record: struct, class, or union. |
ReferenceKind | Reference type kinds |
StorageClassKind | Storage class kinds |
SymbolKind | Info variant discriminator |
TArgKind | The kind of template argument. |
TParamKeyKind | The keyword a template parameter was declared with |
TParamKind | Discriminates the different template parameter categories. |
TableAlignmentKind | Horizontal alignment for table columns. |
TemplateSpecKind | The kind of template or specialization. |
TypeKind | Variants of C++ types captured in metadata. |
UsingClass | The class of using declaration. |
| Name | Description |
|---|---|
CompareDerived | Compares two polymorphic objects that have visit functions |
HTMLEscape | HTMLEscape overloads |
addMember | Append a new function overload to the set. |
addMetaObject | Add a $meta object with type information. |
allMembers | allMembers overloads |
assert_failed | Handler invoked when MRDOCS_ASSERT fails. |
bottomUpTraverse | Traverse a DocComment tree bottom-up (post-order). |
canMerge | Check whether two symbols may be merged. |
cast | cast overloads |
cast_or_null | cast_or_null overloads |
compareSymbolNames | Return the result of comparing s0 to s1. |
contains | Determine if a range contains a specific element. |
contains_any | Determine if a range contains any of the specified elements. |
contains_n | Determine if a range contains at least N instances of the specified element. |
contains_n_any | Determine if a range contains at least N instances of any of the specified elements. |
countSymbolKind | Count the number of SymbolKind enumerators. |
createFrame | Create child data objects. |
dyn_cast | dyn_cast overloads |
dyn_cast_or_null | dyn_cast_or_null overloads |
endsWithOneOf | Determine if a string ends with one of the specified characters |
escapeExpression | |
findGenerator | Find a generator by its id. |
find_last_of | Find the last element in a range that matches an element in the specified range. |
forEachFile | forEachFile overloads |
formatError | Return a formatted error. |
fromString | Convert a string to a FundamentalTypeKind. |
getDefaultAccessString | Return the default accessibility for a record key kind. |
getOperatorKind | Return the short name of an operator as a string. |
getOperatorKindFromSuffix | Return the short name of an operator as a string. |
getOperatorName | Return the name of an operator as a string. |
getOperatorReadableName | Return the human-readable name of the operator |
getParents | getParents overloads |
getPrimaryLocation | getPrimaryLocation overloads |
getSafeOperatorName | Return the safe name of an operator as a string. |
getShortOperatorName | Return the short name of an operator as a string. |
getSinglePageFullPath | Return the full path for single page output. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innermostType | innermostType overloads |
installGenerator | Install a custom generator. |
isAlphaNumeric | isAlphaNumeric overloads |
isAlphabetic | isAlphabetic overloads |
isBinaryOperator | Determines whether the operator is potentially binary. |
isCopyAssignment | Check whether a function is a copy assignment operator. |
isCopyConstructor | Check whether a function is a copy constructor. |
isDefaultConstructor | Check whether a function is a default constructor. |
isDigit | isDigit overloads |
isEmpty | Determine if a value is empty |
isLowerCase | isLowerCase overloads |
isMoveAssignment | Check whether a function is a move assignment operator. |
isMoveConstructor | Check whether a function is a move constructor. |
isSpecialMemberFunction | Check whether a function is a special member function. |
isUnaryOperator | Determines whether the operator is potentially unary. |
isUpperCase | isUpperCase overloads |
isWhitespace | isWhitespace overloads |
is_null | is_null helper that uses nullable_traits<T> if available. |
is_one_of | Determine if an element is equal to any of the elements in the specified range. |
isa | Return true if the polymorphic object holds a value of type To. |
isa_or_null | Return true if pointer is non-null and referent is of type To. |
leastSpecific | Compare ExtractionModes and returns the least specific |
ltrim | ltrim overloads |
makeChar | Apply the "char" specifier to the type |
makeLong | Apply the "long" specifier to the type |
makeOverload | Factory function that creates an Overload from the given callables. |
makeShort | Apply the "short" specifier to the type |
makeSigned | Apply the "signed" specifier to the type |
makeUnsigned | Apply the "unsigned" specifier to the type |
makeVisitor | Make a visitor for a base type |
make_array_view | make_array_view overloads |
make_null | make_null helper that uses nullable_traits<T> if available. |
mapReflectedType | mapReflectedType overloads |
match | Applies a set of callables to a std::variant using std::visit and Overload. |
merge | merge overloads |
mostSpecific | Compare ExtractionModes and returns the most specific |
null_of | null_of helper that constructs a null T using nullable_traits<T>. |
operator| | Pipe a contiguous character range into the adaptor. |
overrides | Determine if one function would override the other |
parse | Parse a string view |
readableTypeName | Get the unqualified name of a type. |
reindentCode | Reindent code by removing the common leading spaces and adding the specified indent. |
replace | Return the substring without leading and trailing horizontal whitespace. |
rtrim | rtrim overloads |
safeString | safeString overloads |
splitLines | splitLines overloads |
startsWithOneOf | Determine if a string starts with one of the specified characters |
swap | swap overloads |
tag_invoke | tag_invoke overloads |
toBase16Str | Convert a SymbolID to a string |
toCamelCase | Convert a string to camelCase using ASCII letter rules. |
toKebabCase | Convert a string to kebab-case using ASCII letter rules. |
toLowerCase | toLowerCase overloads |
toPascalCase | Convert a string to PascalCase using ASCII letter rules. |
toSnakeCase | Convert a string to snake_case using ASCII letter rules. |
toString | toString overloads |
toUpperCase | toUpperCase overloads |
to_underlying | Return the value as its underlying type. |
topDownTraverse | Traverse a DocComment tree top-down (pre-order). |
trim | trim overloads |
visit | visit overloads |
visitIndexed | Visits a std::variant and calls the combined callable with the active index and the value. |
yCombinator | Factory that creates a YCombinator from a callable. |
operator<< | Write to output |
operator== | Equality operators |
operator!= | Inequality operators |
operator< | Less-than operators |
operator<= | Less-than-or-equal operators |
operator> | Greater-than operators |
operator>= | Greater-than-or-equal operators |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
htmlEscapeEntities | Character-to-entity table used by HTMLEscape. |
unexpect | Tag object to request unexpected construction. |
| Name | Description |
|---|---|
ClearableContainerLike | Internal concept that matches “empty-clear default-constructible” types. |
DescribedComparable | True if T has described members (for comparison). |
DocCommentNode | Concept to check if a type represents a DocComment node. |
DocCommentNodeTraversable | Types that can be traversed by DocComment helpers. |
HasParse | Concept to determine if there's a parse function for a type. |
HasSentinel | Concept that is satisfied when sentinel_traits<T> declares a usable sentinel. |
SymbolParent | A concept for types that have Symbol members. |
dereferenceable | Determine if a type is dereferenceable |
has_nullable_traits_v | Utility concept that returns true if T has a nullable_traits specialization enabled. |
pair_like | Concept to check if a type is pair-like |
polymorphic_storage_for | Concept to check if a type is representing a polymorphic storage |
range_of | Concept to check if a type is a range of T |
range_of_tuple_like | Concept to check if a range is a range of tuple-like elements |
tuple_like | Concept to check if a type is tuple-like |
| Name | Description |
|---|---|
ArrayView<T> | Deduce ArrayView element type from C-style array. |
ArrayView<T> | Deduce ArrayView element type from pointer and count. |
Overload<Ts...> | Class template argument deduction guide for Overload. |
RangeFor<Container> | Deduction guide for RangeFor. |
ScopeExit<F> | Deduction guide for ScopeExit. |
ScopeExitRestore<T> | Deduction guide for ScopeExitRestore taking a reference. |
ScopeExitRestore<T> | Deduction guide for ScopeExitRestore taking a reference and new value. |
Unexpected<E> | Deduction guide for Unexpected, forwarding the error type. |
| Name | Description |
|---|---|
reference_constructs_from_temporary_v | True when binding To from From would require a temporary conversion. |
reference_converts_from_temporary_v | Like reference_converts_from_temporary_v, but for construction. |
source_location | Alias to std::source_location when available. |
Doc-comment enums and helpers that describe admonition kinds.
| Name | Description |
|---|---|
AdmonitionBlock | A block for side-notes like tips, warnings, notes |
Block | A piece of block content |
BlockCommonBase | Base class for providing variant discriminator functions. |
BlockContainer | A composite block that stores a sequence of child blocks. |
BriefBlock | The brief description |
CodeBlock | Preformatted source code. |
CodeInline | Inline code (monospaced) used for short snippets within text. |
CopyDetailsInline | Documentation copied from another symbol. |
DefinitionListBlock | A list of terms paired with definitions. |
DefinitionListItem | An item in a definition list |
EmphInline | Emphasized text (typically rendered in italics). |
FootnoteDefinitionBlock | Text defining the content of a footnote reference. |
FootnoteReferenceInline | A reference to a symbol. |
HeadingBlock | A manually specified section heading. |
HighlightInline | Highlighted text span used to call out important words. |
ImageInline | An image. |
Inline | A Node containing a string of text. |
InlineCommonBase | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
InlineTextLeaf | A leaf node that stores a string of text. |
LineBreakInline | A hard line break that renders as "" |
LinkInline | A hyperlink. |
ListBlock | A list of list items |
ListItem | An item in a ListBlock |
MathBlock | A block of LaTeX math |
MathInline | An inline LaTeX math expression |
ParagraphBlock | A sequence of text nodes. |
ParamBlock | Documentation for a function parameter |
PostconditionBlock | Text describing conditions guaranteed on successful exit. |
PreconditionBlock | Text describing required conditions before entry. |
QuoteBlock | A quoted block of text. |
ReferenceInline | A reference to a symbol. |
ReturnsBlock | Documentation for a function return type |
SeeBlock | A |
SoftBreakInline | A line break that may render as a space |
StrikethroughInline | Strikethrough span to show removed or deprecated text. |
StrongInline | Strong emphasis span (typically rendered in bold). |
SubscriptInline | Subscript text fragment (lowered baseline). |
SuperscriptInline | Superscript text fragment (raised baseline). |
TParamBlock | Documentation for a template parameter |
TableBlock | A table block |
TableCell | A cell in a table |
TableRow | An item in a list |
TextInline | A Node containing a string of text. |
ThematicBreakBlock | A horizontal thematic break separating sections. |
ThrowsBlock | Documentation for a function exception clause |
| Name | Description |
|---|---|
AdmonitionKind | An admonishment style. |
BlockKind | Enumerates the different kinds of DocComment blocks. |
InlineKind | Enumerates the different kinds of inline nodes. |
ParamDirection | Parameter pass direction. |
Parts | Which parts of the documentation to copy. |
| Name | Description |
|---|---|
getAsPlainText | getAsPlainText overloads |
isBlockCommand | Return true if the given block kind represents a command block. |
isEmpty | Determine if the inline is empty |
ltrim | ltrim overloads |
rtrim | rtrim overloads |
tag_invoke | tag_invoke overloads |
toString | toString overloads |
traverse | Traverse a list of inlines. |
trim | trim overloads |
visit | visit overloads |
operator== | Equality delegates to the three-way comparison. |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
operator<=> | Three-way comparison for any described type. |
operator== | Equality for any described type. |
A block for side-notes like tips, warnings, notes
Declared in <mrdocs/Metadata/DocComment/Block/AdmonitionBlock.hpp>
struct AdmonitionBlock final
: BlockCommonBase<BlockKind::Admonition>
, BlockContainer
This paragraph represents an admonition, such as a note, tip, important, caution, or warning.
Syntax:
@note text
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Admonition> | Base class for providing variant discriminator functions. |
BlockContainer | A composite block that stores a sequence of child blocks. |
| Name | Description |
|---|---|
AdmonitionBlock [constructor] | Construct an admonition with the given kind. |
asBlockContainer | asBlockContainer overloads |
| Name | Description |
|---|---|
Title | Optional title for the admonition |
admonish | The kind of admonition |
blocks | Child blocks contained within this composite block. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text elements |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text elements |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements |
Construct an admonition with the given kind.
Declared in <mrdocs/Metadata/DocComment/Block/AdmonitionBlock.hpp>
explicit
AdmonitionBlock(AdmonitionKind const admonish_ = AdmonitionKind::none) noexcept;
| Name | Description |
|---|---|
| admonish_ | The object to construct from |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Optional title for the admonition
Declared in <mrdocs/Metadata/DocComment/Block/AdmonitionBlock.hpp>
Optional<Polymorphic<Inline>> Title;
The kind of admonition
Declared in <mrdocs/Metadata/DocComment/Block/AdmonitionBlock.hpp>
AdmonitionKind admonish;
This is typically a string in other implementations.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
A piece of block content
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
struct Block;
The top level is a list of blocks.
There are two types of blocks: headings and paragraphs.
| Name | Description |
|---|---|
~Block [destructor] [virtual] | Virtual to allow deleting through a base pointer. |
asBlock | asBlock overloads |
| Name | Description |
|---|---|
Kind | Discriminator identifying which concrete block this instance holds. |
| Name | Description |
|---|---|
Block [constructor] | Constructors |
| Name | Description |
|---|---|
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
| Name | Description |
|---|---|
BlockCommonBase | Base class for providing variant discriminator functions. |
Virtual to allow deleting through a base pointer.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr
virtual
~Block() = default;
asBlock overloads
View this object as a Block reference.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr
Block const&
asBlock() const noexcept;
A piece of block content
View this object as a mutable Block reference.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr
Block&
asBlock() noexcept;
A piece of block content
Discriminator identifying which concrete block this instance holds.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
BlockKind Kind = BlockKind::Paragraph;
Constructors
Default-construct a paragraph block.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr
Block() = default;
Construct a block with the specified discriminant.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
explicit
Block(BlockKind const kind_) noexcept;
| Name | Description |
|---|---|
| kind_ | The object to construct from |
Base class for providing variant discriminator functions.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
template<BlockKind K>
struct BlockCommonBase
: Block
This offers functions that return a boolean at compile-time, indicating if the most-derived class is a certain type.
| Name | Description |
|---|---|
Block | A piece of block content |
| Name | Description |
|---|---|
~BlockCommonBase [destructor] [virtual] | Virtual to keep dynamic dispatch working for block hierarchies. |
asBlock | asBlock overloads |
| Name | Description |
|---|---|
Kind | Discriminator identifying which concrete block this instance holds. |
| Name | Description |
|---|---|
kind_id | The variant discriminator constant of the most-derived class. |
| Name | Description |
|---|---|
BlockCommonBase [constructor] | Construct with the fixed block kind. |
| Name | Description |
|---|---|
mrdocs::doc::mrdocs_member_descriptor_fn | |
mrdocs::doc::mrdocs_base_descriptor_fn |
| Name | Description |
|---|---|
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
| Name | Description |
|---|---|
AdmonitionBlock | A block for side-notes like tips, warnings, notes |
BriefBlock | The brief description |
CodeBlock | Preformatted source code. |
DefinitionListBlock | A list of terms paired with definitions. |
FootnoteDefinitionBlock | Text defining the content of a footnote reference. |
HeadingBlock | A manually specified section heading. |
ListBlock | A list of list items |
MathBlock | A block of LaTeX math |
ParagraphBlock | A sequence of text nodes. |
ParamBlock | Documentation for a function parameter |
PostconditionBlock | Text describing conditions guaranteed on successful exit. |
PreconditionBlock | Text describing required conditions before entry. |
QuoteBlock | A quoted block of text. |
ReturnsBlock | Documentation for a function return type |
SeeBlock | A |
TParamBlock | Documentation for a template parameter |
TableBlock | A table block |
ThematicBreakBlock | A horizontal thematic break separating sections. |
ThrowsBlock | Documentation for a function exception clause |
Virtual to keep dynamic dispatch working for block hierarchies.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
virtual
~BlockCommonBase() override = default;
The variant discriminator constant of the most-derived class.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
inline constexpr static
BlockKind kind_id = K;
It only distinguishes from Block::kind in that it is a constant.
Construct with the fixed block kind.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr
explicit
BlockCommonBase();
A composite block that stores a sequence of child blocks.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
struct BlockContainer;
| Name | Description |
|---|---|
asBlockContainer | asBlockContainer overloads |
| Name | Description |
|---|---|
blocks | Child blocks contained within this composite block. |
| Name | Description |
|---|---|
ltrim | Removes leading whitespace from the first text elements |
rtrim | Removes trailing whitespace from the last text elements |
trim | Removes leading and trailing whitespace from the text elements |
| Name | Description |
|---|---|
AdmonitionBlock | A block for side-notes like tips, warnings, notes |
DefinitionListItem | An item in a definition list |
FootnoteDefinitionBlock | Text defining the content of a footnote reference. |
ListItem | An item in a ListBlock |
QuoteBlock | A quoted block of text. |
asBlockContainer overloads
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
Access the container as a mutable view.
BlockContainer&
asBlockContainer();
» more...
Access the container as a const view.
BlockContainer const&
asBlockContainer() const;
» more...
Access the container as a mutable view.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
BlockContainer&
asBlockContainer();
A composite block that stores a sequence of child blocks.
Access the container as a const view.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
BlockContainer const&
asBlockContainer() const;
A composite block that stores a sequence of child blocks.
Child blocks contained within this composite block.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
std::vector<Polymorphic<Block>> blocks;
The brief description
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
struct BriefBlock final
: BlockCommonBase<BlockKind::Brief>
, InlineContainer
Syntax:
@brief summary
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Brief> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
BriefBlock [constructor] | Constructors |
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
copiedFrom | Names of declarations whose brief text was reused. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
BriefBlock | Inherit inline container constructors. |
operator= | Reuse inline container assignment operators. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Constructors
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
Create an empty brief.
constexpr
BriefBlock() = default;
» more...
Copy-construct from another brief.
constexpr
BriefBlock(BriefBlock const& other) = default;
» more...
Create an empty brief.
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
constexpr
BriefBlock() = default;
Copy-construct from another brief.
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
constexpr
BriefBlock(BriefBlock const& other) = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Assignment operators
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Copy-assign another brief.
constexpr
BriefBlock&
operator=(BriefBlock const& other) = default;
» more...
Copy-assign child nodes.
constexpr
InlineContainer&
operator=(InlineContainer const& other) = default;
» more...
Move-assign child nodes.
constexpr
InlineContainer&
operator=(InlineContainer&& other) noexcept = default;
» more...
Assign an InlineContainer with a single TextInline child.
InlineContainer&
operator=(std::string_view text);
» more...
Copy-assign another brief.
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
constexpr
BriefBlock&
operator=(BriefBlock const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Copy-assign child nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer&
operator=(InlineContainer const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move-assign child nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer&
operator=(InlineContainer&& other) noexcept = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Assign an InlineContainer with a single TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
InlineContainer&
operator=(std::string_view text);
Reference to the current object
| Name | Description |
|---|---|
| text | The object to assign from |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Names of declarations whose brief text was reused.
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
std::vector<std::string> copiedFrom;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
using InlineContainer::BriefBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
Reuse inline container assignment operators.
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
using InlineContainer::operator=;
Preformatted source code.
Declared in <mrdocs/Metadata/DocComment/Block/CodeBlock.hpp>
struct CodeBlock final
: BlockCommonBase<BlockKind::Code>
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Code> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
CodeBlock [constructor] | Construct an empty code block. |
| Name | Description |
|---|---|
info | Fence info string, e.g. "cpp" |
literal | Raw code text inside the fenced block. |
| Name |
|---|
kind_id |
Construct an empty code block.
Declared in <mrdocs/Metadata/DocComment/Block/CodeBlock.hpp>
constexpr
CodeBlock() noexcept = default;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Fence info string, e.g. "cpp"
Declared in <mrdocs/Metadata/DocComment/Block/CodeBlock.hpp>
std::string info;
Raw code text inside the fenced block.
Declared in <mrdocs/Metadata/DocComment/Block/CodeBlock.hpp>
std::string literal;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inline code (monospaced) used for short snippets within text.
Declared in <mrdocs/Metadata/DocComment/Inline/CodeInline.hpp>
struct CodeInline final
: InlineCommonBase<InlineKind::Code>
, InlineContainer
Syntax:
@c inline_code
or
`inline_code`
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Code> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
CodeInline | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Inline/CodeInline.hpp>
using InlineContainer::CodeInline;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
Documentation copied from another symbol.
Declared in <mrdocs/Metadata/DocComment/Inline/CopyDetailsInline.hpp>
struct CopyDetailsInline final
: InlineCommonBase<InlineKind::CopyDetails>
Syntax:
@copydetails other_symbol
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::CopyDetails> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
CopyDetailsInline [constructor] | Construct with optional text payload. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
id | Symbol to copy details from. |
string | Element to copy the details from |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
Construct with optional text payload.
Declared in <mrdocs/Metadata/DocComment/Inline/CopyDetailsInline.hpp>
CopyDetailsInline(std::string string_ = std::string()) noexcept;
| Name | Description |
|---|---|
| string_ | The object to construct from |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Symbol to copy details from.
Declared in <mrdocs/Metadata/DocComment/Inline/CopyDetailsInline.hpp>
SymbolID id = = SymbolID::invalid;
Element to copy the details from
Declared in <mrdocs/Metadata/DocComment/Inline/CopyDetailsInline.hpp>
std::string string;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
A list of terms paired with definitions.
Declared in <mrdocs/Metadata/DocComment/Block/DefinitionListBlock.hpp>
struct DefinitionListBlock final
: BlockCommonBase<BlockKind::List>
Syntax:
Markdown
: A lightweight markup language
: Created by John Gruber in 2004
HTML
: A standard markup language used to create web pages
: Used for structuring content on the internet
In HTML, it looks like:
<dl>
<dt>First Term</dt>
<dd>This is the definition of the first term.</dd>
<dt>Second Term</dt>
<dd>This is one definition of the second term. </dd>
<dd>This is another definition of the second term.</dd>
</dl>
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::List> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
items | Sequence of definition list items. |
| Name |
|---|
kind_id |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Sequence of definition list items.
Declared in <mrdocs/Metadata/DocComment/Block/DefinitionListBlock.hpp>
std::vector<DefinitionListItem> items;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
An item in a definition list
Declared in <mrdocs/Metadata/DocComment/Block/DefinitionListItem.hpp>
struct DefinitionListItem final
: BlockContainer
| Name | Description |
|---|---|
BlockContainer | A composite block that stores a sequence of child blocks. |
| Name | Description |
|---|---|
asBlockContainer | asBlockContainer overloads |
| Name | Description |
|---|---|
blocks | Child blocks contained within this composite block. |
term | The term being defined. |
The term being defined.
Declared in <mrdocs/Metadata/DocComment/Block/DefinitionListItem.hpp>
InlineContainer term;
Emphasized text (typically rendered in italics).
Declared in <mrdocs/Metadata/DocComment/Inline/EmphInline.hpp>
struct EmphInline final
: InlineCommonBase<InlineKind::Emph>
, InlineContainer
Syntax:
@e emphasized or *italic text* or _italic text_
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Emph> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
EmphInline | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Inline/EmphInline.hpp>
using InlineContainer::EmphInline;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
Text defining the content of a footnote reference.
Declared in <mrdocs/Metadata/DocComment/Block/FootnoteDefinitionBlock.hpp>
struct FootnoteDefinitionBlock final
: BlockCommonBase<BlockKind::FootnoteDefinition>
, BlockContainer
Syntax:
This is a sentence with a footnote[^1].
[^1]: This is the content of the footnote. It can also have multiple paragraphs.
Here is the second paragraph, which needs to be indented.
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::FootnoteDefinition> | Base class for providing variant discriminator functions. |
BlockContainer | A composite block that stores a sequence of child blocks. |
| Name | Description |
|---|---|
FootnoteDefinitionBlock [constructor] | Construct an empty footnote definition. |
asBlockContainer | asBlockContainer overloads |
| Name | Description |
|---|---|
blocks | Child blocks contained within this composite block. |
label | Footnote label identifier. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text elements |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text elements |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements |
Construct an empty footnote definition.
Declared in <mrdocs/Metadata/DocComment/Block/FootnoteDefinitionBlock.hpp>
constexpr
FootnoteDefinitionBlock() noexcept = default;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Footnote label identifier.
Declared in <mrdocs/Metadata/DocComment/Block/FootnoteDefinitionBlock.hpp>
std::string label;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
A reference to a symbol.
Declared in <mrdocs/Metadata/DocComment/Inline/FootnoteReferenceInline.hpp>
struct FootnoteReferenceInline
: InlineCommonBase<InlineKind::FootnoteReference>
In markdown, this is represented as "[]".
Syntax:
[^footnote-id]
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::FootnoteReference> | Base class for providing variant discriminator functions. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
label | Footnote label that the reference points to. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Footnote label that the reference points to.
Declared in <mrdocs/Metadata/DocComment/Inline/FootnoteReferenceInline.hpp>
std::string label;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
A manually specified section heading.
Declared in <mrdocs/Metadata/DocComment/Block/HeadingBlock.hpp>
struct HeadingBlock final
: BlockCommonBase<BlockKind::Heading>
, InlineContainer
Syntax:
@par Heading
or in Markdown:
# Heading 1
## Heading 2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Heading> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
level | Heading depth (1..6). |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
HeadingBlock | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Heading depth (1..6).
Declared in <mrdocs/Metadata/DocComment/Block/HeadingBlock.hpp>
unsigned int level = 1;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/HeadingBlock.hpp>
using InlineContainer::HeadingBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
Highlighted text span used to call out important words.
Declared in <mrdocs/Metadata/DocComment/Inline/HighlightInline.hpp>
struct HighlightInline final
: InlineCommonBase<InlineKind::Highlight>
, InlineContainer
Syntax:
==highlight== or <mark>highlighted</mark>
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Highlight> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
An image.
Declared in <mrdocs/Metadata/DocComment/Inline/ImageInline.hpp>
struct ImageInline final
: InlineCommonBase<InlineKind::Image>
, InlineContainer
Syntax:
@image html path/to/img "alt text"
or

| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Image> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
alt | Alternate text when the image cannot be shown. |
children | Child inline elements contained here. |
src | Image source URL or path. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Alternate text when the image cannot be shown.
Declared in <mrdocs/Metadata/DocComment/Inline/ImageInline.hpp>
std::string alt;
Image source URL or path.
Declared in <mrdocs/Metadata/DocComment/Inline/ImageInline.hpp>
std::string src;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
A Node containing a string of text.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
struct Inline;
There will be no newlines in the text. Otherwise, this would be represented as multiple text nodes within a Paragraph node.
| Name | Description |
|---|---|
~Inline [destructor] [virtual] | Virtual destructor to enable polymorphic deletion. |
asInline | asInline overloads |
| Name | Description |
|---|---|
Kind | Discriminator identifying which inline variant is active. |
| Name | Description |
|---|---|
Inline [constructor] | Constructors |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
| Name | Description |
|---|---|
InlineCommonBase | Base class for providing variant discriminator functions. |
Virtual destructor to enable polymorphic deletion.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
virtual
~Inline() = default;
asInline overloads
View as const Inline reference.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
Inline const&
asInline() const noexcept;
A Node containing a string of text.
View as mutable Inline reference.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
Inline&
asInline() noexcept;
A Node containing a string of text.
Discriminator identifying which inline variant is active.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
InlineKind Kind = InlineKind::Text;
Constructors
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Default-construct a text inline.
constexpr
Inline() noexcept = default;
» more...
Construct with a specific inline kind.
Inline(InlineKind kind_);
» more...
Default-construct a text inline.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
Inline() noexcept = default;
Construct with a specific inline kind.
| Name | Description |
|---|---|
| kind_ | The object to construct from |
Base class for providing variant discriminator functions.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
template<InlineKind K>
struct InlineCommonBase
: Inline
This offers functions that return a boolean at compile-time, indicating if the most-derived class is a certain type.
| Name | Description |
|---|---|
Inline | A Node containing a string of text. |
| Name | Description |
|---|---|
~InlineCommonBase [destructor] [virtual] | Virtual destructor to preserve polymorphic cleanup. |
asInline | asInline overloads |
| Name | Description |
|---|---|
Kind | Discriminator identifying which inline variant is active. |
| Name | Description |
|---|---|
kind_id | The variant discriminator constant of the most-derived class. |
| Name | Description |
|---|---|
InlineCommonBase [constructor] | Default-construct with the fixed inline kind. |
| Name | Description |
|---|---|
mrdocs::doc::mrdocs_member_descriptor_fn | |
mrdocs::doc::mrdocs_base_descriptor_fn |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
| Name | Description |
|---|---|
CodeInline | Inline code (monospaced) used for short snippets within text. |
CopyDetailsInline | Documentation copied from another symbol. |
EmphInline | Emphasized text (typically rendered in italics). |
FootnoteReferenceInline | A reference to a symbol. |
HighlightInline | Highlighted text span used to call out important words. |
ImageInline | An image. |
LineBreakInline | A hard line break that renders as "" |
LinkInline | A hyperlink. |
MathInline | An inline LaTeX math expression |
ReferenceInline | A reference to a symbol. |
SoftBreakInline | A line break that may render as a space |
StrikethroughInline | Strikethrough span to show removed or deprecated text. |
StrongInline | Strong emphasis span (typically rendered in bold). |
SubscriptInline | Subscript text fragment (lowered baseline). |
SuperscriptInline | Superscript text fragment (raised baseline). |
TextInline | A Node containing a string of text. |
Virtual destructor to preserve polymorphic cleanup.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
virtual
~InlineCommonBase() override = default;
The variant discriminator constant of the most-derived class.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
inline constexpr static
InlineKind kind_id = K;
It only distinguishes from Inline::kind in that it is a constant.
Default-construct with the fixed inline kind.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
explicit
InlineCommonBase();
An internal node in the inline element tree.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
struct InlineContainer;
| Name | Description |
|---|---|
InlineContainer [constructor] | Constructors |
~InlineContainer [destructor] [virtual] | Virtual destructor for derived containers. |
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
| Name | Description |
|---|---|
BriefBlock | The brief description |
CodeInline | Inline code (monospaced) used for short snippets within text. |
EmphInline | Emphasized text (typically rendered in italics). |
HeadingBlock | A manually specified section heading. |
HighlightInline | Highlighted text span used to call out important words. |
ImageInline | An image. |
LinkInline | A hyperlink. |
ParagraphBlock | A sequence of text nodes. |
ParamBlock | Documentation for a function parameter |
PostconditionBlock | Text describing conditions guaranteed on successful exit. |
PreconditionBlock | Text describing required conditions before entry. |
ReturnsBlock | Documentation for a function return type |
SeeBlock | A |
StrikethroughInline | Strikethrough span to show removed or deprecated text. |
StrongInline | Strong emphasis span (typically rendered in bold). |
SubscriptInline | Subscript text fragment (lowered baseline). |
SuperscriptInline | Superscript text fragment (raised baseline). |
TParamBlock | Documentation for a template parameter |
TableCell | A cell in a table |
ThrowsBlock | Documentation for a function exception clause |
Constructors
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Default-construct an empty container.
constexpr
InlineContainer() = default;
» more...
Copy-construct all child nodes.
constexpr
InlineContainer(InlineContainer const& other) = default;
» more...
Move-construct child nodes.
constexpr
InlineContainer(InlineContainer&& other) noexcept = default;
» more...
Construct an InlineContainer with a single TextInline child.
explicit
InlineContainer(std::string_view text);
» more...
Construct an InlineContainer with a single TextInline child.
explicit
InlineContainer(std::string const& text);
» more...
Construct an InlineContainer with a single TextInline child.
explicit
InlineContainer(std::string&& text);
» more...
Construct an InlineContainer with a single TextInline child.
explicit
InlineContainer(char const* text);
» more...
Default-construct an empty container.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer() = default;
Copy-construct all child nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer(InlineContainer const& other) = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Move-construct child nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer(InlineContainer&& other) noexcept = default;
| Name | Description |
|---|---|
| other | The object to move construct from |
Construct an InlineContainer with a single TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
explicit
InlineContainer(std::string_view text);
| Name | Description |
|---|---|
| text | The object to construct from |
Construct an InlineContainer with a single TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
explicit
InlineContainer(std::string const& text);
| Name | Description |
|---|---|
| text | The object to copy construct from |
Construct an InlineContainer with a single TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
explicit
InlineContainer(std::string&& text);
| Name | Description |
|---|---|
| text | The object to move construct from |
Construct an InlineContainer with a single TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
explicit
InlineContainer(char const* text);
| Name | Description |
|---|---|
| text | The value to construct from |
Virtual destructor for derived containers.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
virtual
~InlineContainer() = default;
Assignment operators
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Copy-assign child nodes.
constexpr
InlineContainer&
operator=(InlineContainer const& other) = default;
» more...
Move-assign child nodes.
constexpr
InlineContainer&
operator=(InlineContainer&& other) noexcept = default;
» more...
Assign an InlineContainer with a single TextInline child.
InlineContainer&
operator=(std::string_view text);
» more...
Copy-assign child nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer&
operator=(InlineContainer const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move-assign child nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer&
operator=(InlineContainer&& other) noexcept = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Assign an InlineContainer with a single TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
InlineContainer&
operator=(std::string_view text);
Reference to the current object
| Name | Description |
|---|---|
| text | The object to assign from |
append overloads
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Append a TextInline child.
InlineContainer&
append(std::string_view text);
» more...
Append a child of the specified type.
template<
std::derived_from<Inline> InlineTy,
class... Args>
InlineContainer&
append(Args&&... args);
» more...
A reference to this container.
| Name | Description |
|---|---|
| InlineTy | The Inline-derived type to add. |
| Name | Description |
|---|---|
| text | The text to append. |
| args | Constructor arguments forwarded to the child. |
Append a TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
InlineContainer&
append(std::string_view text);
A reference to this container.
| Name | Description |
|---|---|
| text | The text to append. |
Append a child of the specified type.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
template<
std::derived_from<Inline> InlineTy,
class... Args>
InlineContainer&
append(Args&&... args);
A reference to this container.
| Name | Description |
|---|---|
| InlineTy | The Inline-derived type to add. |
| Name | Description |
|---|---|
| args | Constructor arguments forwarded to the child. |
Return this container as a base-class reference.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Return this container as a base-class reference.
InlineContainer&
asInlineContainer();
» more...
Return this container as a base-class reference.
InlineContainer const&
asInlineContainer() const;
» more...
A reference to the underlying InlineContainer.
Return this container as a base-class reference.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
InlineContainer&
asInlineContainer();
A reference to the underlying InlineContainer.
Return this container as a base-class reference.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
InlineContainer const&
asInlineContainer() const;
A reference to the underlying InlineContainer.
Get the last inline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Get the last inline child.
Polymorphic<Inline> const&
back() const;
» more...
Get the last inline child.
Polymorphic<Inline>&
back();
» more...
Get the last inline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Polymorphic<Inline> const&
back() const;
the last inline child.
Get the last inline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Polymorphic<Inline>&
back();
the last inline child.
Begin iterator forwarding to children.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
decltype(auto)
begin(this auto&& self) noexcept;
Iterator to the first child.
| Name | Description |
|---|---|
| self | The container instance. |
Clear all inline children.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
void
clear();
Append a child of the specified type in-place.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
template<
std::derived_from<Inline> InlineTy,
class... Args>
InlineContainer&
emplace_back(Args&&... args);
A reference to this container.
| Name | Description |
|---|---|
| InlineTy | The Inline-derived type to emplace. |
| Name | Description |
|---|---|
| args | Constructor arguments forwarded to the child. |
Determine if there are no inline children.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
bool
empty() const noexcept;
if there are no inline children.
End iterator forwarding to children.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
decltype(auto)
end(this auto&& self) noexcept;
Iterator past the last child.
| Name | Description |
|---|---|
| self | The container instance. |
Erase inline children.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
decltype(auto)
erase(this
auto&& self,
auto&&... args);
The iterator returned by erase.
| Name | Description |
|---|---|
| self | The container instance. |
| args | Arguments forwarded to std::vector::erase. |
Get the first inline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Get the first inline child.
Polymorphic<Inline> const&
front() const;
» more...
Get the first inline child.
Polymorphic<Inline>&
front();
» more...
Get the first inline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Polymorphic<Inline> const&
front() const;
the first inline child.
Get the first inline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Polymorphic<Inline>&
front();
the first inline child.
Insert inline children.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
decltype(auto)
insert(this
auto&& self,
auto&&... args);
The iterator returned by insert.
| Name | Description |
|---|---|
| self | The container instance. |
| args | Arguments forwarded to std::vector::insert. |
Addition assignment operators
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Append a TextInline child.
InlineContainer&
operator+=(std::string_view text);
» more...
Append an inline child.
template<std::derived_from<Inline> InlineTy>
InlineContainer&
operator+=(InlineTy&& inlineChild);
» more...
Append a TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
InlineContainer&
operator+=(std::string_view text);
Reference to the current object
| Name | Description |
|---|---|
| text | The right operand |
Append an inline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
template<std::derived_from<Inline> InlineTy>
InlineContainer&
operator+=(InlineTy&& inlineChild);
Reference to the current object
| Name | Description |
|---|---|
| inlineChild | The right operand |
Get the number of inline children.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
std::size_t
size() const noexcept;
the number of inline children.
Child inline elements contained here.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
std::vector<Polymorphic<Inline>> children;
A leaf node that stores a string of text.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
struct InlineTextLeaf;
| Name | Description |
|---|---|
InlineTextLeaf [constructor] | Constructors |
| Name | Description |
|---|---|
literal | Raw literal text stored in this leaf node. |
Constructors
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Construct from a string view.
explicit
InlineTextLeaf(std::string_view literal_);
» more...
Construct from a string copy.
explicit
InlineTextLeaf(std::string const& literal_);
» more...
Construct by moving a string.
explicit
InlineTextLeaf(std::string&& literal_) noexcept;
» more...
Construct from a string view.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
explicit
InlineTextLeaf(std::string_view literal_);
| Name | Description |
|---|---|
| literal_ | The object to construct from |
Construct from a string copy.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
explicit
InlineTextLeaf(std::string const& literal_);
| Name | Description |
|---|---|
| literal_ | The object to copy construct from |
Construct by moving a string.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
explicit
InlineTextLeaf(std::string&& literal_) noexcept;
| Name | Description |
|---|---|
| literal_ | The object to move construct from |
Raw literal text stored in this leaf node.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
std::string literal;
A hard line break that renders as ""
Declared in <mrdocs/Metadata/DocComment/Inline/LineBreakInline.hpp>
struct LineBreakInline
: InlineCommonBase<InlineKind::LineBreak>
Syntax:
first line\
second line
or
first line<br>second line
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::LineBreak> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
LineBreakInline [constructor] | Construct a line break node. |
~LineBreakInline [destructor] [virtual] | Virtual destructor for the inline hierarchy. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
Construct a line break node.
Declared in <mrdocs/Metadata/DocComment/Inline/LineBreakInline.hpp>
constexpr
LineBreakInline() noexcept = default;
Virtual destructor for the inline hierarchy.
Declared in <mrdocs/Metadata/DocComment/Inline/LineBreakInline.hpp>
constexpr
virtual
~LineBreakInline() override = default;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
A hyperlink.
Declared in <mrdocs/Metadata/DocComment/Inline/LinkInline.hpp>
struct LinkInline final
: InlineCommonBase<InlineKind::Link>
, InlineContainer
Syntax:
@link https://example.com label @endlink
Or with markdown syntax:
[link text](URL)
[link text](URL "title")
Or:
<a href="https://www.example.com">Visit Example.com</a>
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Link> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
LinkInline [constructor] | Constructors |
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
href | Destination of the hyperlink. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Constructors
Declared in <mrdocs/Metadata/DocComment/Inline/LinkInline.hpp>
Construct an empty link.
constexpr
LinkInline() = default;
» more...
Construct a link with display text and target.
LinkInline(
std::string_view text,
std::string_view href);
» more...
| Name | Description |
|---|---|
| text | Link text to display. |
| href | Destination URI. |
Construct an empty link.
Declared in <mrdocs/Metadata/DocComment/Inline/LinkInline.hpp>
constexpr
LinkInline() = default;
Construct a link with display text and target.
Declared in <mrdocs/Metadata/DocComment/Inline/LinkInline.hpp>
LinkInline(
std::string_view text,
std::string_view href);
| Name | Description |
|---|---|
| text | Link text to display. |
| href | Destination URI. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Destination of the hyperlink.
Declared in <mrdocs/Metadata/DocComment/Inline/LinkInline.hpp>
std::string href;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
A list of list items
Declared in <mrdocs/Metadata/DocComment/Block/ListBlock.hpp>
struct ListBlock final
: BlockCommonBase<BlockKind::List>
Syntax:
- item one
- item two
Unordered list:
- Item 1
- Item 2
- Nested item 2.1
- Nested item 2.2
Item 3
+ Item 4
Ordered list:
1. First item
2. Second item
1. Nested ordered item 2.1
2. Nested ordered item 2.2
3. Third item
Task lists (Checklists):
- [x] Completed task
- [ ] Pending task
- [x] Another completed task
Definition Lists (DefinitionListBlock)
Term 1
: Definition of Term 1
Term 2
: Definition of Term 2
: Another definition for Term 2
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::List> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
items | Items contained in the list. |
listKind | Display style for the list. |
| Name |
|---|
kind_id |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Items contained in the list.
Declared in <mrdocs/Metadata/DocComment/Block/ListBlock.hpp>
std::vector<ListItem> items;
Display style for the list.
Declared in <mrdocs/Metadata/DocComment/Block/ListBlock.hpp>
ListKind listKind = ListKind::Unordered;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
An item in a ListBlock
Declared in <mrdocs/Metadata/DocComment/Block/ListItem.hpp>
struct ListItem final
: BlockContainer
| Name | Description |
|---|---|
BlockContainer | A composite block that stores a sequence of child blocks. |
| Name | Description |
|---|---|
asBlockContainer | asBlockContainer overloads |
| Name | Description |
|---|---|
blocks | Child blocks contained within this composite block. |
A block of LaTeX math
Declared in <mrdocs/Metadata/DocComment/Block/MathBlock.hpp>
struct MathBlock final
: BlockCommonBase<BlockKind::Math>
A block of LaTeX math, typically between or fenced with "math".
On a new line:
$$ \int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi} $$
Or as a code block:
```math
\int_{-\infty}^{\infty} e^{-x^2} dx = \sqrt{\pi}
```
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Math> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
MathBlock [constructor] | Copy-construct a math block. |
operator= | Copy-assign a math block. |
| Name | Description |
|---|---|
literal | Raw TeX math source |
| Name |
|---|
kind_id |
Copy-construct a math block.
Declared in <mrdocs/Metadata/DocComment/Block/MathBlock.hpp>
constexpr
MathBlock(MathBlock const& other) = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Copy-assign a math block.
Declared in <mrdocs/Metadata/DocComment/Block/MathBlock.hpp>
constexpr
MathBlock&
operator=(MathBlock const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Raw TeX math source
Declared in <mrdocs/Metadata/DocComment/Block/MathBlock.hpp>
std::string literal;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
An inline LaTeX math expression
Declared in <mrdocs/Metadata/DocComment/Inline/MathInline.hpp>
struct MathInline
: InlineCommonBase<InlineKind::Math>
Inline LaTeX math, typically between .
Syntax:
$2 + 2 = 4$ or $x_{i+1}^2$
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Math> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
MathInline [constructor] | Constructors |
~MathInline [destructor] [virtual] | Virtual destructor for inline hierarchy. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
literal | Raw LaTeX/TeX math content. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
Constructors
Declared in <mrdocs/Metadata/DocComment/Inline/MathInline.hpp>
Construct an empty math inline.
constexpr
MathInline() noexcept = default;
» more...
Construct a math inline from source text.
explicit
MathInline(std::string string_) noexcept;
» more...
Construct an empty math inline.
Declared in <mrdocs/Metadata/DocComment/Inline/MathInline.hpp>
constexpr
MathInline() noexcept = default;
Construct a math inline from source text.
Declared in <mrdocs/Metadata/DocComment/Inline/MathInline.hpp>
explicit
MathInline(std::string string_) noexcept;
| Name | Description |
|---|---|
| string_ | The object to construct from |
Virtual destructor for inline hierarchy.
Declared in <mrdocs/Metadata/DocComment/Inline/MathInline.hpp>
constexpr
virtual
~MathInline() override = default;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Raw LaTeX/TeX math content.
Declared in <mrdocs/Metadata/DocComment/Inline/MathInline.hpp>
std::string literal;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
A sequence of text nodes.
Declared in <mrdocs/Metadata/DocComment/Block/ParagraphBlock.hpp>
struct ParagraphBlock
: BlockCommonBase<BlockKind::Paragraph>
, InlineContainer
Syntax:
Plain paragraph text.
Another paragraph.
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Paragraph> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
ParagraphBlock [constructor] | Construct an empty paragraph. |
~ParagraphBlock [destructor] [virtual] | Virtual destructor for the polymorphic block hierarchy. |
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Construct an empty paragraph.
Declared in <mrdocs/Metadata/DocComment/Block/ParagraphBlock.hpp>
constexpr
ParagraphBlock() noexcept = default;
Virtual destructor for the polymorphic block hierarchy.
Declared in <mrdocs/Metadata/DocComment/Block/ParagraphBlock.hpp>
constexpr
virtual
~ParagraphBlock() override = default;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Documentation for a function parameter
Declared in <mrdocs/Metadata/DocComment/Block/ParamBlock.hpp>
struct ParamBlock final
: BlockCommonBase<BlockKind::Param>
, InlineContainer
Syntax:
@param name description
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Param> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
ParamBlock [constructor] | Constructors |
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
direction | Direction (in/out/inout) of the parameter. |
name | Name of the parameter being documented. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
ParamBlock | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Constructors
Declared in <mrdocs/Metadata/DocComment/Block/ParamBlock.hpp>
Build from an existing inline container.
ParamBlock(InlineContainer const& other);
» more...
Build from an rvalue inline container.
ParamBlock(InlineContainer&& other) noexcept;
» more...
Construct from name, text, and direction.
ParamBlock(
std::string_view name,
std::string_view text,
ParamDirection direction = ParamDirection::none);
» more...
| Name | Description |
|---|---|
| name | Parameter identifier. |
| text | Description text. |
| direction | Flow direction of the parameter. |
Build from an existing inline container.
Declared in <mrdocs/Metadata/DocComment/Block/ParamBlock.hpp>
ParamBlock(InlineContainer const& other);
| Name | Description |
|---|---|
| other | The object to copy construct from |
Build from an rvalue inline container.
Declared in <mrdocs/Metadata/DocComment/Block/ParamBlock.hpp>
ParamBlock(InlineContainer&& other) noexcept;
| Name | Description |
|---|---|
| other | The object to move construct from |
Construct from name, text, and direction.
Declared in <mrdocs/Metadata/DocComment/Block/ParamBlock.hpp>
ParamBlock(
std::string_view name,
std::string_view text,
ParamDirection direction = ParamDirection::none);
| Name | Description |
|---|---|
| name | Parameter identifier. |
| text | Description text. |
| direction | Flow direction of the parameter. |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Direction (in/out/inout) of the parameter.
Declared in <mrdocs/Metadata/DocComment/Block/ParamBlock.hpp>
ParamDirection direction = ParamDirection::none;
Name of the parameter being documented.
Declared in <mrdocs/Metadata/DocComment/Block/ParamBlock.hpp>
std::string name;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/ParamBlock.hpp>
using InlineContainer::ParamBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
Text describing conditions guaranteed on successful exit.
Declared in <mrdocs/Metadata/DocComment/Block/PostconditionBlock.hpp>
struct PostconditionBlock
: BlockCommonBase<BlockKind::Postcondition>
, InlineContainer
Syntax:
@post condition
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Postcondition> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
PostconditionBlock | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/PostconditionBlock.hpp>
using InlineContainer::PostconditionBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
Text describing required conditions before entry.
Declared in <mrdocs/Metadata/DocComment/Block/PreconditionBlock.hpp>
struct PreconditionBlock final
: BlockCommonBase<BlockKind::Precondition>
, InlineContainer
Syntax:
@pre condition
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Precondition> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
PreconditionBlock | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/PreconditionBlock.hpp>
using InlineContainer::PreconditionBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
A quoted block of text.
Declared in <mrdocs/Metadata/DocComment/Block/QuoteBlock.hpp>
struct QuoteBlock final
: BlockCommonBase<BlockKind::Quote>
, BlockContainer
Syntax:
> quoted text
Multi-line quotes:
> This is the first line of a multi-line quote.
> This is the second line.
> And this is the third.
Nested quotes:
> This is the outer quote.
>
> > This is a nested quote within the outer quote.
> >
> > > This is a further nested quote.
Quotes with other markdown elements:
> ### Important Note
>
> - This blockquote contains a heading.
> - And a list item.
>
> *Emphasis* and **strong emphasis** also work within blockquotes.
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Quote> | Base class for providing variant discriminator functions. |
BlockContainer | A composite block that stores a sequence of child blocks. |
| Name | Description |
|---|---|
asBlockContainer | asBlockContainer overloads |
| Name | Description |
|---|---|
blocks | Child blocks contained within this composite block. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text elements |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text elements |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
A reference to a symbol.
Declared in <mrdocs/Metadata/DocComment/Inline/ReferenceInline.hpp>
struct ReferenceInline
: InlineCommonBase<InlineKind::Reference>
Syntax:
@ref target "label"
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Reference> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
ReferenceInline [constructor] | Construct a reference with optional display text. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
id | Symbol being referenced. |
literal | Display text of the reference. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
Construct a reference with optional display text.
Declared in <mrdocs/Metadata/DocComment/Inline/ReferenceInline.hpp>
explicit
ReferenceInline(std::string str = {}) noexcept;
| Name | Description |
|---|---|
| str | The object to construct from |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Symbol being referenced.
Declared in <mrdocs/Metadata/DocComment/Inline/ReferenceInline.hpp>
SymbolID id = = SymbolID::invalid;
Display text of the reference.
Declared in <mrdocs/Metadata/DocComment/Inline/ReferenceInline.hpp>
std::string literal;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
Documentation for a function return type
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
struct ReturnsBlock final
: BlockCommonBase<BlockKind::Returns>
, InlineContainer
Syntax:
@return description
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Returns> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
ReturnsBlock [constructor] | Constructors |
~ReturnsBlock [destructor] [virtual] | Virtual destructor for polymorphic base. |
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
ReturnsBlock | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Constructors
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
Copy constructor.
constexpr
ReturnsBlock(ReturnsBlock const& other) = default;
» more...
Move constructor.
constexpr
ReturnsBlock(ReturnsBlock&& other) noexcept = default;
» more...
Construct from inline content (copy).
ReturnsBlock(InlineContainer const& other);
» more...
Construct from inline content (move).
ReturnsBlock(InlineContainer&& other) noexcept;
» more...
Copy constructor.
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
constexpr
ReturnsBlock(ReturnsBlock const& other) = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Move constructor.
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
constexpr
ReturnsBlock(ReturnsBlock&& other) noexcept = default;
| Name | Description |
|---|---|
| other | The object to move construct from |
Construct from inline content (copy).
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
ReturnsBlock(InlineContainer const& other);
| Name | Description |
|---|---|
| other | The object to copy construct from |
Construct from inline content (move).
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
ReturnsBlock(InlineContainer&& other) noexcept;
| Name | Description |
|---|---|
| other | The object to move construct from |
Virtual destructor for polymorphic base.
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
constexpr
virtual
~ReturnsBlock() override = default;
Assignment operators
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Copy-assign child nodes.
constexpr
InlineContainer&
operator=(InlineContainer const& other) = default;
» more...
Copy assignment.
constexpr
ReturnsBlock&
operator=(ReturnsBlock const& other) = default;
» more...
Move-assign child nodes.
constexpr
InlineContainer&
operator=(InlineContainer&& other) noexcept = default;
» more...
Move assignment.
constexpr
ReturnsBlock&
operator=(ReturnsBlock&& other) noexcept = default;
» more...
Assign an InlineContainer with a single TextInline child.
InlineContainer&
operator=(std::string_view text);
» more...
Copy-assign child nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer&
operator=(InlineContainer const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Copy assignment.
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
constexpr
ReturnsBlock&
operator=(ReturnsBlock const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move-assign child nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr
InlineContainer&
operator=(InlineContainer&& other) noexcept = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Move assignment.
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
constexpr
ReturnsBlock&
operator=(ReturnsBlock&& other) noexcept = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Assign an InlineContainer with a single TextInline child.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
InlineContainer&
operator=(std::string_view text);
Reference to the current object
| Name | Description |
|---|---|
| text | The object to assign from |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/ReturnsBlock.hpp>
using InlineContainer::ReturnsBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
A
Declared in <mrdocs/Metadata/DocComment/Block/SeeBlock.hpp>
struct SeeBlock final
: BlockCommonBase<BlockKind::See>
, InlineContainer
Syntax:
@see other_symbol
or
@see AnotherFunction()
@see MyClass::calculateSomething()
@see MyFile.h
@see "The Doxygen Manual"
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::See> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
SeeBlock | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
paragraph listing related symbols or references.
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/SeeBlock.hpp>
using InlineContainer::SeeBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
A line break that may render as a space
Declared in <mrdocs/Metadata/DocComment/Inline/SoftBreakInline.hpp>
struct SoftBreakInline
: InlineCommonBase<InlineKind::SoftBreak>
Syntax:
This is the first part of a line,
and this is the continuation on the next line.
Placing a backslash () at the end of a line, followed by a new line, can also create a soft line break. This method is often preferred because it is less susceptible to space-trimming issues.
This is the first part of a line,\
and this is the continuation on the next line.
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::SoftBreak> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
SoftBreakInline [constructor] | Construct a soft line break node. |
~SoftBreakInline [destructor] [virtual] | Virtual destructor for inline hierarchy. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
Construct a soft line break node.
Declared in <mrdocs/Metadata/DocComment/Inline/SoftBreakInline.hpp>
constexpr
SoftBreakInline() noexcept = default;
Virtual destructor for inline hierarchy.
Declared in <mrdocs/Metadata/DocComment/Inline/SoftBreakInline.hpp>
constexpr
virtual
~SoftBreakInline() override = default;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
Strikethrough span to show removed or deprecated text.
Declared in <mrdocs/Metadata/DocComment/Inline/StrikethroughInline.hpp>
struct StrikethroughInline final
: InlineCommonBase<InlineKind::Strikethrough>
, InlineContainer
Syntax:
~~crossed out~~
When rendered to HTML, the Markdown syntax above typically translates into the del tag, which represents content that has been deleted or is no longer accurate.
<del>This text is struck through.</del>
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Strikethrough> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
Strong emphasis span (typically rendered in bold).
Declared in <mrdocs/Metadata/DocComment/Inline/StrongInline.hpp>
struct StrongInline final
: InlineCommonBase<InlineKind::Strong>
, InlineContainer
Syntax:
@b bold
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Strong> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
StrongInline | Inherit text container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
Inherit text container constructors.
Declared in <mrdocs/Metadata/DocComment/Inline/StrongInline.hpp>
using InlineContainer::StrongInline;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
Subscript text fragment (lowered baseline).
Declared in <mrdocs/Metadata/DocComment/Inline/SubscriptInline.hpp>
struct SubscriptInline final
: InlineCommonBase<InlineKind::Subscript>
, InlineContainer
Syntax:
H~2~O
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Subscript> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
Superscript text fragment (raised baseline).
Declared in <mrdocs/Metadata/DocComment/Inline/SuperscriptInline.hpp>
struct SuperscriptInline final
: InlineCommonBase<InlineKind::Superscript>
, InlineContainer
Syntax:
x^2^
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Superscript> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Get the plain text representation of an inline element tree. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
Documentation for a template parameter
Declared in <mrdocs/Metadata/DocComment/Block/TParamBlock.hpp>
struct TParamBlock final
: BlockCommonBase<BlockKind::TParam>
, InlineContainer
Syntax:
@tparam T description
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::TParam> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
name | Template parameter name. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
TParamBlock | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Template parameter name.
Declared in <mrdocs/Metadata/DocComment/Block/TParamBlock.hpp>
std::string name;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/TParamBlock.hpp>
using InlineContainer::TParamBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
A table block
Declared in <mrdocs/Metadata/DocComment/Block/TableBlock.hpp>
struct TableBlock final
: BlockCommonBase<BlockKind::Table>
Syntax:
| Header 1 | Header 2 | Header 3 |
| :------- | :------: | -------: |
| Left | Center | Right |
| Cell 1A | Cell 1B | Cell 1C |
| Cell 2A | Cell 2B | Cell 2C |
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Table> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
Alignments | Column alignments for each table column. |
items | Rows that make up the table body (header first when present). |
| Name |
|---|
kind_id |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Column alignments for each table column.
Declared in <mrdocs/Metadata/DocComment/Block/TableBlock.hpp>
std::vector<TableAlignmentKind> Alignments;
Rows that make up the table body (header first when present).
Declared in <mrdocs/Metadata/DocComment/Block/TableBlock.hpp>
std::vector<TableRow> items;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
A cell in a table
Declared in <mrdocs/Metadata/DocComment/Block/TableCell.hpp>
struct TableCell final
: InlineContainer
| Name | Description |
|---|---|
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
An item in a list
Declared in <mrdocs/Metadata/DocComment/Block/TableRow.hpp>
struct TableRow final
| Name | Description |
|---|---|
Cells | Cells contained in the row. |
is_header | True if this row represents a header. |
Cells contained in the row.
Declared in <mrdocs/Metadata/DocComment/Block/TableRow.hpp>
std::vector<TableCell> Cells;
True if this row represents a header.
Declared in <mrdocs/Metadata/DocComment/Block/TableRow.hpp>
bool is_header = false;
A Node containing a string of text.
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
struct TextInline
: InlineCommonBase<InlineKind::Text>
There will be no newlines in the text. Otherwise, this would be represented as multiple text nodes within a Paragraph node.
Syntax:
plain text
| Name | Description |
|---|---|
InlineCommonBase<InlineKind::Text> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
TextInline [constructor] | Constructors |
~TextInline [destructor] [virtual] | Virtual destructor for the inline hierarchy. |
| Name |
|---|
isCode |
isCopyDetails |
isEmph |
isFootnoteReference |
isHighlight |
isImage |
isLineBreak |
isLink |
isMath |
isReference |
isSoftBreak |
isStrikethrough |
isStrong |
isSubscript |
isSuperscript |
isText |
| Name | Description |
|---|---|
literal | Plain text carried by this inline node. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
getAsPlainText | Get the plain text representation of an inline element tree. |
getAsPlainText | Get the plain text representation of an inline element tree. |
Constructors
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
Construct an empty text inline.
constexpr
TextInline() noexcept = default;
» more...
Construct from a string view.
explicit
TextInline(std::string_view str) noexcept;
» more...
Construct from a string copy.
explicit
TextInline(std::string const& str) noexcept;
» more...
Construct by moving text storage.
explicit
TextInline(std::string&& str) noexcept;
» more...
Construct from a C string.
explicit
TextInline(char const* str) noexcept;
» more...
Construct an empty text inline.
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
constexpr
TextInline() noexcept = default;
Construct from a string view.
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
explicit
TextInline(std::string_view str) noexcept;
| Name | Description |
|---|---|
| str | The object to construct from |
Construct from a string copy.
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
explicit
TextInline(std::string const& str) noexcept;
| Name | Description |
|---|---|
| str | The object to copy construct from |
Construct by moving text storage.
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
explicit
TextInline(std::string&& str) noexcept;
| Name | Description |
|---|---|
| str | The object to move construct from |
Construct from a C string.
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
explicit
TextInline(char const* str) noexcept;
| Name | Description |
|---|---|
| str | The value to construct from |
Virtual destructor for the inline hierarchy.
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
constexpr
virtual
~TextInline() override = default;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isCopyDetails() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isEmph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isFootnoteReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isHighlight() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isImage() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLineBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isLink() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isReference() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSoftBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrikethrough() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isStrong() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSubscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isSuperscript() noexcept;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineNodes.inc>
constexpr
static
bool
isText() noexcept;
Plain text carried by this inline node.
Declared in <mrdocs/Metadata/DocComment/Inline/TextInline.hpp>
std::string literal;
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
constexpr static
InlineKind kind_id;
A horizontal thematic break separating sections.
Declared in <mrdocs/Metadata/DocComment/Block/ThematicBreakBlock.hpp>
struct ThematicBreakBlock final
: BlockCommonBase<BlockKind::ThematicBreak>
Syntax:
---
or
**
or
___
or
- - -
You can use an asterisk (), dash (-), or underscore ().
There must be at least three characters in a row.
Spaces can be used between the characters, but no other characters.
The thematic break should be on its own line, separated by blank lines above and below.
Thematic breaks can also be used inside lists, but the character used for the break must be different from the list marker.
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::ThematicBreak> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
ThematicBreakBlock [constructor] | Copy constructor. |
operator= | Copy assignment. |
| Name |
|---|
kind_id |
Copy constructor.
Declared in <mrdocs/Metadata/DocComment/Block/ThematicBreakBlock.hpp>
constexpr
ThematicBreakBlock(ThematicBreakBlock const& other) = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Copy assignment.
Declared in <mrdocs/Metadata/DocComment/Block/ThematicBreakBlock.hpp>
constexpr
ThematicBreakBlock&
operator=(ThematicBreakBlock const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Documentation for a function exception clause
Declared in <mrdocs/Metadata/DocComment/Block/ThrowsBlock.hpp>
struct ThrowsBlock final
: BlockCommonBase<BlockKind::Throws>
, InlineContainer
Syntax:
@throws Type description
| Name | Description |
|---|---|
BlockCommonBase<BlockKind::Throws> | Base class for providing variant discriminator functions. |
InlineContainer | An internal node in the inline element tree. |
| Name | Description |
|---|---|
operator= | Assignment operators |
append | append overloads |
asInlineContainer | Return this container as a base-class reference. |
back | Get the last inline child. |
begin | Begin iterator forwarding to children. |
clear | Clear all inline children. |
emplace_back | Append a child of the specified type in-place. |
empty | Determine if there are no inline children. |
end | End iterator forwarding to children. |
erase | Erase inline children. |
front | Get the first inline child. |
insert | Insert inline children. |
operator+= | Addition assignment operators |
size | Get the number of inline children. |
| Name | Description |
|---|---|
children | Child inline elements contained here. |
exception | Exception type being described. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
ThrowsBlock | Inherit inline container constructors. |
| Name | Description |
|---|---|
getAsPlainText | Flatten an InlineContainer to plain text. |
getAsPlainText | Flatten an InlineContainer to plain text. |
isEmpty | Determine if the inline is empty |
ltrim | Removes leading whitespace from the first text element in the given InlineContainer. |
ltrim | Removes leading whitespace from the block. |
rtrim | Removes trailing whitespace from the last text element in the given InlineContainer. |
rtrim | Removes trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the block. |
trim | Removes leading and trailing whitespace from the text elements in the given InlineContainer. |
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isAdmonition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isBrief() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isCode() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isDefinitionList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isFootnoteDefinition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isHeading() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isList() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isMath() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isParagraph() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPostcondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isPrecondition() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isQuote() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isReturns() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isSee() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isTParam() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isTable() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockNodes.inc>
constexpr
static
bool
isThematicBreak() noexcept;
Declared in <mrdocs/Metadata/DocComment/Block/BlockCommandNodes.inc>
constexpr
static
bool
isThrows() noexcept;
Exception type being described.
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
constexpr static
BlockKind kind_id;
Inherit inline container constructors.
Declared in <mrdocs/Metadata/DocComment/Block/ThrowsBlock.hpp>
using InlineContainer::ThrowsBlock;
| Name | Description |
|---|---|
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Construct an InlineContainer with a single TextInline child. |
InlineContainer [constructor] | Move-construct child nodes. |
InlineContainer [constructor] | Copy-construct all child nodes. |
An admonishment style.
Declared in <mrdocs/Metadata/DocComment/Block/AdmonitionKind.hpp>
enum class AdmonitionKind : int;
| Name | Description |
|---|---|
none | No admonishment |
note | A general note |
tip | A tip to the reader |
important | Something important |
caution | A caution admonishment |
warning | A warning admonishment |
| Name | Description |
|---|---|
toString | Return the name of the Admonish as a string. |
Enumerates the different kinds of DocComment blocks.
Declared in <mrdocs/Metadata/DocComment/Block/BlockKind.hpp>
enum class BlockKind : int;
| Name | Description |
|---|---|
isBlockCommand | Return true if the given block kind represents a command block. |
toString | Convert a block kind to its kebab-case string name. |
Enumerates the different kinds of inline nodes.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineKind.hpp>
enum class InlineKind : int;
| Name | Description |
|---|---|
toString | Convert an inline kind to its kebab-case string. |
Parameter pass direction.
Declared in <mrdocs/Metadata/DocComment/Block/ParamDirection.hpp>
enum class ParamDirection : int;
| Name | Description |
|---|---|
none | No direction specified |
in | Parameter is passed |
out | Parameter is passed back to the caller |
inout | Parameter is passed and passed back to the caller |
| Name | Description |
|---|---|
toString | Return the name of the ParamDirection as a string. |
Which parts of the documentation to copy.
Declared in <mrdocs/Metadata/DocComment/Inline/Parts.hpp>
enum class Parts : int;
all: copy the brief and the description.
brief: only copy the brief.
description: only copy the description.
| Name | Description |
|---|---|
all | Copy the brief and the description |
brief | Copy the brief |
description | Copy the description |
| Name | Description |
|---|---|
toString | Return the name of the Parts as a string. |
getAsPlainText overloads
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
Get the plain text representation of an inline element tree.
std::string
getAsPlainText(doc::Inline const& in);
» more...
Flatten an InlineContainer to plain text.
std::string
getAsPlainText(doc::InlineContainer const& in);
» more...
Get the plain text representation of an inline element tree.
void
getAsPlainText(
doc::Inline const& in,
std::string& dst);
» more...
Flatten an InlineContainer to plain text.
void
getAsPlainText(
doc::InlineContainer const& in,
std::string& dst);
» more...
The flattened plain text.
| Name | Description |
|---|---|
| in | The input inline element. |
| dst | The output string to append to. |
Get the plain text representation of an inline element tree.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
std::string
getAsPlainText(doc::Inline const& in);
This strips all formatting and returns just the text content.
The flattened plain text.
| Name | Description |
|---|---|
| in | The input inline element. |
Flatten an InlineContainer to plain text.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
std::string
getAsPlainText(doc::InlineContainer const& in);
This concatenates all text nodes, ignoring formatting.
The flattened plain text.
| Name | Description |
|---|---|
| in | The InlineContainer to flatten. |
Get the plain text representation of an inline element tree.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
void
getAsPlainText(
doc::Inline const& in,
std::string& dst);
This strips all formatting and returns just the text content.
the plain text representation of an inline element tree.
| Name | Description |
|---|---|
| in | The input inline element. |
| dst | The output string to append to. |
Flatten an InlineContainer to plain text.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
void
getAsPlainText(
doc::InlineContainer const& in,
std::string& dst);
This concatenates all text nodes, ignoring formatting.
| Name | Description |
|---|---|
| in | The InlineContainer to flatten. |
| dst | The output string to append to. |
Return true if the given block kind represents a command block.
Declared in <mrdocs/Metadata/DocComment/Block/BlockKind.hpp>
constexpr
bool
isBlockCommand(BlockKind k) noexcept;
true if the given block kind represents a command block.
| Name | Description |
|---|---|
| k | Enumerates the different kinds of DocComment blocks. |
Determine if the inline is empty
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
Determine if the inline is empty
bool
isEmpty(Block const& el);
» more...
Determine if the inline is empty
bool
isEmpty(Polymorphic<Block> const& el);
» more...
Determine if the inline is empty
bool
isEmpty(Polymorphic<Inline> const& el);
» more...
Determine if the inline is empty
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
bool
isEmpty(Block const& el);
if the inline is empty
| Name | Description |
|---|---|
| el | A piece of block content |
Determine if the inline is empty
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
bool
isEmpty(Polymorphic<Block> const& el);
if the inline is empty
| Name | Description |
|---|---|
| el | A polymorphic value-type. |
Determine if the inline is empty
Declared in <mrdocs/Metadata/DocComment/Inline.hpp>
bool
isEmpty(Polymorphic<Inline> const& el);
This determines if the inline is considered to have no content for the purposes of trimming.
if the inline is empty
| Name | Description |
|---|---|
| el | A polymorphic value-type. |
ltrim overloads
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
Removes leading whitespace from the block.
void
ltrim(Block& el);
» more...
Removes leading whitespace from the first text elements
void
ltrim(BlockContainer& blocks);
» more...
Removes leading whitespace from the first text element in the given InlineContainer.
void
ltrim(InlineContainer& inlines);
» more...
Removes leading whitespace from the block.
void
ltrim(Polymorphic<Block>& el);
» more...
Removes leading whitespace from the inline element.
void
ltrim(Polymorphic<Inline>& el);
» more...
void
| Name | Description |
|---|---|
| el | The Block to trim. |
| blocks | The BlockContainer to trim. |
| inlines | The InlineContainer to trim. |
Removes leading whitespace from the block.
void
| Name | Description |
|---|---|
| el | The Block to trim. |
Removes leading whitespace from the first text elements
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
void
ltrim(BlockContainer& blocks);
void
| Name | Description |
|---|---|
| blocks | The BlockContainer to trim. |
Removes leading whitespace from the first text element in the given InlineContainer.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
void
ltrim(InlineContainer& inlines);
void
| Name | Description |
|---|---|
| inlines | The InlineContainer to trim. |
Removes leading whitespace from the block.
void
| Name | Description |
|---|---|
| el | The Polymorphic<Block> to trim. |
Removes leading whitespace from the inline element.
void
| Name | Description |
|---|---|
| el | The Polymorphic<Inline> to trim. |
rtrim overloads
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
Removes trailing whitespace from the block.
void
rtrim(Block& el);
» more...
Removes trailing whitespace from the last text elements
void
rtrim(BlockContainer& blocks);
» more...
Removes trailing whitespace from the last text element in the given InlineContainer.
void
rtrim(InlineContainer& inlines);
» more...
Removes trailing whitespace from the block.
void
rtrim(Polymorphic<Block>& el);
» more...
Removes trailing whitespace from the inline element.
void
rtrim(Polymorphic<Inline>& el);
» more...
void
| Name | Description |
|---|---|
| el | The Block to trim. |
| blocks | The BlockContainer to trim. |
| inlines | The InlineContainer to trim. |
Removes trailing whitespace from the block.
void
| Name | Description |
|---|---|
| el | The Block to trim. |
Removes trailing whitespace from the last text elements
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
void
rtrim(BlockContainer& blocks);
void
| Name | Description |
|---|---|
| blocks | The BlockContainer to trim. |
Removes trailing whitespace from the last text element in the given InlineContainer.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
void
rtrim(InlineContainer& inlines);
void
| Name | Description |
|---|---|
| inlines | The InlineContainer to trim. |
Removes trailing whitespace from the block.
void
| Name | Description |
|---|---|
| el | The Polymorphic<Block> to trim. |
Removes trailing whitespace from the inline element.
void
| Name | Description |
|---|---|
| el | The Polymorphic<Inline> to trim. |
tag_invoke overloads
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
Return the ParamDirection from a dom::Value string.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ParamDirection const kind);
» more...
Return the Parts from a dom::Value string.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Parts const kind);
» more...
Map an optional polymorphic block into a DOM value, producing null when empty.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<Polymorphic<Block>> const& I,
DomCorpus const* domCorpus);
» more...
Map the Polymorphic Block as a dom::Value object.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<Block> const& I,
DomCorpus const* domCorpus);
» more...
Map an optional brief block to a DOM value, yielding null when absent.
void
tag_invoke(
mrdocs::dom::ValueFromTag,
mrdocs::dom::Value& v,
Optional<BriefBlock> const& I,
DomCorpus const* domCorpus);
» more...
Map the Polymorphic Block to a dom::Object.
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
Polymorphic<Block> const& I,
DomCorpus const* domCorpus);
» more...
Serialize a polymorphic inline node into a DOM value.
template<
class IO,
polymorphic_storage_for<Block> InlineTy>
void
tag_invoke(
dom::ValueFromTag,
IO& io,
InlineTy const& I,
DomCorpus const* domCorpus);
» more...
| Name | Description |
|---|---|
| v | Destination value. |
| I | Optional block to convert. |
| domCorpus | Corpus context for lazy resolution. |
| io | The output parameter to receive the dom::Object. |
Return the ParamDirection from a dom::Value string.
Declared in <mrdocs/Metadata/DocComment/Block/ParamDirection.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ParamDirection const kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Parameter pass direction. |
Return the Parts from a dom::Value string.
Declared in <mrdocs/Metadata/DocComment/Inline/Parts.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Parts const kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Which parts of the documentation to copy. |
Map an optional polymorphic block into a DOM value, producing null when empty.
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<Polymorphic<Block>> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | Destination value. |
| I | Optional block to convert. |
| domCorpus | Corpus context for lazy resolution. |
Map the Polymorphic Block as a dom::Value object.
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<Block> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | The output parameter to receive the dom::Value. |
| I | The polymorphic Block to convert. |
| domCorpus | The DomCorpus used to resolve references. |
Map an optional brief block to a DOM value, yielding null when absent.
Declared in <mrdocs/Metadata/DocComment/Block/BriefBlock.hpp>
void
tag_invoke(
mrdocs::dom::ValueFromTag,
mrdocs::dom::Value& v,
Optional<BriefBlock> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | Destination value. |
| I | Optional brief block to convert. |
| domCorpus | Corpus context for lazy references. |
Map the Polymorphic Block to a dom::Object.
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
Polymorphic<Block> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The output parameter to receive the dom::Object. |
| I | The polymorphic Block to convert. |
| domCorpus | The DomCorpus used to resolve references. |
Serialize a polymorphic inline node into a DOM value.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
template<
class IO,
polymorphic_storage_for<Block> InlineTy>
void
tag_invoke(
dom::ValueFromTag,
IO& io,
InlineTy const& I,
DomCorpus const* domCorpus);
Map the Polymorphic Inline as a dom::Value object.
Convert a polymorphic block storage into a DOM value.
| Name | Description |
|---|---|
| io | Destination value. |
| I | Inline storage to convert. |
| domCorpus | Corpus context for lazy references. |
toString overloads
Declared in <mrdocs/Metadata/DocComment/Block/AdmonitionKind.hpp>
Return the name of the Admonish as a string.
dom::String
toString(AdmonitionKind kind) noexcept;
» more...
Convert a block kind to its kebab-case string name.
dom::String
toString(BlockKind kind) noexcept;
» more...
Convert an inline kind to its kebab-case string.
dom::String
toString(InlineKind kind) noexcept;
» more...
Return the name of the ParamDirection as a string.
dom::String
toString(ParamDirection kind) noexcept;
» more...
Return the name of the Parts as a string.
dom::String
toString(Parts kind) noexcept;
» more...
Return the name of the Admonish as a string.
Declared in <mrdocs/Metadata/DocComment/Block/AdmonitionKind.hpp>
dom::String
toString(AdmonitionKind kind) noexcept;
the name of the Admonish as a string.
| Name | Description |
|---|---|
| kind | An admonishment style. |
Convert a block kind to its kebab-case string name.
Declared in <mrdocs/Metadata/DocComment/Block/BlockKind.hpp>
dom::String
toString(BlockKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Enumerates the different kinds of DocComment blocks. |
Convert an inline kind to its kebab-case string.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineKind.hpp>
dom::String
toString(InlineKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Enumerates the different kinds of inline nodes. |
Return the name of the ParamDirection as a string.
Declared in <mrdocs/Metadata/DocComment/Block/ParamDirection.hpp>
dom::String
toString(ParamDirection kind) noexcept;
the name of the ParamDirection as a string.
| Name | Description |
|---|---|
| kind | Parameter pass direction. |
Return the name of the Parts as a string.
Declared in <mrdocs/Metadata/DocComment/Inline/Parts.hpp>
dom::String
toString(Parts kind) noexcept;
the name of the Parts as a string.
| Name | Description |
|---|---|
| kind | Which parts of the documentation to copy. |
Traverse a list of inlines.
Declared in <mrdocs/Metadata/DocComment/Inline.hpp>
template<
class F,
class T,
class... Args>
requires std::derived_from<T, Inline>
void
traverse(
std::vector<std::unique_ptr<T>> const& list,
F&& f,
Args&&... args);
| Name | Description |
|---|---|
| list | The list of texts to traverse. |
| f | The function to call for each text. |
| args | Additional arguments to pass to the function. |
trim overloads
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
Removes leading and trailing whitespace from the block.
void
trim(Block& el);
» more...
Removes leading and trailing whitespace from the text elements
void
trim(BlockContainer& blocks);
» more...
Removes leading and trailing whitespace from the text elements in the given InlineContainer.
void
trim(InlineContainer& inlines);
» more...
Removes leading and trailing whitespace from the block.
void
trim(Polymorphic<Block>& el);
» more...
Removes leading and trailing whitespace from the inline element.
void
trim(Polymorphic<Inline>& el);
» more...
void
| Name | Description |
|---|---|
| el | The Block to trim. |
| blocks | The BlockContainer to trim. |
| inlines | The InlineContainer to trim. |
Removes leading and trailing whitespace from the block.
void
| Name | Description |
|---|---|
| el | The Block to trim. |
Removes leading and trailing whitespace from the text elements
Declared in <mrdocs/Metadata/DocComment/Block/BlockBase.hpp>
void
trim(BlockContainer& blocks);
void
| Name | Description |
|---|---|
| blocks | The BlockContainer to trim. |
Removes leading and trailing whitespace from the text elements in the given InlineContainer.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
void
trim(InlineContainer& inlines);
void
| Name | Description |
|---|---|
| inlines | The InlineContainer to trim. |
Removes leading and trailing whitespace from the block.
void
| Name | Description |
|---|---|
| el | The Polymorphic<Block> to trim. |
Removes leading and trailing whitespace from the inline element.
void
| Name | Description |
|---|---|
| el | The Polymorphic<Inline> to trim. |
visit overloads
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
Visit a block.
template<
std::derived_from<Block> BlockTy,
class Fn,
class... Args>
decltype(auto)
visit(
BlockTy& info,
Fn&& fn,
Args&&... args);
» more...
Visit an inline.
template<
class InlineTy,
class Fn,
class... Args>
requires std::derived_from<InlineTy, Inline>
decltype(auto)
visit(
InlineTy& el,
Fn&& fn,
Args&&... args);
» more...
The result of calling the function.
| Name | Description |
|---|---|
| info | The block to visit. |
| fn | The function to call for each block. |
| args | Additional arguments to pass to the function. |
| el | The inline element to visit. |
Visit a block.
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
template<
std::derived_from<Block> BlockTy,
class Fn,
class... Args>
decltype(auto)
visit(
BlockTy& info,
Fn&& fn,
Args&&... args);
The result of calling the function.
| Name | Description |
|---|---|
| info | The block to visit. |
| fn | The function to call for each block. |
| args | Additional arguments to pass to the function. |
Visit an inline.
Declared in <mrdocs/Metadata/DocComment/Inline.hpp>
template<
class InlineTy,
class Fn,
class... Args>
requires std::derived_from<InlineTy, Inline>
decltype(auto)
visit(
InlineTy& el,
Fn&& fn,
Args&&... args);
The result of calling the function.
| Name | Description |
|---|---|
| el | The inline element to visit. |
| fn | The function to call for each inline. |
| args | Additional arguments to pass to the function. |
Equality delegates to the three-way comparison.
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
Equality delegates to the three-way comparison.
bool
operator==(
Polymorphic<Inline> const& lhs,
Polymorphic<Inline> const& rhs);
» more...
Equality delegates to the three-way comparison.
bool
operator==(
Polymorphic<Block> const& lhs,
Polymorphic<Block> const& rhs);
» more...
Equality delegates to the three-way comparison.
Declared in <mrdocs/Metadata/DocComment/Inline.hpp>
bool
operator==(
Polymorphic<Inline> const& lhs,
Polymorphic<Inline> const& rhs);
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Equality delegates to the three-way comparison.
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
bool
operator==(
Polymorphic<Block> const& lhs,
Polymorphic<Block> const& rhs);
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Three-way comparison operators
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
Three-way comparison for polymorphic inline elements.
std::strong_ordering
operator<=>(
Polymorphic<Inline> const& lhs,
Polymorphic<Inline> const& rhs);
» more...
Three-way comparison between polymorphic block wrappers.
std::strong_ordering
operator<=>(
Polymorphic<Block> const& lhs,
Polymorphic<Block> const& rhs);
» more...
Three-way comparison for polymorphic inline elements.
Declared in <mrdocs/Metadata/DocComment/Inline.hpp>
std::strong_ordering
operator<=>(
Polymorphic<Inline> const& lhs,
Polymorphic<Inline> const& rhs);
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Three-way comparison between polymorphic block wrappers.
Declared in <mrdocs/Metadata/DocComment/Block.hpp>
std::strong_ordering
operator<=>(
Polymorphic<Block> const& lhs,
Polymorphic<Block> const& rhs);
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Three-way comparison for any described type.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
using mrdocs::operator<=>;
Compares base classes first (in description order), then own members.
| Name | Description |
|---|---|
operator<=> | Three-way comparison operators |
Equality for any described type.
Declared in <mrdocs/Metadata/DocComment/Inline/InlineBase.hpp>
using mrdocs::operator==;
Needed because removing a defaulted member operator<=>() also removes the implicitly-generated operator==().
| Name | Description |
|---|---|
operator== | Equality operators |
Objects representing JSON-like values.
This class is a variant-like container for holding any kind of value that can be represented in JSON, with extensions for functions and "safe strings".
The class supports the following types:
Undefined
Null
Boolean
Integer
String
SafeString
Array
Object
Function
The class provides type-safe accessors for each type, as well as methods to check the type of the contained value.
Example:
{.cpp}
dom::Value v1 = 42; // Integer
dom::Value v2 = "Hello, World!"; // String
dom::Value v3 = dom::Array{v1, v2}; // Array
if (v1.isInteger())
{
std::cout << "v1 is an integer: " << v1.getInteger() << "\n";
}
if (v2.isString())
{
std::cout << "v2 is a string: " << v2.getString() << "\n";
}
if (v3.isArray())
{
std::cout << "v3 is an array with " << v3.getArray().size() << " elements.\n";
}
| Name | Description |
|---|---|
JSON | JSON serialization helpers for DOM values. |
| Name | Description |
|---|---|
Array | An array of values |
ArrayImpl | Abstract array interface. |
DefaultArrayImpl | The default array implementation. |
DefaultFunctionImpl | Function implementation that wraps a fixed-arity callable. |
DefaultObjectImpl | The default Object implementation. |
Function | Value-semantic wrapper over a callable exposed to the DOM layer. |
FunctionImpl | Value-semantic wrapper over a callable exposed to the DOM layer. |
LazyArrayImpl | Lazy array implementation |
LazyArrayImpl | Lazy array implementation |
LazyObjectImpl | Lazy object implementation. |
LazyObjectImpl | Lazy object implementation. |
LazyObjectMapTag | Customization point tag. |
Object | A container of key and value pairs. |
ObjectImpl | Abstract object interface. |
String | UTF-8 string value used by the DOM. |
Value | A variant container for any kind of Dom value. |
ValueFromTag | Customization point tag. |
VariadicFunctionImpl | Function implementation that forwards the entire Array to a callable. |
function_traits | Helper traits to extract return and argument types from callables. |
function_traits<F> | Traits specialization for functors/lambdas. |
function_traits<R(*)(Args...)> | Traits specialization for function pointers. |
function_traits<R(Args...)> | Traits specialization for free functions. |
function_traits<R const volatile(C::*)(Args...)> | Traits specialization for member functions. |
| Name | Description |
|---|---|
Kind | The type of data in a Value. |
| Name | Description |
|---|---|
LazyArray | LazyArray overloads |
LazyObject | LazyObject overloads |
TransformArray | Return a new dom::Array based on a transformed lazy array implementation. |
ValueFrom | ValueFrom overloads |
makeInvocable | Create a Function from a fixed-arity invocable. |
makeVariadicInvocable | Create a Function that receives the argument Array directly. |
newArray | Return a new array using a custom implementation. |
newFunction | Return a diagnostic string. |
newObject | Return a new object using a custom implementation. |
operator&& | Return the first dom::Value that is not truthy, or the last one. |
operator+ | Addition operators |
operator|| | Return the first dom::Value that is truthy, or the last one. |
stringOrNull | Return a non-empty string, or a null. |
swap | swap overloads |
toString | toString overloads |
operator== | Equality operators |
operator!= | Return the result of comparing two strings. |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
HasLazyObjectMap | Determine if T can be converted to dom::Value. |
HasLazyObjectMapWithContext | Concept to determine if a type can be mapped to a dom::LazyObjectImpl with a user-provided conversion. |
HasLazyObjectMapWithoutContext | Concept to determine if a type can be mapped to a dom::LazyObjectImpl with a user-provided conversion. |
HasStandaloneValueFrom | Determine if T can be converted to dom::Value without a context. |
HasValueFrom | Determine if T can be converted to dom::Value. |
HasValueFromWithContext | Concept to determine if a type can be converted to a dom::Value with a user-provided conversion. |
HasValueFromWithoutContext | Concept to determine if a type can be converted to a dom::Value with a user-provided conversion. |
StringLikeTy | Satisfied if StringTy is convertible to String but not a String. |
function_traits_convertible_to_value | Concept selecting callables convertible to dom::Value. |
has_function_args_for_default_function_impl | Concept requiring all arguments be convertible to dom::Value. |
has_function_traits | Concept true when function_traits is defined for F. |
has_function_traits_for_default_function_impl | Concept combining argument and return constraints for default wrapper. |
has_invoke_expected_result_convertible_to_dom_value | Concept true when F returns Expected<dom::Value> or Expected<void>. |
has_invoke_result_convertible_to_dom_value | Concept true when F returns a dom::Value or void. |
has_invoke_result_for_default_function_impl | Concept enabling default function wrapper for supported return types. |
JSON serialization helpers for DOM values.
This namespace wraps the platform JSON encoder/decoder behavior we emulate inside MrDocs so generators can round-trip DOM Value objects to text and back with predictable spacing, escaping, and cyclic-detection rules.
| Name | Description |
|---|---|
stringify | Stringify a value as JSON |
Stringify a value as JSON
This function serialized a Value to a string as if JSON.stringify() had been called on it.
Recursive objects are identified.
A string containing valid JSON.
| Name | Description |
|---|---|
| value | The value to stringify. |
An array of values
Declared in <mrdocs/Dom/Array.hpp>
class Array final
Arrays are a collection of indexed values. They are an extension of objects with a particular relationship between integer-keyed properties and some abstract length-property. Besides, they include convenient methods to manipulate these ordered sequences of values.
| Name | Description |
|---|---|
iterator | A constant iterator referencing an element in an Array. |
| Name | Description |
|---|---|
const_iterator | A constant iterator referencing an element in an Array. |
const_pointer | A pointer to an element. |
const_reference | A reference to an element. |
difference_type | A signed integral type. |
impl_type | The implementation type. |
pointer | A pointer to an element. |
reference | A reference to an element. |
size_type | An unsigned integral type used for indexes and sizes. |
storage_type | The type of storage used by the default implementation. |
value_type | The type of an element. |
| Name | Description |
|---|---|
Array [constructor] | Constructor. |
~Array [destructor] | Destructor. |
operator= | Assignment. |
at | Return the i-th element. |
back | Return the last element. |
begin | Return an iterator to the beginning of the range of elements. |
emplace_back | Append an element to the end of the array. |
empty | Return true if the array is empty. |
end | Return an iterator to the end of the range of elements. |
front | Return the first element. |
get | Return the i-th element, without bounds checking. |
impl | Return the implementation used by this object. |
push_back | Append an element to the end of the array. |
set | Set the i-th element, without bounds checking. |
size | Return the number of elements in the array. |
swap | Swap two arrays. |
type_key | Return the type key of the implementation. |
| Name | Description |
|---|---|
mrdocs::dom::newArray | Return a new array using a custom implementation. |
mrdocs::dom::toString | Return a diagnostic string. |
mrdocs::dom::operator<=> | Compare two arrays for precedence. |
mrdocs::dom::operator== | Compare two arrays for equality. |
mrdocs::dom::swap | Swap two arrays. |
mrdocs::dom::operator+ | |
mrdocs::dom::operator+ | |
mrdocs::dom::operator+ | Concatenate two arrays. |
| Name | Description |
|---|---|
LazyArray | Return a new dom::Array based on a FromValue context |
LazyArray | Return a new dom::Array based on a lazy array implementation. |
TransformArray | Return a new dom::Array based on a transformed lazy array implementation. |
::mrdocs::getParents | Return a list of the parent symbols of the specified Info. |
::mrdocs::helpers::and_fn | "and" helper function |
::mrdocs::helpers::eq_fn | "eq" helper function |
::mrdocs::helpers::ne_fn | "ne" helper function |
::mrdocs::helpers::not_fn | "not" helper function |
::mrdocs::helpers::or_fn | "or" helper function |
A constant iterator referencing an element in an Array.
A pointer to an element.
A reference to an element.
This is a read-only reference to an element.
A signed integral type.
Declared in <mrdocs/Dom/Array.hpp>
using difference_type = std::ptrdiff_t;
The implementation type.
Declared in <mrdocs/Dom/Array.hpp>
using impl_type = std::shared_ptr<ArrayImpl>;
A pointer to an element.
A reference to an element.
This is a read-only reference to an element.
An unsigned integral type used for indexes and sizes.
Declared in <mrdocs/Dom/Array.hpp>
using size_type = std::size_t;
The type of storage used by the default implementation.
Declared in <mrdocs/Dom/Array.hpp>
using storage_type = std::vector<value_type>;
The type of an element.
A constant iterator referencing an element in an Array.
Declared in <mrdocs/Dom/Array.hpp>
class iterator;
| Name | Description |
|---|---|
mrdocs::dom::operator+ | |
mrdocs::dom::Array | An array of values |
Constructor.
Declared in <mrdocs/Dom/Array.hpp>
Constructor.
Array();
» more...
Constructor.
Array(Array const& other);
» more...
Constructor.
Array(Array&& other);
» more...
Constructor.
Array(impl_type impl) noexcept;
» more...
Constructor.
Array(storage_type elements);
» more...
| Name | Description |
|---|---|
| elements | The elements to acquire. |
Constructor.
Declared in <mrdocs/Dom/Array.hpp>
Array();
Default-constructed arrays refer to a new, empty array which is distinct from every other empty array.
Constructor.
The newly constructed array will contain copies of the scalars in other, and references to its structured data.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Constructor.
Ownership of the contents is transferred to the new object. The moved-from array will behave as if default-constructed.
| Name | Description |
|---|---|
| other | The object to move construct from |
Constructor.
This constructs an array from an existing implementation, with shared ownership. The pointer cannot not be null.
| Name | Description |
|---|---|
| impl | The object to construct from |
Constructor.
Upon construction, the array will retain ownership of a shallow copy of the specified elements. In particular, dynamic objects will be acquired with shared ownership.
| Name | Description |
|---|---|
| elements | The elements to acquire. |
Destructor.
Declared in <mrdocs/Dom/Array.hpp>
~Array();
Assignment.
Assignment.
Declared in <mrdocs/Dom/Array.hpp>
constexpr
Array&
operator=(Array const& other) = default;
This acquires shared ownership of the copied array, and ownership of the previous contents is released.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Assignment.
Ownership of the array is transferred to this, and ownership of the previous contents is released. The moved-from array behaves as if default constructed.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Return the i-th element.
| Name | Thrown on |
|---|---|
Exception | i >= size() |
the i-th element.
| Name | Description |
|---|---|
| i | An unsigned integral type used for indexes and sizes. |
Return an iterator to the beginning of the range of elements.
an iterator to the beginning of the range of elements.
Append an element to the end of the array.
Declared in <mrdocs/Dom/Array.hpp>
template<class... Args>
void
emplace_back(Args&&... args);
If the array is read-only, an exception is thrown.
| Name | Description |
|---|---|
| args | Arguments forwarded to the constructor of Value. |
Return true if the array is empty.
Declared in <mrdocs/Dom/Array.hpp>
bool
empty() const noexcept;
true if the array is empty.
Return an iterator to the end of the range of elements.
an iterator to the end of the range of elements.
Return the i-th element, without bounds checking.
the i-th element, without bounds checking.
| Name | Description |
|---|---|
| i | The zero-based index of the element. |
Return the implementation used by this object.
the implementation used by this object.
Append an element to the end of the array.
If the array is read-only, an exception is thrown.
| Name | Description |
|---|---|
| value | The type of an element. |
Set the i-th element, without bounds checking.
| Name | Description |
|---|---|
| i | The zero-based index of the element. |
| v | The value to set. |
Return the number of elements in the array.
the number of elements in the array.
Swap two arrays.
| Name | Description |
|---|---|
| other | An array of values |
Return the type key of the implementation.
Declared in <mrdocs/Dom/Array.hpp>
char const*
type_key() const noexcept;
the type key of the implementation.
Abstract array interface.
Declared in <mrdocs/Dom/Array.hpp>
class ArrayImpl;
This interface is used by Array types.
| Name | Description |
|---|---|
size_type | An unsigned integral type used for indexes and sizes. |
value_type | The type of an element. |
| Name | Description |
|---|---|
~ArrayImpl [destructor] [virtual] | Destructor. |
emplace_back [virtual] | Append an element to the end of the array. |
get [virtual] | Return the i-th element, without bounds checking. |
set [virtual] | Set the i-th element, without bounds checking. |
size [virtual] | Return the number of elements in the array. |
type_key [virtual] | Return the type key of the implementation. |
| Name | Description |
|---|---|
DefaultArrayImpl | The default array implementation. |
LazyArrayImpl | Lazy array implementation |
LazyArrayImpl | Lazy array implementation |
An unsigned integral type used for indexes and sizes.
The type of an element.
Destructor.
Declared in <mrdocs/Dom/Array.hpp>
virtual
~ArrayImpl();
Append an element to the end of the array.
The default implementation throws an exception, making the array effectively read-only.
| Name | Description |
|---|---|
| value | The type of an element. |
Return the i-th element, without bounds checking.
the i-th element, without bounds checking.
| Name | Description |
|---|---|
| i | An unsigned integral type used for indexes and sizes. |
Set the i-th element, without bounds checking.
| Name | Description |
|---|---|
| index | An unsigned integral type used for indexes and sizes. |
| value | A variant container for any kind of Dom value. |
Return the number of elements in the array.
the number of elements in the array.
Return the type key of the implementation.
Declared in <mrdocs/Dom/Array.hpp>
virtual
char const*
type_key() const noexcept;
the type key of the implementation.
The default array implementation.
This implementation is backed by a simple vector and allows appending.
| Name | Description |
|---|---|
ArrayImpl | Abstract array interface. |
| Name | Description |
|---|---|
size_type | An unsigned integral type used for indexes and sizes. |
storage_type | The type of storage used by the default implementation. |
value_type | The type of an element. |
| Name | Description |
|---|---|
DefaultArrayImpl [constructor] | Constructors |
emplace_back [virtual] | Append a value to the array. |
get [virtual] | Retrieve an element at the specified index. |
set [virtual] | set overloads |
size [virtual] | Return the number of stored elements. |
type_key [virtual] | Return the type key string for this array. |
An unsigned integral type used for indexes and sizes.
The type of storage used by the default implementation.
The type of an element.
Constructors
Declared in <mrdocs/Dom/Array.hpp>
Create an empty array implementation.
DefaultArrayImpl();
» more...
Create an array populated with the given elements.
explicit
DefaultArrayImpl(storage_type elements) noexcept;
» more...
| Name | Description |
|---|---|
| elements | Initial contents to take ownership of. |
Create an empty array implementation.
Declared in <mrdocs/Dom/Array.hpp>
DefaultArrayImpl();
Create an array populated with the given elements.
Declared in <mrdocs/Dom/Array.hpp>
explicit
DefaultArrayImpl(storage_type elements) noexcept;
| Name | Description |
|---|---|
| elements | Initial contents to take ownership of. |
Append a value to the array.
| Name | Description |
|---|---|
| value | The type of an element. |
Retrieve an element at the specified index.
The type of an element.
| Name | Description |
|---|---|
| i | Index of the element to fetch. |
set overloads
Declared in <mrdocs/Dom/Array.hpp>
Replace the element at the specified index.
virtual
void
set(
size_type i,
Value v) override;
» more...
Set the i-th element, without bounds checking.
virtual
void
set(
size_type index,
Value value);
» more...
| Name | Description |
|---|---|
| i | Index to update. |
| v | New value to store. |
Replace the element at the specified index.
| Name | Description |
|---|---|
| i | Index to update. |
| v | New value to store. |
Set the i-th element, without bounds checking.
| Name | Description |
|---|---|
| index | An unsigned integral type used for indexes and sizes. |
| value | A variant container for any kind of Dom value. |
Return the number of stored elements.
the number of stored elements.
Return the type key string for this array.
Declared in <mrdocs/Dom/Array.hpp>
virtual
char const*
type_key() const noexcept override;
the type key string for this array.
Function implementation that wraps a fixed-arity callable.
Declared in <mrdocs/Dom/Function.hpp>
template<class F>
class DefaultFunctionImpl
: public FunctionImpl
| Name | Description |
|---|---|
FunctionImpl | Value-semantic wrapper over a callable exposed to the DOM layer. |
| Name | Description |
|---|---|
args_type | Argument tuple type accepted by the callable. |
return_type | Result type produced by the callable. |
| Name | Description |
|---|---|
DefaultFunctionImpl [constructor] | Construct from any callable convertible to F. |
call [virtual] | Invoke the wrapped callable with the given arguments. |
type_key [virtual] | Return the type key of the implementation. |
Argument tuple type accepted by the callable.
Declared in <mrdocs/Dom/Function.hpp>
using args_type = function_traits<F>::args_type;
Result type produced by the callable.
Declared in <mrdocs/Dom/Function.hpp>
using return_type = function_traits<F>::return_type;
Construct from any callable convertible to F.
Declared in <mrdocs/Dom/Function.hpp>
template<class U>
DefaultFunctionImpl(U&& u);
| Name | Description |
|---|---|
| u | Callable to wrap. |
Invoke the wrapped callable with the given arguments.
Declared in <mrdocs/Dom/Function.hpp>
virtual
Expected<Value>
call(Array const& args) const override;
A container holding an error or a value.
| Name | Description |
|---|---|
| args | An array of values |
Return the type key of the implementation.
Declared in <mrdocs/Dom/Function.hpp>
virtual
char const*
type_key() const noexcept override;
the type key of the implementation.
The default Object implementation.
| Name | Description |
|---|---|
ObjectImpl | Abstract object interface. |
| Name | Description |
|---|---|
reference | A reference to an element. |
storage_type | The type of storage used by the default implementation. |
| Name | Description |
|---|---|
DefaultObjectImpl [constructor] | Constructors |
exists [virtual] | Check whether a key exists in the object. |
get [virtual] | Retrieve a value by key. |
set [virtual] | Set a value by key. |
size [virtual] | Return number of elements stored. |
type_key [virtual] | Return the type key of the implementation. |
visit [virtual] | visit overloads |
Constructors
Declared in <mrdocs/Dom/Object.hpp>
Create an empty object implementation.
DefaultObjectImpl() noexcept;
» more...
Create an object pre-populated with entries.
explicit
DefaultObjectImpl(storage_type entries) noexcept;
» more...
| Name | Description |
|---|---|
| entries | Key/value storage to take ownership of. |
Create an empty object implementation.
Declared in <mrdocs/Dom/Object.hpp>
DefaultObjectImpl() noexcept;
Create an object pre-populated with entries.
Declared in <mrdocs/Dom/Object.hpp>
explicit
DefaultObjectImpl(storage_type entries) noexcept;
| Name | Description |
|---|---|
| entries | Key/value storage to take ownership of. |
Check whether a key exists in the object.
Declared in <mrdocs/Dom/Object.hpp>
virtual
bool
exists(std::string_view key) const override;
True if the key exists.
| Name | Description |
|---|---|
| key | Key to test. |
Retrieve a value by key.
Declared in <mrdocs/Dom/Object.hpp>
virtual
Value
get(std::string_view key) const override;
Stored value or undefined if absent.
| Name | Description |
|---|---|
| key | Key to search for. |
Set a value by key.
| Name | Description |
|---|---|
| key | Key to set. |
| value | New value. |
Return number of elements stored.
Declared in <mrdocs/Dom/Object.hpp>
virtual
std::size_t
size() const override;
number of elements stored.
visit overloads
Declared in <mrdocs/Dom/Object.hpp>
Invoke the visitor for each key/value pair.
virtual
bool
visit(std::function<bool(String, Value)> fn) const = 0;
» more...
Visit each key/value pair until the visitor returns false.
virtual
bool
visit(std::function<bool(String, Value)> visitor) const override;
» more...
true if the visitor returned true for all elements, otherwise false.| Name | Description |
|---|---|
| fn | The visitor function. |
| visitor | Callback receiving key and value. |
Invoke the visitor for each key/value pair.
Declared in <mrdocs/Dom/Object.hpp>
virtual
bool
visit(std::function<bool(String, Value)> fn) const = 0;
The visitor function must return true to continue iteration, or false to stop.
The visit function returns true if the visitor returned true for all elements, otherwise false.
true if the visitor returned true for all elements, otherwise false.
| Name | Description |
|---|---|
| fn | The visitor function. |
Visit each key/value pair until the visitor returns false.
Declared in <mrdocs/Dom/Object.hpp>
virtual
bool
visit(std::function<bool(String, Value)> visitor) const override;
False if visitor requested stop, otherwise true.
| Name | Description |
|---|---|
| visitor | Callback receiving key and value. |
Value-semantic wrapper over a callable exposed to the DOM layer.
Declared in <mrdocs/Dom/Function.hpp>
class Function;
| Name | Description |
|---|---|
Function [constructor] | Constructors |
~Function [destructor] | Destructor. |
operator= | Assignment. |
call | Invoke the function. |
impl | Return the implementation used by this object. |
operator() | Invoke the function. |
swap | Swap two objects. |
try_invoke | Invoke the function. |
type_key | Return the type key. |
| Name | Description |
|---|---|
mrdocs::dom::newFunction | Return a diagnostic string. |
mrdocs::dom::swap | Swap two objects. |
| Name | Description |
|---|---|
makeInvocable | Create a Function from a fixed-arity invocable. |
makeVariadicInvocable | Create a Function that receives the argument Array directly. |
Constructors
Declared in <mrdocs/Dom/Function.hpp>
Constructor.
Function() noexcept;
» more...
Constructor.
Function(Function const& other) noexcept;
» more...
Constructor.
Function(Function&& other) noexcept;
» more...
Construct a Function from any supported callable.
template<class F>
requires function_traits_convertible_to_value<std::decay_t<F>>
Function(F const& f);
» more...
| Name | Description |
|---|---|
| f | Callable to wrap. |
Constructor.
Declared in <mrdocs/Dom/Function.hpp>
Function() noexcept;
A default-constructed function has this equivalent implementation:
Value f()
{
return nullptr;
}
Constructor.
The newly constructed object acquires shared ownership of the function.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Constructor.
Ownership of the function is tranferred. The moved-from object behaves as if default constructed.
| Name | Description |
|---|---|
| other | The object to move construct from |
Construct a Function from any supported callable.
Declared in <mrdocs/Dom/Function.hpp>
template<class F>
requires function_traits_convertible_to_value<std::decay_t<F>>
Function(F const& f);
| Name | Description |
|---|---|
| f | Callable to wrap. |
Destructor.
Declared in <mrdocs/Dom/Function.hpp>
~Function();
Assignment.
Assignment.
This acquires shared ownership of the function. Ownership of the previous function is removed.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Assignment.
Ownership of the function is tranferred, and ownership of the previous function is released. The moved-from object behaves as if default constructed.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Invoke the function.
A container holding an error or a value.
| Name | Description |
|---|---|
| args | An array of values |
Return the implementation used by this object.
the implementation used by this object.
Invoke the function.
Declared in <mrdocs/Dom/Function.hpp>
template<class... Args>
Value
operator()(Args&&... args) const;
The return value of the function.
| Name | Description |
|---|---|
| args | The arguments to the function. |
Swap two objects.
| Name | Description |
|---|---|
| other | The other object. |
Invoke the function.
Declared in <mrdocs/Dom/Function.hpp>
template<class... Args>
Expected<Value>
try_invoke(Args&&... args) const;
A container holding an error or a value.
| Name | Description |
|---|---|
| args | The arguments to the function. |
Return the type key.
Declared in <mrdocs/Dom/Function.hpp>
char const*
type_key() const noexcept;
the type key.
Value-semantic wrapper over a callable exposed to the DOM layer.
Declared in <mrdocs/Dom/Function.hpp>
class FunctionImpl;
Abstract base for function implementations.
| Name | Description |
|---|---|
~FunctionImpl [destructor] [virtual] | Destructor. |
call [virtual] | Invoke the function. |
type_key [virtual] | Return the type key of the implementation. |
| Name | Description |
|---|---|
DefaultFunctionImpl | Function implementation that wraps a fixed-arity callable. |
VariadicFunctionImpl | Function implementation that forwards the entire Array to a callable. |
Destructor.
Declared in <mrdocs/Dom/Function.hpp>
constexpr
virtual
~FunctionImpl() = default;
Invoke the function.
Declared in <mrdocs/Dom/Function.hpp>
virtual
Expected<Value>
call(Array const& args) const = 0;
A container holding an error or a value.
| Name | Description |
|---|---|
| args | An array of values |
Return the type key of the implementation.
Declared in <mrdocs/Dom/Function.hpp>
virtual
char const*
type_key() const noexcept;
the type key of the implementation.
Lazy array implementation
This array type is used to define a dom::Array whose members are evaluated on demand as they are accessed.
Each member can goes through a transform function before being returned as a Value so that all types can be converted to dom::Value.
The underlying representation of the array is a range from where the elements are extracted. Elements in this range should be convertible to dom::Value.
This class is typically useful for implementing arrays that are expensive and have recursive dependencies, as these recursive dependencies can also be deferred.
Unlike a LazyObjectImpl, which contains an overlay object, this implementation is read-only. The set and emplace_back methods are not implemented.
| Name | Description |
|---|---|
ArrayImpl | Abstract array interface. |
| Name | Description |
|---|---|
size_type | An unsigned integral type used for indexes and sizes. |
value_type | The type of an element. |
| Name | Description |
|---|---|
LazyArrayImpl [constructor] | Constructors |
~LazyArrayImpl [destructor] [virtual] | Virtual destructor. |
emplace_back [virtual] | Append an element to the end of the array. |
get [virtual] | get overloads |
set [virtual] | Set the i-th element, without bounds checking. |
size [virtual] | Return the number of elements, computing it lazily if needed. |
type_key [virtual] | Return the type key of the implementation. |
Constructors
Declared in <mrdocs/Dom/LazyArray.hpp>
Construct from a range of values.
explicit
LazyArrayImpl(R const& arr);
» more...
Construct from a range and a conversion context.
explicit
LazyArrayImpl(
R const& arr,
Context const& ctx);
» more...
| Name | Description |
|---|---|
| arr | Range to wrap lazily. |
| ctx | Context used to convert elements. |
Construct from a range of values.
Declared in <mrdocs/Dom/LazyArray.hpp>
explicit
LazyArrayImpl(R const& arr);
| Name | Description |
|---|---|
| arr | The object to copy construct from |
Construct from a range and a conversion context.
Declared in <mrdocs/Dom/LazyArray.hpp>
explicit
LazyArrayImpl(
R const& arr,
Context const& ctx);
| Name | Description |
|---|---|
| arr | Range to wrap lazily. |
| ctx | Context used to convert elements. |
Virtual destructor.
Declared in <mrdocs/Dom/LazyArray.hpp>
virtual
~LazyArrayImpl() override = default;
get overloads
Declared in <mrdocs/Dom/Array.hpp>
Retrieve the element at index i, or nil if out of range.
virtual
dom::Value
get(std::size_t i) const override;
» more...
Return the i-th element, without bounds checking.
virtual
value_type
get(size_type i) const = 0;
» more...
| Name | Description |
|---|---|
| i | Index of the element. |
Retrieve the element at index i, or nil if out of range.
Declared in <mrdocs/Dom/LazyArray.hpp>
virtual
dom::Value
get(std::size_t i) const override;
A variant container for any kind of Dom value.
| Name | Description |
|---|---|
| i | Index of the element. |
Return the i-th element, without bounds checking.
the i-th element, without bounds checking.
| Name | Description |
|---|---|
| i | An unsigned integral type used for indexes and sizes. |
Return the number of elements, computing it lazily if needed.
Declared in <mrdocs/Dom/LazyArray.hpp>
virtual
std::size_t
size() const noexcept override;
the number of elements, computing it lazily if needed.
Return the type key of the implementation.
Declared in <mrdocs/Dom/LazyArray.hpp>
virtual
char const*
type_key() const noexcept override;
the type key of the implementation.
Lazy array implementation
Declared in <mrdocs/Dom/LazyArray.hpp>
template<
std::ranges::random_access_range R,
class Context = /* implementation-defined */>
requires HasValueFrom<std::ranges::range_value_t<R>, Context> ||
(std::invocable<Context, std::ranges::range_value_t<R>> &&
HasStandaloneValueFrom<std::invoke_result_t<Context, std::ranges::range_value_t<R>>>)
class LazyArrayImpl
: public ArrayImpl
This array type is used to define a dom::Array whose members are evaluated on demand as they are accessed.
Each member can goes through a transform function before being returned as a Value so that all types can be converted to dom::Value.
The underlying representation of the array is a range from where the elements are extracted. Elements in this range should be convertible to dom::Value.
This class is typically useful for implementing arrays that are expensive and have recursive dependencies, as these recursive dependencies can also be deferred.
Unlike a LazyObjectImpl, which contains an overlay object, this implementation is read-only. The set and emplace_back methods are not implemented.
| Name | Description |
|---|---|
ArrayImpl | Abstract array interface. |
| Name | Description |
|---|---|
size_type | An unsigned integral type used for indexes and sizes. |
value_type | The type of an element. |
| Name | Description |
|---|---|
emplace_back [virtual] | Append an element to the end of the array. |
get [virtual] | Return the i-th element, without bounds checking. |
set [virtual] | Set the i-th element, without bounds checking. |
size [virtual] | Return the number of elements in the array. |
type_key [virtual] | Return the type key of the implementation. |
Lazy object implementation.
This interface is used to define objects whose members are evaluated on demand as they are accessed.
When any of the object properties are accessed, the object dom::Value is constructed. In practice, the object never takes any memory besides the pointer to the underlying object.
The keys and values in the underlying object should be mapped using tag_invoke.
This class is typically useful for implementing objects that are expensive and have recursive dependencies, as these recursive dependencies can also be deferred.
A context can also be stored in the object as a form to customize how the object is mapped. This context should be copyable and is propagated to other objects that support an overload with the same context.
The context can be simply a tag identifying how to map the object, or a more complex object carrying data to customize the mapping process.
In the latter case, because the context should be a copyable, the user might want to use a type with reference semantics.
| Name | Description |
|---|---|
ObjectImpl | Abstract object interface. |
| Name | Description |
|---|---|
reference | A reference to an element. |
storage_type | The type of storage used by the default implementation. |
| Name | Description |
|---|---|
LazyObjectImpl [constructor] | Constructors |
~LazyObjectImpl [destructor] [virtual] | Virtual destructor. |
exists [virtual] | Determine if a key exists. |
get [virtual] | Return the value for the specified key, or null. |
set [virtual] | Insert or set the given key/value pair. |
size [virtual] | Return the number of properties in the object. |
type_key [virtual] | Return the type key of the implementation. |
visit [virtual] | Invoke the visitor for each key/value pair. |
Constructors
Declared in <mrdocs/Dom/LazyObject.hpp>
Wrap an object using the default lazy mapping.
explicit
LazyObjectImpl(T const& obj)
requires HasLazyObjectMapWithoutContext<T>;
» more...
Wrap an object using a custom mapping context.
explicit
LazyObjectImpl(
T const& obj,
Context const& context)
requires HasLazyObjectMapWithContext<T, Context>;
» more...
| Name | Description |
|---|---|
| obj | Object providing the data. |
| context | Context that guides the mapping. |
Wrap an object using the default lazy mapping.
Declared in <mrdocs/Dom/LazyObject.hpp>
explicit
LazyObjectImpl(T const& obj)
requires HasLazyObjectMapWithoutContext<T>;
| Name | Description |
|---|---|
| obj | Object providing the data. |
Wrap an object using a custom mapping context.
Declared in <mrdocs/Dom/LazyObject.hpp>
explicit
LazyObjectImpl(
T const& obj,
Context const& context)
requires HasLazyObjectMapWithContext<T, Context>;
| Name | Description |
|---|---|
| obj | Object providing the data. |
| context | Context that guides the mapping. |
Virtual destructor.
Declared in <mrdocs/Dom/LazyObject.hpp>
virtual
~LazyObjectImpl() override = default;
Determine if a key exists.
Declared in <mrdocs/Dom/LazyObject.hpp>
virtual
bool
exists(std::string_view key) const override;
true if the key exists, otherwise false.
| Name | Description |
|---|---|
| key | The key to check for existence. |
Return the value for the specified key, or null.
Declared in <mrdocs/Dom/LazyObject.hpp>
virtual
Value
get(std::string_view key) const override;
The value for the specified key, or null if the key does not exist.
| Name | Description |
|---|---|
| key | The key. |
Insert or set the given key/value pair.
Declared in <mrdocs/Dom/LazyObject.hpp>
virtual
void
set(
String key,
Value value) override;
| Name | Description |
|---|---|
| key | The key. |
| value | The value to set. |
Return the number of properties in the object.
Declared in <mrdocs/Dom/LazyObject.hpp>
virtual
std::size_t
size() const override;
the number of properties in the object.
Return the type key of the implementation.
Declared in <mrdocs/Dom/LazyObject.hpp>
virtual
char const*
type_key() const noexcept override;
the type key of the implementation.
Invoke the visitor for each key/value pair.
Declared in <mrdocs/Dom/LazyObject.hpp>
virtual
bool
visit(std::function<bool(String, Value)> fn) const override;
The visitor function must return true to continue iteration, or false to stop.
The visit function returns true if the visitor returned true for all elements, otherwise false.
true if the visitor returned true for all elements, otherwise false.
| Name | Description |
|---|---|
| fn | The visitor function. |
Lazy object implementation.
Declared in <mrdocs/Dom/LazyObject.hpp>
template<
class T,
class Context = /* implementation-defined */>
requires HasLazyObjectMap<T, Context>
class LazyObjectImpl
: public ObjectImpl
This interface is used to define objects whose members are evaluated on demand as they are accessed.
When any of the object properties are accessed, the object dom::Value is constructed. In practice, the object never takes any memory besides the pointer to the underlying object.
The keys and values in the underlying object should be mapped using tag_invoke.
This class is typically useful for implementing objects that are expensive and have recursive dependencies, as these recursive dependencies can also be deferred.
A context can also be stored in the object as a form to customize how the object is mapped. This context should be copyable and is propagated to other objects that support an overload with the same context.
The context can be simply a tag identifying how to map the object, or a more complex object carrying data to customize the mapping process.
In the latter case, because the context should be a copyable, the user might want to use a type with reference semantics.
| Name | Description |
|---|---|
ObjectImpl | Abstract object interface. |
| Name | Description |
|---|---|
reference | A reference to an element. |
storage_type | The type of storage used by the default implementation. |
| Name | Description |
|---|---|
exists [virtual] | Determine if a key exists. |
get [virtual] | Return the value for the specified key, or null. |
set [virtual] | Insert or set the given key/value pair. |
size [virtual] | Return the number of properties in the object. |
type_key [virtual] | Return the type key of the implementation. |
visit [virtual] | Invoke the visitor for each key/value pair. |
Customization point tag.
Declared in <mrdocs/Dom/LazyObject.hpp>
struct LazyObjectMapTag;
This tag type is used by the class dom::LazyObjectImpl to select overloads of tag_invoke.
This type is empty; it has no members.
| Name | Description |
|---|---|
::mrdocs::tag_invoke | Map a FriendInfo to a dom::Object with deferred name lookup. |
::mrdocs::tag_invoke | Map the Polymorphic Symbol to a dom::Object. |
::mrdocs::tag_invoke | Map the SourceInfo to a lazy DOM object. |
::mrdocs::tag_invoke | Generic tag_invoke for any described type with DomCorpus context. |
::mrdocs::tag_invoke | Map a TemplateInfo to a dom::Object with computed specialization kind. |
::mrdocs::tag_invoke | Map a Name to a dom::Object via visit-based polymorphic dispatch. |
::mrdocs::tag_invoke | Generic tag_invoke for described types without context. |
::mrdocs::tag_invoke | Map a BaseInfo to a dom::Object with computed access booleans. |
::mrdocs::tag_invoke | Map a Symbol to a dom::Object with computed extraction properties. |
::mrdocs::tag_invoke | Map an ExprInfo to a dom::Value object. |
::mrdocs::tag_invoke | Map a RecordSymbol to a dom::Object with computed defaultAccess. |
::mrdocs::tag_invoke | Map an ArrayType to a dom::Object with split bounds properties. |
::mrdocs::doc::tag_invoke | Map the Polymorphic Block to a dom::Object. |
A container of key and value pairs.
Declared in <mrdocs/Dom/Object.hpp>
class Object final
Objects are a collection of properties, which are equivalent to key-value pairs. Property values can be any type, including other Objects, allowing for the creation of arbitrarily complex data structures.
An Object is a non-primitive (or reference) type, meaning that they are not copied when assigned or passed as a parameter. Instead, the reference is copied, and the original value is shared.
These reference types are modeled after JavaScript "Objects". All non-primitive types (Object types) are derived from Object in JavaScript. This means types such as Array and Function represent a relevant selection of built-in types that would derive from Object in JavaScript.
Objects are a collection of properties, which are
equivalent to key-value pairs. There are two
kinds of properties:
@li Data properties: Associates a key with a value.
@li Accessor properties: Associates a key with
one of two accessor functions (`get` and `set`),
which are used to retrieve or set the value.
The internal representation of objects can determine
how properties are stored and the type of properties
being represented.
Properties can also be enumerable or non-enumerable.
An enumerable property is one that is iterated by
the `visit` function. Non-enumerable properties can
only be accessed by name with the `get` and `set`
functions.
| Name | Description |
|---|---|
value_type | The type of an element. |
| Name | Description |
|---|---|
const_pointer | A pointer to an element. |
const_reference | A reference to an element. |
difference_type | A signed integral type. |
impl_type | The implementation type. |
pointer | A pointer to an element. |
reference | A reference to an element. |
size_type | An unsigned integral type used for indexes and sizes. |
storage_type | The type of storage used by the default implementation. |
| Name | Description |
|---|---|
Object [constructor] | Constructor. |
~Object [destructor] | Destructor. |
operator= | Assignment. |
at | Return the element at a given index. |
empty | Return true if the container is empty. |
exists | Return true if a key exists. |
get | Return the element with the specified key |
impl | Return the implementation used by this object. |
set | Set or replace the value for a given key. |
size | Return the number of elements. |
swap | Swap two objects. |
type_key | Return the type key. |
visit | Invoke the visitor for each key/value pair |
| Name | Description |
|---|---|
mrdocs::dom::toString | Return a diagnostic string. |
mrdocs::dom::operator<=> | Compare two objects for precedence. |
mrdocs::dom::operator== | Compare two objects for equality. |
mrdocs::dom::swap | Swap two objects. |
| Name | Description |
|---|---|
LazyObject | Return a new dom::Object based on a transformed lazy array implementation. |
LazyObject | Return a new dom::Object based on a lazy object implementation. |
newObject | Return a new object using a custom implementation. |
::mrdocs::createFrame | Create child data objects. |
A pointer to an element.
A reference to an element.
This is a read-only reference to an element.
A signed integral type.
Declared in <mrdocs/Dom/Object.hpp>
using difference_type = std::ptrdiff_t;
The implementation type.
Declared in <mrdocs/Dom/Object.hpp>
using impl_type = std::shared_ptr<ObjectImpl>;
A pointer to an element.
A reference to an element.
This is a read-only reference to an element.
An unsigned integral type used for indexes and sizes.
Declared in <mrdocs/Dom/Object.hpp>
using size_type = std::size_t;
The type of storage used by the default implementation.
Declared in <mrdocs/Dom/Object.hpp>
using storage_type = std::vector<value_type>;
The type of an element.
Declared in <mrdocs/Dom/Object.hpp>
struct value_type;
Elements of this container are key and value pairs where the key is a string. This type is a copyable, movable value type.
Constructor.
Declared in <mrdocs/Dom/Object.hpp>
Constructor.
Object();
» more...
Constructor.
Object(Object const& other) noexcept;
» more...
Constructor.
Object(Object&& other);
» more...
Constructor.
explicit
Object(impl_type impl) noexcept;
» more...
Constructor.
explicit
Object(storage_type list);
» more...
| Name | Description |
|---|---|
| list | The initial list of values. |
Constructor.
Declared in <mrdocs/Dom/Object.hpp>
Object();
Default-constructed objects refer to a new, empty container which is distinct from every other empty container.
Constructor.
The newly constructed object will contain copies of the scalars in other, and references to its structured data.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Constructor.
Ownership of the contents is transferred to the new object. The moved-from object will behave as if default-constructed.
| Name | Description |
|---|---|
| other | The object to move construct from |
Constructor.
This constructs an object from an existing implementation, with shared ownership. The pointer cannot not be null.
| Name | Description |
|---|---|
| impl | The object to construct from |
Constructor.
Upon construction, the object will retain ownership of a shallow copy of the specified list. In particular, dynamic objects will be acquired with shared ownership.
| Name | Description |
|---|---|
| list | The initial list of values. |
Destructor.
Declared in <mrdocs/Dom/Object.hpp>
constexpr
~Object() = default;
Assignment.
Assignment.
Shared ownership and copies of elements in others are acquired by this. Ownership of the previous contents is released.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Assignment.
Ownership of the object is transferred to this, and ownership of the previous contents is released. The moved-from object behaves as if default constructed.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Return the element at a given index.
The value at the specified index, or null if the index is out of range.
| Name | Description |
|---|---|
| i | The index. |
Return true if the container is empty.
Declared in <mrdocs/Dom/Object.hpp>
bool
empty() const;
true if the container is empty.
Return true if a key exists.
Declared in <mrdocs/Dom/Object.hpp>
bool
exists(std::string_view key) const;
true if the key exists, otherwise false.
| Name | Description |
|---|---|
| key | The key to check for existence. |
Return the element with the specified key
The value for the specified key, or null if the key does not exist.
| Name | Description |
|---|---|
| key | The key. |
Return the implementation used by this object.
the implementation used by this object.
Set or replace the value for a given key.
This function inserts a new key or changes the value for the existing key if it is already present.
| Name | Description |
|---|---|
| key | The key. |
| value | The value to set. |
Return the number of elements.
Declared in <mrdocs/Dom/Object.hpp>
std::size_t
size() const;
the number of elements.
Swap two objects.
| Name | Description |
|---|---|
| other | A container of key and value pairs. |
Return the type key.
Declared in <mrdocs/Dom/Object.hpp>
char const*
type_key() const noexcept;
the type key.
Invoke the visitor for each key/value pair
Declared in <mrdocs/Dom/Object.hpp>
Invoke the visitor for each key/value pair
template<class F>
requires std::invocable<F, String, Value> &&
std::same_as<std::invoke_result_t<F, String, Value>, bool>
bool
visit(F&& fn) const;
» more...
Invoke the visitor for each key/value pair
template<class F>
requires std::invocable<F, String, Value> &&
mrdocs::detail::isExpected<std::invoke_result_t<F, String, Value>>
Expected<void, std::invoke_result_t<F, String, Value>::error_type>
visit(F&& fn) const;
» more...
Invoke the visitor for each key/value pair
template<class F>
requires std::invocable<F, String, Value> &&
std::same_as<std::invoke_result_t<F, String, Value>, void>
void
visit(F&& fn) const;
» more...
true if the visitor returned true for all elements, otherwise false.void if the visitor returned did not return an error for any element, otherwise E.| Name | Description |
|---|---|
| fn | The visitor function. |
Invoke the visitor for each key/value pair
Declared in <mrdocs/Dom/Object.hpp>
template<class F>
requires std::invocable<F, String, Value> &&
std::same_as<std::invoke_result_t<F, String, Value>, bool>
bool
visit(F&& fn) const;
The visitor function must return true to continue iteration, or false to stop iteration early.
true if the visitor returned true for all elements, otherwise false.
| Name | Description |
|---|---|
| fn | The visitor function. |
Invoke the visitor for each key/value pair
Declared in <mrdocs/Dom/Object.hpp>
template<class F>
requires std::invocable<F, String, Value> &&
mrdocs::detail::isExpected<std::invoke_result_t<F, String, Value>>
Expected<void, std::invoke_result_t<F, String, Value>::error_type>
visit(F&& fn) const;
The visitor function must return void to continue iteration, or an Unexpected<E> to stop iteration early.
If an error is returned, the iteration stops and the error is returned from this function.
void if the visitor returned did not return an error for any element, otherwise E.void if the visitor returned did not return an error for any element, otherwise E.| Name | Description |
|---|---|
| fn | The visitor function. |
Invoke the visitor for each key/value pair
Declared in <mrdocs/Dom/Object.hpp>
template<class F>
requires std::invocable<F, String, Value> &&
std::same_as<std::invoke_result_t<F, String, Value>, void>
void
visit(F&& fn) const;
| Name | Description |
|---|---|
| fn | The visitor function. |
Abstract object interface.
Declared in <mrdocs/Dom/Object.hpp>
class ObjectImpl;
This interface is used by Object types.
| Name | Description |
|---|---|
reference | A reference to an element. |
storage_type | The type of storage used by the default implementation. |
| Name | Description |
|---|---|
~ObjectImpl [destructor] [virtual] | Destructor. |
exists [virtual] | Determine if a key exists. |
get [virtual] | Return the value for the specified key, or null. |
set [virtual] | Insert or set the given key/value pair. |
size [virtual] | Return the number of properties in the object. |
type_key [virtual] | Return the type key of the implementation. |
visit [virtual] | Invoke the visitor for each key/value pair. |
| Name | Description |
|---|---|
DefaultObjectImpl | The default Object implementation. |
LazyObjectImpl | Lazy object implementation. |
LazyObjectImpl | Lazy object implementation. |
A reference to an element.
This is a read-only reference to an element.
The type of storage used by the default implementation.
Destructor.
Declared in <mrdocs/Dom/Object.hpp>
virtual
~ObjectImpl();
Determine if a key exists.
Declared in <mrdocs/Dom/Object.hpp>
virtual
bool
exists(std::string_view key) const;
true if the key exists, otherwise false.
| Name | Description |
|---|---|
| key | The key to check for existence. |
Return the value for the specified key, or null.
The value for the specified key, or null if the key does not exist.
| Name | Description |
|---|---|
| key | The key. |
Insert or set the given key/value pair.
| Name | Description |
|---|---|
| key | The key. |
| value | The value to set. |
Return the number of properties in the object.
Declared in <mrdocs/Dom/Object.hpp>
virtual
std::size_t
size() const = 0;
the number of properties in the object.
Return the type key of the implementation.
Declared in <mrdocs/Dom/Object.hpp>
virtual
char const*
type_key() const noexcept;
the type key of the implementation.
Invoke the visitor for each key/value pair.
Declared in <mrdocs/Dom/Object.hpp>
virtual
bool
visit(std::function<bool(String, Value)> fn) const = 0;
The visitor function must return true to continue iteration, or false to stop.
The visit function returns true if the visitor returned true for all elements, otherwise false.
true if the visitor returned true for all elements, otherwise false.
| Name | Description |
|---|---|
| fn | The visitor function. |
UTF-8 string value used by the DOM.
Declared in <mrdocs/Dom/String.hpp>
class String final
| Name | Description |
|---|---|
String [constructor] | Constructor. |
~String [destructor] | Destructor. |
operator= | Assignment. |
c_str | Return the string. |
data | Return the string. |
empty | Return true if the string is empty. |
get | Return the string. |
size | Return the size. |
str | Return the string. |
swap | Swap two strings. |
operator std::string_view | Return the string. |
| Name | Description |
|---|---|
mrdocs::dom::operator+ | |
mrdocs::dom::operator+ | |
mrdocs::dom::operator+ | Concatenate two strings. |
mrdocs::dom::operator<=> | Return the result of comparing two strings. |
mrdocs::dom::operator!= | Return the result of comparing two strings. |
mrdocs::dom::operator== | Return the result of comparing two strings. |
mrdocs::dom::operator<=> | Return the result of comparing two strings. |
mrdocs::dom::operator!= | Return the result of comparing two strings. |
mrdocs::dom::operator== | Return the result of comparing two strings. |
mrdocs::dom::swap | Swap two strings. |
| Name | Description |
|---|---|
::mrdocs::toString | Convert an explicit kind to its string form. |
::mrdocs::toString | Convert a reference kind to its string representation. |
::mrdocs::toString | Convert a storage class kind to its string form. |
::mrdocs::toString | Convert ExplicitInfo to a string. |
::mrdocs::toString | Convert a noexcept kind to its string form. |
::mrdocs::toString | Convert a cv/ref qualifier kind to its string form. |
::mrdocs::toString | Convert access specifier to its string form. |
::mrdocs::toString | Convert NoexceptInfo to a string. |
::mrdocs::toString | Convert a TypeKind to its string representation. |
::mrdocs::toString | Convert an auto-kind to its spelling. |
::mrdocs::toString | Convert a constexpr/consteval specifier kind to a string. |
::mrdocs::doc::toString | Convert an inline kind to its kebab-case string. |
::mrdocs::doc::toString | Return the name of the Admonish as a string. |
::mrdocs::doc::toString | Return the name of the Parts as a string. |
::mrdocs::doc::toString | Convert a block kind to its kebab-case string name. |
::mrdocs::doc::toString | Return the name of the ParamDirection as a string. |
Constructor.
Declared in <mrdocs/Dom/String.hpp>
Constructor.
constexpr
String() noexcept = default;
» more...
Constructor.
String(String const& other) noexcept;
» more...
Constructor.
constexpr
String(String&& other) noexcept;
» more...
Constructor.
String(std::string_view sv);
» more...
Constructor.
template<StringLikeTy StringLike>
String(StringLike const& s);
» more...
Constructor.
template<std::size_t N>
constexpr
String(char const(& str)[N]);
» more...
Constructor.
String(
char const* str,
std::size_t len);
» more...
| Name | Description |
|---|---|
| sv | The string to construct with. A copy of this string is made. |
| s | The string to construct with. A copy of this string is made. |
| str | A null-terminated string. If the string is not null-terminated, the result is undefined. |
| len | The length of the string. |
Constructor.
Declared in <mrdocs/Dom/String.hpp>
constexpr
String() noexcept = default;
Default constructed strings have a zero size, and include a null terminator.
Constructor.
The newly constructed string acquries shared ownership of the string referenced by other.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Constructor.
Ownership of the string is transferred to the newly constructed string. The moved-from string behaves as if default constructed.
| Name | Description |
|---|---|
| other | The object to move construct from |
Constructor.
Declared in <mrdocs/Dom/String.hpp>
String(std::string_view sv);
This function constructs a new string from the buffer pointed to by sv.
| Name | Description |
|---|---|
| sv | The string to construct with. A copy of this string is made. |
Constructor.
Declared in <mrdocs/Dom/String.hpp>
template<StringLikeTy StringLike>
String(StringLike const& s);
This function constructs a new string from s, which must be convertible to std::string_view.
| Name | Description |
|---|---|
| s | The string to construct with. A copy of this string is made. |
Constructor.
Declared in <mrdocs/Dom/String.hpp>
template<std::size_t N>
constexpr
String(char const(& str)[N]);
This function constructs a string literal which references the buffer pointed to by str. Ownership is not transferred; the lifetime of the buffer must extend until the string is destroyed, otherwise the behavior is undefined.
| Name | Description |
|---|---|
| str | A null-terminated string. If the string is not null-terminated, the result is undefined. |
Constructor.
Declared in <mrdocs/Dom/String.hpp>
String(
char const* str,
std::size_t len);
This function constructs a new string from the string pointed to by str of length len.
| Name | Description |
|---|---|
| str | The string to construct with. A copy of this string is made. |
| len | The length of the string. |
Destructor.
Declared in <mrdocs/Dom/String.hpp>
~String() noexcept;
Assignment.
Assignment.
This acquires shared ownership of the string referenced by other. Ownership of the previously referenced string is released.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Assignment.
This transfers ownership of the string referenced by other to this. Ownership of the previously referened string is released. After the assignment, the moved-from string behaves as if default constructed.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Return the string.
Declared in <mrdocs/Dom/String.hpp>
char const*
c_str() const noexcept;
The pointed-to character buffer returned by this function is always null-terminated.
the string.
Return the string.
Declared in <mrdocs/Dom/String.hpp>
char const*
data() const noexcept;
The pointed-to character buffer returned by this function is always null-terminated.
the string.
Return true if the string is empty.
Declared in <mrdocs/Dom/String.hpp>
bool
empty() const noexcept;
true if the string is empty.
Return the string.
Declared in <mrdocs/Dom/String.hpp>
std::string_view
get() const noexcept;
the string.
Return the size.
Declared in <mrdocs/Dom/String.hpp>
std::size_t
size() const noexcept;
the size.
Return the string.
Declared in <mrdocs/Dom/String.hpp>
std::string
str() const noexcept;
the string.
Swap two strings.
| Name | Description |
|---|---|
| other | The other string. |
Return the string.
Declared in <mrdocs/Dom/String.hpp>
operator std::string_view() const noexcept;
the string.
A variant container for any kind of Dom value.
Declared in <mrdocs/Dom/Value.hpp>
class Value;
| Name | Description |
|---|---|
Value [constructor] | Constructors |
~Value [destructor] | Destroy the contained value, releasing owned storage. |
operator= | Assignment operators |
empty | Return if an Array or Object is empty. |
exists | Return true if a key exists. |
get | get overloads |
getArray | Return the array. |
getBool | Return the underlying boolean value. |
getFunction | Return the function. |
getInteger | Return the underlying integer value. |
getObject | Return the object. |
getString | Return the underlying string value. |
isArray | Return true if this is an array. |
isBoolean | Return true if this is a boolean. |
isFunction | Return true if this is a function. |
isInteger | Return true if this is an integer. |
isNull | Return true if this is null. |
isObject | Return true if this is an object. |
isSafeString | Return true if this is a safe string. |
isString | Return true if this is a string. |
isTruthy | Determine if a value is truthy |
isUndefined | Return true if this is undefined. |
kind | Return the type of value contained. |
lookup | Lookup a sequence of keys. |
operator() | Invoke the function. |
set | Set or replace the value for a given key. |
size | Return if an Array or Object is empty. |
swap | Swap two values. |
type_key | Return the type key of the value. |
operator std::string | Return the string. |
operator bool | Determine if a value is truthy |
| Name | Description |
|---|---|
arr_ [variant member] | Array payload; shared with lazy arrays. |
b_ [variant member] | Boolean payload when the value kind is Boolean. |
fn_ [variant member] | Callable payload used by template helpers. |
i_ [variant member] | Integer payload when the value kind is Integer. |
obj_ [variant member] | Object payload; shared with lazy objects. |
str_ [variant member] | UTF-8 string or safe-string payload. |
| Name | Description |
|---|---|
mrdocs::dom::toString | Return value as a string. |
mrdocs::dom::operator&& | |
mrdocs::dom::operator&& | |
mrdocs::dom::operator&& | Return the first dom::Value that is not truthy, or the last one. |
mrdocs::dom::operator|| | |
mrdocs::dom::operator|| | |
mrdocs::dom::operator|| | Return the first dom::Value that is truthy, or the last one. |
mrdocs::dom::operator+ | |
mrdocs::dom::operator+ | |
mrdocs::dom::operator+ | Add or concatenate two values. |
mrdocs::dom::operator<=> | Three-way comparison operator |
mrdocs::dom::operator<=> | Three-way comparison operator |
mrdocs::dom::operator<=> | Compare two values for inequality. |
mrdocs::dom::operator== | Compare two values for equality. |
mrdocs::dom::swap | Swap two values. |
mrdocs::safeString | Create a wrapper for a safe string. |
mrdocs::dom::Object | A container of key and value pairs. |
mrdocs::dom::Array | An array of values |
| Name | Description |
|---|---|
ValueFrom | Convert an object of type T to dom::Value with a context |
ValueFrom | Convert an object of type T to dom::Value. |
stringOrNull | Return a non-empty string, or a null. |
stringOrNull | Return a non-empty string, or a null. |
stringOrNull | Return a non-empty string, or a null. |
JSON::stringify | Stringify a value as JSON |
::mrdocs::isEmpty | Determine if a value is empty |
::mrdocs::safeString | Return a DOM string ensuring special characters are escaped. |
::mrdocs::safeString | Mark an existing string-like value as safe to emit without escaping. |
::mrdocs::helpers::detag_fn | "detag" helper function |
::mrdocs::helpers::increment_fn | "increment" helper function |
::mrdocs::helpers::or_fn | "or" helper function |
::mrdocs::helpers::relativize_fn | "relativize" helper function |
::mrdocs::helpers::select_fn | "select" helper function |
Constructors
Declared in <mrdocs/Dom/Value.hpp>
Construct an undefined value.
Value() noexcept;
» more...
Copy-construct from another value.
Value(Value const& other);
» more...
Move-construct from another value, leaving it undefined.
Value(Value&& other) noexcept;
» more...
Construct an array value, taking ownership of the elements.
Value(Array arr) noexcept;
» more...
Construct a function value that can be invoked by templates.
Value(Function fn) noexcept;
» more...
Construct an empty value with the specified kind.
Value(dom::Kind kind) noexcept;
» more...
Construct an object value, taking ownership of the members.
Value(Object obj) noexcept;
» more...
Construct a string or safe-string value, taking ownership.
Value(String str) noexcept;
» more...
Construct a single-character string value.
Value(char c) noexcept;
» more...
Construct an integer value.
Value(int64_t v) noexcept;
» more...
Construct a null value.
Value(std::nullptr_t v) noexcept;
» more...
Construct an array value from raw storage.
Value(Array::storage_type elements);
» more...
Construct a string value from a C string.
Value(char const* s);
» more...
Construct an integer value from a floating-point number by truncation.
template<std::floating_point T>
Value(T v) noexcept;
» more...
Construct an integer value from an integral type other than bool or char.
template<std::integral T>
requires (!std::same_as<T, bool>) &&
(!std::same_as<T, char>)
Value(T v) noexcept;
» more...
Construct a boolean value.
template<std::convertible_to<String> Boolean>
Value(Boolean const& b);
» more...
Construct a function value from a callable object.
template<class F>
requires function_traits_convertible_to_value<F>
Value(F const& f);
» more...
Construct from Optional, using Undefined when empty.
template<class T>
requires std::constructible_from<Value, T>
Value(Optional<T> const& opt);
» more...
Construct from std::optional, using Undefined when empty.
template<class T>
requires std::constructible_from<Value, T>
Value(std::optional<T> const& opt);
» more...
Construct a string value from a string literal.
template<std::size_t N>
Value(char const(& sz)[N]);
» more...
Construct an undefined value.
Declared in <mrdocs/Dom/Value.hpp>
Value() noexcept;
Copy-construct from another value.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Move-construct from another value, leaving it undefined.
| Name | Description |
|---|---|
| other | The object to move construct from |
Construct an array value, taking ownership of the elements.
| Name | Description |
|---|---|
| arr | The object to construct from |
Construct a function value that can be invoked by templates.
| Name | Description |
|---|---|
| fn | The object to construct from |
Construct an empty value with the specified kind.
| Name | Description |
|---|---|
| kind | The object to construct from |
Construct an object value, taking ownership of the members.
| Name | Description |
|---|---|
| obj | The object to construct from |
Construct a string or safe-string value, taking ownership.
| Name | Description |
|---|---|
| str | The object to construct from |
Construct a single-character string value.
Declared in <mrdocs/Dom/Value.hpp>
Value(char c) noexcept;
| Name | Description |
|---|---|
| c | The value to construct from |
Construct an integer value.
Declared in <mrdocs/Dom/Value.hpp>
Value(int64_t v) noexcept;
| Name | Description |
|---|---|
| v | The object to construct from |
Construct a null value.
Declared in <mrdocs/Dom/Value.hpp>
Value(std::nullptr_t v) noexcept;
| Name | Description |
|---|---|
| v | The object to construct from |
Construct an array value from raw storage.
| Name | Description |
|---|---|
| elements | The object to construct from |
Construct a string value from a C string.
Declared in <mrdocs/Dom/Value.hpp>
Value(char const* s);
| Name | Description |
|---|---|
| s | The value to construct from |
Construct an integer value from a floating-point number by truncation.
Declared in <mrdocs/Dom/Value.hpp>
template<std::floating_point T>
Value(T v) noexcept;
| Name | Description |
|---|---|
| v | The object to construct from |
Construct an integer value from an integral type other than bool or char.
Declared in <mrdocs/Dom/Value.hpp>
template<std::integral T>
requires (!std::same_as<T, bool>) &&
(!std::same_as<T, char>)
Value(T v) noexcept;
| Name | Description |
|---|---|
| v | The object to construct from |
Construct a boolean value.
Declared in <mrdocs/Dom/Value.hpp>
template<std::convertible_to<String> Boolean>
Value(Boolean const& b);
Construct a string value from any String-convertible type.
| Name | Description |
|---|---|
| b | The object to copy construct from |
Construct a function value from a callable object.
Declared in <mrdocs/Dom/Value.hpp>
template<class F>
requires function_traits_convertible_to_value<F>
Value(F const& f);
| Name | Description |
|---|---|
| f | The object to copy construct from |
Construct from Optional, using Undefined when empty.
Declared in <mrdocs/Dom/Value.hpp>
template<class T>
requires std::constructible_from<Value, T>
Value(Optional<T> const& opt);
| Name | Description |
|---|---|
| opt | The object to copy construct from |
Construct from std::optional, using Undefined when empty.
Declared in <mrdocs/Dom/Value.hpp>
template<class T>
requires std::constructible_from<Value, T>
Value(std::optional<T> const& opt);
| Name | Description |
|---|---|
| opt | The object to copy construct from |
Construct a string value from a string literal.
Declared in <mrdocs/Dom/Value.hpp>
template<std::size_t N>
Value(char const(& sz)[N]);
| Name | Description |
|---|---|
| sz | The value to construct from |
Destroy the contained value, releasing owned storage.
Declared in <mrdocs/Dom/Value.hpp>
~Value();
Assignment operators
Copy-assign from another value, replacing the stored payload.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move-assign from another value, leaving it undefined.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Return if an Array or Object is empty.
Declared in <mrdocs/Dom/Value.hpp>
bool
empty() const;
if an Array or Object is empty.
Return true if a key exists.
Declared in <mrdocs/Dom/Value.hpp>
bool
exists(std::string_view key) const;
true if the key exists, otherwise false.
| Name | Description |
|---|---|
| key | The key to check for existence. |
get overloads
Declared in <mrdocs/Dom/Value.hpp>
Return the element at a given index.
dom::Value
get(std::size_t i) const;
» more...
Return the element for a given key.
dom::Value
get(std::string_view key) const;
» more...
Return the element at a given index or key.
dom::Value
get(dom::Value const& i) const;
» more...
Return the element for a given key.
template<std::convertible_to<std::string_view> S>
dom::Value
get(S const& key) const;
» more...
Kind::Undefined if the key does not exist.Kind::Undefined if the key does not exist.| Name | Description |
|---|---|
| i | The index. |
| key | The key. |
Return the element at a given index.
The value at the specified index, or a Value of type
| Name | Description |
|---|---|
| i | The index. |
Return the element for a given key.
If the Value is not an object, or the key is not found, a Value of type Kind::Undefined is returned.
The value for the specified key, or a Value of type Kind::Undefined if the key does not exist.
| Name | Description |
|---|---|
| key | The key. |
Return the element at a given index or key.
the element at a given index or key.
| Name | Description |
|---|---|
| i | A variant container for any kind of Dom value. |
Return the element for a given key.
Declared in <mrdocs/Dom/Value.hpp>
template<std::convertible_to<std::string_view> S>
dom::Value
get(S const& key) const;
If the Value is not an object, or the key is not found, a Value of type Kind::Undefined is returned.
The value for the specified key, or a Value of type Kind::Undefined if the key does not exist.
| Name | Description |
|---|---|
| key | The key. |
Return the array.
Declared in <mrdocs/Dom/Value.hpp>
Return the array.
Array const&
getArray() const;
» more...
Array&
getArray();
» more...
| Name | Thrown on |
|---|---|
Exception | ! isArray() |
Return the underlying boolean value.
Declared in <mrdocs/Dom/Value.hpp>
bool
getBool() const noexcept;
Behaviour is undefined if !isBoolean()
the underlying boolean value.
Return the underlying integer value.
Declared in <mrdocs/Dom/Value.hpp>
int64_t
getInteger() const noexcept;
Behaviour is undefined if !isInteger()
the underlying integer value.
Return the underlying string value.
Behaviour is undefined if !isString()
the underlying string value.
Return true if this is an array.
Declared in <mrdocs/Dom/Value.hpp>
bool
isArray() const noexcept;
true if this is an array.
Return true if this is a boolean.
Declared in <mrdocs/Dom/Value.hpp>
bool
isBoolean() const noexcept;
true if this is a boolean.
Return true if this is a function.
Declared in <mrdocs/Dom/Value.hpp>
bool
isFunction() const noexcept;
true if this is a function.
Return true if this is an integer.
Declared in <mrdocs/Dom/Value.hpp>
bool
isInteger() const noexcept;
true if this is an integer.
Return true if this is null.
Declared in <mrdocs/Dom/Value.hpp>
bool
isNull() const noexcept;
true if this is null.
Return true if this is an object.
Declared in <mrdocs/Dom/Value.hpp>
bool
isObject() const noexcept;
true if this is an object.
Return true if this is a safe string.
Declared in <mrdocs/Dom/Value.hpp>
bool
isSafeString() const noexcept;
true if this is a safe string.
Return true if this is a string.
Declared in <mrdocs/Dom/Value.hpp>
bool
isString() const noexcept;
true if this is a string.
Determine if a value is truthy
Declared in <mrdocs/Dom/Value.hpp>
bool
isTruthy() const noexcept;
A value is truthy if it is a boolean and is true, a number and not zero, or an non-empty string, array or object.
true if the value is truthy, false otherwise
Return true if this is undefined.
Declared in <mrdocs/Dom/Value.hpp>
bool
isUndefined() const noexcept;
true if this is undefined.
Return the type of value contained.
the type of value contained.
Lookup a sequence of keys.
This function is equivalent to calling get multiple times, once for each key in the sequence of dot-separated keys.
The value at the end of the sequence, or a Value of type Kind::Undefined if any key is not found.
| Name | Description |
|---|---|
| keys | The dot-separated sequence of keys. |
Invoke the function.
Declared in <mrdocs/Dom/Value.hpp>
template<class... Args>
Value
operator()(Args&&... args) const;
If the Value is not an object, or the key is not found, a Value of type Kind::Undefined is returned.
Another instance of the object
| Name | Description |
|---|---|
| args | The arguments to the function. |
Set or replace the value for a given key.
| Name | Description |
|---|---|
| key | The key. |
| value | The value to set. |
Return if an Array or Object is empty.
Declared in <mrdocs/Dom/Value.hpp>
std::size_t
size() const;
if an Array or Object is empty.
Swap two values.
| Name | Description |
|---|---|
| other | A variant container for any kind of Dom value. |
Return the type key of the value.
Declared in <mrdocs/Dom/Value.hpp>
char const*
type_key() const noexcept;
the type key of the value.
Return the string.
Declared in <mrdocs/Dom/Value.hpp>
explicit
operator std::string() const noexcept;
the string.
Determine if a value is truthy
Declared in <mrdocs/Dom/Value.hpp>
explicit
operator bool() const noexcept;
A value is truthy if it is a boolean and is true, a number and not zero, or an non-empty string, array or object.
true if the value is truthy, false otherwise
Array payload; shared with lazy arrays.
Boolean payload when the value kind is Boolean.
Declared in <mrdocs/Dom/Value.hpp>
bool b_ = {false};
Callable payload used by template helpers.
Integer payload when the value kind is Integer.
Declared in <mrdocs/Dom/Value.hpp>
int64_t i_;
Object payload; shared with lazy objects.
UTF-8 string or safe-string payload.
Customization point tag.
Declared in <mrdocs/Dom/Value.hpp>
struct ValueFromTag;
This tag type is used by the function dom::ValueFrom to select overloads of tag_invoke.
This type is empty; it has no members.
| Name | Description |
|---|---|
::mrdocs::tag_invoke | Convert a NoexceptInfo to a DOM value. |
::mrdocs::tag_invoke | Serialize a Type into a DOM value. |
::mrdocs::tag_invoke | Serialize a polymorphic template argument into a DOM value. |
::mrdocs::tag_invoke | Serialize a FundamentalTypeKind into a DOM value. |
::mrdocs::tag_invoke | Return the UsingClass as a dom::Value string. |
::mrdocs::tag_invoke | Serialize an optional polymorphic name into a DOM value. |
::mrdocs::tag_invoke | Serialize a polymorphic name into a DOM value. |
::mrdocs::tag_invoke | Return the AccessKind as a dom::Value string. |
::mrdocs::tag_invoke | Serialize an optional polymorphic type into a DOM value. |
::mrdocs::tag_invoke | Convert SymbolID to dom::Value object in the DOM using Corpus |
::mrdocs::tag_invoke | Serialize template info into a DOM value. |
::mrdocs::tag_invoke | Convert SymbolID pointers to dom::Value or null. |
::mrdocs::tag_invoke | Return the ConstexprKind as a dom::Value string. |
::mrdocs::tag_invoke | Serialize the auto kind into a DOM value. |
::mrdocs::tag_invoke | Generic ValueFrom for any described enum. |
::mrdocs::tag_invoke | Serialize a name into a DOM value. |
::mrdocs::tag_invoke | Serialize source locations into a DOM value. |
::mrdocs::tag_invoke | Serialize a base description into a DOM value. |
::mrdocs::tag_invoke | Map a TypeKind into a DOM value. |
::mrdocs::tag_invoke | Serialize the argument to a DOM value. |
::mrdocs::tag_invoke | Serialize a template parameter into a DOM value. |
::mrdocs::tag_invoke | Return the Param as a dom::Value object. |
::mrdocs::tag_invoke | Generic ValueFrom for any described compound type. |
::mrdocs::tag_invoke | Serialize an optional template info into a DOM value. |
::mrdocs::tag_invoke | Serialize a polymorphic type into a DOM value. |
::mrdocs::tag_invoke | Return the ReferenceKind as a dom::Value string. |
::mrdocs::tag_invoke | Map an operator kind to a DOM value (its underlying integer). |
::mrdocs::tag_invoke | Return the ExplicitInfo as a dom::Value string. |
::mrdocs::tag_invoke | Return the StorageClassKind as a dom::Value string. |
::mrdocs::tag_invoke | Generic ValueFrom for described enums, with context. |
::mrdocs::tag_invoke | Convert an optional SymbolID to dom::Value or null. |
::mrdocs::tag_invoke | Map a vector of parameters to a dom::Value object. |
::mrdocs::tag_invoke | Convert SymbolID to dom::Value string in the DOM using toBase16 |
::mrdocs::tag_invoke | Map an ExprInfo to a dom::Value object. |
::mrdocs::tag_invoke | Map a QualifierKind into a DOM value. |
::mrdocs::tag_invoke | Serialize a polymorphic template parameter. |
::mrdocs::doc::tag_invoke | Return the Parts from a dom::Value string. |
::mrdocs::doc::tag_invoke | Map an optional brief block to a DOM value, yielding null when absent. |
::mrdocs::doc::tag_invoke | Map the Polymorphic Block as a dom::Value object. |
::mrdocs::doc::tag_invoke | Map an optional polymorphic block into a DOM value, producing null when empty. |
::mrdocs::doc::tag_invoke | Serialize a polymorphic inline node into a DOM value. |
::mrdocs::doc::tag_invoke | Return the ParamDirection from a dom::Value string. |
Function implementation that forwards the entire Array to a callable.
Declared in <mrdocs/Dom/Function.hpp>
template<class F>
class VariadicFunctionImpl
: public FunctionImpl
| Name | Description |
|---|---|
FunctionImpl | Value-semantic wrapper over a callable exposed to the DOM layer. |
| Name | Description |
|---|---|
args_type | Argument tuple type accepted by the callable. |
return_type | Result type produced by the callable. |
| Name | Description |
|---|---|
VariadicFunctionImpl [constructor] | Construct from any callable convertible to F. |
call [virtual] | Invoke the wrapped callable with the full argument array. |
type_key [virtual] | Return the type key of the implementation. |
Argument tuple type accepted by the callable.
Declared in <mrdocs/Dom/Function.hpp>
using args_type = function_traits<F>::args_type;
Result type produced by the callable.
Declared in <mrdocs/Dom/Function.hpp>
using return_type = function_traits<F>::return_type;
Construct from any callable convertible to F.
Declared in <mrdocs/Dom/Function.hpp>
template<class U>
VariadicFunctionImpl(U&& u);
| Name | Description |
|---|---|
| u | Callable to wrap. |
Invoke the wrapped callable with the full argument array.
Declared in <mrdocs/Dom/Function.hpp>
virtual
Expected<Value>
call(Array const& args) const override;
A container holding an error or a value.
| Name | Description |
|---|---|
| args | An array of values |
Return the type key of the implementation.
Declared in <mrdocs/Dom/Function.hpp>
virtual
char const*
type_key() const noexcept override;
the type key of the implementation.
Helper traits to extract return and argument types from callables.
Declared in <mrdocs/Dom/Function.hpp>
template<typename F>
struct function_traits;
| Name | Description |
|---|---|
function_traits<F> | Traits specialization for functors/lambdas. |
Traits specialization for functors/lambdas.
Declared in <mrdocs/Dom/Function.hpp>
template<typename F>
requires requires { &F::operator(); }
struct function_traits<F>
: function_traits<decltype(&F::operator)>
| Name | Description |
|---|---|
function_traits<decltype(&F::operator)> | Helper traits to extract return and argument types from callables. |
Traits specialization for function pointers.
Declared in <mrdocs/Dom/Function.hpp>
template<
typename R,
typename... Args>
struct function_traits<R(*)(Args...)>;
| Name | Description |
|---|---|
args_type | Tuple of argument types accepted by the callable. |
return_type | Result type of the callable. |
Tuple of argument types accepted by the callable.
Declared in <mrdocs/Dom/Function.hpp>
using args_type = std::tuple<Args...>;
Result type of the callable.
Declared in <mrdocs/Dom/Function.hpp>
using return_type = R;
Traits specialization for free functions.
Declared in <mrdocs/Dom/Function.hpp>
template<
typename R,
typename... Args>
struct function_traits<R(Args...)>;
| Name | Description |
|---|---|
args_type | Tuple of argument types accepted by the callable. |
return_type | Result type of the callable. |
Tuple of argument types accepted by the callable.
Declared in <mrdocs/Dom/Function.hpp>
using args_type = std::tuple<Args...>;
Result type of the callable.
Declared in <mrdocs/Dom/Function.hpp>
using return_type = R;
Traits specialization for member functions.
Declared in <mrdocs/Dom/Function.hpp>
template<
typename C,
typename R,
typename... Args>
struct function_traits<R const volatile(C::*)(Args...)>;
Traits specialization for const member functions.
Traits specialization for volatile member functions.
Traits specialization for const volatile member functions.
| Name | Description |
|---|---|
args_type | Tuple of argument types accepted by the callable. |
return_type | Result type of the callable. |
Tuple of argument types accepted by the callable.
Declared in <mrdocs/Dom/Function.hpp>
using args_type = std::tuple<Args...>;
Result type of the callable.
Declared in <mrdocs/Dom/Function.hpp>
using return_type = R;
The type of data in a Value.
Declared in <mrdocs/Dom/Kind.hpp>
enum class Kind : int;
This is the type of data stored in a Value. These types are loosely modeled after the JavaScript types and data structures.
Primitive values are Undefined, Null, Boolean, Integer, and String.
Undefined and Null are inhabited by a single value each. The difference between Undefined and Null is that Undefined is the default value for a Value, while Null represents a value that is explicitly set. Undefined is used to represent things such as:
An uninitialized Value
The Value returned from a function that failed to return a value
The result of accessing a nonexistent object property
The result of a find algorithm when no element is found
This distinction is semantically important as algorithms frequently need to distinguish between these two cases.
Booleans, Integers, and Strings are also primitive values. This means they are deeply copied when assigned or passed as a parameter.
Other value types, such as Array, Object, and Function are reference types, meaning that they are not copied when assigned or passed as a parameter. Instead, the reference is copied, and the original value is shared.
These reference types are modeled after JavaScript "Objects". All non-primitive types (Object types) are derived from Object in JavaScript. This means types such as Array and Function represent a relevant selection of built-in types that would derive from Object in JavaScript.
Objects are a collection of properties, which are equivalent to key-value pairs. Property values can be any type, including other Objects, allowing for the creation of arbitrarily complex data structures.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures
| Name | Description |
|---|---|
Undefined | The value is undefined. |
Null | The value is null. |
Boolean | The value is a boolean. |
Integer | The value is an integer. |
String | The value is a string. |
SafeString | The value is a safe string. |
Array | The value is an array. |
Object | The value is an object. |
Function | The value is a function. |
LazyArray overloads
Declared in <mrdocs/Dom/LazyArray.hpp>
Return a new dom::Array based on a lazy array implementation.
template<std::ranges::random_access_range T>
requires HasStandaloneValueFrom<std::ranges::range_value_t<T>>
Array
LazyArray(T const& arr);
» more...
Return a new dom::Array based on a FromValue context
template<
std::ranges::random_access_range T,
class Context>
requires HasValueFrom<std::ranges::range_value_t<T>, Context>
Array
LazyArray(
T const& arr,
Context const& ctx);
» more...
| Name | Description |
|---|---|
| arr | The underlying range of elements. |
| ctx | The context used to convert each element to a dom::Value. |
Return a new dom::Array based on a lazy array implementation.
Declared in <mrdocs/Dom/LazyArray.hpp>
template<std::ranges::random_access_range T>
requires HasStandaloneValueFrom<std::ranges::range_value_t<T>>
Array
LazyArray(T const& arr);
A new dom::Array whose elements are the result of converting each element in the underlying range to a dom::Value.
| Name | Description |
|---|---|
| arr | The underlying range of elements. |
Return a new dom::Array based on a FromValue context
Declared in <mrdocs/Dom/LazyArray.hpp>
template<
std::ranges::random_access_range T,
class Context>
requires HasValueFrom<std::ranges::range_value_t<T>, Context>
Array
LazyArray(
T const& arr,
Context const& ctx);
A new dom::Array whose elements are the result of converting each element in the underlying range using the specified context.
| Name | Description |
|---|---|
| arr | The underlying range of elements. |
| ctx | The context used to convert each element to a dom::Value. |
LazyObject overloads
Declared in <mrdocs/Dom/LazyObject.hpp>
Return a new dom::Object based on a lazy object implementation.
template<HasLazyObjectMapWithoutContext T>
Object
LazyObject(T const& obj);
» more...
Return a new dom::Object based on a transformed lazy array implementation.
template<
class T,
class Context>
requires HasLazyObjectMap<T, Context>
Object
LazyObject(
T const& arr,
Context const& context);
» more...
| Name | Description |
|---|---|
| obj | The underlying object. |
| arr | The underlying range of elements. |
| context | The context used to convert each element to a dom::Value. |
Return a new dom::Object based on a lazy object implementation.
Declared in <mrdocs/Dom/LazyObject.hpp>
template<HasLazyObjectMapWithoutContext T>
Object
LazyObject(T const& obj);
A new dom::Object whose properties are the result of converting each property in the underlying object to a dom::Value.
| Name | Description |
|---|---|
| obj | The underlying object. |
Return a new dom::Object based on a transformed lazy array implementation.
Declared in <mrdocs/Dom/LazyObject.hpp>
template<
class T,
class Context>
requires HasLazyObjectMap<T, Context>
Object
LazyObject(
T const& arr,
Context const& context);
A new dom::Array whose elements are the result of converting each element in the underlying range using the specified context.
| Name | Description |
|---|---|
| arr | The underlying range of elements. |
| context | The context used to convert each element to a dom::Value. |
Return a new dom::Array based on a transformed lazy array implementation.
Declared in <mrdocs/Dom/LazyArray.hpp>
template<
std::ranges::random_access_range T,
class F>
requires std::invocable<F, std::ranges::range_value_t<T>> &&
HasStandaloneValueFrom<std::invoke_result_t<F, std::ranges::range_value_t<T>>>
Array
TransformArray(
T const& arr,
F const& f);
A new dom::Array whose elements are the result of applying the transform function to each element in the underlying range.
| Name | Description |
|---|---|
| arr | The underlying range of elements. |
| f | The transform function to apply to each element before converting it to a dom::Value. |
ValueFrom overloads
Declared in <mrdocs/Dom/Value.hpp>
Convert an object of type T to dom::Value.
template<class T>
requires HasStandaloneValueFrom<T>
Value
ValueFrom(T&& t);
» more...
Convert an object of type T to dom::Value.
template<class T>
requires HasStandaloneValueFrom<T>
void
ValueFrom(
T&& t,
Value& v);
» more...
Convert an object of type T to dom::Value with a context
template<
class T,
class Context>
requires HasValueFrom<T, Context>
Value
ValueFrom(
T&& t,
Context const& ctx);
» more...
Convert an object of type T to dom::Value.
template<
class Context,
HasValueFrom<Context> T>
void
ValueFrom(
T&& t,
Context const& ctx,
Value& v);
» more...
dom::Value out parameter.
| Name | Description |
|---|---|
| T | The type of the object to convert. |
| Context | The type of context passed to the conversion function. |
| Name | Description |
|---|---|
| t | The object to convert. |
| v | dom::Value out parameter. |
| ctx | Context passed to the conversion function. |
Convert an object of type T to dom::Value.
Declared in <mrdocs/Dom/Value.hpp>
template<class T>
requires HasStandaloneValueFrom<T>
Value
ValueFrom(T&& t);
This function attempts to convert an object of type T to dom::Value using
a user-provided overload of tag_invoke.
one of dom::Value's constructors,
Conversion of other types is done by calling an overload of tag_invoke found by argument-dependent lookup. Its signature should be similar to:
void tag_invoke( ValueFromTag, dom::Value&, T );
Strong guarantee.
dom::Value out parameter.
| Name | Description |
|---|---|
| T | The type of the object to convert. |
| Name | Description |
|---|---|
| t | The object to convert. |
Convert an object of type T to dom::Value.
Declared in <mrdocs/Dom/Value.hpp>
template<class T>
requires HasStandaloneValueFrom<T>
void
ValueFrom(
T&& t,
Value& v);
This function attempts to convert an object of type T to dom::Value using
a user-provided overload of tag_invoke.
one of dom::Value's constructors,
Conversion of other types is done by calling an overload of tag_invoke found by argument-dependent lookup. Its signature should be similar to:
void tag_invoke( ValueFromTag, dom::Value&, T );
Strong guarantee.
| Name | Description |
|---|---|
| T | The type of the object to convert. |
| Name | Description |
|---|---|
| t | The object to convert. |
| v | dom::Value out parameter. |
Convert an object of type T to dom::Value with a context
Declared in <mrdocs/Dom/Value.hpp>
template<
class T,
class Context>
requires HasValueFrom<T, Context>
Value
ValueFrom(
T&& t,
Context const& ctx);
This function attempts to convert an object of type T to dom::Value using
a user-provided overload of tag_invoke.
one of dom::Value's constructors,
Conversion of other types is done by calling an overload of tag_invoke found by argument-dependent lookup. Its signature should be similar to:
void tag_invoke( ValueFromTag, dom::Value&, T );
Strong guarantee.
dom::Value out parameter.
| Name | Description |
|---|---|
| T | The type of the object to convert. |
| Name | Description |
|---|---|
| t | The object to convert. |
| ctx | Context passed to the conversion function. |
Convert an object of type T to dom::Value.
Declared in <mrdocs/Dom/Value.hpp>
template<
class Context,
HasValueFrom<Context> T>
void
ValueFrom(
T&& t,
Context const& ctx,
Value& v);
This function attempts to convert an object of type T to dom::Value using
a user-provided overload of tag_invoke.
one of dom::Value's constructors,
Conversion of user-provided types is done by calling an overload of tag_invoke found by argument-dependent lookup. Its signature should be similar to:
void tag_invoke( ValueFromTag, dom::Value&, T, Context const& );
or
void tag_invoke( ValueFromTag, dom::Value&, T );
The overloads are checked for existence in that order and the first that matches will be selected.
The ctx argument can be used either as a tag type to provide conversions for third-party types, or to pass extra data to the conversion function.
Strong guarantee.
| Name | Description |
|---|---|
| T | The type of the object to convert. |
| Context | The type of context passed to the conversion function. |
| Name | Description |
|---|---|
| t | The object to convert. |
| ctx | Context passed to the conversion function. |
| v | dom::Value out parameter. |
Create a Function from a fixed-arity invocable.
Function that forwards arguments to f.
| Name | Description |
|---|---|
| f | Callable to wrap. |
Create a Function that receives the argument Array directly.
Declared in <mrdocs/Dom/Function.hpp>
template<class F>
requires std::invocable<F, Array const&>
Function
makeVariadicInvocable(F&& f);
Function wrapper for the callable.
| Name | Description |
|---|---|
| f | Callable invoked with the argument array. |
Return a new array using a custom implementation.
Declared in <mrdocs/Dom/Array.hpp>
template<
class T,
class... Args>
requires std::derived_from<T, ArrayImpl>
Array
newArray(Args&&... args);
Return a new array using a custom implementation.
A new array using the specified implementation.
| Name | Description |
|---|---|
| T | The type of the custom implementation. This must be derived from ArrayImpl. |
| Args | The types of the arguments. |
| Name | Description |
|---|---|
| args | Arguments forwarded to the constructor of T. |
Return a diagnostic string.
Declared in <mrdocs/Dom/Function.hpp>
template<
class T,
class... Args>
requires std::derived_from<T, FunctionImpl>
Function
newFunction(Args&&... args);
Return a new function using a custom implementation.
a diagnostic string.
| Name | Description |
|---|---|
| args | The arguments to the function. |
Return a new object using a custom implementation.
Declared in <mrdocs/Dom/Object.hpp>
template<
class T,
class... Args>
requires std::derived_from<T, ObjectImpl>
Object
newObject(Args&&... args);
A new object using the specified implementation.
| Name | Description |
|---|---|
| T | The type of the custom implementation. This must be derived from ObjectImpl. |
| Args | The types of the arguments. |
| Name | Description |
|---|---|
| args | Arguments forwarded to the constructor of T. |
Return the first dom::Value that is not truthy, or the last one.
Declared in <mrdocs/Dom/Value.hpp>
auto
operator&&(
S const& lhs,
Value const& rhs) noexcept;
» more...
auto
operator&&(
Value const& lhs,
S const& rhs) noexcept;
» more...
Return the first dom::Value that is not truthy, or the last one.
dom::Value
operator&&(
Value const& lhs,
Value const& rhs);
» more...
Declared in <mrdocs/Dom/Value.hpp>
auto
operator&&(
S const& lhs,
Value const& rhs) noexcept;
Declared in <mrdocs/Dom/Value.hpp>
auto
operator&&(
Value const& lhs,
S const& rhs) noexcept;
Return the first dom::Value that is not truthy, or the last one.
Declared in <mrdocs/Dom/Value.hpp>
dom::Value
operator&&(
Value const& lhs,
Value const& rhs);
This function is equivalent to the JavaScript && operator.
the first dom::Value that is not truthy, or the last one.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Addition operators
Declared in <mrdocs/Dom/Array.hpp>
iterator
operator+(
difference_type n,
iterator it) noexcept;
» more...
Concatenate two arrays.
Array
operator+(
Array const& lhs,
Array const& rhs);
» more...
auto
operator+(
Array const& lhs,
S const& rhs) noexcept;
» more...
auto
operator+(
S const& lhs,
Array const& rhs) noexcept;
» more...
auto
operator+(
S const& lhs,
String const& rhs) noexcept;
» more...
auto
operator+(
S const& lhs,
Value const& rhs) noexcept;
» more...
auto
operator+(
String const& lhs,
S const& rhs) noexcept;
» more...
Concatenate two strings.
auto
operator+(
String const& lhs,
String const& rhs) noexcept;
» more...
auto
operator+(
Value const& lhs,
S const& rhs) noexcept;
» more...
Add or concatenate two values.
dom::Value
operator+(
Value const& lhs,
Value const& rhs);
» more...
The concatenated string.
| Name | Description |
|---|---|
| lhs | The left-hand side string. |
| rhs | The right-hand side string. |
Concatenate two arrays.
An array of values
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Declared in <mrdocs/Dom/Array.hpp>
auto
operator+(
Array const& lhs,
S const& rhs) noexcept;
Declared in <mrdocs/Dom/Array.hpp>
auto
operator+(
S const& lhs,
Array const& rhs) noexcept;
Declared in <mrdocs/Dom/String.hpp>
auto
operator+(
S const& lhs,
String const& rhs) noexcept;
Declared in <mrdocs/Dom/Value.hpp>
auto
operator+(
S const& lhs,
Value const& rhs) noexcept;
Declared in <mrdocs/Dom/String.hpp>
auto
operator+(
String const& lhs,
S const& rhs) noexcept;
Concatenate two strings.
Declared in <mrdocs/Dom/String.hpp>
auto
operator+(
String const& lhs,
String const& rhs) noexcept;
The concatenated string.
| Name | Description |
|---|---|
| lhs | The left-hand side string. |
| rhs | The right-hand side string. |
Declared in <mrdocs/Dom/Value.hpp>
auto
operator+(
Value const& lhs,
S const& rhs) noexcept;
Add or concatenate two values.
Declared in <mrdocs/Dom/Value.hpp>
dom::Value
operator+(
Value const& lhs,
Value const& rhs);
A variant container for any kind of Dom value.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Return the first dom::Value that is truthy, or the last one.
Declared in <mrdocs/Dom/Value.hpp>
auto
operator||(
S const& lhs,
Value const& rhs) noexcept;
» more...
auto
operator||(
Value const& lhs,
S const& rhs) noexcept;
» more...
Return the first dom::Value that is truthy, or the last one.
dom::Value
operator||(
Value const& lhs,
Value const& rhs);
» more...
Declared in <mrdocs/Dom/Value.hpp>
auto
operator||(
S const& lhs,
Value const& rhs) noexcept;
Declared in <mrdocs/Dom/Value.hpp>
auto
operator||(
Value const& lhs,
S const& rhs) noexcept;
Return the first dom::Value that is truthy, or the last one.
Declared in <mrdocs/Dom/Value.hpp>
dom::Value
operator||(
Value const& lhs,
Value const& rhs);
This function is equivalent to the JavaScript || operator.
the first dom::Value that is truthy, or the last one.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Return a non-empty string, or a null.
Declared in <mrdocs/Dom/Value.hpp>
Return a non-empty string, or a null.
Value
stringOrNull(std::string_view s);
» more...
Return a non-empty string, or a null.
Value
stringOrNull(Optional<std::string> s);
» more...
Return a non-empty string, or a null.
Value
stringOrNull(std::string const& s);
» more...
| Name | Description |
|---|---|
| s | The string to check. |
Return a non-empty string, or a null.
a non-empty string, or a null.
| Name | Description |
|---|---|
| s | The string to check. |
Return a non-empty string, or a null.
a non-empty string, or a null.
| Name | Description |
|---|---|
| s | The string to check. |
Return a non-empty string, or a null.
a non-empty string, or a null.
| Name | Description |
|---|---|
| s | The string to check. |
swap overloads
Declared in <mrdocs/Dom/Array.hpp>
Swap two arrays.
void
swap(
Array& lhs,
Array& rhs) noexcept;
» more...
Swap two objects.
void
swap(
Function& lhs,
Function& rhs) noexcept;
» more...
Swap two objects.
void
swap(
Object& lhs,
Object& rhs) noexcept;
» more...
Swap two strings.
constexpr
void
swap(
String& lhs,
String& rhs) noexcept;
» more...
Swap two values.
void
swap(
Value& v0,
Value& v1) noexcept;
» more...
| Name | Description |
|---|---|
| lhs | The first object. |
| rhs | The second object. |
Swap two arrays.
| Name | Description |
|---|---|
| lhs | An array of values |
| rhs | An array of values |
Swap two objects.
| Name | Description |
|---|---|
| lhs | The first object. |
| rhs | The second object. |
Swap two objects.
| Name | Description |
|---|---|
| lhs | A container of key and value pairs. |
| rhs | A container of key and value pairs. |
Swap two strings.
Declared in <mrdocs/Dom/String.hpp>
constexpr
void
swap(
String& lhs,
String& rhs) noexcept;
| Name | Description |
|---|---|
| lhs | The first string. |
| rhs | The second string. |
Swap two values.
| Name | Description |
|---|---|
| v0 | A variant container for any kind of Dom value. |
| v1 | A variant container for any kind of Dom value. |
toString overloads
Return a diagnostic string.
a diagnostic string.
| Name | Description |
|---|---|
| arr | An array of values |
Return a diagnostic string.
a diagnostic string.
| Name | Description |
|---|---|
| object | A container of key and value pairs. |
Return value as a string.
value as a string.
| Name | Description |
|---|---|
| value | A variant container for any kind of Dom value. |
Equality operators
Declared in <mrdocs/Dom/Array.hpp>
Return the result of comparing two strings.
bool
operator==(
String const& lhs,
String const& rhs) noexcept;
» more...
Return the result of comparing two strings.
bool
operator==(
String const& lhs,
StringLike const& rhs) noexcept;
» more...
Compare two values for equality.
bool
operator==(
Value const& lhs,
Value const& rhs) noexcept;
» more...
Compare two objects for equality.
bool
operator==(
Object const& a,
Object const& b) noexcept;
» more...
Compare two arrays for equality.
bool
operator==(
Array const& lhs,
Array const& rhs) noexcept;
» more...
Return the result of comparing two strings.
Declared in <mrdocs/Dom/String.hpp>
bool
operator==(
String const& lhs,
String const& rhs) noexcept;
the result of comparing two strings.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Return the result of comparing two strings.
Declared in <mrdocs/Dom/String.hpp>
bool
operator==(
String const& lhs,
StringLike const& rhs) noexcept;
the result of comparing two strings.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compare two values for equality.
Declared in <mrdocs/Dom/Value.hpp>
bool
operator==(
Value const& lhs,
Value const& rhs) noexcept;
This operator uses strict equality, meaning that the types must match exactly, and for objects and arrays the children must match exactly.
The == operator behaves differently for objects compared to primitive data types like numbers and strings. When comparing objects using ==, it checks for reference equality, not structural equality.
This means that two objects are considered equal with === only if they reference the exact same object in memory.
In JavaScript, this is equivalent to the === operator, which does not perform type conversions.
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compare two objects for equality.
Declared in <mrdocs/Dom/Object.hpp>
bool
operator==(
Object const& a,
Object const& b) noexcept;
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Compare two arrays for equality.
Declared in <mrdocs/Dom/Array.hpp>
bool
operator==(
Array const& lhs,
Array const& rhs) noexcept;
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Return the result of comparing two strings.
Declared in <mrdocs/Dom/String.hpp>
Return the result of comparing two strings.
bool
operator!=(
String const& lhs,
String const& rhs) noexcept;
» more...
Return the result of comparing two strings.
bool
operator!=(
String const& lhs,
StringLike const& rhs) noexcept;
» more...
Return the result of comparing two strings.
Declared in <mrdocs/Dom/String.hpp>
bool
operator!=(
String const& lhs,
String const& rhs) noexcept;
the result of comparing two strings.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Return the result of comparing two strings.
Declared in <mrdocs/Dom/String.hpp>
bool
operator!=(
String const& lhs,
StringLike const& rhs) noexcept;
the result of comparing two strings.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Three-way comparison operators
Declared in <mrdocs/Dom/Array.hpp>
Return the result of comparing two strings.
auto
operator<=>(
String const& lhs,
String const& rhs) noexcept;
» more...
Return the result of comparing two strings.
auto
operator<=>(
String const& lhs,
StringLike const& rhs) noexcept;
» more...
Three-way comparison operator
auto
operator<=>(
Value const& lhs,
S const& rhs) noexcept;
» more...
Three-way comparison operator
auto
operator<=>(
S const& lhs,
Value const& rhs) noexcept;
» more...
Compare two values for inequality.
std::strong_ordering
operator<=>(
Value const& lhs,
Value const& rhs) noexcept;
» more...
Compare two objects for precedence.
std::strong_ordering
operator<=>(
Object const& a,
Object const& b) noexcept;
» more...
Compare two arrays for precedence.
std::strong_ordering
operator<=>(
Array const& lhs,
Array const& rhs) noexcept;
» more...
Return the result of comparing two strings.
Declared in <mrdocs/Dom/String.hpp>
auto
operator<=>(
String const& lhs,
String const& rhs) noexcept;
the result of comparing two strings.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Return the result of comparing two strings.
Declared in <mrdocs/Dom/String.hpp>
auto
operator<=>(
String const& lhs,
StringLike const& rhs) noexcept;
the result of comparing two strings.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Three-way comparison operator
Declared in <mrdocs/Dom/Value.hpp>
auto
operator<=>(
Value const& lhs,
S const& rhs) noexcept;
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Three-way comparison operator
Declared in <mrdocs/Dom/Value.hpp>
auto
operator<=>(
S const& lhs,
Value const& rhs) noexcept;
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compare two values for inequality.
Declared in <mrdocs/Dom/Value.hpp>
std::strong_ordering
operator<=>(
Value const& lhs,
Value const& rhs) noexcept;
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compare two objects for precedence.
Declared in <mrdocs/Dom/Object.hpp>
std::strong_ordering
operator<=>(
Object const& a,
Object const& b) noexcept;
The relative order of the objects
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Compare two arrays for precedence.
Declared in <mrdocs/Dom/Array.hpp>
std::strong_ordering
operator<=>(
Array const& lhs,
Array const& rhs) noexcept;
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Determine if T can be converted to dom::Value.
Declared in <mrdocs/Dom/LazyObject.hpp>
template<
class T,
class Context>
concept HasLazyObjectMap = HasLazyObjectMapWithContext<T, Context> ||
HasLazyObjectMapWithoutContext<T>;
If T can be converted to dom::Value via a call to dom::ValueFrom, the static data member value is defined as true. Otherwise, value is defined as false.
Concept to determine if a type can be mapped to a dom::LazyObjectImpl with a user-provided conversion.
Declared in <mrdocs/Dom/LazyObject.hpp>
template<
class T,
class Context>
concept HasLazyObjectMapWithContext = requires(
detail::ArchetypalIO& io,
T const& t,
Context const& ctx)
{
{ tag_invoke(LazyObjectMapTag{}, io, t, ctx) } -> std::same_as<void>;
};
This concept determines if the user-provided conversion is defined as:
template <class IO>
void tag_invoke( LazyObjectMapTag, IO&, T, Context const& );
Concept to determine if a type can be mapped to a dom::LazyObjectImpl with a user-provided conversion.
Declared in <mrdocs/Dom/LazyObject.hpp>
template<class T>
concept HasLazyObjectMapWithoutContext = requires(
detail::ArchetypalIO& io,
T const& t)
{
{ tag_invoke(LazyObjectMapTag{}, io, t) } -> std::same_as<void>;
};
This concept determines if the user-provided conversion is defined as:
template <class IO>
void tag_invoke( LazyObjectMapTag, IO&, T& );
This customization can be defined by any type that needs to be converted to/from a lazy dom::Object. For example:
template <class IO>
void tag_invoke( LazyObjectMapTag, IO& io, MyStruct const& s)
{
io.map("name", s.name);
io.map("size", s.size);
io.map("age", s.age);
}
Determine if T can be converted to dom::Value without a context.
Declared in <mrdocs/Dom/Value.hpp>
template<class T>
concept HasStandaloneValueFrom = HasValueFromWithoutContext<T> ||
std::constructible_from<Value, T>;
This concept determines if there is a user-provided conversion to dom::Value that does not require a context or if dom::Value has a constructor that can be used to convert T to a dom::Value.
Determine if T can be converted to dom::Value.
Declared in <mrdocs/Dom/Value.hpp>
template<
class T,
class Context>
concept HasValueFrom = HasValueFromWithContext<T, Context> ||
HasValueFromWithoutContext<T> ||
std::constructible_from<Value, T>;
If T can be converted to dom::Value via a call to dom::ValueFrom, the static data member value is defined as true. Otherwise, value is defined as false.
Concept to determine if a type can be converted to a dom::Value with a user-provided conversion.
Declared in <mrdocs/Dom/Value.hpp>
template<
class T,
class Context>
concept HasValueFromWithContext = requires(
Value& v,
T const& t,
Context const& ctx)
{
tag_invoke(ValueFromTag{}, v, t, ctx);
};
This concept determines if the user-provided conversion is defined as:
void tag_invoke( ValueFromTag, dom::Value&, T, Context const& );
Concept to determine if a type can be converted to a dom::Value with a user-provided conversion.
Declared in <mrdocs/Dom/Value.hpp>
template<class T>
concept HasValueFromWithoutContext = requires(
Value& v,
T const& t)
{
tag_invoke(ValueFromTag{}, v, t);
};
This concept determines if the user-provided conversion is defined as:
void tag_invoke( ValueFromTag, dom::Value&, T );
Satisfied if StringTy is convertible to String but not a String.
Declared in <mrdocs/Dom/String.hpp>
template<class StringTy>
concept StringLikeTy = ! std::is_same_v<StringTy, String> &&
std::convertible_to<StringTy, std::string_view>;
Concept selecting callables convertible to dom::Value.
Declared in <mrdocs/Dom/Function.hpp>
template<class F>
concept function_traits_convertible_to_value = has_function_traits<F> &&
has_function_traits_for_default_function_impl<F>;
Concept requiring all arguments be convertible to dom::Value.
Declared in <mrdocs/Dom/Function.hpp>
template<typename F>
concept has_function_args_for_default_function_impl = (std::tuple_size_v<typename function_traits<F>::args_type> == 0 ||
[]<std::size_t... I>(std::index_sequence<I...>) {
return
(std::convertible_to<
std::tuple_element_t<
I, typename function_traits<F>::args_type>,
Value> && ...);
}(std::make_index_sequence<std::tuple_size_v<typename function_traits<F>::args_type>>()));
Concept true when function_traits is defined for F.
Declared in <mrdocs/Dom/Function.hpp>
template<typename F>
concept has_function_traits = requires {
typename function_traits<F>::return_type;
typename function_traits<F>::args_type;
};
Concept combining argument and return constraints for default wrapper.
Declared in <mrdocs/Dom/Function.hpp>
template<typename F>
concept has_function_traits_for_default_function_impl = has_invoke_result_for_default_function_impl<F> &&
has_function_args_for_default_function_impl<F>;
Concept true when F returns Expected<dom::Value> or Expected<void>.
Declared in <mrdocs/Dom/Function.hpp>
template<typename F>
concept has_invoke_expected_result_convertible_to_dom_value = detail::isExpected<typename function_traits<F>::return_type> &&
(std::convertible_to<typename function_traits<F>::return_type::value_type, Value> ||
std::same_as<typename function_traits<F>::return_type::value_type, void>);
Concept true when F returns a dom::Value or void.
Declared in <mrdocs/Dom/Function.hpp>
template<typename F>
concept has_invoke_result_convertible_to_dom_value = std::convertible_to<typename function_traits<F>::return_type, Value> ||
std::same_as<typename function_traits<F>::return_type, void>;
Concept enabling default function wrapper for supported return types.
Declared in <mrdocs/Dom/Function.hpp>
template<typename F>
concept has_invoke_result_for_default_function_impl = has_invoke_result_convertible_to_dom_value<F> ||
has_invoke_expected_result_convertible_to_dom_value<F>;
Filesystem helpers (join, temp, real-path resolution) used throughout MrDocs.
The files namespace centralizes cross-platform path manipulation so CLI, generators, and tests can share the same normalization and staging logic.
| Name | Description |
|---|---|
FileType | The type of a file. |
| Name | Description |
|---|---|
appendPath | appendPath overloads |
createDirectory | Create a directory. |
exists | Determine if a path exists |
getFileName | Return the filename part of the path. |
getFileText | Return the contents of a file as a string. |
getFileType | Return the file type or an error |
getParentDir | Return the parent directory. |
getSourceFilename | Return the relevant suffix of a source file path. |
isAbsolute | Return true if pathName is absolute. |
isDirectory | Determine if a path is a directory. |
isDirsy | Return true if pathName ends in a separator. |
isLexicalDirectory | Determine lexically if a path is a directory. |
isPosixStyle | Check if the path is posix style. |
isResolvedSubpathOf | Checks whether the given path lies within the specified prefix, tolerating symlinks. |
isSubpathOf | Checks whether the given path lies within the specified prefix. |
makeAbsolute | Return an absolute path from a possibly relative path. |
makeDirsy | Append a trailing native separator if not already present. |
makePosixStyle | Convert all backward slashes to forward slashes. |
makeRealPath | Return the real, symlink-resolved form of a path. |
normalizeDir | Return a normalized directory. |
normalizePath | Return a normalized path. |
requireAbsolute | Return an error if pathName is not absolute. |
requireDirectory | Return an error if the path is not a directory. |
withExtension | Return the filename with a new or different extension. |
The type of a file.
Declared in <mrdocs/Support/Path.hpp>
enum class FileType : int;
| Name | Description |
|---|---|
not_found | The file does not exist |
regular | The path represents a regular file |
directory | The file is a directory |
other | The file is something else |
| Name | Description |
|---|---|
getFileType | Return the file type or an error |
appendPath overloads
Declared in <mrdocs/Support/Path.hpp>
Append a component to a base path using the native separator.
std::string
appendPath(
std::string_view basePath,
std::string_view name);
» more...
Append two components to a base path using the native separator.
std::string
appendPath(
std::string_view basePath,
std::string_view name1,
std::string_view name2);
» more...
Append three components to a base path using the native separator.
std::string
appendPath(
std::string_view basePath,
std::string_view name1,
std::string_view name2,
std::string_view name3);
» more...
Append four components to a base path using the native separator.
std::string
appendPath(
std::string_view basePath,
std::string_view name1,
std::string_view name2,
std::string_view name3,
std::string_view name4);
» more...
Combined path string.
| Name | Description |
|---|---|
| basePath | Base path. |
| name | Component to append. |
| name1 | First component to append. |
| name2 | Second component to append. |
| name3 | Third component to append. |
| name4 | Fourth component to append. |
Append a component to a base path using the native separator.
Declared in <mrdocs/Support/Path.hpp>
std::string
appendPath(
std::string_view basePath,
std::string_view name);
Combined path string.
| Name | Description |
|---|---|
| basePath | Base path. |
| name | Component to append. |
Append two components to a base path using the native separator.
Declared in <mrdocs/Support/Path.hpp>
std::string
appendPath(
std::string_view basePath,
std::string_view name1,
std::string_view name2);
Combined path string.
| Name | Description |
|---|---|
| basePath | Base path. |
| name1 | First component to append. |
| name2 | Second component to append. |
Append three components to a base path using the native separator.
Declared in <mrdocs/Support/Path.hpp>
std::string
appendPath(
std::string_view basePath,
std::string_view name1,
std::string_view name2,
std::string_view name3);
Combined path string.
| Name | Description |
|---|---|
| basePath | Base path. |
| name1 | First component to append. |
| name2 | Second component to append. |
| name3 | Third component to append. |
Append four components to a base path using the native separator.
Declared in <mrdocs/Support/Path.hpp>
std::string
appendPath(
std::string_view basePath,
std::string_view name1,
std::string_view name2,
std::string_view name3,
std::string_view name4);
Combined path string.
| Name | Description |
|---|---|
| basePath | Base path. |
| name1 | First component to append. |
| name2 | Second component to append. |
| name3 | Third component to append. |
| name4 | Fourth component to append. |
Create a directory.
Declared in <mrdocs/Support/Path.hpp>
Expected<void>
createDirectory(std::string_view pathName);
Any missing parent directories will also be created.
A container holding an error or a value.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to create. |
Determine if a path exists
Declared in <mrdocs/Support/Path.hpp>
bool
exists(std::string_view pathName);
true if the path exists, false otherwise.
| Name | Description |
|---|---|
| pathName | The absolute or relative path |
Return the filename part of the path.
Declared in <mrdocs/Support/Path.hpp>
std::string_view
getFileName(std::string_view pathName);
The filename part of the path, or the empty string if there is none.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Return the contents of a file as a string.
Declared in <mrdocs/Support/Path.hpp>
Expected<std::string>
getFileText(std::string_view pathName);
The contents of the file, or an error if any occurred.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the file. |
Return the file type or an error
Declared in <mrdocs/Support/Path.hpp>
Expected<FileType>
getFileType(std::string_view pathName);
the file type or an error
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the file. |
Return the parent directory.
Declared in <mrdocs/Support/Path.hpp>
Return the parent directory.
std::string
getParentDir(std::string_view pathName);
» more...
Return the parent directory.
std::string
getParentDir(
std::string_view pathName,
unsigned int levels);
» more...
The parent directory, or the empty string if there is none.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
| levels | The number of levels to go up. If this is zero, the original path is returned. If this is greater than the number of levels in the path, the empty string is returned. |
Return the parent directory.
Declared in <mrdocs/Support/Path.hpp>
std::string
getParentDir(std::string_view pathName);
If the parent directory is defined, the returned path will always have a trailing separator.
The parent directory, or the empty string if there is none.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Return the parent directory.
Declared in <mrdocs/Support/Path.hpp>
std::string
getParentDir(
std::string_view pathName,
unsigned int levels);
If the parent directory is defined, the returned path will always have a trailing separator.
The parent directory, or the empty string if there is none.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
| levels | The number of levels to go up. If this is zero, the original path is returned. If this is greater than the number of levels in the path, the empty string is returned. |
Return the relevant suffix of a source file path.
Declared in <mrdocs/Support/Path.hpp>
std::string_view
getSourceFilename(std::string_view pathName);
The suffix, including the leading dot, or the empty string if there is no suffix.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the file. |
Return true if pathName is absolute.
Declared in <mrdocs/Support/Path.hpp>
bool
isAbsolute(std::string_view pathName) noexcept;
true if the path is absolute, false otherwise.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Determine if a path is a directory.
Declared in <mrdocs/Support/Path.hpp>
bool
isDirectory(std::string_view pathName);
true if the path exists and is a directory, false otherwise.
| Name | Description |
|---|---|
| pathName | The absolute or relative path |
Return true if pathName ends in a separator.
Declared in <mrdocs/Support/Path.hpp>
bool
isDirsy(std::string_view pathName) noexcept;
true if the path ends in a separator, false otherwise.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Determine lexically if a path is a directory.
Declared in <mrdocs/Support/Path.hpp>
bool
isLexicalDirectory(std::string_view pathName);
This function determines if a path is a directory.
If the path does not exist, the function determines lexically if the path represents a directory. In this case, the function returns true if the last path segment contains a period, otherwise false.
true if the path exists and is a directory, or if the path does not exist and the last path segment does not contain a period. false otherwise.
| Name | Description |
|---|---|
| pathName | The absolute or relative path |
Check if the path is posix style.
Declared in <mrdocs/Support/Path.hpp>
bool
isPosixStyle(std::string_view pathName);
true if the path uses only forward slashes as path separators, false otherwise.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Checks whether the given path lies within the specified prefix, tolerating symlinks.
Declared in <mrdocs/Support/Path.hpp>
bool
isResolvedSubpathOf(
std::string_view pathName,
std::string_view prefix);
This behaves like isSubpathOf, but also returns true when pathName lies within prefix only after resolving symbolic links on both sides (see makeRealPath). It recognizes a file reached through a symlinked directory while prefix refers to the real path, or vice versa.
Matching is generous: a lexical match alone is enough, and resolving symlinks only ever adds matches, so anything isSubpathOf accepts is still accepted. This makes it suitable for inclusion decisions. Prefer the strict isSubpathOf for exclusion decisions, so that a symlinked alias of an excluded file is not excluded.
The symlink resolution performs filesystem lookups, so it is reached only when the lexical comparison fails; paths with no symlinks pay no extra cost.
A boolean value. Returns true if pathName lies within prefix as written or after resolving symlinks, false otherwise.
| Name | Description |
|---|---|
| pathName | A string view representing the path to be checked. |
| prefix | A string view representing the prefix to be checked against the path. |
Checks whether the given path lies within the specified prefix.
Declared in <mrdocs/Support/Path.hpp>
bool
isSubpathOf(
std::string_view pathName,
std::string_view prefix);
It returns true if pathName is prefix or lies underneath it. The comparison walks whole path segments rather than characters, so /abc contains /abc/def but not /abcdef. The comparison is case-sensitive.
Unlike a direct string comparison, this function also accepts differences in the slashes used to separate paths. Therefore, it returns true even when the slashes used in pathName and prefix are not the same. The function accepts both forward slashes ("/") and backslashes ("").
It does not resolve symbolic links; use isResolvedSubpathOf when symlink equivalence matters.
A boolean value. Returns true if pathName lies within prefix, false otherwise.
| Name | Description |
|---|---|
| pathName | A string view representing the path to be checked. |
| prefix | A string view representing the prefix to be checked against the path. |
Return an absolute path from a possibly relative path.
Declared in <mrdocs/Support/Path.hpp>
Return an absolute path from a possibly relative path.
Expected<std::string>
makeAbsolute(std::string_view pathName);
» more...
Return an absolute path from a possibly relative path.
std::string
makeAbsolute(
std::string_view pathName,
std::string_view workingDir);
» more...
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
| workingDir | The working directory to resolve relative paths against. |
Return an absolute path from a possibly relative path.
Declared in <mrdocs/Support/Path.hpp>
Expected<std::string>
makeAbsolute(std::string_view pathName);
Relative paths are resolved against the current working directory of the process.
The absolute path, or an error if any occurred.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Return an absolute path from a possibly relative path.
Declared in <mrdocs/Support/Path.hpp>
std::string
makeAbsolute(
std::string_view pathName,
std::string_view workingDir);
The absolute path, or an error if any occurred.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
| workingDir | The working directory to resolve relative paths against. |
Append a trailing native separator if not already present.
Declared in <mrdocs/Support/Path.hpp>
std::string
makeDirsy(std::string_view pathName);
A copy of the path with a trailing separator if not already present.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Convert all backward slashes to forward slashes.
Declared in <mrdocs/Support/Path.hpp>
std::string
makePosixStyle(std::string_view pathName);
A copy of the path with all backslashes replaced with forward slashes.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Return the real, symlink-resolved form of a path.
Declared in <mrdocs/Support/Path.hpp>
std::string
makeRealPath(std::string_view pathName);
Resolves every symbolic link and ./.. component in pathName to the file's actual on-disk location and returns it in POSIX style (forward slashes). The same file can be named by many paths (through symlinks, .., or a directory that is itself a link); this collapses all of those spellings to one real path, so two paths that refer to the same file produce the same result.
If the path cannot be resolved, for example because it does not exist on disk, is a virtual or in-memory file, or has not been created yet, the input is returned unchanged apart from POSIX normalization. Callers can therefore always fall back to comparing the path as written, and this function never fails.
The real POSIX path, or the POSIX-normalized input if it cannot be resolved.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to a directory or file. |
Return a normalized directory.
Declared in <mrdocs/Support/Path.hpp>
std::string
normalizeDir(std::string_view pathName);
This function returns a new directory path based on applying the changes defined by normalizePath and makeDirsy.
The normalized path.
| Name | Description |
|---|---|
| pathName | The relative or absolute path. |
Return a normalized path.
Declared in <mrdocs/Support/Path.hpp>
std::string
normalizePath(std::string_view pathName);
This function returns a new path based on applying the following changes to the passed path:
"." and ".." are resolved
Separators made uniform
Separators are replaced with the native separator
The normalized path.
| Name | Description |
|---|---|
| pathName | The relative or absolute path. |
Return an error if pathName is not absolute.
Declared in <mrdocs/Support/Path.hpp>
Expected<void>
requireAbsolute(std::string_view pathName);
An error if the path is not absolute.
| Name | Description |
|---|---|
| pathName | The absolute or relative path to the directory or file. |
Return an error if the path is not a directory.
Declared in <mrdocs/Support/Path.hpp>
Expected<void>
requireDirectory(std::string_view pathName);
An error if the path does not exist or is not a directory.
| Name | Description |
|---|---|
| pathName | The absolute or relative path |
Return the filename with a new or different extension.
Declared in <mrdocs/Support/Path.hpp>
std::string
withExtension(
std::string_view fileName,
std::string_view ext);
the filename with a new or different extension.
| Name | Description |
|---|---|
| fileName | The absolute or relative path to the directory or file. |
| ext | The extension to use, without a leading dot. If this is empty and the path contains an extension, then the extension is removed. |
Handlebars helper registry for templates.
Everything under helpers mirrors the runtime helper registry shipped with our bundled Handlebars engine so templates can call the same helpers in both Node-based dev mode and the embedded C++ rendering pipeline.
| Name | Description |
|---|---|
and_fn | "and" helper function |
detag_fn | "detag" helper function |
eq_fn | "eq" helper function |
increment_fn | "increment" helper function |
ne_fn | "ne" helper function |
not_fn | "not" helper function |
or_fn | "or" helper function |
registerAntoraHelpers | Register all the Antora helpers into a Handlebars instance |
registerBuiltinHelpers | Register all the built-in helpers into a Handlebars instance |
registerConstructorHelpers | Register contructor helpers into a Handlebars instance |
registerContainerHelpers | Register helpers to manipulate composite data types |
registerLogicalHelpers | Register logical helpers into a Handlebars instance |
registerMathHelpers | Register math helpers into a Handlebars instance |
registerStringHelpers | Register string helpers into a Handlebars instance |
registerTypeHelpers | Register type helpers into a Handlebars instance |
relativize_fn | "relativize" helper function |
select_fn | "select" helper function |
year_fn | "year" helper function |
"and" helper function
The "and" helper returns true if all of the values are truthy.
True if all of the values are truthy, false otherwise.
| Name | Description |
|---|---|
| args | The values to test |
"detag" helper function
The "detag" helper applies the regex expression "<[]+>" to the input to remove all HTML tags.
A variant container for any kind of Dom value.
| Name | Description |
|---|---|
| html | A variant container for any kind of Dom value. |
"eq" helper function
The "eq" helper returns true if all of the values are equal.
True if all of the values are equal, false otherwise.
| Name | Description |
|---|---|
| args | The values to compare |
"increment" helper function
Declared in <mrdocs/Support/Handlebars.hpp>
dom::Value
increment_fn(dom::Value const& value);
The "increment" helper adds 1 to the value if it's an integer and converts booleans to true. Other values are returned as-is.
A variant container for any kind of Dom value.
| Name | Description |
|---|---|
| value | A variant container for any kind of Dom value. |
"ne" helper function
The "ne" helper returns true if any of the values are not equal.
True if any of the values are not equal, false otherwise.
| Name | Description |
|---|---|
| args | The values to compare |
"not" helper function
The "not" helper returns true if not all of the values are truthy.
True if not all of the values are truthy, false otherwise.
| Name | Description |
|---|---|
| arg | An array of values |
"or" helper function
The "or" helper returns true if any of the values are truthy.
A variant container for any kind of Dom value.
| Name | Description |
|---|---|
| args | An array of values |
Register all the Antora helpers into a Handlebars instance
This function registers all the helpers that are part of the default Antora UI.
Individual Antora helpers can also be registered with the public *_fn functions in this namespace.
Since the Antora helpers are not mandatory and include many functions not applicable to all applications, this allows the user to register only some of the Antora helpers.
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helpers into |
https://gitlab.com/antora/antora-ui-default/-/tree/master/src/helpers
Register all the built-in helpers into a Handlebars instance
Individual built-in helpers can also be registered with the public *_fn functions in this namespace.
This allows the user to override only some of the built-in helpers. In particular, this is important for mandatory helpers, such as blockHelperMissing and helperMissing.
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helpers into |
https://github.com/handlebars-lang/handlebars.js/tree/master/lib/handlebars/helpers
https://handlebarsjs.com/guide/builtin-helpers.html
Register contructor helpers into a Handlebars instance
Declared in <mrdocs/Support/Handlebars.hpp>
void
registerConstructorHelpers(Handlebars& hbs);
This function registers a number of common helpers that allows the user to create objects of specific types directly from literals in the template.
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helpers into |
Register helpers to manipulate composite data types
Declared in <mrdocs/Support/Handlebars.hpp>
void
registerContainerHelpers(Handlebars& hbs);
This function registers a number of common helpers that operate on Objects and Arrays. Object and Array helpers are particularly useful because most applications will need to manipulate Objects and Arrays to extract information from them, such as object keys or specific Array items known ahead of time.
The helper names are inspired by the default functions provided in multiple programming languages for dictionaries, objects, and arrays, such as Python and JavaScript, for their default types.
The individual helpers are defined as an implementation detail and cannot be registered individually.
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helpers into |
Register logical helpers into a Handlebars instance
This function registers a number of common helpers that perform logical operations.
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helpers into |
Register math helpers into a Handlebars instance
This function registers a number of common helpers that perform mathemathical operations.
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helpers into |
Register string helpers into a Handlebars instance
This function registers a number of common helpers that operate on strings. String helpers are particularly useful because most applications will need to manipulate strings for presentation purposes.
All helpers can be used as either block helpers or inline helpers. When used as a block helper, the block content is used as the first argument to the helper function. When used as an inline helper, the first argument is the value of the helper.
The helper names are inspired by the default string functions provided in multiple programming languages, such as Python and JavaScript, for their default string types.
The individual helpers are defined as an implementation detail and cannot be registered individually.
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helpers into |
Register type helpers into a Handlebars instance
This function registers a number of common helpers that operate on types, such as identity, type checking, and type conversion.
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helpers into |
"relativize" helper function
Declared in <mrdocs/Support/Handlebars.hpp>
dom::Value
relativize_fn(
dom::Value to,
dom::Value from,
dom::Value context);
The "relativize" helper makes the first path relative to the second path.
A variant container for any kind of Dom value.
| Name | Description |
|---|---|
| to | A variant container for any kind of Dom value. |
| from | A variant container for any kind of Dom value. |
| context | A variant container for any kind of Dom value. |
"select" helper function
Declared in <mrdocs/Support/Handlebars.hpp>
dom::Value
select_fn(
dom::Value const& condition,
dom::Value const& result_true,
dom::Value const& result_false);
The "select" helper returns the second argument if the first argument is truthy, and the third argument otherwise.
A variant container for any kind of Dom value.
| Name | Description |
|---|---|
| condition | A variant container for any kind of Dom value. |
| result_true | A variant container for any kind of Dom value. |
| result_false | A variant container for any kind of Dom value. |
"year" helper function
Declared in <mrdocs/Support/Handlebars.hpp>
int
year_fn();
The "year" helper returns the current year as an integer.
The current year as an integer.
JavaScript interop helpers for the embedded runtime.
These functions abstract over the embedded JavaScript engine so that scripts and helpers can be bound, invoked, and marshalled without leaking engine-specific types into the rest of the codebase.
## Implementation Notes (for Python/Lua integrations)
The current implementation uses JerryScript with the following design choices:
### Context Isolation Each Context owns an independent JerryScript interpreter with its own 512KB heap. This allows multiple threads to execute JavaScript in parallel by giving each thread its own Context. The JERRY_EXTERNAL_CONTEXT build flag enables this multi-context support.
### Scope and Value Lifetime JerryScript uses heap-based reference counting (not a stack like Lua/Duktape). To provide deterministic cleanup similar to stack-based engines:
Scope tracks values created within it and releases one reference to each when the scope ends. Values that were copied elsewhere survive; values that remained local are freed.
Value holds its own reference via jerry_value_copy/jerry_value_free. Values can safely outlive their creating Scope if copied.
### Integer Limitations JerryScript only guarantees 32-bit integer precision. Values outside the int32 range (approximately +/-2 billion) are converted to strings when passed to JavaScript to avoid wraparound bugs. When reading values back, integers that fit in int64 are returned as integers; others remain as doubles.
### DOM to JS Conversion Strategy
Objects: Use lazy Proxy wrappers to avoid infinite recursion from circular references (e.g., Handlebars symbol contexts that reference parent symbols). Properties are converted on-demand when accessed.
Arrays: Converted eagerly (snapshot semantics) because they rarely contain circular references. This means JS mutations don't affect the original C++ array and vice versa.
Functions: Wrapped bidirectionally so JS can call C++ functions and C++ can invoke JS functions through dom::Function.
### Thread Safety Each Context has its own mutex serializing operations on that context. Different Contexts can execute in parallel on different threads. Values hold a shared_ptr to their Context, keeping it alive and using the mutex for all JerryScript operations.
### Port Functions JerryScript requires "port functions" for platform-specific operations. We use the default jerry-port library (JERRY_PORT=ON) for most functions (logging, time, fatal errors, etc.), but provide custom implementations of the context management functions:
jerry_port_context_alloc: Allocates context + heap memory
jerry_port_context_free: Frees context memory
jerry_port_context_get: Returns current thread's active context
The default jerry-port context functions use a static global pointer, limiting all threads to a single shared context. When building with JERRY_EXTERNAL_CONTEXT=ON, these functions are excluded from jerry-port (see third-party/patches/jerryscript/CMakeLists.txt), and mrdocs provides TLS-based implementations that allow each thread to have its own active context, enabling parallel JavaScript execution.
| Name | Description |
|---|---|
Array | Lightweight handle to a JavaScript array. |
Boolean | Boolean wrapper for JavaScript values. |
Context | An isolated JavaScript interpreter instance. |
Object | Object wrapper for JavaScript values. |
Scope | A JavaScript scope for value lifetime management. |
String | String wrapper for JavaScript values. |
Value | An ECMAScript value. |
| Name | Description |
|---|---|
Type | Types of values. |
| Name | Description |
|---|---|
operator&& | Return the first Value that is not truthy, or the last one. |
operator|| | Return the first Value that is truthy, or the last one. |
registerHelper | Register a JavaScript helper function |
swap | Swap two values. |
toString | Return value as a string. |
operator== | Compare two values for equality. |
operator!= | Inequality operators |
operator<=> | Compare two values for inequality. |
Lightweight handle to a JavaScript array.
Declared in <mrdocs/Support/JavaScript.hpp>
class Array;
Boolean wrapper for JavaScript values.
Declared in <mrdocs/Support/JavaScript.hpp>
class Boolean;
An isolated JavaScript interpreter instance.
Declared in <mrdocs/Support/JavaScript.hpp>
class Context;
Each Context owns an independent JerryScript interpreter with its own 512KB heap. Multiple Contexts can exist simultaneously, allowing parallel JavaScript execution across threads (each thread should use its own Context).
To execute scripts or create values, construct a Scope from the Context. The Scope activates the Context on the current thread and provides methods for script evaluation and value creation.
Contexts can be copied (via copy constructor); copies share the same underlying interpreter and heap. This is useful for passing context references without transferring ownership.
| Name | Description |
|---|---|
Impl | Shared runtime data for a JavaScript context. |
| Name | Description |
|---|---|
Context [constructor] | Constructors |
~Context [destructor] | Destructor. |
operator= [deleted] | Copy assignment (deleted). |
| Name | Description |
|---|---|
mrdocs::js::Scope | A JavaScript scope for value lifetime management. |
mrdocs::js::Value | An ECMAScript value. |
Scope
Shared runtime data for a JavaScript context.
Declared in <mrdocs/Support/JavaScript.hpp>
struct Impl;
Constructors
Constructor.
Declared in <mrdocs/Support/JavaScript.hpp>
Context();
Creates a new JavaScript interpreter with its own 512KB heap. The interpreter is initialized but inactive until a Scope is created.
Copy constructor.
Creates a new Context that shares the same underlying interpreter. Both Contexts reference the same heap and global object. This is useful for passing Context references without transferring ownership.
Operations on the shared interpreter are serialized by a mutex, so only one thread can execute at a time per interpreter.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Destructor.
Declared in <mrdocs/Support/JavaScript.hpp>
~Context();
Releases this reference to the interpreter. The underlying JerryScript context is destroyed when the last Context (or Value) referencing it is destroyed.
Copy assignment (deleted).
Declared in <mrdocs/Support/JavaScript.hpp>
Context&
operator=(Context const& other) = delete;
Copy assignment is deleted to prevent accidental interpreter sharing. Use the copy constructor explicitly if sharing is intended.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Object wrapper for JavaScript values.
Declared in <mrdocs/Support/JavaScript.hpp>
class Object;
A JavaScript scope for value lifetime management.
Declared in <mrdocs/Support/JavaScript.hpp>
class Scope;
Scope serves two purposes:
1. Value batch tracking: Tracks JavaScript values created within the scope and releases one reference to each when the scope ends. Values that were copied elsewhere (e.g., returned from functions, stored in containers) survive because they hold their own references. Values that remained local to the scope are freed.
2. Thread safety: Each Scope operation briefly locks the Context's mutex and activates the context (sets TLS). This allows multiple threads to share a Context while serializing access to the interpreter. Values obtained from a Scope can be used from other threads; they will acquire the lock as needed.
This provides deterministic cleanup similar to stack-based engines (Lua, Duktape) while working with JerryScript's reference-counted heap.
Multiple Scopes can exist for the same Context (even in different threads), but operations are serialized by the Context's mutex.
| Name | Description |
|---|---|
Scope [constructor] | Constructor. |
~Scope [destructor] | Destructor. |
compile_function | Compile a script and push results to stack. |
compile_script | Compile a script and push results to stack. |
eval | Compile and run a expression. |
getGlobal | Return a global object if it exists. |
getGlobalObject | Return the global object. |
pushArray | Push a new array to the stack |
pushBoolean | Push a boolean to the stack |
pushDouble | Push a double to the stack |
pushInteger | Push an integer to the stack |
pushObject | Push a new object to the stack |
pushString | Push a string to the stack |
script | Compile and run a script. |
setGlobal | Set a global object. |
Constructor.
Records the context for this scope. The context's mutex is NOT held for the lifetime of the Scope; instead, each operation locks briefly.
| Name | Description |
|---|---|
| ctx | The context to use. |
Destructor.
Declared in <mrdocs/Support/JavaScript.hpp>
~Scope();
Releases one reference to each value created within this scope. Values whose reference count drops to zero are freed; values that were copied elsewhere survive.
Compile a script and push results to stack.
Declared in <mrdocs/Support/JavaScript.hpp>
Expected<Value>
compile_function(std::string_view jsCode);
Coerces provided source into a callable function. First parenthesizes the source to force expression parsing; if that fails, executes the script and returns the first declared function name. Ambiguous sources may run side effects twice (expression attempt + fallback) matching existing behavior.
A function object that can be called. The function object has the number of arguments defined in the code. If the code does not define a function, an error is returned.
| Name | Description |
|---|---|
| jsCode | The JavaScript code to compile. |
Compile a script and push results to stack.
Declared in <mrdocs/Support/JavaScript.hpp>
Expected<Value>
compile_script(std::string_view jsCode);
Wraps arbitrary script text in an IIFE that calls eval when invoked, returning the last expression result. Function declarations are rejected to avoid silent re-declarations. Side effects in the script run at invocation time.
A function object that can be called. The function object has zero arguments.
| Name | Description |
|---|---|
| jsCode | The JavaScript code to compile. |
Compile and run a expression.
This function compiles and executes the specified JavaScript code. The script can be used to execute commands or define global variables in the parent context.
It evaluates the ECMAScript source code and converts any internal errors to Error.
A container holding an error or a value.
| Name | Description |
|---|---|
| jsCode | The JavaScript code to execute. |
Return a global object if it exists.
Declared in <mrdocs/Support/JavaScript.hpp>
Expected<Value>
getGlobal(std::string_view name);
This function returns a Value that represents a global variable in the parent context.
If the variable does not exist, an error is returned.
a global object if it exists.
| Name | Description |
|---|---|
| name | The name of the global variable. |
Return the global object.
This function returns a Value that represents the global object in the parent context.
The global object is the root of the ECMAScript object hierarchy and is the value returned by the global this expression.
If the global object does not exist, an error is returned.
the global object.
Push a new array to the stack
An ECMAScript value.
Push a boolean to the stack
A Value representing the boolean.
| Name | Description |
|---|---|
| value | The boolean value to push. |
Push a double to the stack
A Value representing the double.
| Name | Description |
|---|---|
| value | The double value to push. |
Push an integer to the stack
A Value representing the integer.
| Name | Description |
|---|---|
| value | The integer value to push. |
Push a new object to the stack
An ECMAScript value.
Push a string to the stack
A Value representing the string.
| Name | Description |
|---|---|
| value | The string value to push. The string is copied to the internal heap. |
Compile and run a script.
Declared in <mrdocs/Support/JavaScript.hpp>
Expected<void>
script(std::string_view jsCode);
This function compiles and executes the specified JavaScript code. The script can be used to execute commands or define global variables in the parent context.
ES module import/export is not enabled; scripts must be self-contained or rely on globals.
It evaluates the ECMAScript source code and converts any internal errors to Error.
A container holding an error or a value.
| Name | Description |
|---|---|
| jsCode | The JavaScript code to execute. |
Set a global object.
Declared in <mrdocs/Support/JavaScript.hpp>
void
setGlobal(
std::string_view name,
dom::Value const& value);
| Name | Description |
|---|---|
| name | The name of the global variable. |
| value | The value to set. |
String wrapper for JavaScript values.
Declared in <mrdocs/Support/JavaScript.hpp>
class String;
An ECMAScript value.
Declared in <mrdocs/Support/JavaScript.hpp>
class Value;
This class represents a value in the JavaScript interpreter.
A value is a variable that is defined in a Scope. It can be a primitive type or an object.
A Value not associated with a Scope is undefined.
The user is responsible for ensuring that the lifetime of a Value does not exceed the lifetime of the Scope that created it.
A value can be converted to a DOM value using the getDom function.
Generic JavaScript value wrapper.
An ECMAScript value.
This class represents a value in the JavaScript interpreter.
A value is a variable that is defined in a Scope. It can be a primitive type or an object.
A Value not associated with a Scope is undefined.
The user is responsible for ensuring that the lifetime of a Value does not exceed the lifetime of the Scope that created it.
A value can be converted to a DOM value using the getDom function.
| Name | Description |
|---|---|
Value [constructor] | Constructor |
~Value [destructor] | Destructor |
operator= | Assignment operators |
apply | apply overloads |
call | Invoke a function. |
empty | Return if an Array or Object is empty. |
erase | Remove a property from an object if it exists. |
exists | Return true if a key exists. |
get | get overloads |
getArray | Return the underlying array. |
getBool | Return the underlying boolean value. |
getDom | Return the value as a dom::Value |
getDouble | Return the underlying double value. |
getFunction | Return the underlying array. |
getInteger | Return the underlying integer value. |
getObject | Return the underlying object. |
getString | Return the underlying string |
isArray | Check if the value is an array. |
isBoolean | Check if the value is a boolean. |
isDouble | Check if the value is a floating point number. |
isFunction | Check if the value is a function. |
isInteger | Check if the value is an integer number. |
isNull | Check if the value is null. |
isNumber | Check if the value is a number. |
isObject | Check if the value is an object. |
isString | Check if the value is a string. |
isTruthy | Determine if a value is truthy |
isUndefined | Check if the value is undefined. |
lookup | Lookup a sequence of keys. |
operator() | Invoke a function. |
operator[] | Subscript operators |
set | Set or replace the value for a given key. |
size | Return if an Array or Object is empty. |
swap | Swap two values. |
type | Return the type of the value. |
operator std::string | Return the string. |
operator bool | Determine if a value is truthy |
| Name | Description |
|---|---|
Value [constructor] | Wrap an existing engine value without transferring ownership. |
| Name | Description |
|---|---|
impl_ | Shared lifetime owner for the underlying JavaScript runtime. |
val_ | Opaque engine value handle stored as an integer (engine-specific inside the implementation). |
| Name | Description |
|---|---|
mrdocs::js::toString | Return value as a string. |
mrdocs::js::operator&& | |
mrdocs::js::operator&& | |
mrdocs::js::operator&& | Return the first Value that is not truthy, or the last one. |
mrdocs::js::operator|| | |
mrdocs::js::operator|| | |
mrdocs::js::operator|| | Return the first Value that is truthy, or the last one. |
mrdocs::js::operator<=> | Compare two values for inequality. |
mrdocs::js::operator!= | |
mrdocs::js::operator!= | |
mrdocs::js::operator!= | Inequality operator |
mrdocs::js::operator== | |
mrdocs::js::operator== | |
mrdocs::js::operator== | Compare two values for equality. |
mrdocs::js::swap | Swap two values. |
mrdocs::js::Scope | A JavaScript scope for value lifetime management. |
Scope
Type
Constructor
Constructor
Declared in <mrdocs/Support/JavaScript.hpp>
Value() noexcept;
Constructor
Duplicates the underlying engine handle held by value and shares the same runtime state.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Constructor
The function associates the existing value with this object.
| Name | Description |
|---|---|
| other | The object to move construct from |
Destructor
Declared in <mrdocs/Support/JavaScript.hpp>
~Value();
Releases the underlying engine handle; lifetime is tied to the shared Context::Impl, not to a stack frame.
Assignment operators
Copy assignment.
Duplicates the underlying engine handle held by value and shares the same runtime state.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move assignment.
The function associates the existing value with this object.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
apply overloads
Declared in <mrdocs/Support/JavaScript.hpp>
Invoke a function with an initializer_list of arguments.
Expected<Value>
apply(std::initializer_list<dom::Value> args) const;
» more...
Invoke a function with a span of arguments.
Expected<Value>
apply(std::span<dom::Value const> args) const;
» more...
The return value of the function.
| Name | Description |
|---|---|
| args | Arguments to pass to the JavaScript function. |
Invoke a function with an initializer_list of arguments.
Declared in <mrdocs/Support/JavaScript.hpp>
Expected<Value>
apply(std::initializer_list<dom::Value> args) const;
The return value of the function.
| Name | Description |
|---|---|
| args | Arguments to pass to the JavaScript function. |
Invoke a function with a span of arguments.
Declared in <mrdocs/Support/JavaScript.hpp>
Expected<Value>
apply(std::span<dom::Value const> args) const;
The return value of the function.
| Name | Description |
|---|---|
| args | Arguments to pass to the JavaScript function. |
Invoke a function.
Declared in <mrdocs/Support/JavaScript.hpp>
template<std::convertible_to<dom::Value>... Args>
Expected<Value>
call(Args&&... args) const;
The return value of the method.
| Name | Description |
|---|---|
| args | Zero or more arguments to pass to the method. |
Return if an Array or Object is empty.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
empty() const;
if an Array or Object is empty.
Remove a property from an object if it exists.
Declared in <mrdocs/Support/JavaScript.hpp>
void
erase(std::string_view key) const;
| Name | Description |
|---|---|
| key | Property name to erase from the current object. |
Return true if a key exists.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
exists(std::string_view key) const;
true if the key exists, false otherwise.
| Name | Description |
|---|---|
| key | The key to check for. |
get overloads
Declared in <mrdocs/Support/JavaScript.hpp>
Return the element at a given index.
Value
get(std::size_t i) const;
» more...
Return the element for a given key.
Value
get(std::string_view key) const;
» more...
Return the element at a given index or key.
Value
get(dom::Value const& i) const;
» more...
Return the element for a given key.
template<std::convertible_to<std::string_view> S>
Value
get(S const& key) const;
» more...
Kind::Undefined if the index is out of range.| Name | Description |
|---|---|
| i | The index of the element to return. |
| key | The key to look up. |
Return the element at a given index.
The element at the given index, or a Value of type Kind::Undefined if the index is out of range.
| Name | Description |
|---|---|
| i | The index of the element to return. |
Return the element for a given key.
If the Value is not an object, or the key is not found, a Value of type Kind::Undefined is returned.
The element for the given key, or a Value of type Kind::Undefined if the key is not found.
| Name | Description |
|---|---|
| key | The key to look up. |
Return the element at a given index or key.
the element at a given index or key.
| Name | Description |
|---|---|
| i | A variant container for any kind of Dom value. |
Return the element for a given key.
Declared in <mrdocs/Support/JavaScript.hpp>
template<std::convertible_to<std::string_view> S>
Value
get(S const& key) const;
If the Value is not an object, or the key is not found, a Value of type Kind::Undefined is returned.
The element for the given key, or a Value of type Kind::Undefined if the key is not found.
| Name | Description |
|---|---|
| key | The key to look up. |
Return the underlying array.
Behaviour is undefined if !isArray()
the underlying array.
Return the underlying boolean value.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
getBool() const noexcept;
Behaviour is undefined if !isBoolean()
the underlying boolean value.
Return the value as a dom::Value
This function returns the value as a dom::Value.
If the value is a primitive type, it is converted to a DOM primitive.
If the value is an object, a type with reference semantics to access the underlying DOM object is returned.
the value as a dom::Value
Return the underlying double value.
Declared in <mrdocs/Support/JavaScript.hpp>
double
getDouble() const noexcept;
Behaviour is undefined if !isNumber()
the underlying double value.
Return the underlying array.
Behaviour is undefined if !isFunction()
the underlying array.
Return the underlying integer value.
Declared in <mrdocs/Support/JavaScript.hpp>
int64_t
getInteger() const noexcept;
Behaviour is undefined if !isNumber()
the underlying integer value.
Return the underlying object.
Behaviour is undefined if !isObject()
the underlying object.
Return the underlying string
Declared in <mrdocs/Support/JavaScript.hpp>
std::string
getString() const;
This function returns the value as a string.
This function performs no coercions. If the value is not a string, it is not converted to a string.
JerryScript allocates a new buffer for string extraction, so the returned value is an owning std::string rather than a view.
Behaviour is undefined if !isString()
the underlying string
Check if the value is an array.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isArray() const noexcept;
true if the value is an array, false otherwise
Check if the value is a boolean.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isBoolean() const noexcept;
true if the value is a boolean, false otherwise
Check if the value is a floating point number.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isDouble() const noexcept;
true if the value is a number but not an integer, false otherwise
Check if the value is a function.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isFunction() const noexcept;
true if the value is a function, false otherwise
Check if the value is an integer number.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isInteger() const noexcept;
All numbers are internally represented by IEEE doubles, which are capable of representing all integers up to 53 bits accurately.
This function returns true if the value is a number with no precision loss when representing an integer.
When isNumber() is true, the function behaves as if evaluating the condition d == static_cast<double>(static_cast<int>(d)) where d is the result of toDouble().
true if the value is a number with no fractional part, false otherwise
Check if the value is null.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isNull() const noexcept;
true if the value is null, false otherwise
Check if the value is a number.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isNumber() const noexcept;
In ECMA, the number type is an IEEE double, including +/- Infinity and NaN values.
Zero sign is also preserved.
An IEEE double can represent all integers up to 53 bits accurately.
The user should not rely on NaNs preserving their exact non-normalized form.
true if the value is a number, false otherwise
Check if the value is an object.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isObject() const noexcept;
Check if the value is an object but not an array or function.
While in ECMA anything with properties is an object, this function returns false for arrays and functions.
Properties are key-value pairs with a string key and an arbitrary value, including undefined.
true if the value is an object, false otherwise
Check if the value is a string.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isString() const noexcept;
true if the value is a string, false otherwise
Determine if a value is truthy
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isTruthy() const noexcept;
A value is truthy if it is a boolean and is true, a number and not zero, or an non-empty string, array or object.
true if the value is truthy, false otherwise
Check if the value is undefined.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
isUndefined() const noexcept;
true if the value is undefined, false otherwise
Lookup a sequence of keys.
This function is equivalent to calling get multiple times, once for each key in the sequence of dot-separated keys.
The value at the end of the sequence, or a Value of type Kind::Undefined if any key is not found.
| Name | Description |
|---|---|
| keys | A sequence of keys separated by dots. |
Invoke a function.
Declared in <mrdocs/Support/JavaScript.hpp>
template<class... Args>
Value
operator()(Args&&... args) const;
The return value of the method.
| Name | Description |
|---|---|
| args | Zero or more arguments to pass to the method. |
Subscript operators
Declared in <mrdocs/Support/JavaScript.hpp>
Return the element for an array index.
Value
operator[](std::size_t index) const;
» more...
Return the element for a property name.
Value
operator[](std::string_view key) const;
» more...
| Name | Description |
|---|---|
| index | Zero-based array index to fetch when the value is an array. |
| key | Property name to fetch from the current object. |
Return the element for an array index.
The element for the given index, or undefined if out of bounds / not an array.
| Name | Description |
|---|---|
| index | Zero-based array index to fetch when the value is an array. |
Return the element for a property name.
The element for the given key, or undefined if missing / not an object.
| Name | Description |
|---|---|
| key | Property name to fetch from the current object. |
Set or replace the value for a given key.
Declared in <mrdocs/Support/JavaScript.hpp>
Set or replace the value for a given key.
void
set(
std::string_view key,
Value const& value) const;
» more...
Set or replace the value for a given key.
void
set(
std::string_view key,
dom::Value const& value) const;
» more...
| Name | Description |
|---|---|
| key | The key to set. |
| value | The value to set. |
Set or replace the value for a given key.
Declared in <mrdocs/Support/JavaScript.hpp>
void
set(
std::string_view key,
Value const& value) const;
| Name | Description |
|---|---|
| key | The key to set. |
| value | The value to set. |
Set or replace the value for a given key.
Declared in <mrdocs/Support/JavaScript.hpp>
void
set(
std::string_view key,
dom::Value const& value) const;
| Name | Description |
|---|---|
| key | The key to set. |
| value | The value to set. |
Return if an Array or Object is empty.
Declared in <mrdocs/Support/JavaScript.hpp>
std::size_t
size() const;
if an Array or Object is empty.
Swap two values.
| Name | Description |
|---|---|
| other | An ECMAScript value. |
Return the type of the value.
This function returns the JavaScript type of the value.
The type can represent a primitive type (such as boolean, number, and string) or an object.
When the type is an object, the return type also classifies the object as an array or function.
An array is an object with the internal ECMAScript class Array or a Proxy wrapping an Array.
A function is an object with the internal ECMAScript class Function.
the type of the value.
Return the string.
Declared in <mrdocs/Support/JavaScript.hpp>
explicit
operator std::string() const noexcept;
the string.
Determine if a value is truthy
Declared in <mrdocs/Support/JavaScript.hpp>
explicit
operator bool() const noexcept;
A value is truthy if it is a boolean and is true, a number and not zero, or an non-empty string, array or object.
true if the value is truthy, false otherwise
Wrap an existing engine value without transferring ownership.
Declared in <mrdocs/Support/JavaScript.hpp>
Value(
uint32_t val,
std::shared_ptr<Context::Impl> impl) noexcept;
| Name | Description |
|---|---|
| val | JerryScript value handle that will be acquired. |
| impl | Shared runtime state that keeps the context alive. |
Shared lifetime owner for the underlying JavaScript runtime.
Declared in <mrdocs/Support/JavaScript.hpp>
std::shared_ptr<Context::Impl> impl_;
Opaque engine value handle stored as an integer (engine-specific inside the implementation).
Declared in <mrdocs/Support/JavaScript.hpp>
uint32_t val_;
Types of values.
Declared in <mrdocs/Support/JavaScript.hpp>
enum class Type : int;
| Name | Description |
|---|---|
undefined | The value is undefined |
null | The value is null |
boolean | The value is a boolean |
number | The value is a number |
string | The value is a string |
object | The value is an object |
function | The value is a function |
array | The value is an array |
Return the first Value that is not truthy, or the last one.
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator&&(
S const& lhs,
Value const& rhs) noexcept;
» more...
auto
operator&&(
Value const& lhs,
S const& rhs) noexcept;
» more...
Return the first Value that is not truthy, or the last one.
Value
operator&&(
Value const& lhs,
Value const& rhs);
» more...
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator&&(
S const& lhs,
Value const& rhs) noexcept;
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator&&(
Value const& lhs,
S const& rhs) noexcept;
Return the first Value that is not truthy, or the last one.
Declared in <mrdocs/Support/JavaScript.hpp>
Value
operator&&(
Value const& lhs,
Value const& rhs);
This function is equivalent to the JavaScript && operator.
the first Value that is not truthy, or the last one.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Return the first Value that is truthy, or the last one.
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator||(
S const& lhs,
Value const& rhs) noexcept;
» more...
auto
operator||(
Value const& lhs,
S const& rhs) noexcept;
» more...
Return the first Value that is truthy, or the last one.
Value
operator||(
Value const& lhs,
Value const& rhs);
» more...
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator||(
S const& lhs,
Value const& rhs) noexcept;
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator||(
Value const& lhs,
S const& rhs) noexcept;
Return the first Value that is truthy, or the last one.
Declared in <mrdocs/Support/JavaScript.hpp>
Value
operator||(
Value const& lhs,
Value const& rhs);
This function is equivalent to the JavaScript || operator.
the first Value that is truthy, or the last one.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Register a JavaScript helper function
Declared in <mrdocs/Support/JavaScript.hpp>
[[nodiscard]]
Expected<void, Error>
registerHelper(
mrdocs::Handlebars& hbs,
std::string_view name,
Context& ctx,
std::string_view script);
This function registers a JavaScript function as a helper function that can be called from Handlebars templates.
The helper source is resolved in the following order:
1. Parenthesized eval - wraps the script in parentheses and evaluates. Handles function declarations without side effects. Example: "function add(a, b) { return a + b; }"
2. Direct eval - evaluates the script as-is. Handles IIFEs and expressions that return functions. Example: "(function(){ return function(x){ return x*2; }; })()"
3. Global lookup - looks up the helper name on the global object. Handles scripts that define globals before returning. Example: "var helper = function(x){ return x; }; helper;"
The resolved function is stored on the shared MrDocsHelpers global object and registered with Handlebars. When invoked, positional arguments are passed to the JavaScript function (the Handlebars options object is stripped to avoid expensive recursive conversion of symbol contexts).
Success, or an error if the script could not be resolved to a function
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helper into |
| name | The name of the helper function |
| ctx | The JavaScript context to use |
| script | The JavaScript code that defines the helper function |
Swap two values.
| Name | Description |
|---|---|
| v0 | An ECMAScript value. |
| v1 | An ECMAScript value. |
Return value as a string.
This function coerces any value to a string.
value as a string.
| Name | Description |
|---|---|
| value | An ECMAScript value. |
Compare two values for equality.
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator==(
Value const& lhs,
S const& rhs) noexcept;
» more...
auto
operator==(
S const& lhs,
Value const& rhs) noexcept;
» more...
Compare two values for equality.
bool
operator==(
Value const& lhs,
Value const& rhs) noexcept;
» more...
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator==(
Value const& lhs,
S const& rhs) noexcept;
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator==(
S const& lhs,
Value const& rhs) noexcept;
Compare two values for equality.
Declared in <mrdocs/Support/JavaScript.hpp>
bool
operator==(
Value const& lhs,
Value const& rhs) noexcept;
This operator uses strict equality, meaning that the types must match exactly, and for objects and arrays the children must match exactly.
The == operator behaves differently for objects compared to primitive data types like numbers and strings. When comparing objects using ==, it checks for reference equality, not structural equality.
This means that two objects are considered equal with === only if they reference the exact same object in memory.
In JavaScript, this is equivalent to the === operator, which does not perform type conversions.
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Inequality operators
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator!=(
Value const& lhs,
S const& rhs) noexcept;
» more...
auto
operator!=(
S const& lhs,
Value const& rhs) noexcept;
» more...
Inequality operator
bool
operator!=(
Value const& lhs,
Value const& rhs) noexcept;
» more...
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator!=(
Value const& lhs,
S const& rhs) noexcept;
Declared in <mrdocs/Support/JavaScript.hpp>
auto
operator!=(
S const& lhs,
Value const& rhs) noexcept;
Inequality operator
Declared in <mrdocs/Support/JavaScript.hpp>
bool
operator!=(
Value const& lhs,
Value const& rhs) noexcept;
true if the objects are not equal, false otherwise
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compare two values for inequality.
Declared in <mrdocs/Support/JavaScript.hpp>
std::strong_ordering
operator<=>(
Value const& lhs,
Value const& rhs) noexcept;
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Lua interop helpers for the optional scripting/backend integration.
This namespace contains glue for pushing/popping values, registering functions, and safely executing snippets so embedders can enable Lua without duplicating binding code.
| Name | Description |
|---|---|
Access | Internal tag granting access to lua internals. |
Context | A reference to an instance of a Lua interpreter. |
Function | A Lua function. |
Param | A lazy container to push values to the Lua stack. |
Scope | Stack scope guard for Lua calls. |
String | A Lua string. |
Table | A Lua table. |
Value | A Lua value. |
zstring | A null-terminated string. |
| Name | Description |
|---|---|
FunctionPtr | Pointer to a Lua-callable function returning Value. |
| Name | Description |
|---|---|
Type | Types of values. |
| Name | Description |
|---|---|
registerHelper | Register a Lua helper function |
Pointer to a Lua-callable function returning Value.
Internal tag granting access to lua internals.
Declared in <mrdocs/Support/Lua.hpp>
struct Access;
A reference to an instance of a Lua interpreter.
Declared in <mrdocs/Support/Lua.hpp>
class Context;
| Name | Description |
|---|---|
Context [constructor] | Constructor. |
~Context [destructor] | Destructor. |
operator= [deleted] | Copy assignment. |
nativeState | Return the underlying lua_State*. |
| Name | Description |
|---|---|
mrdocs::lua::Scope | Stack scope guard for Lua calls. |
mrdocs::lua::Access | Internal tag granting access to lua internals. |
Constructor.
Constructor.
Declared in <mrdocs/Support/Lua.hpp>
Context();
Constructor.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Destructor.
Declared in <mrdocs/Support/Lua.hpp>
~Context();
Copy assignment.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Return the underlying lua_State*.
Declared in <mrdocs/Support/Lua.hpp>
void*
nativeState() const noexcept;
Exposed as void* so callers don't have to drag lua.h into the public API. Cast to lua_State* at the use site. The state is owned by this Context and must not be lua_closed by the caller; use this only when the wrapper does not yet abstract the operation you need (for example, registering a native C function that the script can call as a global).
the underlying lua_State*.
A Lua function.
| Name | Description |
|---|---|
Value | A Lua value. |
| Name | Description |
|---|---|
Function [constructor] | Construct a function wrapper from an existing value. |
call | Invoke the value as a function. |
displayString | Return a string representation. |
isBoolean | Return true if the value is a boolean. |
isFunction | Return true if the value is a function. |
isNil | Return true if the value is nil. |
isNumber | Return true if the value is numeric. |
isString | Return true if the value is a string. |
isTable | Return true if the value is a table. |
operator() | Invoke the value as a function. |
type | Return the Lua type of this value. |
| Name | Description |
|---|---|
index_ | Stack index where the value is stored. |
scope_ | Scope that owns the stack slot for this value. |
| Name | Description |
|---|---|
mrdocs::lua::Access | Internal tag granting access to lua internals. |
Construct a function wrapper from an existing value.
| Name | Description |
|---|---|
| value | The object to construct from |
A lazy container to push values to the Lua stack.
Declared in <mrdocs/Support/Lua.hpp>
class Param;
| Name | Description |
|---|---|
Param [constructor] [deleted] | Constructors |
~Param [destructor] | Destroy the stored value without throwing. |
operator= [deleted] | Deleted copy assignment to avoid double pops. |
| Name | Description |
|---|---|
arr_ [variant member] | Stored array when kind_ == domArray. |
b_ [variant member] | Stored boolean value when kind_ == boolean. |
i_ [variant member] | Stored integer value when kind_ == integer. |
index_ [variant member] | Stack index when kind_ == value. |
obj_ [variant member] | Stored object when kind_ == domObject. |
s_ [variant member] | Stored string view when kind_ == string. |
| Name | Description |
|---|---|
mrdocs::lua::Access | Internal tag granting access to lua internals. |
Constructors
Declared in <mrdocs/Support/Lua.hpp>
Deleted copy constructor to avoid double pops.
Param(Param const& other) = delete;
» more...
Construct from a DOM array.
Param(dom::Array arr) noexcept;
» more...
Construct from a DOM object.
Param(dom::Object obj) noexcept;
» more...
Construct an integer parameter.
Param(int64_t value) noexcept;
» more...
Construct a nil parameter.
Param(std::nullptr_t value) noexcept;
» more...
Construct a string parameter (non-owning).
Param(std::string_view s) noexcept;
» more...
Construct from a Lua Value already on the stack.
Param(Value const& value) noexcept;
» more...
Construct from a generic DOM value.
Param(dom::Value const& value) noexcept;
» more...
Construct a string parameter from C-string.
Param(char const* s) noexcept;
» more...
Construct an integral parameter from an enum.
template<class Enum>
requires std::is_enum_v<Enum>
Param(Enum v) noexcept;
» more...
Construct a boolean parameter from a bool-like type.
template<class Boolean>
requires std::is_same_v<Boolean, bool>
Param(Boolean const& b) noexcept;
» more...
Construct a string parameter from a convertible string type.
template<class String>
requires std::is_convertible_v<
String, std::string_view>
Param(String const& s);
» more...
Deleted copy constructor to avoid double pops.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Construct from a DOM array.
| Name | Description |
|---|---|
| arr | The object to construct from |
Construct from a DOM object.
| Name | Description |
|---|---|
| obj | The object to construct from |
Construct an integer parameter.
Declared in <mrdocs/Support/Lua.hpp>
Param(int64_t value) noexcept;
| Name | Description |
|---|---|
| value | The object to construct from |
Construct a nil parameter.
Declared in <mrdocs/Support/Lua.hpp>
Param(std::nullptr_t value) noexcept;
| Name | Description |
|---|---|
| value | The object to construct from |
Construct a string parameter (non-owning).
Declared in <mrdocs/Support/Lua.hpp>
Param(std::string_view s) noexcept;
| Name | Description |
|---|---|
| s | The object to construct from |
Construct from a Lua Value already on the stack.
| Name | Description |
|---|---|
| value | The object to copy construct from |
Construct from a generic DOM value.
| Name | Description |
|---|---|
| value | The object to copy construct from |
Construct a string parameter from C-string.
Declared in <mrdocs/Support/Lua.hpp>
Param(char const* s) noexcept;
| Name | Description |
|---|---|
| s | The value to construct from |
Construct an integral parameter from an enum.
Declared in <mrdocs/Support/Lua.hpp>
template<class Enum>
requires std::is_enum_v<Enum>
Param(Enum v) noexcept;
| Name | Description |
|---|---|
| v | The object to construct from |
Construct a boolean parameter from a bool-like type.
Declared in <mrdocs/Support/Lua.hpp>
template<class Boolean>
requires std::is_same_v<Boolean, bool>
Param(Boolean const& b) noexcept;
| Name | Description |
|---|---|
| b | The object to copy construct from |
Construct a string parameter from a convertible string type.
Declared in <mrdocs/Support/Lua.hpp>
template<class String>
requires std::is_convertible_v<
String, std::string_view>
Param(String const& s);
| Name | Description |
|---|---|
| s | The object to copy construct from |
Destroy the stored value without throwing.
Declared in <mrdocs/Support/Lua.hpp>
~Param();
Deleted copy assignment to avoid double pops.
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Stored array when kind_ == domArray.
Stored boolean value when kind_ == boolean.
Declared in <mrdocs/Support/Lua.hpp>
bool b_;
Stored integer value when kind_ == integer.
Declared in <mrdocs/Support/Lua.hpp>
int i_;
Stack index when kind_ == value.
Declared in <mrdocs/Support/Lua.hpp>
int index_;
Stored object when kind_ == domObject.
Stored string view when kind_ == string.
Declared in <mrdocs/Support/Lua.hpp>
std::string_view s_;
Stack scope guard for Lua calls.
Declared in <mrdocs/Support/Lua.hpp>
class Scope;
Helper that balances the Lua stack for a Context scope.
| Name | Description |
|---|---|
Scope [constructor] | Create a scope that manages Lua stack references. |
~Scope [destructor] | Pop any pending stack references on destruction. |
getGlobal | Return a value from the global table if it exists. |
getGlobalTable | Return the global table. |
loadChunk | Load a Lua chunk |
loadChunkFromFile | Run a Lua chunk. |
pushDom | Push a dom::Value onto the Lua stack. |
| Name | Description |
|---|---|
mrdocs::lua::Access | Internal tag granting access to lua internals. |
Create a scope that manages Lua stack references.
| Name | Description |
|---|---|
| ctx | Lua context to guard. |
Pop any pending stack references on destruction.
Declared in <mrdocs/Support/Lua.hpp>
~Scope();
Return a value from the global table if it exists.
Declared in <mrdocs/Support/Lua.hpp>
Expected<Value>
getGlobal(
std::string_view key,
std::source_location loc = source_location::current());
The value if it exists, or an error.
| Name | Description |
|---|---|
| key | The key to get. |
| loc | The source location of the call site. |
Return the global table.
the global table.
Load a Lua chunk
Declared in <mrdocs/Support/Lua.hpp>
Load a Lua chunk
Expected<Function>
loadChunk(
std::string_view luaChunk,
std::source_location loc = source_location::current());
» more...
Load a Lua chunk
Expected<Function>
loadChunk(
std::string_view luaChunk,
zstring chunkName,
std::source_location loc = source_location::current());
» more...
The function if successful, or an error.
| Name | Description |
|---|---|
| luaChunk | The Lua chunk to load. |
| loc | The source location of the call site. |
| chunkName | The name of the chunk (used in error messages). |
Load a Lua chunk
Declared in <mrdocs/Support/Lua.hpp>
Expected<Function>
loadChunk(
std::string_view luaChunk,
std::source_location loc = source_location::current());
The function if successful, or an error.
| Name | Description |
|---|---|
| luaChunk | The Lua chunk to load. |
| loc | The source location of the call site. |
Load a Lua chunk
Declared in <mrdocs/Support/Lua.hpp>
Expected<Function>
loadChunk(
std::string_view luaChunk,
zstring chunkName,
std::source_location loc = source_location::current());
The function if successful, or an error.
| Name | Description |
|---|---|
| luaChunk | The Lua chunk to load. |
| chunkName | The name of the chunk (used in error messages). |
| loc | The source location of the call site. |
Run a Lua chunk.
Declared in <mrdocs/Support/Lua.hpp>
Expected<Function>
loadChunkFromFile(
std::string_view fileName,
std::source_location loc = source_location::current());
The function if successful, or an error.
| Name | Description |
|---|---|
| fileName | The name of the file to load. |
| loc | The source location of the call site. |
Push a dom::Value onto the Lua stack.
Primitives (nil, boolean, integer, string) are pushed as their Lua-native counterparts. Arrays and objects are pushed as userdata wrapping the underlying dom container, with the same lazy bindings used elsewhere in the wrapper.
A Value referring to the new stack slot.
| Name | Description |
|---|---|
| value | The DOM value to push. |
A Lua string.
| Name | Description |
|---|---|
Value | A Lua value. |
| Name | Description |
|---|---|
String [constructor] | Constructors |
call | Invoke the value as a function. |
displayString | Return a string representation. |
get | Retrieve the underlying string view. |
isBoolean | Return true if the value is a boolean. |
isFunction | Return true if the value is a function. |
isNil | Return true if the value is nil. |
isNumber | Return true if the value is numeric. |
isString | Return true if the value is a string. |
isTable | Return true if the value is a table. |
operator() | Invoke the value as a function. |
operator* | Dereference to the underlying string view. |
type | Return the Lua type of this value. |
operator std::string_view | Implicit conversion to string view. |
| Name | Description |
|---|---|
index_ | Stack index where the value is stored. |
scope_ | Scope that owns the stack slot for this value. |
| Name | Description |
|---|---|
mrdocs::lua::Access | Internal tag granting access to lua internals. |
Constructors
Wrap an existing Lua value as a string.
| Name | Description |
|---|---|
| value | The object to construct from |
Create a new Lua string from the given view.
Declared in <mrdocs/Support/Lua.hpp>
explicit
String(std::string_view s);
| Name | Description |
|---|---|
| s | The object to construct from |
Retrieve the underlying string view.
Declared in <mrdocs/Support/Lua.hpp>
std::string_view
get() const noexcept;
View of the Lua string contents.
Dereference to the underlying string view.
Declared in <mrdocs/Support/Lua.hpp>
std::string_view
operator*() const noexcept;
View of the Lua string contents.
Implicit conversion to string view.
Declared in <mrdocs/Support/Lua.hpp>
operator std::string_view() const noexcept;
The object converted to string_view
A Lua table.
| Name | Description |
|---|---|
Value | A Lua value. |
| Name | Description |
|---|---|
Table [constructor] | Constructors |
call | Invoke the value as a function. |
displayString | Return a string representation. |
get | Retrieve a table entry by key; returns nil if missing. |
isBoolean | Return true if the value is a boolean. |
isFunction | Return true if the value is a function. |
isNil | Return true if the value is nil. |
isNumber | Return true if the value is numeric. |
isString | Return true if the value is a string. |
isTable | Return true if the value is a table. |
operator() | Invoke the value as a function. |
set | Create or replace the value with a key. |
type | Return the Lua type of this value. |
| Name | Description |
|---|---|
index_ | Stack index where the value is stored. |
scope_ | Scope that owns the stack slot for this value. |
| Name | Description |
|---|---|
mrdocs::lua::Access | Internal tag granting access to lua internals. |
Constructors
Declared in <mrdocs/Support/Lua.hpp>
Wrap an existing Lua value as a table.
Table(Value value);
» more...
Create an empty table in the given scope.
explicit
Table(Scope& scope);
» more...
Construct a table by copying fields from a DOM object.
Table(
Scope& scope,
dom::Object const& obj);
» more...
Wrap an existing Lua value as a table.
| Name | Description |
|---|---|
| value | The object to construct from |
Create an empty table in the given scope.
| Name | Description |
|---|---|
| scope | The object to copy construct from |
Construct a table by copying fields from a DOM object.
| Name | Description |
|---|---|
| scope | The object to copy construct from |
| obj | A container of key and value pairs. |
Retrieve a table entry by key; returns nil if missing.
Value stored at key or nil if absent.
| Name | Description |
|---|---|
| key | Table key to look up. |
Create or replace the value with a key.
| Name | Description |
|---|---|
| key | The key to set. |
| value | The value to set. |
A Lua value.
Declared in <mrdocs/Support/Lua.hpp>
class Value;
| Name | Description |
|---|---|
Value [constructor] | Constructor. |
~Value [destructor] | Destructor. |
call | Invoke the value as a function. |
displayString | Return a string representation. |
isBoolean | Return true if the value is a boolean. |
isFunction | Return true if the value is a function. |
isNil | Return true if the value is nil. |
isNumber | Return true if the value is numeric. |
isString | Return true if the value is a string. |
isTable | Return true if the value is a table. |
operator() | Invoke the value as a function. |
type | Return the Lua type of this value. |
| Name | Description |
|---|---|
Value [constructor] | Create a value referring to a stack slot within a scope. |
| Name | Description |
|---|---|
index_ | Stack index where the value is stored. |
scope_ | Scope that owns the stack slot for this value. |
| Name | Description |
|---|---|
mrdocs::lua::Access | Internal tag granting access to lua internals. |
Constructor.
Declared in <mrdocs/Support/Lua.hpp>
Constructor.
Value() noexcept;
» more...
Constructor.
Value(Value const& other);
» more...
Constructor.
Value(Value&& other) noexcept;
» more...
| Name | Description |
|---|---|
| other | The value to copy. |
Constructor.
Declared in <mrdocs/Support/Lua.hpp>
Value() noexcept;
Default constructed values have no scope or assigned stack index and are equivalent to the value Nil.
Constructor.
The new value will be assigned a new stack index which has the same underlying value as other.
| Name | Description |
|---|---|
| other | The value to copy. |
Constructor.
The newly constructed object will acquire the same stack index, while the moved-from object will become as if default-constructed.
| Name | Description |
|---|---|
| other | The object to move construct from |
Destructor.
Declared in <mrdocs/Support/Lua.hpp>
~Value();
The Lua value will eventually be removed from the stack.
Invoke the value as a function.
Declared in <mrdocs/Support/Lua.hpp>
template<class... Args>
Expected<Value>
call(Args&&... args);
If the invocation fails the return value will contain the corresponding error.
The return value of the function.
| Name | Description |
|---|---|
| args | Zero or more values to pass to the function. |
Return a string representation.
Declared in <mrdocs/Support/Lua.hpp>
std::string
displayString() const;
This function is used for diagnostics.
a string representation.
Return true if the value is a boolean.
Declared in <mrdocs/Support/Lua.hpp>
bool
isBoolean() const noexcept;
true if the value is a boolean.
Return true if the value is a function.
Declared in <mrdocs/Support/Lua.hpp>
bool
isFunction() const noexcept;
true if the value is a function.
Return true if the value is nil.
Declared in <mrdocs/Support/Lua.hpp>
bool
isNil() const noexcept;
true if the value is nil.
Return true if the value is numeric.
Declared in <mrdocs/Support/Lua.hpp>
bool
isNumber() const noexcept;
true if the value is numeric.
Return true if the value is a string.
Declared in <mrdocs/Support/Lua.hpp>
bool
isString() const noexcept;
true if the value is a string.
Return true if the value is a table.
Declared in <mrdocs/Support/Lua.hpp>
bool
isTable() const noexcept;
true if the value is a table.
Invoke the value as a function.
Declared in <mrdocs/Support/Lua.hpp>
template<class... Args>
Value
operator()(Args&&... args);
Another instance of the object
| Name | Description |
|---|---|
| args | Zero or more values to pass to the function. |
Return the Lua type of this value.
the Lua type of this value.
Create a value referring to a stack slot within a scope.
| Name | Description |
|---|---|
| position | The value to construct from |
| scope | Stack scope guard for Lua calls. |
Stack index where the value is stored.
Declared in <mrdocs/Support/Lua.hpp>
int index_;
Scope that owns the stack slot for this value.
A null-terminated string.
Declared in <mrdocs/Support/Lua.hpp>
class zstring;
| Name | Description |
|---|---|
zstring [constructor] | Constructors |
c_str | Return the underlying C-string pointer. |
Constructors
Declared in <mrdocs/Support/Lua.hpp>
Construct from string_view (stores an owned copy).
zstring(std::string_view s);
» more...
Construct from std::string without copying.
zstring(std::string const& s);
» more...
Construct from a C-string pointer.
zstring(char const* s) noexcept;
» more...
| Name | Description |
|---|---|
| s | String view to copy. |
Construct from string_view (stores an owned copy).
Declared in <mrdocs/Support/Lua.hpp>
zstring(std::string_view s);
| Name | Description |
|---|---|
| s | String view to copy. |
Construct from std::string without copying.
Declared in <mrdocs/Support/Lua.hpp>
zstring(std::string const& s);
| Name | Description |
|---|---|
| s | Source string. |
Construct from a C-string pointer.
Declared in <mrdocs/Support/Lua.hpp>
zstring(char const* s) noexcept;
| Name | Description |
|---|---|
| s | Null-terminated string. |
Return the underlying C-string pointer.
Declared in <mrdocs/Support/Lua.hpp>
char const*
c_str() const noexcept;
the underlying C-string pointer.
Types of values.
Declared in <mrdocs/Support/Lua.hpp>
enum class Type : int;
| Name | Description |
|---|---|
nil | The value is nil |
boolean | The value is a boolean |
number | The value is a number |
string | The value is a string |
table | The value is a table |
function | The value is a function |
Register a Lua helper function
Declared in <mrdocs/Support/Lua.hpp>
[[nodiscard]]
Expected<void, Error>
registerHelper(
mrdocs::Handlebars& hbs,
std::string_view name,
Context& ctx,
std::string_view script);
Register a Lua chunk as a Handlebars helper. The chunk source is resolved to a callable in the following order:
1. Chunk return value - load and execute the chunk; if it returns a function, use that. This is the idiomatic shape for a per-file helper: Example: return function(x) return 'lua:' .. tostring(x) end
2. Global lookup - if the chunk does not return a function, look up the helper name on the global table. This handles chunks that define a function as a side effect: Example: function helper_name(x) return tostring(x) end
The resolved function is anchored in LUA_REGISTRYINDEX for the lifetime of the registration. When the helper is invoked from a template, positional arguments are converted from dom::Value to Lua values; the trailing Handlebars options object is dropped (matching the JavaScript helper semantics) to avoid recursive marshalling of symbol contexts.
Success, or an error if the script could not be resolved to a function
| Name | Description |
|---|---|
| hbs | The Handlebars instance to register the helper into |
| name | The name of the helper function |
| ctx | The Lua context that anchors the helper closure |
| script | The Lua source that defines the helper function |
Reporting utilities (messages, statistics, sinks).
The report namespace owns severity enums, message structs, and output sinks so tooling and libraries emit diagnostics in a uniform, testable format regardless of UI.
| Name | Description |
|---|---|
Located | Parameter type that adds a source location to a value. |
Results | Provides statistics on the number of reported messages. |
| Name | Description |
|---|---|
Level | Severity levels attached to reported messags. |
| Name | Description |
|---|---|
debug | Emit a debug-level diagnostic for troubleshooting. |
error | Emit an error that indicates failure but allows continuation. |
fatal | Emit a fatal error and mark the report as the highest severity. |
getMinimumLevel | Get the minimum threshold level for reporting. |
info | Emit an informational message for users. |
log | Format a message to the console. |
print | Report a message to the console. |
setMinimumLevel | Set the minimum threshold level for reporting. |
setSourceLocationWarnings | If true, source location information will be printed with warnings, errors, and fatal messages. |
trace | Emit a trace-level diagnostic (verbose, off by default). |
warn | Emit a warning that does not stop execution. |
| Name | Description |
|---|---|
results | Holds current statistics on reported messages. |
Parameter type that adds a source location to a value.
Declared in <mrdocs/Support/Report.hpp>
template<class T>
struct Located;
| Name | Description |
|---|---|
Located [constructor] | Construct a Located wrapper. |
| Name | Description |
|---|---|
value | Wrapped value. |
where | Source location of the value. |
| Name | Description |
|---|---|
debug | Emit a debug-level diagnostic for troubleshooting. |
error | Emit an error that indicates failure but allows continuation. |
fatal | Emit a fatal error and mark the report as the highest severity. |
info | Emit an informational message for users. |
trace | Emit a trace-level diagnostic (verbose, off by default). |
warn | Emit a warning that does not stop execution. |
Construct a Located wrapper.
Declared in <mrdocs/Support/Report.hpp>
template<class Arg>
requires std::is_constructible_v<T, Arg>
Located(
Arg&& arg,
std::source_location const& loc = source_location::current());
| Name | Description |
|---|---|
| arg | Value to wrap. |
| loc | Source location to associate (defaults to current). |
Wrapped value.
Declared in <mrdocs/Support/Report.hpp>
T value;
Source location of the value.
Declared in <mrdocs/Support/Report.hpp>
std::source_location where;
Provides statistics on the number of reported messages.
Declared in <mrdocs/Support/Report.hpp>
struct Results;
| Name | Description |
|---|---|
debugCount | Number of debug-level messages. |
errorCount | Number of error-level messages. |
fatalCount | Number of fatal-level messages. |
infoCount | Number of info-level messages. |
traceCount | Number of trace-level messages. |
warnCount | Number of warning-level messages. |
Number of debug-level messages.
Declared in <mrdocs/Support/Report.hpp>
std::size_t debugCount;
Number of error-level messages.
Declared in <mrdocs/Support/Report.hpp>
std::size_t errorCount;
Number of fatal-level messages.
Declared in <mrdocs/Support/Report.hpp>
std::size_t fatalCount;
Number of info-level messages.
Declared in <mrdocs/Support/Report.hpp>
std::size_t infoCount;
Number of trace-level messages.
Declared in <mrdocs/Support/Report.hpp>
std::size_t traceCount;
Number of warning-level messages.
Declared in <mrdocs/Support/Report.hpp>
std::size_t warnCount;
Severity levels attached to reported messags.
Declared in <mrdocs/Support/Report.hpp>
enum class Level : int;
| Name | Description |
|---|---|
trace | Programming trace messages |
debug | Debug messages |
info | Informational messages |
warn | Warning messages |
error | Error messages |
fatal | Fatal error messages |
| Name | Description |
|---|---|
getMinimumLevel | Get the minimum threshold level for reporting. |
log | Format a message to the console. |
print | Report a message to the console. |
setMinimumLevel | Set the minimum threshold level for reporting. |
Emit a debug-level diagnostic for troubleshooting.
Declared in <mrdocs/Support/Report.hpp>
template<class... Args>
void
debug(
Located<std::string_view> format,
Args&&... args);
| Name | Description |
|---|---|
| format | fmt-style format string. |
| args | Arguments substituted into the format string. |
Emit an error that indicates failure but allows continuation.
Declared in <mrdocs/Support/Report.hpp>
template<class... Args>
void
error(
Located<std::string_view> format,
Args&&... args);
| Name | Description |
|---|---|
| format | fmt-style format string. |
| args | Arguments substituted into the format string. |
Emit a fatal error and mark the report as the highest severity.
Declared in <mrdocs/Support/Report.hpp>
template<class... Args>
void
fatal(
Located<std::string_view> format,
Args&&... args);
| Name | Description |
|---|---|
| format | fmt-style format string. |
| args | Arguments substituted into the format string. |
Get the minimum threshold level for reporting.
Current minimum Level that will be emitted.
Emit an informational message for users.
Declared in <mrdocs/Support/Report.hpp>
template<class... Args>
void
info(
Located<std::string_view> format,
Args&&... args);
| Name | Description |
|---|---|
| format | fmt-style format string. |
| args | Arguments substituted into the format string. |
Format a message to the console.
Declared in <mrdocs/Support/Report.hpp>
template<class... Args>
void
log(
Level level,
Located<std::string_view> fs,
Args&&... args);
| Name | Description |
|---|---|
| level | 0 to 4 The severity of the report. 0 is debug and 4 is fatal. |
| fs | The format string. |
| args | Optional additional arguments used to format a message to print. A trailing newline will be added to the message automatically. |
Report a message to the console.
Declared in <mrdocs/Support/Report.hpp>
Report a message to the console.
void
print(std::string const& text);
» more...
Report a message to the console.
void
print(
Level level,
std::string const& text,
std::source_location const* loc = nullptr,
Error const* e = nullptr);
» more...
| Name | Description |
|---|---|
| text | The message to print. A trailing newline will be added to the message automatically. |
| level | 0 to 4 The severity of the report. 0 is debug and 4 is fatal. |
| loc | The source location of the report. If this value is null, no location is printed. |
Report a message to the console.
Declared in <mrdocs/Support/Report.hpp>
void
print(std::string const& text);
| Name | Description |
|---|---|
| text | The message to print. A trailing newline will be added to the message automatically. |
Report a message to the console.
Declared in <mrdocs/Support/Report.hpp>
void
print(
Level level,
std::string const& text,
std::source_location const* loc = nullptr,
Error const* e = nullptr);
| Name | Description |
|---|---|
| level | 0 to 4 The severity of the report. 0 is debug and 4 is fatal. |
| text | The message to print. A trailing newline will be added to the message automatically. |
| loc | The source location of the report. If this value is null, no location is printed. |
| e | Holds the description of an error, or success. |
Set the minimum threshold level for reporting.
Messages below this level will not be printed. A value of 5 will suppress all messages. Note that messages will still be counted towards result totals even if they are not displayed.
| Name | Description |
|---|---|
| level | Severity levels attached to reported messags. |
If true, source location information will be printed with warnings, errors, and fatal messages.
Declared in <mrdocs/Support/Report.hpp>
void
setSourceLocationWarnings(bool b) noexcept;
| Name | Description |
|---|---|
| b | true to enable source location information, false to disable it. The default value is true. |
Emit a trace-level diagnostic (verbose, off by default).
Declared in <mrdocs/Support/Report.hpp>
template<class... Args>
void
trace(
Located<std::string_view> format,
Args&&... args);
| Name | Description |
|---|---|
| format | fmt-style format string. |
| args | Arguments substituted into the format string. |
Emit a warning that does not stop execution.
Declared in <mrdocs/Support/Report.hpp>
template<class... Args>
void
warn(
Located<std::string_view> format,
Args&&... args);
| Name | Description |
|---|---|
| format | fmt-style format string. |
| args | Arguments substituted into the format string. |
Holds current statistics on reported messages.
unordered_map keyed by std::string with transparent hashing.
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
template<class T>
using UnorderedStringMap = std::unordered_map<std::string, T, StringHash, std::equal_to<>>;
unordered_multimap keyed by std::string with transparent hashing.
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
template<class T>
using UnorderedStringMultiMap = std::unordered_multimap<std::string, T, StringHash, std::equal_to<>>;
Alias for add_const_from<From, To>::type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
using add_const_from_t = add_const_from<From, To>::type;
| Name | Description |
|---|---|
| From | Source type providing const qualifier. |
| To | Destination type to adjust. |
Alias for add_cv_from<From, To>::type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
using add_cv_from_t = add_cv_from<From, To>::type;
| Name | Description |
|---|---|
| From | Source type providing cv qualifiers. |
| To | Destination type to adjust. |
Alias for add_cvref_from<From, To>::type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
using add_cvref_from_t = add_cvref_from<From, To>::type;
| Name | Description |
|---|---|
| From | Source type providing cv-ref qualifiers. |
| To | Destination type to adjust. |
Alias for add_lvalue_reference_from<From, To>::type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
using add_lvalue_reference_from_t = add_lvalue_reference_from<From, To>::type;
| Name | Description |
|---|---|
| From | Source type providing reference qualifier. |
| To | Destination type to adjust. |
Alias for add_reference_from<From, To>::type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
using add_reference_from_t = add_reference_from<From, To>::type;
| Name | Description |
|---|---|
| From | Source type providing reference qualifier. |
| To | Destination type to adjust. |
Alias for add_rvalue_reference_from<From, To>::type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
using add_rvalue_reference_from_t = add_rvalue_reference_from<From, To>::type;
| Name | Description |
|---|---|
| From | Source type providing reference qualifier. |
| To | Destination type to adjust. |
Alias for add_volatile_from<From, To>::type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
using add_volatile_from_t = add_volatile_from<From, To>::type;
| Name | Description |
|---|---|
| From | Source type providing volatile qualifier. |
| To | Destination type to adjust. |
Alias for make_dependent<T, U>::type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename T,
typename U>
using make_dependent_t = T;
| Name | Description |
|---|---|
| T | Type to make dependent. |
| U | Dependent parameter. |
Polymorphic visitor for files discovered during traversal.
Declared in <mrdocs/Support/Path.hpp>
struct AnyFileVisitor;
| Name | Description |
|---|---|
~AnyFileVisitor [destructor] [virtual] | Virtual destructor. |
visitFile [virtual] | Visit a single file path. |
Virtual destructor.
Declared in <mrdocs/Support/Path.hpp>
virtual
~AnyFileVisitor() = 0;
Visit a single file path.
Declared in <mrdocs/Support/Path.hpp>
virtual
Expected<void>
visitFile(std::string_view fileName) = 0;
Success or error from visitor.
| Name | Description |
|---|---|
| fileName | Path to the file being visited. |
C++ array type (bounded or unbounded).
Declared in <mrdocs/Metadata/Type/ArrayType.hpp>
struct ArrayType final
: TypeCommonBase<TypeKind::Array>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::Array> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
Bounds | Optional bound; empty means unknown or dependent. |
ElementType | Element type held by the array. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
Optional bound; empty means unknown or dependent.
Element type held by the array.
Declared in <mrdocs/Metadata/Type/ArrayType.hpp>
Polymorphic<Type> ElementType = Polymorphic<Type>(AutoType{});
A non-owning, read-only view over a contiguous array of T.
Declared in <mrdocs/ADT/ArrayView.hpp>
template<class T>
class ArrayView;
Similar to std::string_view but for arbitrary element type T.
| Name | Description |
|---|---|
const_iterator | Iterator over elements. |
const_pointer | Pointer to constant element. |
const_reference | Reference to constant element. |
const_reverse_iterator | Const reverse iterator over the view. |
difference_type | Signed iterator difference type. |
iterator | Iterator over elements. |
pointer | Pointer to constant element. |
reference | Reference to constant element. |
reverse_iterator | Reverse iterator over the view. |
size_type | Unsigned size type. |
value_type | Element type referenced by the view. |
| Name | Description |
|---|---|
ArrayView [constructor] | Constructors |
at | Access the element at the specified index with bounds checking. |
back | Return a reference to the last element. |
begin | Return an iterator to the first element. |
cbegin | Return a const iterator to the first element. |
cend | Return a const iterator one past the last element. |
data | Return a pointer to the underlying data. |
drop_back | Return a view with the last n elements removed. |
drop_front | Return a view with the first n elements removed. |
empty | Return true if the view contains no elements. |
end | Return an iterator one past the last element. |
front | Return a reference to the first element. |
length | Return the number of elements in the view. |
operator[] | Access the element at the specified index without bounds checking. |
rbegin | Return a reverse iterator to the last element. |
remove_prefix | Remove n elements from the front of the view. |
remove_suffix | Remove n elements from the back of the view. |
rend | Return a reverse iterator one before the first element. |
size | Return the number of elements in the view. |
slice | Return a subview starting at pos with up to count elements. |
take_back | Return a view containing the last n elements. |
take_front | Return a view containing the first n elements. |
| Name | Description |
|---|---|
npos | Sentinel used by slicing helpers to indicate “until the end”. |
| Name | Description |
|---|---|
mrdocs::operator<=> | Three-way comparison operator |
mrdocs::operator== | Equality operator |
| Name | Description |
|---|---|
make_array_view | Create an ArrayView from a C-style array. |
make_array_view | Create an ArrayView from a pointer and count. |
Iterator over elements.
Declared in <mrdocs/ADT/ArrayView.hpp>
using const_iterator = T const*;
Pointer to constant element.
Declared in <mrdocs/ADT/ArrayView.hpp>
using const_pointer = T const*;
Reference to constant element.
Declared in <mrdocs/ADT/ArrayView.hpp>
using const_reference = T const&;
Const reverse iterator over the view.
Declared in <mrdocs/ADT/ArrayView.hpp>
using const_reverse_iterator = std::reverse_iterator<const_iterator>;
Signed iterator difference type.
Declared in <mrdocs/ADT/ArrayView.hpp>
using difference_type = std::ptrdiff_t;
Iterator over elements.
Declared in <mrdocs/ADT/ArrayView.hpp>
using iterator = T const*;
Pointer to constant element.
Declared in <mrdocs/ADT/ArrayView.hpp>
using pointer = T const*;
Reference to constant element.
Declared in <mrdocs/ADT/ArrayView.hpp>
using reference = T const&;
Reverse iterator over the view.
Declared in <mrdocs/ADT/ArrayView.hpp>
using reverse_iterator = std::reverse_iterator<const_iterator>;
Unsigned size type.
Declared in <mrdocs/ADT/ArrayView.hpp>
using size_type = std::size_t;
Element type referenced by the view.
Declared in <mrdocs/ADT/ArrayView.hpp>
using value_type = T;
Constructors
Declared in <mrdocs/ADT/ArrayView.hpp>
Construct an empty view.
constexpr
ArrayView() noexcept = default;
» more...
Construct a view from a C-style array.
template<size_type N>
constexpr
ArrayView(T const(& arr)[N]) noexcept;
» more...
Construct a view from a pointer and element count.
constexpr
ArrayView(
T const* data,
size_type count) noexcept;
» more...
Construct a view from a contiguous iterator range of known size.
template<class It>
requires (std::contiguous_iterator<It> &&
std::same_as<std::remove_cv_t<std::remove_reference_t<std::iter_value_t<It>>>, T>)
constexpr
ArrayView(
It first,
size_type count) noexcept;
» more...
| Name | Description |
|---|---|
| arr | The array to view. |
| data | Pointer to the first element. |
| count | Number of elements in the range. |
| first | Iterator to the first element. |
Construct an empty view.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
ArrayView() noexcept = default;
Construct a view from a C-style array.
Declared in <mrdocs/ADT/ArrayView.hpp>
template<size_type N>
constexpr
ArrayView(T const(& arr)[N]) noexcept;
| Name | Description |
|---|---|
| arr | The array to view. |
Construct a view from a pointer and element count.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
ArrayView(
T const* data,
size_type count) noexcept;
| Name | Description |
|---|---|
| data | Pointer to the first element. |
| count | Number of elements in the range. |
Construct a view from a contiguous iterator range of known size.
Declared in <mrdocs/ADT/ArrayView.hpp>
template<class It>
requires (std::contiguous_iterator<It> &&
std::same_as<std::remove_cv_t<std::remove_reference_t<std::iter_value_t<It>>>, T>)
constexpr
ArrayView(
It first,
size_type count) noexcept;
| Name | Description |
|---|---|
| first | Iterator to the first element. |
| count | Number of elements starting at first. |
Access the element at the specified index with bounds checking.
Reference to the element.
| Name | Description |
|---|---|
| i | Zero-based index. |
Return a reference to the last element.
a reference to the last element.
Return an iterator to the first element.
Iterator to the start of the view.
Return a const iterator to the first element.
Const iterator to the start of the view.
Return a const iterator one past the last element.
Const iterator to the end sentinel.
Return a pointer to the underlying data.
Pointer to the first element, or nullptr when empty.
Return a view with the last n elements removed.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
ArrayView
drop_back(size_type n) const noexcept;
Subview excluding the dropped elements.
| Name | Description |
|---|---|
| n | Number of elements to drop from the back. |
Return a view with the first n elements removed.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
ArrayView
drop_front(size_type n) const noexcept;
Subview starting after the dropped elements.
| Name | Description |
|---|---|
| n | Number of elements to drop from the front. |
Return true if the view contains no elements.
Declared in <mrdocs/ADT/ArrayView.hpp>
[[nodiscard]]
constexpr
bool
empty() const noexcept;
true when size is zero, otherwise false.
Return an iterator one past the last element.
Iterator to the end sentinel.
Return a reference to the first element.
a reference to the first element.
Return the number of elements in the view.
Element count.
Access the element at the specified index without bounds checking.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
const_reference
operator[](size_type i) const noexcept;
Reference to the element.
| Name | Description |
|---|---|
| i | Zero-based index. |
Return a reverse iterator to the last element.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
const_reverse_iterator
rbegin() const noexcept;
Reverse iterator to the last element.
Remove n elements from the front of the view.
| Name | Description |
|---|---|
| n | Number of elements to drop. |
Remove n elements from the back of the view.
| Name | Description |
|---|---|
| n | Number of elements to drop. |
Return a reverse iterator one before the first element.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
const_reverse_iterator
rend() const noexcept;
Reverse iterator denoting the rend sentinel.
Return the number of elements in the view.
Element count.
Return a subview starting at pos with up to count elements.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
ArrayView
slice(
size_type pos,
size_type count = npos) const noexcept;
Subview representing the requested slice.
| Name | Description |
|---|---|
| pos | Starting index within the current view. |
| count | Maximum number of elements to include; use npos for the remainder. |
Return a view containing the last n elements.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
ArrayView
take_back(size_type n) const noexcept;
Subview of the last n elements (clamped to size).
| Name | Description |
|---|---|
| n | Desired suffix length. |
Return a view containing the first n elements.
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
ArrayView
take_front(size_type n) const noexcept;
Subview of the first n elements (clamped to size).
| Name | Description |
|---|---|
| n | Desired prefix length. |
Sentinel used by slicing helpers to indicate “until the end”.
Declared in <mrdocs/ADT/ArrayView.hpp>
inline constexpr static
size_type npos = static_cast<size_type>(-1);
Represents auto or decltype(auto) placeholder type.
Declared in <mrdocs/Metadata/Type/AutoType.hpp>
struct AutoType final
: TypeCommonBase<TypeKind::Auto>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::Auto> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
Constraint | Constraint on the auto type, if any. |
Keyword | Which placeholder keyword appears (auto or decltype(auto)). |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
Constraint on the auto type, if any.
Declared in <mrdocs/Metadata/Type/AutoType.hpp>
Optional<Polymorphic<Name>> Constraint = std::nullopt;
Which placeholder keyword appears (auto or decltype(auto)).
Base class for accessing an empty Expected.
Declared in <mrdocs/Support/Expected.hpp>
template<class E>
class BadExpectedAccess
: public BadExpectedAccess<void>
Exception thrown when reading the error of an Expected with a value.
| Name | Description |
|---|---|
BadExpectedAccess<void> | Exception thrown when reading the value of an empty Expected. |
| Name | Description |
|---|---|
BadExpectedAccess [constructor] | Construct with the unexpected error value. |
operator= | Assignment operators |
error | error overloads |
what [virtual] | Return a diagnostic string. |
| Name | Description |
|---|---|
operator= | Assignment operators |
Construct with the unexpected error value.
Declared in <mrdocs/Support/Expected.hpp>
explicit
BadExpectedAccess(E e);
| Name | Description |
|---|---|
| e | The object to construct from |
error overloads
Declared in <mrdocs/Support/Expected.hpp>
Access the contained error by lvalue reference.
[[nodiscard]]
E&
error() & noexcept;
» more...
Access the contained error by const lvalue reference.
[[nodiscard]]
E const&
error() const & noexcept;
» more...
Access the contained error by rvalue reference.
[[nodiscard]]
E&&
error() && noexcept;
» more...
Access the contained error by const rvalue reference.
[[nodiscard]]
E const&&
error() const && noexcept;
» more...
Access the contained error by lvalue reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
E&
error() & noexcept;
Reference to the stored unexpected value.
Access the contained error by const lvalue reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
E const&
error() const & noexcept;
Const reference to the stored unexpected value.
Access the contained error by rvalue reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
E&&
error() && noexcept;
Rvalue reference to the stored unexpected value.
Access the contained error by const rvalue reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
E const&&
error() const && noexcept;
Const rvalue reference to the stored unexpected value.
Exception thrown when reading the value of an empty Expected.
Declared in <mrdocs/Support/Expected.hpp>
template<>
class BadExpectedAccess<void>
: public std::exception
| Name | Description |
|---|---|
std::exception | Base class for all library exceptions. |
| Name | Description |
|---|---|
operator= | Assignment operators |
what [virtual] | Return a diagnostic string. |
| Name | Description |
|---|---|
BadExpectedAccess [constructor] | Constructors |
~BadExpectedAccess [destructor] [virtual] | Virtual destructor. |
operator= | Assignment operators |
| Name | Description |
|---|---|
BadExpectedAccess | Base class for accessing an empty Expected. |
Assignment operators
Assignment operator
Declared in <bits/exception.h>
constexpr
exception&
operator=(exception const& value) = default;
Base class for all library exceptions.
| Name | Description |
|---|---|
| value | The object to copy assign from |
Assignment operator
Declared in <bits/exception.h>
constexpr
exception&
operator=(exception&& value) = default;
Base class for all library exceptions.
| Name | Description |
|---|---|
| value | The object to move assign from |
Return a diagnostic string.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
virtual
char const*
what() const noexcept override;
a diagnostic string.
Constructors
Declared in <mrdocs/Support/Expected.hpp>
Default constructor.
constexpr
BadExpectedAccess() noexcept = default;
» more...
Copy constructor.
constexpr
BadExpectedAccess(BadExpectedAccess<void> const& other) = default;
» more...
Move constructor.
constexpr
BadExpectedAccess(BadExpectedAccess<void>&& other) = default;
» more...
Default constructor.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
BadExpectedAccess() noexcept = default;
Copy constructor.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
BadExpectedAccess(BadExpectedAccess<void> const& other) = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Move constructor.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
BadExpectedAccess(BadExpectedAccess<void>&& other) = default;
| Name | Description |
|---|---|
| other | The object to move construct from |
Virtual destructor.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
virtual
~BadExpectedAccess() override = default;
Assignment operators
Declared in <mrdocs/Support/Expected.hpp>
Copy assignment.
constexpr
BadExpectedAccess<void>&
operator=(BadExpectedAccess<void> const& other) = default;
» more...
Move assignment.
constexpr
BadExpectedAccess<void>&
operator=(BadExpectedAccess<void>&& other) = default;
» more...
Copy assignment.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
BadExpectedAccess<void>&
operator=(BadExpectedAccess<void> const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move assignment.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
BadExpectedAccess<void>&
operator=(BadExpectedAccess<void>&& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Metadata for a direct base.
Declared in <mrdocs/Metadata/Symbol/RecordBase.hpp>
struct BaseInfo;
| Name | Description |
|---|---|
BaseInfo [constructor] [deleted] | Constructors |
| Name | Description |
|---|---|
Access | The access specifier for the base. |
IsVirtual | Whether the base is virtual. |
Type | The base type. |
Constructors
Declared in <mrdocs/Metadata/Symbol/RecordBase.hpp>
Bases must be explicitly described.
BaseInfo() = delete;
» more...
Create a base description.
BaseInfo(
Polymorphic<Type>&& type,
AccessKind const access,
bool const is_virtual);
» more...
| Name | Description |
|---|---|
| type | The base type. |
| access | Declared access specifier. |
| is_virtual | Whether the base is virtual. |
Bases must be explicitly described.
Declared in <mrdocs/Metadata/Symbol/RecordBase.hpp>
BaseInfo() = delete;
Create a base description.
Declared in <mrdocs/Metadata/Symbol/RecordBase.hpp>
BaseInfo(
Polymorphic<Type>&& type,
AccessKind const access,
bool const is_virtual);
| Name | Description |
|---|---|
| type | The base type. |
| access | Declared access specifier. |
| is_virtual | Whether the base is virtual. |
The access specifier for the base.
Declared in <mrdocs/Metadata/Symbol/RecordBase.hpp>
AccessKind Access = AccessKind::Public;
Whether the base is virtual.
Declared in <mrdocs/Metadata/Symbol/RecordBase.hpp>
bool IsVirtual = false;
The base type.
This is typically a NamedType that refers to a RecordSymbol, but it could also be a more complex type such as a decltype.
Info for concepts.
Declared in <mrdocs/Metadata/Symbol/Concept.hpp>
struct ConceptSymbol final
: SymbolCommonBase<SymbolKind::Concept>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Concept> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
ConceptSymbol [constructor] | Construct a concept symbol with its ID. |
operator<=> | Compare concept symbols by base info, template, and constraint. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
Constraint | The concepts constraint-expression |
Template | The concepts template parameters |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Construct a concept symbol with its ID.
Declared in <mrdocs/Metadata/Symbol/Concept.hpp>
explicit
ConceptSymbol(SymbolID const& ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to copy construct from |
Compare concept symbols by base info, template, and constraint.
Declared in <mrdocs/Metadata/Symbol/Concept.hpp>
std::strong_ordering
operator<=>(ConceptSymbol const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
The concepts constraint-expression
The concepts template parameters
Configuration used to generate the Corpus and Docs
Declared in <mrdocs/Config.hpp>
class Config;
This contains all the public settings applied from the command line and the YML file (if any).
This class stores the original and public config options as they are passed to MrDocs, in their original data types, such as strings and bools.
This class is an abstract interface whose private concrete implementation typically includes these parsed configuration values in a more convenient form for use by MrDocs.
Meanwhile, this class is provided publicly to plugins.
The configuration is always connected to the directory of the mrdocs.yml file from which absolute paths are calculated from relative paths.
| Name | Description |
|---|---|
Settings | Settings values used to generate the Corpus and Docs |
| Name | Description |
|---|---|
~Config [destructor] [virtual] | Destructor. |
object [virtual] | Return a DOM object representing the configuration keys. |
operator-> | Return the settings used to generate the Corpus and Docs. |
settings [virtual] | Return the settings used to generate the Corpus and Docs. |
threadPool [virtual] | Return a pool of threads for executing work. |
| Name | Description |
|---|---|
load | Create a Config from normalized public settings. |
| Name | Description |
|---|---|
Config [constructor] | Construct an empty configuration interface. Implementations populate settings in derived classes. |
Settings values used to generate the Corpus and Docs
Declared in <mrdocs/Config.hpp>
struct Settings
: PublicSettings
| Name | Description |
|---|---|
PublicSettings |
| Name | Description |
|---|---|
OptionProperties | Option validation traits |
| Name | Description |
|---|---|
BaseMemberInheritance | Enum for "base-member-inheritance" options |
LogLevel | Enum for "log-level" options |
OptionType | Option Type |
SortSymbolBy | Enum for "sort-symbol-by" options |
| Name | Description |
|---|---|
configDir | Full path to the config file directory |
normalize | Normalize the configuration values with a visitor |
operator-> | Provide pointer-like access to settings fields. |
outputDir | Full path to the output directory |
visit | Visit all options |
| Name | Description |
|---|---|
fromString | |
load | load overloads |
load_file | Loads the public configuration settings from the specified file. |
toString |
| Name | Description |
|---|---|
addons | Path to the Addons directory |
addonsSupplemental | Additional addons layered on top of the base addons |
autoBrief | command is required. |
autoFunctionMetadata | Automatically provide missing documentation for special functions and trivial metadata |
autoFunctionObjects | Automatically detect algorithm function objects |
autoRelates | Automatically find non-member functions |
baseUrl | Base URL for links to source code |
cmake | CMake arguments when generating the compilation database from CMakeLists.txt |
cmdLineInputs | Configuration or compilation database files |
compilationDatabase | Path to the compilation database |
concurrency | Number of threads to use |
config | Mr.Docs configuration file |
configYaml | A string holding the complete configuration YAML. |
copycss | Copy local stylesheets when linking |
cwdDir | Full path to the current working directory |
defines | Additional defines passed to the compiler |
embedded | Output an embeddable document |
errorOnEmptyCorpus | Treat an empty corpus as an error |
exclude | Input directories to exclude |
excludePatterns | File patterns to exclude |
excludeSymbols | Symbol patterns to exclude |
extractAll | Extract all symbols |
extractAnonymousNamespaces | Extraction policy for anonymous namespaces |
extractEmptyNamespaces | Extraction policy for empty namespaces |
extractFriends | Extraction policy for friend functions and classes |
extractImplicitSpecializations | Implicit template specializations used as base classes are extracted as dependencies |
extractLocalClasses | Extraction policy for records defined locally in source files |
extractPrivate | Extraction policy for private class members |
extractPrivateBases | Extraction policy for private base classes |
extractPrivateVirtual | Extraction policy for private virtual methods of a class |
extractStatic | Extraction policy for static members of a file |
filePatterns | File patterns to include |
generator | Generator(s) used to create the documentation |
globalNamespaceIndex | Use the global namespace page as an index for all symbols |
ignoreFailures | Whether AST visitation failures should not stop the program |
ignoreMapErrors | Continue if files are not mapped correctly |
implementationDefined | Symbols rendered as "implementation-defined" |
includeSymbols | Symbol patterns to include |
includes | Include paths |
inheritBaseMembers | Determine how derived classes inherit base members |
input | Input directories to extract symbols from |
legibleNames | Use legible names |
libcIncludes | Standard Library include paths |
linkcss | Link stylesheets instead of embedding them |
logLevel | The minimum reporting level |
missingIncludePrefixes | Include path prefixes allowed to be missing |
missingIncludeShims | Shims for forgiven missing include files |
mrdocsRootDir | Full path to the mrdocs root directory |
multipage | Generate a multipage documentation |
noDefaultStyles | Disable the bundled default stylesheet |
output | Directory or file for generating output |
overloads | Detect and group function overloads |
recursive | Recursively include files from "input" paths |
report | The minimum reporting level |
seeBelow | Exposition only symbols rendered as "see-below". |
sfinae | Detect and reduce SFINAE expressions |
showEnumConstants | Show enum constant pages in the documentation |
showNamespaces | Show namespace pages in the documentation |
sortMembers | Sort the members of a record |
sortMembersAssignment1St | Sort assignment operators first |
sortMembersBy | Determine how members of a record are sorted |
sortMembersConversionLast | Sort conversion operators last |
sortMembersCtors1St | Sort constructors first |
sortMembersDtors1St | Sort destructors first |
sortMembersRelationalLast | Sort relational operators last |
sortNamespaceMembersBy | Determine how members of a namespace are sorted |
sourceRoot | Path to the root directory of the source code |
stdlibIncludes | C++ Standard Library include paths |
stylesdir | Directory for linked stylesheets |
stylesheets | Ordered list of stylesheets to apply to HTML output |
systemIncludes | System include paths |
tagfile | Path for the tagfile |
useSystemLibc | Use the system C standard library |
useSystemStdlib | Use the system C++ standard library |
verbose | Verbose output |
warnAsError | Treat warnings as errors |
warnBrokenRef | Warn if a documentation reference is broken |
warnIfDocError | Warn if documentation has errors |
warnIfUndocEnumVal | Warn if enum values are not documented |
warnIfUndocumented | Warn if symbols are not documented |
warnNoParamdoc | Warn if parameters are not documented |
warnUnnamedParam | Warn if documented functions have unnamed parameters |
warnings | Enable warning messages |
| Name | Description |
|---|---|
llvm::yaml::MappingTraits |
Option validation traits
Declared in <mrdocs/PublicSettings.hpp>
struct OptionProperties;
Enum for "base-member-inheritance" options
Declared in <mrdocs/PublicSettings.hpp>
enum class BaseMemberInheritance : int;
This enumeration value is valid for the inherit-base-members option
Enum for "log-level" options
Declared in <mrdocs/PublicSettings.hpp>
enum class LogLevel : int;
This enumeration value is valid for the log-level option
Option Type
Declared in <mrdocs/PublicSettings.hpp>
enum class OptionType : int;
Enum for "sort-symbol-by" options
Declared in <mrdocs/PublicSettings.hpp>
enum class SortSymbolBy : int;
These enumeration values are valid for the following options:
sort-members-by
sort-namespace-members-by
Full path to the config file directory
Declared in <mrdocs/Config.hpp>
std::string
configDir() const;
The reference directory for most MrDocs options is the directory of the mrdocs.yml file.
It is used to calculate full paths from relative paths.
This string will always be native style and have a trailing directory separator.
The full path to the config file directory.
Normalize the configuration values with a visitor
Declared in <mrdocs/Config.hpp>
Normalize the configuration values with a visitor
Expected<void>
normalize(ReferenceDirectories const& dirs);
» more...
Normalize the configuration values with a visitor
template<class F>
Expected<void>
normalize(
ReferenceDirectories const& dirs,
F&& f);
» more...
Expected<void> with the error if any
| Name | Description |
|---|---|
| dirs | The reference directories to resolve paths |
| f | The visitor |
Normalize the configuration values with a visitor
Declared in <mrdocs/Config.hpp>
Expected<void>
normalize(ReferenceDirectories const& dirs);
This function normalizes and validates the configuration values.
Expected<void> with the error if any
| Name | Description |
|---|---|
| dirs | The reference directories to resolve paths |
Normalize the configuration values with a visitor
Declared in <mrdocs/PublicSettings.hpp>
template<class F>
Expected<void>
normalize(
ReferenceDirectories const& dirs,
F&& f);
This function normalizes and validates the configuration values.
Expected<void> with the error if any
| Name | Description |
|---|---|
| dirs | The reference directories to resolve paths |
| f | The visitor |
Provide pointer-like access to settings fields.
Pointer to this Settings instance.
Full path to the output directory
Declared in <mrdocs/Config.hpp>
std::string
outputDir() const;
The reference directory for MrDocs output and temporary files is the output directory.
This is either the output option (if already a directory) or the parent directory of the output option (if it is a file).
When the output option is a path that does not exist, we determine if it's a file or directory by checking if the filename contains a period.
This string will always be native style and have a trailing directory separator.
The full path to the output directory.
Visit all options
Declared in <mrdocs/PublicSettings.hpp>
Visit all options
template<class F>
void
visit(F&& f);
» more...
Visit all options
template<class F>
void
visit(F&& f) const;
» more...
| Name | Description |
|---|---|
| f | The visitor |
Visit all options
Declared in <mrdocs/PublicSettings.hpp>
template<class F>
void
visit(F&& f);
| Name | Description |
|---|---|
| f | The visitor |
Visit all options
Declared in <mrdocs/PublicSettings.hpp>
template<class F>
void
visit(F&& f) const;
| Name | Description |
|---|---|
| f | The visitor |
Declared in <mrdocs/PublicSettings.hpp>
constexpr
static
bool
fromString(
std::string_view const str,
BaseMemberInheritance& e);
» more...
constexpr
static
bool
fromString(
std::string_view const str,
LogLevel& e);
» more...
constexpr
static
bool
fromString(
std::string_view const str,
SortSymbolBy& e);
» more...
Declared in <mrdocs/PublicSettings.hpp>
constexpr
static
bool
fromString(
std::string_view const str,
BaseMemberInheritance& e);
Declared in <mrdocs/PublicSettings.hpp>
constexpr
static
bool
fromString(
std::string_view const str,
LogLevel& e);
Declared in <mrdocs/PublicSettings.hpp>
constexpr
static
bool
fromString(
std::string_view const str,
SortSymbolBy& e);
load overloads
Declared in <mrdocs/Config.hpp>
Load the configuration from a YAML string
static
Expected<void>
load(
PublicSettings& s,
std::string_view configYaml);
» more...
Loads the public configuration settings from the specified YAML file.
static
Expected<void>
load(
Config::Settings& s,
std::string_view configYaml,
ReferenceDirectories const& dirs);
» more...
| Name | Description |
|---|---|
| s | The PublicSettings object to load the configuration into |
| configYaml | The YAML string with the configuration |
| dirs | A constant reference to a PublicSettings::ReferenceDirectories object containing the reference directories. |
Load the configuration from a YAML string
Declared in <mrdocs/PublicSettings.hpp>
static
Expected<void>
load(
PublicSettings& s,
std::string_view configYaml);
This function loads the values from the YAML string without normalizing or validating them.
After calling this function, call normalize to normalize and validate the options.
Expected<void> with the error if any
| Name | Description |
|---|---|
| s | The PublicSettings object to load the configuration into |
| configYaml | The YAML string with the configuration |
Loads the public configuration settings from the specified YAML file.
Declared in <mrdocs/Config.hpp>
static
Expected<void>
load(
Config::Settings& s,
std::string_view configYaml,
ReferenceDirectories const& dirs);
This function takes a YAML file and a set of reference directories as input. It parses the YAML file and loads the configuration settings into a Config::Settings object. The reference directories are used to resolve any relative paths in the configuration settings.
An Expected object containing a Config::Settings object if the YAML file was successfully parsed and the configuration settings were loaded, or an error otherwise.
| Name | Description |
|---|---|
| s | A reference to a Config::Settings object where the configuration settings will be loaded. |
| configYaml | A string view representing the YAML file containing the configuration settings. |
| dirs | A constant reference to a PublicSettings::ReferenceDirectories object containing the reference directories. |
Loads the public configuration settings from the specified file.
Declared in <mrdocs/Config.hpp>
static
Expected<void>
load_file(
Config::Settings& s,
std::string_view configPath,
ReferenceDirectories const& dirs);
This function takes a file path and a set of reference directories as input. It reads the file and loads the configuration settings into a Config::Settings object. The reference directories are used to resolve any relative paths in the configuration settings.
An Expected object containing void if the file was successfully read and the configuration settings were loaded, or an error otherwise.
| Name | Description |
|---|---|
| s | A reference to a Config::Settings object where the configuration settings will be loaded. |
| configPath | A string view representing the file path of the configuration settings. |
| dirs | A constant reference to a PublicSettings::ReferenceDirectories object containing the reference directories. |
Declared in <mrdocs/PublicSettings.hpp>
constexpr
static
std::string_view
toString(BaseMemberInheritance const e);
Declared in <mrdocs/PublicSettings.hpp>
constexpr
static
std::string_view
toString(LogLevel const e);
Declared in <mrdocs/PublicSettings.hpp>
constexpr
static
std::string_view
toString(SortSymbolBy const e);
Path to the Addons directory
Declared in <mrdocs/PublicSettings.hpp>
std::string addons;
The directory of template files the generators use to build the documentation.
Leave it unset to use the defaults that ship at share/mrdocs/addons in the MrDocs installation.
To customize the output, copy those defaults to your own directory and point this option at it.
Additional addons layered on top of the base addons
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> addonsSupplemental;
Optional list of supplemental addons directories that are loaded after the base addons (built-in or replacement).
Files in later supplemental directories override files from earlier ones and from the base addons.
Use this to add or override a few templates/helpers without copying the entire addons tree.
command is required.
Declared in <mrdocs/PublicSettings.hpp>
bool autoBrief = true;
Use the first line of the comment as the brief
When set to true, Mr.Docs uses the first line (until the first dot, question mark, or exclamation mark) of the comment as the brief of the symbol.
When set to false, a explicit
Automatically provide missing documentation for special functions and trivial metadata
Declared in <mrdocs/PublicSettings.hpp>
bool autoFunctionMetadata = true;
When set to true, Mr.Docs automatically provides documentation for special functions, such as constructors, destructors, and operators.
It also provides documentation for missing documentation metadata, such as known types.
Automatically detect algorithm function objects
Declared in <mrdocs/PublicSettings.hpp>
bool autoFunctionObjects = true;
When true, Mr.Docs automatically detects algorithm function objects (informally known as niebloids): variables whose type is a record whose only public non-special members are operator() overloads.
Set to false to disable auto-detection and rely solely on the
/
doc command.
The
command is still useful when auto-detection is enabled, to force treatment of types that fail auto-detection (e.g.
because they have extra public members); it may be placed on the variable or on the function-object record.
When a variable is treated as an algorithm function object, its documentation comes from the record's operator() overloads, falling back to the variable's own doc comment when operator() is undocumented; the record's own doc comment is not used.
Automatically find non-member functions
Declared in <mrdocs/PublicSettings.hpp>
bool autoRelates = true;
When set to true, Mr.Docs automatically finds non-member functions that are related to the current class.
Base URL for links to source code
Declared in <mrdocs/PublicSettings.hpp>
std::string baseUrl;
The prefix for links to the source code.
MrDocs joins it with the path of each source file to build the link.
CMake arguments when generating the compilation database from CMakeLists.txt
Declared in <mrdocs/PublicSettings.hpp>
std::string cmake;
When the compilation-database option is a CMakeLists.txt file, these arguments are passed to the cmake command to generate the compilation_database.json.
Configuration or compilation database files
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> cmdLineInputs;
Positional inputs that drive the run.
Each path is dispatched by file name: an input ending in mrdocs.yml is read as a configuration file, and an input ending in compile_commands.json or CMakeLists.txt is read as a compilation database.
The dispatch is a convenience; prefer the explicit config and compilation-database flags so the invocation is unambiguous and easier to read in scripts and CI logs.
Path to the compilation database
Declared in <mrdocs/PublicSettings.hpp>
std::string compilationDatabase;
The path to a compilation database, or to a build script that generates one.
A compilation database is a JSON file of the compiler commands that build the source; MrDocs reads the compiler flags and source files from it to extract symbols.
You can also pass a build script such as CMakeLists.txt: MrDocs then looks for CMake on PATH or in CMAKE_ROOT, runs the script, and uses the database it produces.
Number of threads to use
Declared in <mrdocs/PublicSettings.hpp>
unsigned int concurrency = 0;
The desired level of concurrency: 0 for hardware-suggested.
Mr.Docs configuration file
Declared in <mrdocs/PublicSettings.hpp>
std::string config;
A YAML file holding the options for the run: the source code, the output directory, the compilation database, the generator, and the filters.
MrDocs reads it and applies the options it finds.
A string holding the complete configuration YAML.
Declared in <mrdocs/Config.hpp>
std::string configYaml;
Copy local stylesheets when linking
Declared in <mrdocs/PublicSettings.hpp>
bool copycss = true;
When linkcss is true, copy bundled and local stylesheet files into the output under stylesdir.
Remote URLs are not copied.
Set to false to skip copying.
Full path to the current working directory
Declared in <mrdocs/Config.hpp>
std::string cwdDir = ".";
This string will always be native style and have a trailing directory separator.
Additional defines passed to the compiler
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> defines;
Additional defines passed to the compiler when building the source code.
These defines are added to the compilation database regardless of the strategy to generate it.
Output an embeddable document
Declared in <mrdocs/PublicSettings.hpp>
bool embedded = false;
Output an embeddable document, which excludes the header, the footer, and everything outside the body of the document.
This option is useful for producing documents that can be inserted into an external template.
Treat an empty corpus as an error
Declared in <mrdocs/PublicSettings.hpp>
bool errorOnEmptyCorpus = true;
When set to true, MrDocs treats an empty corpus as a hard error and exits with a failure status instead of emitting a warning and succeeding.
A corpus counts as empty when no symbols are extracted; because the global namespace is always present in the model, a corpus that contains only the global namespace and no other declaration is also treated as empty.
This usually means nothing was extracted, which is rarely intended in CI, so this turns that silent success into a detectable failure.
This escalation applies regardless of the warn-as-error option.
Input directories to exclude
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> exclude;
Symbols defined in files in these directories are not extracted even if they are in the list of include directories.
When relative, the paths are relative to the directory of the mrdocs configuration file.
For instance, "include/experimental" will exclude all files in the directory <config-dir>/include/experimental.
Exclusion is strict about symlinks: it matches the file path only as written and does not resolve symlinks.
File patterns to exclude
Declared in <mrdocs/PublicSettings.hpp>
std::vector<PathGlobPattern> excludePatterns;
Files matching these glob patterns are skipped, even when they sit inside an included directory.
The patterns are relative to the configuration file.
A single * matches everything in a directory; ** matches everything in a directory and its subdirectories.
Symbol patterns to exclude
Declared in <mrdocs/PublicSettings.hpp>
std::vector<SymbolGlobPattern> excludeSymbols;
A symbol that matches one of these patterns is not extracted even if whitelisted by "include-symbols".
See the documentation for "include-symbols" for the pattern syntax.
Extract all symbols
Declared in <mrdocs/PublicSettings.hpp>
bool extractAll = true;
When set to true, MrDocs extracts all symbols from the source code, even if no documentation is provided.
MrDocs can only identify whether a symbol is ultimated documented after extracting information from all translation units.
For this reason, when this option is set to false, it's still recommendable to provide file and symbol filters so that only the desired symbols are traversed and stored by MrDocs.
Extraction policy for anonymous namespaces
Declared in <mrdocs/PublicSettings.hpp>
bool extractAnonymousNamespaces = true;
Determine whether symbols in anonymous namespaces should be extracted.
Extraction policy for empty namespaces
Declared in <mrdocs/PublicSettings.hpp>
bool extractEmptyNamespaces = false;
Determine whether empty namespaces without documentation should be extracted.
Extraction policy for friend functions and classes
Declared in <mrdocs/PublicSettings.hpp>
bool extractFriends = true;
Determine whether friend functions and classes should be extracted.
When set to true, MrDocs extracts friend functions and classes.
When set to false, friend functions and classes are not extracted.
Implicit template specializations used as base classes are extracted as dependencies
Declared in <mrdocs/PublicSettings.hpp>
bool extractImplicitSpecializations = true;
When set to true, MrDocs extracts implicit template specializations that appear as base classes, treating them as dependencies.
This gives it the metadata it needs to resolve the derived class's inherited members, as controlled by the inherit-base-members option.
Extraction policy for records defined locally in source files
Declared in <mrdocs/PublicSettings.hpp>
bool extractLocalClasses = true;
Determine whether records only defined locally in source files should be extracted.
Extraction policy for private class members
Declared in <mrdocs/PublicSettings.hpp>
bool extractPrivate = false;
Determine whether private class members should be extracted
Extraction policy for private base classes
Declared in <mrdocs/PublicSettings.hpp>
bool extractPrivateBases = false;
Determine whether private base classes should be extracted
Extraction policy for private virtual methods of a class
Declared in <mrdocs/PublicSettings.hpp>
bool extractPrivateVirtual = false;
Determine whether private virtual methods of a class should be extracted
Extraction policy for static members of a file
Declared in <mrdocs/PublicSettings.hpp>
bool extractStatic = false;
Determine whether static members of a file should be extracted.
This option does not refer to static members of a class.
File patterns to include
Declared in <mrdocs/PublicSettings.hpp>
std::vector<PathGlobPattern> filePatterns;
Only files whose names match these glob patterns are extracted.
The patterns are relative to the input directories.
Generator(s) used to create the documentation
The generator is responsible for creating the documentation from the extracted symbols.
The generator uses the extracted symbols and the templates to create the documentation.
The built-in generators include adoc, html, xml, and noop (which extracts but writes no output, useful for checking extraction warnings); data-driven generators can be added by dropping a template folder under <addon>/generator/<name>/.
This option accepts a single generator (generator: xml), a list (generator: [xml, adoc]), or a comma-separated string (`generator: "xml,adoc"`); when more than one is given the documentation is produced once per generator.
Use the global namespace page as an index for all symbols
Declared in <mrdocs/PublicSettings.hpp>
bool globalNamespaceIndex = true;
When set to true, the page for the global namespace will recursively list all symbols in the documentation, not just those in the global namespace.
This makes the global namespace page act as an index for the entire project.
Whether AST visitation failures should not stop the program
Declared in <mrdocs/PublicSettings.hpp>
bool ignoreFailures = false;
When set to true, MrDocs continues to generate the documentation even if there are AST visitation failures.
AST visitation failures occur when the source code contains constructs that are not supported by MrDocs.
Continue if files are not mapped correctly
Declared in <mrdocs/PublicSettings.hpp>
bool ignoreMapErrors = false;
When set to true, MrDocs continues to generate the documentation even if some files are not mapped correctly.
Files are not mapped correctly when the source file is not found or the compilation database does not contain the compiler flags for the source file.
Symbols rendered as "implementation-defined"
Declared in <mrdocs/PublicSettings.hpp>
std::vector<SymbolGlobPattern> implementationDefined;
Symbols matching these filters, and symbols in scopes that match, are tagged "implementation-defined".
Use it for symbols that belong to the project's private API.
An "implementation-defined" symbol has no page of its own, and any reference to it renders as "implementation-defined".
See include-symbols for the pattern syntax.
Symbol patterns to include
Declared in <mrdocs/PublicSettings.hpp>
std::vector<SymbolGlobPattern> includeSymbols;
If any patterns are defined here, only symbols that match one of these patterns are extracted.
The patterns are applied to the fully qualified name of the symbol without any leading "::".
A single "*" will match all symbols in the namespace.
Double "**" will match all symbols in the namespace and its subnamespaces.
The patterns also support "?" for any chars, "[<chars>]" for charsets, "[]" for inverted charsets, and "{<glob>,...}" for alternatives.
Include paths
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> includes;
Directories added to the header search path.
Headers found there are part of the project and are checked for warnings and errors.
Reach for this option when MrDocs cannot find a header your code includes.
Determine how derived classes inherit base members
Declared in <mrdocs/PublicSettings.hpp>
BaseMemberInheritance inheritBaseMembers = BaseMemberInheritance::CopyDependencies;
Determine how derived classes inherit members of base classes.
When set to never, derived classes do not inherit members of base classes and only the relationship is stored.
When set to reference, derived classes list members of base classes but references are still linked to the base class.
When set to copy-dependencies, a reference is created by default and a copy is created when the base class is a dependency.
When set to copy-all, a copy is created for each base symbol as if it was declared in the derived class.
If the base class is a dependency, the extraction mode is copied from the new parent.
Input directories to extract symbols from
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> input;
Input directories to extract.
Only symbols defined in files in these directories are extracted.
The paths are relative to the mrdocs configuration file.
Inclusion is generous about symlinks: a file counts as being inside an input directory when its path matches the directory either as written or by its real (symlink-resolved) location.
Use legible names
Declared in <mrdocs/PublicSettings.hpp>
bool legibleNames = true;
Use legible names for ids in the documentation.
When set to true, MrDocs uses legible names for symbols in the documentation.
These are symbols that are legible but still safe for URLs.
When the option is set to false, MrDocs uses a hash of the symbol ID.
Standard Library include paths
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> libcIncludes;
When use-system-libc is disabled, the C standard library headers are available in these paths.
Link stylesheets instead of embedding them
Declared in <mrdocs/PublicSettings.hpp>
bool linkcss = false;
When set to true, stylesheets are linked with <link> tags instead of being inlined.
Links use stylesdir plus the stylesheet name (e.g.
css/custom.css).
Local styles are copied unless copycss is false; remote URLs are linked as-is.
The minimum reporting level
Declared in <mrdocs/PublicSettings.hpp>
LogLevel logLevel = LogLevel::Info;
The reporting level determines the amount of information displayed during the generation of the documentation.
Include path prefixes allowed to be missing
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> missingIncludePrefixes;
Specifies path prefixes for include files that, if missing, will not cause documentation generation to fail.
Missing files with these prefixes are served as empty files from an in-memory file system, allowing processing to continue.
For example, use "llvm/" to forgive all includes from LLVM.
If any such path is specified, MrDocs will attempt to synthesize missing included types.
Only simple sets of non-conflicting inferred types can be synthesized.
For more complex types or for better control, provide a shim using the "missing-include-shims" option.
Shims for forgiven missing include files
Declared in <mrdocs/PublicSettings.hpp>
std::map<std::string, std::string> missingIncludeShims;
Specifies a map of include file paths to shim contents.
If a missing include file matches a forgiven prefix, MrDocs will use the shim content from this map as the file contents.
If no shim is provided for a forgiven file, an empty file is used by default.
Full path to the mrdocs root directory
Declared in <mrdocs/Config.hpp>
std::string mrdocsRootDir;
This is the directory containing the mrdocs executable and the shared files.
This string will always be native style and have a trailing directory separator.
Generate a multipage documentation
Declared in <mrdocs/PublicSettings.hpp>
bool multipage = true;
Generates a multipage documentation.
The output directory must be a directory.
This option acts as a hint to the generator to create a multipage documentation.
Whether the hint is followed or not depends on the generator.
Disable the bundled default stylesheet
Declared in <mrdocs/PublicSettings.hpp>
bool noDefaultStyles = false;
When set to true, the bundled stylesheet is not applied.
Combine with an empty stylesheets list to emit no styles at all.
Directory or file for generating output
Declared in <mrdocs/PublicSettings.hpp>
std::string output;
Multipage generators expect a directory.
Single page generators expect a file or a directory where the file will be created.
If the directory does not exist, it will be created.
Detect and group function overloads
Declared in <mrdocs/PublicSettings.hpp>
bool overloads = true;
When set to true, MrDocs detects function overloads and groups them as a single symbol type.
The documentation for this new symbol comes from the union of non-ambiguous metadata from the functions.
Recursively include files from "input" paths
Declared in <mrdocs/PublicSettings.hpp>
bool recursive = true;
Recursively include files.
When set to true, Mr.Docs includes files in subdirectories of the input directories.
When set to false, Mr.Docs includes only the files in the input directories.
The minimum reporting level
Declared in <mrdocs/PublicSettings.hpp>
unsigned int report = -1;
The reporting level determines the amount of information displayed during the generation of the documentation.
The value -1 delegates the decision to the log-level option.
Exposition only symbols rendered as "see-below".
Declared in <mrdocs/PublicSettings.hpp>
std::vector<SymbolGlobPattern> seeBelow;
Symbols matching these filters, and symbols in scopes that match, are tagged "see-below" in the documentation.
Use it for symbols that belong to the project's private API but that users still interact with.
On such a symbol's page the implementation synopsis is rendered as "see-below" and the members of a scope, such as a namespace or record, are not listed, while the rest of the documentation appears as usual.
See include-symbols for the pattern syntax.
Detect and reduce SFINAE expressions
Declared in <mrdocs/PublicSettings.hpp>
bool sfinae = true;
When set to true, MrDocs detects SFINAE expressions in the source code and extracts them as part of the documentation.
Expressions such as std::enable_if<...> are detected, removed, and documented as a requirement.
MrDocs uses an algorithm that extracts SFINAE infomation from types by identifying inspecting the primary template and specializations to detect the result type and the controlling expressions in a specialization.
Show enum constant pages in the documentation
Declared in <mrdocs/PublicSettings.hpp>
bool showEnumConstants = false;
When set to true, MrDocs creates a page for each enum constant in the documentation.
Show namespace pages in the documentation
Declared in <mrdocs/PublicSettings.hpp>
bool showNamespaces = true;
When set to true, MrDocs creates a page for each namespace in the documentation.
Sort the members of a record
Declared in <mrdocs/PublicSettings.hpp>
bool sortMembers = true;
When set to true, sort the members of a record by the criterion determined in the sort-members-by option.
When set to false, the members are included in the declaration order they are extracted.
Sort assignment operators first
Declared in <mrdocs/PublicSettings.hpp>
bool sortMembersAssignment1St = true;
When set to true, assignment operators are sorted first in the list of members of a record.
Determine how members of a record are sorted
Declared in <mrdocs/PublicSettings.hpp>
SortSymbolBy sortMembersBy = SortSymbolBy::Name;
If sort-members is set to true, determine how members of a record are sorted.
When set to name, members are sorted by name.
When set to location, members are sorted by their primary location in the source code, considering the short name of the path and the location in the file.
Sort conversion operators last
Declared in <mrdocs/PublicSettings.hpp>
bool sortMembersConversionLast = true;
When set to true, conversion operators are sorted last in the list of members of a record or namespace.
Sort constructors first
Declared in <mrdocs/PublicSettings.hpp>
bool sortMembersCtors1St = true;
When set to true, constructors are sorted first in the list of members of a record.
Sort destructors first
Declared in <mrdocs/PublicSettings.hpp>
bool sortMembersDtors1St = true;
When set to true, destructors are sorted first in the list of members of a record.
Sort relational operators last
Declared in <mrdocs/PublicSettings.hpp>
bool sortMembersRelationalLast = true;
When set to true, relational operators are sorted last in the list of members of a record or namespace.
Determine how members of a namespace are sorted
Declared in <mrdocs/PublicSettings.hpp>
SortSymbolBy sortNamespaceMembersBy = SortSymbolBy::Name;
Although members of namespaces are always sorted, determine how members of a namespace are sorted.
When set to name, members are sorted by name.
When set to location, members are sorted by their primary location in the source code, considering the short name of the path and the location in the file.
Path to the root directory of the source code
Declared in <mrdocs/PublicSettings.hpp>
std::string sourceRoot;
The root directory of the source tree.
It is the default location for input files and the base for the relative paths MrDocs forms from absolute ones.
Set it to the root of the git project so those relative paths can link back to the source files in the repository; templates build those links from the base-url option.
C++ Standard Library include paths
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> stdlibIncludes;
When use-system-stdlib is disabled, the C++ standard library headers are available in these paths.
Directory for linked stylesheets
Declared in <mrdocs/PublicSettings.hpp>
std::string stylesdir;
The directory MrDocs writes into the href of linked stylesheets when linkcss is true.
Defaults to css.
When local styles are copied, the directory is created under the output root, for example css/mrdocs-default.css.
Ordered list of stylesheets to apply to HTML output
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> stylesheets;
Ordered list of stylesheet names or paths.
If empty, the bundled stylesheet is used.
Entries can be local paths or remote URLs; remote URLs are only linked when linkcss is true.
Inline mode embeds local styles; link mode emits <link> tags for each entry and copies local files.
System include paths
Declared in <mrdocs/PublicSettings.hpp>
std::vector<std::string> systemIncludes;
Directories added to the system header search path.
Headers found there are treated as system headers: they come from outside the project and are not checked for warnings or errors.
The standard library and other external headers usually live here.
Path for the tagfile
Declared in <mrdocs/PublicSettings.hpp>
std::string tagfile;
Specifies the full path (filename) where the generated tagfile should be saved.
If left empty, no tagfile will be generated.
Use the system C standard library
Declared in <mrdocs/PublicSettings.hpp>
bool useSystemLibc = true;
To achieve reproducible results, MrDocs bundles the LibC headers with its definitions.
To use the C standard library available in the system instead, set this option to true.
Use the system C++ standard library
Declared in <mrdocs/PublicSettings.hpp>
bool useSystemStdlib = true;
To achieve reproducible results, MrDocs bundles the LibC++ headers.
To use the C++ standard library available in the system instead, set this option to true.
Verbose output
Declared in <mrdocs/PublicSettings.hpp>
bool verbose = false;
When set to true, MrDocs prints extra information as it generates the documentation.
Treat warnings as errors
Declared in <mrdocs/PublicSettings.hpp>
bool warnAsError = false;
When set to true, MrDocs treats warnings as errors and stops the generation of the documentation.
Warn if a documentation reference is broken
Declared in <mrdocs/PublicSettings.hpp>
bool warnBrokenRef = true;
When set to true, MrDocs outputs a warning message if a reference in the documentation is broken.
Warn if documentation has errors
Declared in <mrdocs/PublicSettings.hpp>
bool warnIfDocError = true;
When set to true, MrDocs outputs a warning message if the documentation of a symbol has errors such as duplicate parameters and parameters that don't exist.
Warn if enum values are not documented
Declared in <mrdocs/PublicSettings.hpp>
bool warnIfUndocEnumVal = true;
When set to true, MrDocs outputs a warning message if an enum value is not documented.
Warn if symbols are not documented
Declared in <mrdocs/PublicSettings.hpp>
bool warnIfUndocumented = true;
When set to true, MrDocs outputs a warning message if a symbol that passes all filters is not documented.
Warn if parameters are not documented
Declared in <mrdocs/PublicSettings.hpp>
bool warnNoParamdoc = true;
When set to true, MrDocs outputs a warning message if a named function parameter is not documented.
Warn if documented functions have unnamed parameters
Declared in <mrdocs/PublicSettings.hpp>
bool warnUnnamedParam = false;
When set to true, MrDocs outputs a warning message if a documented function has a parameter that is not named.
Enable warning messages
Declared in <mrdocs/PublicSettings.hpp>
bool warnings = true;
When set to true, MrDocs outputs warning messages during the generation of the documentation.
It is usually recommended to enable warnings while writing the documentation.
Destructor.
Declared in <mrdocs/Config.hpp>
virtual
~Config() noexcept = 0;
Return a DOM object representing the configuration keys.
The object is invalidated when the configuration is moved or destroyed.
a DOM object representing the configuration keys.
Return the settings used to generate the Corpus and Docs.
the settings used to generate the Corpus and Docs.
Return the settings used to generate the Corpus and Docs.
the settings used to generate the Corpus and Docs.
Return a pool of threads for executing work.
a pool of threads for executing work.
Create a Config from normalized public settings.
Declared in <mrdocs/Config.hpp>
static
Expected<std::shared_ptr<Config const>>
load(
Settings const& settings,
ReferenceDirectories const& dirs,
ThreadPool& threadPool);
The settings must already be normalized against the reference directories (call Settings::normalize first).
A shared, immutable Config on success, otherwise an Error.
| Name | Description |
|---|---|
| settings | Normalized public settings. |
| dirs | Reference directories used to resolve relative paths. |
| threadPool | Thread pool that the resulting Config will own a reference to. |
Construct an empty configuration interface. Implementations populate settings in derived classes.
Declared in <mrdocs/Config.hpp>
Config() noexcept;
Represents an expression with a (possibly known) value
Declared in <mrdocs/Metadata/Expression.hpp>
template<typename T>
struct ConstantExprInfo
: ExprInfo
| Name | Description |
|---|---|
ExprInfo | Represents an expression |
| Name | Description |
|---|---|
type | The underlying type of the expression |
| Name | Description |
|---|---|
asExpr | View this object as its base expression. |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
Value | The expressions value, if it is known |
Written | The expression, as written |
The underlying type of the expression
Declared in <mrdocs/Metadata/Expression.hpp>
using type = T;
Three-way comparison operators
Declared in <mrdocs/Metadata/Expression.hpp>
Order constant expressions by written form and value.
auto
operator<=>(ConstantExprInfo const& rhs) const = default;
» more...
Order expressions by written form.
constexpr
auto
operator<=>(ExprInfo const& rhs) const = default;
» more...
Order constant expressions by written form and value.
Declared in <mrdocs/Metadata/Expression.hpp>
auto
operator<=>(ConstantExprInfo const& rhs) const = default;
The relative order of the objects
| Name | Description |
|---|---|
| rhs | The right operand |
Order expressions by written form.
Declared in <mrdocs/Metadata/Expression.hpp>
constexpr
auto
operator<=>(ExprInfo const& rhs) const = default;
The relative order of the objects
| Name | Description |
|---|---|
| rhs | The right operand |
The expressions value, if it is known
The value of an expression will be unknown if it is e.g. dependent on a template parameter
Non-type template argument.
Declared in <mrdocs/Metadata/TArg/ConstantTArg.hpp>
struct ConstantTArg final
: TArgCommonBase<TArgKind::Constant>
| Name | Description |
|---|---|
TArgCommonBase<TArgKind::Constant> | CRTP base that fixes the argument kind. |
| Name |
|---|
isConstant |
isTemplate |
isType |
| Name | Description |
|---|---|
Value | Template argument expression. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
toString | Convert a template argument to a human-readable string. |
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isConstant() noexcept;
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isTemplate() noexcept;
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isType() noexcept;
Template argument expression.
A constant template parameter
Declared in <mrdocs/Metadata/TParam/ConstantTParam.hpp>
struct ConstantTParam final
: TParamCommonBase<TParamKind::Constant>
Before C++26, constant template parameters were called non-type template parameter in the standard wording. The terminology was changed by P2841R6 / PR#7587.
| Name | Description |
|---|---|
TParamCommonBase<TParamKind::Constant> | CRTP base that fixes the parameter kind. |
| Name |
|---|
isConstant |
isTemplate |
isType |
| Name | Description |
|---|---|
Type | Type of the non-type template parameter |
| Name |
|---|
kind_id |
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isConstant() noexcept;
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isTemplate() noexcept;
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isType() noexcept;
Type of the non-type template parameter
Declared in <mrdocs/Metadata/TParam/ConstantTParam.hpp>
Polymorphic<Type> Type = Polymorphic<struct Type>(AutoType{});
The collection of declarations in extracted form.
Declared in <mrdocs/Corpus.hpp>
class Corpus;
| Name | Description |
|---|---|
TraverseOptions | Options to traverse the members of an Symbol. |
iterator | The iterator type for the index of all symbols. |
| Name | Description |
|---|---|
~Corpus [destructor] [virtual] | Destructor. |
begin [virtual] | Return the begin iterator for the index of all symbols. |
empty | Whether the corpus contains any symbols. |
end [virtual] | Return the end iterator for the index. |
exists | Return true if an Symbol with the specified symbol ID exists. |
find [virtual] | Return the Symbol with the matching ID, or nullptr. |
get | Return the Symbol with the specified symbol ID. |
globalNamespace | Return the metadata for the global namespace. |
lookup | lookup overloads |
qualifiedName | qualifiedName overloads |
size [virtual] | Return the number of symbols in the corpus. |
traverse | Visit the members of specified Symbol. |
visitIDs | Visit the specified Symbol IDs |
| Name | Description |
|---|---|
build | Build a Corpus from a configuration. |
| Name | Description |
|---|---|
config | The configuration used to generate this corpus. |
| Name | Description |
|---|---|
Corpus [constructor] | Create a corpus using the provided configuration. |
| Name | Description |
|---|---|
getParents | Return a list of the parent symbols of the specified Symbol. |
Options to traverse the members of an Symbol.
Declared in <mrdocs/Corpus.hpp>
struct TraverseOptions;
| Name | Description |
|---|---|
ordered | Whether to traverse in a stable order |
recursive | Whether to skip inherited members whose parent is not the Symbol |
skipInherited | Whether to skip inherited members whose parent is not the Symbol |
Whether to traverse in a stable order
Declared in <mrdocs/Corpus.hpp>
bool ordered = false;
Whether to skip inherited members whose parent is not the Symbol
Declared in <mrdocs/Corpus.hpp>
bool recursive = false;
Whether to skip inherited members whose parent is not the Symbol
Declared in <mrdocs/Corpus.hpp>
bool skipInherited = false;
The iterator type for the index of all symbols.
Declared in <mrdocs/Corpus.hpp>
class iterator;
The iterator is a forward iterator that iterates over all symbols in the index. It dereferences to a reference to a const Symbol.
The logic for incrementing the iterator is provided by the Corpus implementation via a function that retuns the next Symbol in the index, or nullptr if there are no more.
| Name | Description |
|---|---|
const_pointer | Pointer to const value. |
const_reference | Reference to const value. |
difference_type | Signed difference type. |
pointer | Pointer to value. |
reference | Reference to value. |
size_type | Unsigned size type. |
value_type | Value type yielded by the iterator. |
| Name | Description |
|---|---|
iterator [constructor] | Constructors |
operator= | Copy assignment. |
operator* | Dereference to the current symbol. |
operator++ | Increment operators |
operator-> | Pointer-like access to the current symbol. |
operator== | Equality comparison. |
operator!= | Inequality comparison. |
Pointer to const value.
Reference to const value.
Signed difference type.
Declared in <mrdocs/Corpus.hpp>
using difference_type = std::ptrdiff_t;
Pointer to value.
Reference to value.
Unsigned size type.
Declared in <mrdocs/Corpus.hpp>
using size_type = std::size_t;
Value type yielded by the iterator.
Constructors
Declared in <mrdocs/Corpus.hpp>
Default constructor.
constexpr
iterator() = default;
» more...
Copy constructor.
constexpr
iterator(iterator const& other) = default;
» more...
Construct an iterator from corpus storage pointers.
iterator(
Corpus const* corpus,
Symbol const* val,
Symbol const*(* next)(Corpus const*, Symbol const*));
» more...
| Name | Description |
|---|---|
| corpus | The parent corpus. |
| val | The current symbol. |
| next | Function that advances to the next symbol. |
Default constructor.
Declared in <mrdocs/Corpus.hpp>
constexpr
iterator() = default;
Copy constructor.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Construct an iterator from corpus storage pointers.
Declared in <mrdocs/Corpus.hpp>
iterator(
Corpus const* corpus,
Symbol const* val,
Symbol const*(* next)(Corpus const*, Symbol const*));
| Name | Description |
|---|---|
| corpus | The parent corpus. |
| val | The current symbol. |
| next | Function that advances to the next symbol. |
Copy assignment.
Declared in <mrdocs/Corpus.hpp>
constexpr
iterator&
operator=(iterator const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Dereference to the current symbol.
Reference to the current Symbol.
Increment operators
Declared in <mrdocs/Corpus.hpp>
Pre-increment.
iterator&
operator++() noexcept;
» more...
Post-increment.
iterator
operator++(int dummy) noexcept;
» more...
| Name | Description |
|---|---|
| dummy | Unused postfix increment discriminator. |
Pre-increment.
*this advanced to next element.
Post-increment.
Iterator prior to increment.
| Name | Description |
|---|---|
| dummy | Unused postfix increment discriminator. |
Pointer-like access to the current symbol.
Pointer to the current Symbol.
Equality comparison.
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| other | The right operand |
Inequality comparison.
true if the objects are not equal, false otherwise
| Name | Description |
|---|---|
| other | The right operand |
Destructor.
Declared in <mrdocs/Corpus.hpp>
virtual
~Corpus() noexcept;
Return the begin iterator for the index of all symbols.
the begin iterator for the index of all symbols.
Whether the corpus contains any symbols.
Declared in <mrdocs/Corpus.hpp>
bool
empty() const noexcept;
The global namespace is a regular symbol in our model and is always present after a successful build, so a corpus is empty only in degenerate cases where not even the global namespace was extracted. To detect the common "nothing was extracted" case, compare size against 1.
true if the corpus is empty, otherwise false.
Return the end iterator for the index.
the end iterator for the index.
Return true if an Symbol with the specified symbol ID exists.
This function uses the find function to locate the Symbol with the specified symbol ID and returns true if it exists, otherwise false.
true if an Symbol with the specified symbol ID exists.
| Name | Description |
|---|---|
| id | A unique identifier for a symbol. |
Return the Symbol with the matching ID, or nullptr.
Declared in <mrdocs/Corpus.hpp>
virtual
Symbol const*
find(SymbolID const& id) const noexcept = 0;
the Symbol with the matching ID, or nullptr.
| Name | Description |
|---|---|
| id | A unique identifier for a symbol. |
Return the Symbol with the specified symbol ID.
Declared in <mrdocs/Corpus.hpp>
template<class T = Symbol>
requires std::derived_from<T, Symbol>
T const&
get(SymbolID const& id) const noexcept;
This function uses the find function to locate the Symbol with the specified symbol ID. The result is converted to the specified type T and returned.
The function exists can be used to determine if an Symbol with the specified symbol ID exists. If the id does not exist, the behavior is undefined.
If the Symbol is not of type T, the behavior is undefined.
the Symbol with the specified symbol ID.
| Name | Description |
|---|---|
| id | A unique identifier for a symbol. |
Return the metadata for the global namespace.
This function is equivalent to calling get with the symbol ID for the global namespace.
the metadata for the global namespace.
lookup overloads
Declared in <mrdocs/Corpus.hpp>
Return the Symbol for the matching string in the global context.
Expected<Symbol const&>
lookup(std::string_view name) const;
» more...
Return the Symbol for the matching string in a given context.
virtual
Expected<Symbol const&>
lookup(
SymbolID const& context,
std::string_view name) const = 0;
» more...
traverse to find all matching symbols.| Name | Description |
|---|---|
| name | The name of the symbol to look up. |
| context | The context to look up the symbol in. |
Return the Symbol for the matching string in the global context.
Declared in <mrdocs/Corpus.hpp>
Expected<Symbol const&>
lookup(std::string_view name) const;
The Symbol for the symbol with the specified name in the global context, or an error if not found.
| Name | Description |
|---|---|
| name | The name of the symbol to look up. |
Return the Symbol for the matching string in a given context.
Declared in <mrdocs/Corpus.hpp>
virtual
Expected<Symbol const&>
lookup(
SymbolID const& context,
std::string_view name) const = 0;
The Symbol for the symbol with the specified name in the specified context, or an error if not found. If multiple symbols match, one is returned arbitrarily. Use traverse to find all matching symbols.
| Name | Description |
|---|---|
| context | The context to look up the symbol in. |
| name | The name of the symbol to look up. |
qualifiedName overloads
Declared in <mrdocs/Corpus.hpp>
Return the fully qualified name of I.
std::string
qualifiedName(Symbol const& I) const;
» more...
Populate temp with the fully qualified name of I.
virtual
void
qualifiedName(
Symbol const& I,
std::string& temp) const = 0;
» more...
Return the qualified name of I relative to context.
std::string
qualifiedName(
Symbol const& I,
SymbolID const& context) const;
» more...
Populate result with a qualified name relative to context. If context contains I, the name is relative; otherwise it is computed from the global namespace.
virtual
void
qualifiedName(
Symbol const& I,
SymbolID const& context,
std::string& result) const = 0;
» more...
| Name | Description |
|---|---|
| I | The Symbol to get the qualified name for. |
| temp | The string to store the result in. |
| context | The context used to qualify the name. |
| result | Output string receiving the name. |
Return the fully qualified name of I.
the fully qualified name of I.
| Name | Description |
|---|---|
| I | Base class with common properties of all symbols |
Populate temp with the fully qualified name of I.
Declared in <mrdocs/Corpus.hpp>
virtual
void
qualifiedName(
Symbol const& I,
std::string& temp) const = 0;
| Name | Description |
|---|---|
| I | The Symbol to get the qualified name for. |
| temp | The string to store the result in. |
Return the qualified name of I relative to context.
Declared in <mrdocs/Corpus.hpp>
std::string
qualifiedName(
Symbol const& I,
SymbolID const& context) const;
the qualified name of I relative to context.
| Name | Description |
|---|---|
| I | Base class with common properties of all symbols |
| context | A unique identifier for a symbol. |
Populate result with a qualified name relative to context. If context contains I, the name is relative; otherwise it is computed from the global namespace.
Declared in <mrdocs/Corpus.hpp>
virtual
void
qualifiedName(
Symbol const& I,
SymbolID const& context,
std::string& result) const = 0;
| Name | Description |
|---|---|
| I | The Symbol to name. |
| context | The context used to qualify the name. |
| result | Output string receiving the name. |
Return the number of symbols in the corpus.
Declared in <mrdocs/Corpus.hpp>
virtual
std::size_t
size() const noexcept = 0;
The global namespace is always counted when present, so a size of 1 means no declaration other than the global namespace was extracted.
The number of symbols in the corpus.
Visit the members of specified Symbol.
Declared in <mrdocs/Corpus.hpp>
Visit the members of specified Symbol.
template<
std::derived_from<Symbol> T,
class F,
class... Args>
void
traverse(
T const& I,
F&& f,
Args&&... args) const;
» more...
Visit the members of specified Symbol.
template<
std::derived_from<Symbol> T,
class F,
class... Args>
void
traverse(
TraverseOptions const& opts,
T const& I,
F&& f,
Args&&... args) const;
» more...
| Name | Description |
|---|---|
| I | The Symbol to visit. |
| f | The function to invoke. |
| args | The arguments to pass to the function. |
| opts | The options to traverse. |
Visit the members of specified Symbol.
Declared in <mrdocs/Corpus.hpp>
template<
std::derived_from<Symbol> T,
class F,
class... Args>
void
traverse(
T const& I,
F&& f,
Args&&... args) const;
This function invokes the specified function f for each member of the specified Symbol I.
For each member of I, the function will invoke the function object fn with a type derived from Symbol as the first argument, followed by args....
The type of the first argument is determined by the SymbolKind of the Symbol object.
| Name | Description |
|---|---|
| I | The Symbol to visit. |
| f | The function to invoke. |
| args | The arguments to pass to the function. |
Visit the members of specified Symbol.
Declared in <mrdocs/Corpus.hpp>
template<
std::derived_from<Symbol> T,
class F,
class... Args>
void
traverse(
TraverseOptions const& opts,
T const& I,
F&& f,
Args&&... args) const;
This function invokes the specified function f for each member of the specified Symbol I.
For each member of I, the function will invoke the function object fn with a type derived from Symbol as the first argument, followed by args....
The type of the first argument is determined by the SymbolKind of the Symbol object.
| Name | Description |
|---|---|
| opts | The options to traverse. |
| I | The Symbol to visit. |
| f | The function to invoke. |
| args | The arguments to pass to the function. |
Visit the specified Symbol IDs
Declared in <mrdocs/Corpus.hpp>
template<
range_of<SymbolID> R,
class F,
class... Args>
void
visitIDs(
R&& range,
F&& f,
Args&&... args) const;
This function invokes the specified function f for each member of the specified range of Symbol IDs.
For each member of I associated with the ID in range, the function will invoke the function object fn with a type derived from Symbol as the first argument, followed by args....
The type of the first argument is determined by the SymbolKind of the Symbol object.
| Name | Description |
|---|---|
| range | A range of SymbolID objects. |
| f | The function to invoke. |
| args | The arguments to pass to the function. |
Build a Corpus from a configuration.
Declared in <mrdocs/Corpus.hpp>
static
Expected<std::unique_ptr<Corpus>>
build(std::shared_ptr<Config const> const& config);
Drives extraction over the translation units described by the configuration. The compilation database is resolved from the configuration settings (a compile_commands.json path, a CMakeLists.txt plus cmake options, or a database synthesized from source-root and input).
A unique pointer to the populated Corpus on success, otherwise an Error.
| Name | Description |
|---|---|
| config | The Config used for extraction, as returned by Config::load. |
The configuration used to generate this corpus.
Create a corpus using the provided configuration.
| Name | Description |
|---|---|
| config_ | The object to copy construct from |
decltype(expr) type wrapper.
Declared in <mrdocs/Metadata/Type/DecltypeType.hpp>
struct DecltypeType final
: TypeCommonBase<TypeKind::Decltype>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::Decltype> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
Operand | Operand expression for decltype. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
Operand expression for decltype.
A processed documentation comment attached to a declaration.
Declared in <mrdocs/Metadata/DocComment.hpp>
struct DocComment;
A complete documentation comment document consists of a sequence of text blocks. Blocks are the top-level structural units that might contain other blocks or inline elements. These are analogous to markdown blocks.
Inline elements (text, emphasis, links, code spans, etc.) live inside certain block types, like paragraphs or headings. Inlines can contain other inlines (e.g., emphasis contains text, link contains text), but they cannot directly contain blocks.
Some blocks contain metadata about the symbol being documented, such as parameters and return values. These blocks are parsed as usual, but are stored separately in the DocComment structure.
Each block in the document might contain:
No other blocks (leaf blocks)
Other blocks (container blocks: e.g. lists)
When they contain no other blocks, they might be:
Inlines only (e.g. paragraphs)
No inlines (e.g. horizontal rule)
Inline content elements contain other inlines but cannot contain blocks.
| Name | Description |
|---|---|
DocComment [constructor] | Constructors |
append | Append blocks from another DocComment to this. |
empty | Return true if this is empty |
operator== | Equality compares all stored blocks. |
operator!= | Inequality is the negation of equality. |
operator<=> | Three-way comparison on the rendered block sequence. |
| Name | Description |
|---|---|
Document | The list of text blocks. |
IsFunctionObject | True if the |
IsSeeBelow | True if the |
brief | A brief description of the symbol. |
exceptions | The list of exceptions. |
params | The list of parameters. |
postconditions | The list of postconditions. |
preconditions | The list of preconditions. |
related | The list of "related" references. |
relates | The list of "relates" references. |
returns | The list of return type descriptions. |
sees | The list of "see also" references. |
tparams | The list of template parameters. |
| Name | Description |
|---|---|
merge | Append blocks from other into I, preserving order. |
Constructors
Declared in <mrdocs/Metadata/DocComment.hpp>
Constructor.
DocComment() noexcept;
» more...
Constructor
explicit
DocComment(std::vector<Polymorphic<doc::Block>> blocks);
» more...
Constructor.
Declared in <mrdocs/Metadata/DocComment.hpp>
DocComment() noexcept;
Constructor
Declared in <mrdocs/Metadata/DocComment.hpp>
explicit
DocComment(std::vector<Polymorphic<doc::Block>> blocks);
| Name | Description |
|---|---|
| blocks | The object to construct from |
Append blocks from another DocComment to this.
| Name | Description |
|---|---|
| other | A processed documentation comment attached to a declaration. |
Return true if this is empty
Declared in <mrdocs/Metadata/DocComment.hpp>
bool
empty() const noexcept;
true if this is empty
Equality compares all stored blocks.
Declared in <mrdocs/Metadata/DocComment.hpp>
constexpr
bool
operator==(DocComment const& rhs) const noexcept = default;
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| rhs | The right operand |
Inequality is the negation of equality.
Declared in <mrdocs/Metadata/DocComment.hpp>
bool
operator!=(DocComment const& rhs) const noexcept;
true if the objects are not equal, false otherwise
| Name | Description |
|---|---|
| rhs | The right operand |
Three-way comparison on the rendered block sequence.
Declared in <mrdocs/Metadata/DocComment.hpp>
auto
operator<=>(DocComment const& other) const noexcept;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
The list of text blocks.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<Polymorphic<doc::Block>> Document;
True if the
Declared in <mrdocs/Metadata/DocComment.hpp>
bool IsFunctionObject = false;
(or
) command was used on this symbol.
True if the
Declared in <mrdocs/Metadata/DocComment.hpp>
bool IsSeeBelow = false;
command was used on this symbol.
A brief description of the symbol.
The list of exceptions.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::ThrowsBlock> exceptions;
The list of parameters.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::ParamBlock> params;
The list of postconditions.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::PostconditionBlock> postconditions;
The list of preconditions.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::PreconditionBlock> preconditions;
The list of "related" references.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::ReferenceInline> related;
These references are the inverse of the relates command.
They are calculated automatically by MrDocs and are rendered as Non-Member Functions.
The list of "relates" references.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::ReferenceInline> relates;
These references are created with the relates command.
The list of return type descriptions.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::ReturnsBlock> returns;
Multiple return descriptions are allowed.
The results are concatenated in the order they appear in the source code.
The list of "see also" references.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::SeeBlock> sees;
The list of template parameters.
Declared in <mrdocs/Metadata/DocComment.hpp>
std::vector<doc::TParamBlock> tparams;
Front-end factory for producing Dom nodes.
Declared in <mrdocs/Metadata/DomCorpus.hpp>
class DomCorpus;
This class keeps a reference to the Corpus of extracted metadata, and provides a mechanism for constructing DOM nodes representing the metadata.
A Generator can subclass this object then uses it to create the Dom nodes used as input for rendering template engines.
| Name | Description |
|---|---|
DomCorpus [constructor] | Constructor. |
~DomCorpus [destructor] [virtual] | Destructor. |
construct [virtual] | Construct a lazy Dom object representing the specified symbol. |
get | Return a Dom object representing the given symbol. |
getCorpus | Returns the Corpus associated with the Dom. |
getDocComment [virtual] | Return a Dom value representing the DocComment. |
operator* | Returns the Corpus associated with the Dom. |
operator-> | Returns the Corpus associated with the Dom. |
| Name | Description |
|---|---|
getParents | Return a list of the parent symbols of the specified Info. |
Constructor.
Ownership of the specified Corpus is not transferred; the caller is responsible for ensuring the lifetime extension of the object.
| Name | Description |
|---|---|
| corpus | The Corpus whose metadata to use. |
Destructor.
Declared in <mrdocs/Metadata/DomCorpus.hpp>
virtual
~DomCorpus();
Construct a lazy Dom object representing the specified symbol.
Declared in <mrdocs/Metadata/DomCorpus.hpp>
virtual
dom::Object
construct(Symbol const& I) const;
This function is called internally when a dom::Object representing a symbol needs to be constructed because it was not found in the cache.
A container of key and value pairs.
| Name | Description |
|---|---|
| I | Base class with common properties of all symbols |
Return a Dom object representing the given symbol.
A value containing the symbol contents, or null if id is invalid.
| Name | Description |
|---|---|
| id | The id of the symbol to return. |
Returns the Corpus associated with the Dom.
the Corpus associated with the Dom.
Return a Dom value representing the DocComment.
Declared in <mrdocs/Metadata/DomCorpus.hpp>
virtual
dom::Value
getDocComment(DocComment const& jd) const;
The default implementation returns null. A Generator should override this member and return a value that has suitable strings in the generator's output format.
a Dom value representing the DocComment.
| Name | Description |
|---|---|
| jd | A processed documentation comment attached to a declaration. |
Returns the Corpus associated with the Dom.
the Corpus associated with the Dom.
Returns the Corpus associated with the Dom.
the Corpus associated with the Dom.
Info for enum constants.
Declared in <mrdocs/Metadata/Symbol/EnumConstant.hpp>
struct EnumConstantSymbol final
: SymbolCommonBase<SymbolKind::EnumConstant>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::EnumConstant> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
EnumConstantSymbol [constructor] | Construct an enum constant with its ID. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
Initializer | The initializer expression, if any |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Construct an enum constant with its ID.
Declared in <mrdocs/Metadata/Symbol/EnumConstant.hpp>
explicit
EnumConstantSymbol(SymbolID ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to construct from |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
The initializer expression, if any
Declared in <mrdocs/Metadata/Symbol/EnumConstant.hpp>
ConstantExprInfo<uint64_t> Initializer;
Metadata for an enumeration declaration.
Declared in <mrdocs/Metadata/Symbol/Enum.hpp>
struct EnumSymbol final
: SymbolCommonBase<SymbolKind::Enum>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Enum> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
EnumSymbol [constructor] | Construct an enum symbol with its ID. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
Constants | The members of this scope. |
Scoped | Indicates whether this enum is scoped (e.g. enum class). |
UnderlyingType | The underlying type of this enum, if explicitly specified. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
allMembers | Return the list of enum constants for this symbol. |
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Construct an enum symbol with its ID.
| Name | Description |
|---|---|
| ID | The object to construct from |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
The members of this scope.
Declared in <mrdocs/Metadata/Symbol/Enum.hpp>
std::vector<SymbolID> Constants;
All members are enum constants.
Enum constants are independent symbol types that can be documented separately.
Indicates whether this enum is scoped (e.g. enum class).
Declared in <mrdocs/Metadata/Symbol/Enum.hpp>
bool Scoped = false;
If true, the enumerators are accessed with the scope resolution operator (e.g. EnumName::Enumerator).
If false, the enumerators are accessed directly (e.g. Enumerator) in the parent context.
The underlying type of this enum, if explicitly specified.
Declared in <mrdocs/Metadata/Symbol/Enum.hpp>
Optional<Polymorphic<Type>> UnderlyingType = std::nullopt;
If not specified, the underlying type is an implementation-defined integral type that can represent all the enumerator values defined in the enumeration.
For enum Foo : short { ... }; this will be represent short.
Holds the description of an error, or success.
Declared in <mrdocs/Support/Error.hpp>
class Error final
| Name | Description |
|---|---|
Error [constructor] | Constructor. |
operator= | Assignment operators |
Throw | Throw overloads |
failed | Return true if this holds an error. |
location | Return the source location. |
message | Return the error string. |
reason | Return the reason string. |
swap | Swap the contents with another error. |
where | Return the location string. |
operator bool | Return true if this holds an error. |
operator== | Return true if this equals rhs. |
| Name | Description |
|---|---|
mrdocs::swap |
| Name | Description |
|---|---|
formatError | Return a formatted error. |
Constructor.
Declared in <mrdocs/Support/Error.hpp>
Constructor.
constexpr
Error() noexcept = default;
» more...
Constructor.
constexpr
Error(Error const& other) = default;
» more...
Constructor.
constexpr
Error(Error&& other) noexcept = default;
» more...
Constructor.
explicit
Error(std::exception const& ex);
» more...
Constructor.
explicit
Error(
std::string reason,
std::source_location loc = source_location::current());
» more...
Constructor.
explicit
Error(
std::error_code const& ec,
std::source_location loc = source_location::current());
» more...
Constructor.
Error(
std::vector<Error> const& errors,
std::source_location loc = source_location::current());
» more...
| Name | Description |
|---|---|
| reason | A string indicating the cause of the failure. This must not be empty. |
| loc | The source location where the error occurred. |
| ec | The error code. |
| errors | The list of errors to combine. |
Constructor.
Declared in <mrdocs/Support/Error.hpp>
constexpr
Error() noexcept = default;
A default-constructed error is equivalent to success.
Constructor.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Constructor.
| Name | Description |
|---|---|
| other | The object to move construct from |
Constructor.
Declared in <mrdocs/Support/Error.hpp>
explicit
Error(std::exception const& ex);
The constructed object will always indicate a failure, even if the message in the exception is empty.
| Name | Description |
|---|---|
| ex | The object to copy construct from |
Constructor.
Declared in <mrdocs/Support/Error.hpp>
explicit
Error(
std::string reason,
std::source_location loc = source_location::current());
| Name | Description |
|---|---|
| reason | A string indicating the cause of the failure. This must not be empty. |
| loc | The source location where the error occurred. |
Constructor.
Declared in <mrdocs/Support/Error.hpp>
explicit
Error(
std::error_code const& ec,
std::source_location loc = source_location::current());
| Name | Description |
|---|---|
| ec | The error code. |
| loc | The source location where the error occurred. |
Constructor.
Declared in <mrdocs/Support/Error.hpp>
Error(
std::vector<Error> const& errors,
std::source_location loc = source_location::current());
This constructs a new error from a list of zero or more errors. If the list is empty, or if all the errors in the list indicate success, then newly constructed object will indicate success.
| Name | Description |
|---|---|
| errors | The list of errors to combine. |
| loc | The source location where the error occurred. |
Assignment operators
Assignment.
Declared in <mrdocs/Support/Error.hpp>
constexpr
Error&
operator=(Error const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Constructor.
Declared in <mrdocs/Support/Error.hpp>
constexpr
Error&
operator=(Error&& other) noexcept = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Throw overloads
Declared in <mrdocs/Support/Error.hpp>
Throw Exception(*this)
[[noreturn]]
void
Throw() const &;
» more...
Throw Exception(std::move(*this))
[[noreturn]]
void
Throw() &&;
» more...
Throw Exception(*this)
Declared in <mrdocs/Support/Error.hpp>
[[noreturn]]
void
Throw() const &;
Throw Exception(std::move(*this))
Declared in <mrdocs/Support/Error.hpp>
[[noreturn]]
void
Throw() &&;
Return true if this holds an error.
Declared in <mrdocs/Support/Error.hpp>
constexpr
bool
failed() const noexcept;
true if this holds an error.
Return the source location.
Declared in <mrdocs/Support/Error.hpp>
constexpr
std::source_location const&
location() const noexcept;
the source location.
Return the error string.
Declared in <mrdocs/Support/Error.hpp>
constexpr
std::string const&
message() const noexcept;
the error string.
Return the reason string.
Declared in <mrdocs/Support/Error.hpp>
constexpr
std::string const&
reason() const noexcept;
the reason string.
Swap the contents with another error.
| Name | Description |
|---|---|
| rhs | Holds the description of an error, or success. |
Return the location string.
Declared in <mrdocs/Support/Error.hpp>
constexpr
std::string const&
where() const noexcept;
the location string.
Return true if this holds an error.
Declared in <mrdocs/Support/Error.hpp>
constexpr
explicit
operator bool() const noexcept;
true if this holds an error.
Return true if this equals rhs.
Declared in <mrdocs/Support/Error.hpp>
constexpr
bool
operator==(Error const& rhs) const noexcept;
true if this equals rhs.
| Name | Description |
|---|---|
| rhs | The right operand |
Type of all exceptions thrown by the API.
Declared in <mrdocs/Support/Error.hpp>
class Exception final
: public std::exception
| Name | Description |
|---|---|
std::exception | Base class for all library exceptions. |
| Name | Description |
|---|---|
Exception [constructor] | Constructor. |
operator= | Assignment operators |
error | Return the Error stored in the exception. |
what [virtual] | Return a null-terminated error string. |
Constructor.
| Name | Description |
|---|---|
| err | The object to construct from |
Assignment operators
Assignment operator
Declared in <bits/exception.h>
constexpr
exception&
operator=(exception const& value) = default;
Base class for all library exceptions.
| Name | Description |
|---|---|
| value | The object to copy assign from |
Assignment operator
Declared in <bits/exception.h>
constexpr
exception&
operator=(exception&& value) = default;
Base class for all library exceptions.
| Name | Description |
|---|---|
| value | The object to move assign from |
Return the Error stored in the exception.
the Error stored in the exception.
Return a null-terminated error string.
Declared in <mrdocs/Support/Error.hpp>
virtual
char const*
what() const noexcept override;
a null-terminated error string.
A set of execution agents for performing concurrent work.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
template<class Agent>
class ExecutorGroup
: public ExecutorGroupBase
| Name | Description |
|---|---|
ExecutorGroupBase | Base class that owns a pool of execution agents and a shared work queue. |
| Name | Description |
|---|---|
arg_t | Argument wrapper propagated from ThreadPool. |
| Name | Description |
|---|---|
ExecutorGroup [constructor] | Construct a new executor group bound to a thread pool. |
async | Submit work to be executed. |
emplace | Construct a new agent in the group. |
wait | Block until all work has completed. |
| Name | Description |
|---|---|
AnyAgent | Type-erased agent holder used by the base class. |
Impl | Opaque implementation shared by all ExecutorGroup instantiations. |
| Name | Description |
|---|---|
post | Queue work to run on the group agents. |
run | Execute queued work until empty. |
| Name | Description |
|---|---|
agents_ | Agents owned by the group. |
impl_ | Opaque implementation pointer shared by all ExecutorGroup instantiations. |
work_ | Pending work posted to the group. |
Construct a new executor group bound to a thread pool.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
explicit
ExecutorGroup(ThreadPool& threadPool);
| Name | Description |
|---|---|
| threadPool | Pool that owns the worker threads. |
Submit work to be executed.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
template<
class F,
class... Args>
void
async(
F&& f,
Args&&... args);
The function object must have this equivalent signature:
void( Agent&, Args... );
| Name | Description |
|---|---|
| f | The function to invoke. |
| args | Zero or more arguments to forward to the function. |
Construct a new agent in the group.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
template<class... Args>
void
emplace(Args&&... args);
The behavior is undefined if there is any outstanding work or busy threads.
| Name | Description |
|---|---|
| args | Zero or more arguments to forward to the agent constructor. |
Base class that owns a pool of execution agents and a shared work queue.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
class ExecutorGroupBase;
| Name | Description |
|---|---|
arg_t | Argument wrapper propagated from ThreadPool. |
| Name | Description |
|---|---|
ExecutorGroupBase [constructor] | Move-construct from another group. |
~ExecutorGroupBase [destructor] | Destroy the executor group, waiting for outstanding work. |
wait | Block until all work has completed. |
| Name | Description |
|---|---|
AnyAgent | Type-erased agent holder used by the base class. |
Impl | Opaque implementation shared by all ExecutorGroup instantiations. |
| Name | Description |
|---|---|
ExecutorGroupBase [constructor] | Construct with a backing thread pool. |
post | Queue work to run on the group agents. |
run | Execute queued work until empty. |
| Name | Description |
|---|---|
agents_ | Agents owned by the group. |
impl_ | Opaque implementation pointer shared by all ExecutorGroup instantiations. |
work_ | Pending work posted to the group. |
| Name | Description |
|---|---|
ExecutorGroup | A set of execution agents for performing concurrent work. |
Argument wrapper propagated from ThreadPool.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
template<class T>
using arg_t = ThreadPool::arg_t<T>;
Move-construct from another group.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
ExecutorGroupBase(ExecutorGroupBase&& other) noexcept;
| Name | Description |
|---|---|
| other | The object to move construct from |
Destroy the executor group, waiting for outstanding work.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
~ExecutorGroupBase();
Block until all work has completed.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
[[nodiscard]]
std::vector<Error>
wait() noexcept;
Zero or more errors which were thrown from submitted work.
Type-erased agent holder used by the base class.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
struct AnyAgent;
| Name | Description |
|---|---|
~AnyAgent [destructor] [virtual] | Virtual destructor to allow deleting through the base pointer. |
get [virtual] | Return a pointer to the stored agent object. |
Virtual destructor to allow deleting through the base pointer.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
virtual
~AnyAgent() = 0;
Return a pointer to the stored agent object.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
virtual
void*
get() noexcept = 0;
a pointer to the stored agent object.
Opaque implementation shared by all ExecutorGroup instantiations.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
struct Impl;
Construct with a backing thread pool.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
explicit
ExecutorGroupBase(ThreadPool& value);
| Name | Description |
|---|---|
| value | The object to copy construct from |
Queue work to run on the group agents.
| Name | Description |
|---|---|
| work | A movable, type-erased function object. |
Execute queued work until empty.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
void
run(std::unique_lock<std::mutex> lock);
| Name | Description |
|---|---|
| lock | Held lock protecting the work queue. |
Agents owned by the group.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
std::vector<std::unique_ptr<AnyAgent>> agents_;
Opaque implementation pointer shared by all ExecutorGroup instantiations.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
std::unique_ptr<Impl> impl_;
Pending work posted to the group.
Declared in <mrdocs/Support/ExecutorGroup.hpp>
std::deque<any_callable<void(void*)>> work_;
A container holding an error or a value.
Declared in <mrdocs/Support/Expected.hpp>
template<
class T,
class E = Error>
class Expected;
Monadic result type holding either a value T or an unexpected error E.
| Name | Description |
|---|---|
error_type | Type produced on failure. |
rebind | Rebind to an Expected with a different value type and the same error type. |
unexpected_type | Convenience alias for an Unexpected containing the error type. |
value_type | Type produced on success. |
| Name | Description |
|---|---|
Expected [constructor] | Constructors |
~Expected [destructor] | Destructors |
operator= [deleted] | Assignment operators |
and_then | and_then overloads |
emplace | emplace overloads |
error | Access the stored error; precondition: !has_value(). |
error_or | error_or overloads |
has_value | Return true when the Expected contains a value. |
operator* | Dereference operators |
operator-> | Access value members through pointer syntax. |
or_else | or_else overloads |
swap | Swap the stored state with another Expected. |
transform | transform overloads |
transform_error | transform_error overloads |
value | value overloads |
value_or | value_or overloads |
operator bool | Return true when the Expected contains a value. |
| Name | Description |
|---|---|
unex_ [variant member] | Storage for the unexpected error. |
val_ [variant member] | Storage for the engaged value. |
| Name | Description |
|---|---|
mrdocs::swap | Swap contents with another Expected. |
mrdocs::operator== | Equality operator |
mrdocs::operator== | Equality operator |
mrdocs::operator== | Equality operator |
mrdocs::Expected | A container holding an error or a value. |
| Name | Description |
|---|---|
forEachFile | Call a function for each file in a directory. |
forEachFile | Visit each file in a directory. |
getSinglePageFullPath | Return the full path for single page output. |
installGenerator | Install a custom generator. |
parse | Parse a string view |
files::createDirectory | Create a directory. |
files::getFileText | Return the contents of a file as a string. |
files::getFileType | Return the file type or an error |
files::makeAbsolute | Return an absolute path from a possibly relative path. |
files::requireAbsolute | Return an error if pathName is not absolute. |
files::requireDirectory | Return an error if the path is not a directory. |
js::registerHelper | Register a JavaScript helper function |
lua::registerHelper | Register a Lua helper function |
Type produced on failure.
Declared in <mrdocs/Support/Expected.hpp>
using error_type = E;
Rebind to an Expected with a different value type and the same error type.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
using rebind = Expected<U, error_type>;
Convenience alias for an Unexpected containing the error type.
Type produced on success.
Declared in <mrdocs/Support/Expected.hpp>
using value_type = T;
Constructors
Declared in <mrdocs/Support/Expected.hpp>
Construct an engaged Expected with a default-initialized value.
constexpr
Expected() noexcept(std::is_nothrow_default_constructible_v<T>)
requires std::is_default_constructible_v<T>;
» more...
Default copy constructor.
Expected(Expected const& other) = default;
» more...
Copy-construct, handling non-trivial alternatives.
constexpr
Expected(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<T> && std::is_nothrow_copy_constructible_v<E>)
requires std::is_copy_constructible_v<T> &&
std::is_copy_constructible_v<E> &&
(!std::is_trivially_copy_constructible_v<T> ||
!std::is_trivially_copy_constructible_v<E>);
» more...
Construct from another Expected with potentially different types.
template<
class U,
class G>
requires std::is_constructible_v<T, U const&> &&
std::is_constructible_v<E, G const&> &&
(!constructible_from_expected<U, G>)
constexpr
explicit(explicit_conv<const U &, const G &>)
Expected(Expected<U, G> const& x) noexcept(std::is_nothrow_constructible_v<T, const U &> && std::is_nothrow_constructible_v<E, const G &>);
» more...
Default move constructor. Default move constructor.
Expected(Expected&& other) = default;
» more...
Move-construct, handling non-trivial alternatives.
constexpr
Expected(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_move_constructible_v<E>)
requires std::is_move_constructible_v<T> &&
std::is_move_constructible_v<E> &&
(!std::is_trivially_move_constructible_v<T> ||
!std::is_trivially_move_constructible_v<E>);
» more...
Move-construct from another Expected with potentially different types.
template<
class U,
class G>
requires std::is_constructible_v<T, U> &&
std::is_constructible_v<E, G> &&
(!constructible_from_expected<U, G>)
constexpr
explicit(explicit_conv<U, G>)
Expected(Expected<U, G>&& x) noexcept(std::is_nothrow_constructible_v<T, U> && std::is_nothrow_constructible_v<E, G>);
» more...
Construct a disengaged Expected from an unexpected error (copy).
template<class G = E>
requires std::is_constructible_v<E, G const&>
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Unexpected<G> const& u) noexcept(std::is_nothrow_constructible_v<E, const G &>);
» more...
Construct an engaged Expected from a convertible value.
template<class U = T>
requires (!std::is_same_v<std::remove_cvref_t<U>, Expected>) &&
(!std::is_same_v<std::remove_cvref_t<U>, std::in_place_t>) &&
(!detail::isUnexpected<std::remove_cvref_t<U>>) &&
std::is_constructible_v<T, U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Expected(U&& v) noexcept(std::is_nothrow_constructible_v<T, U>);
» more...
Construct a disengaged Expected from an unexpected error (move).
template<class G = E>
requires std::is_constructible_v<E, G>
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Unexpected<G>&& u) noexcept(std::is_nothrow_constructible_v<E, G>);
» more...
Construct an engaged Expected in-place.
template<class... Args>
requires std::is_constructible_v<T, Args...>
constexpr
explicit
Expected(
std::in_place_t,
Args&&... args) noexcept(std::is_nothrow_constructible_v<T, Args...>);
» more...
Construct a disengaged Expected holding an error.
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Expected(
unexpect_t,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
» more...
Construct an engaged Expected from an initializer list.
template<
class U,
class... Args>
requires std::is_constructible_v<T, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
std::in_place_t,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<T, std::initializer_list<U> &, Args...>);
» more...
Construct a disengaged Expected from an initializer list.
template<
class U,
class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
unexpect_t,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);
» more...
| Name | Description |
|---|---|
| args | Arguments forwarded to the value constructor. |
| il | Initializer list forwarded to the value constructor. |
Construct an engaged Expected with a default-initialized value.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected() noexcept(std::is_nothrow_default_constructible_v<T>)
requires std::is_default_constructible_v<T>;
Default copy constructor.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Copy-construct, handling non-trivial alternatives.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<T> && std::is_nothrow_copy_constructible_v<E>)
requires std::is_copy_constructible_v<T> &&
std::is_copy_constructible_v<E> &&
(!std::is_trivially_copy_constructible_v<T> ||
!std::is_trivially_copy_constructible_v<E>);
Copy-construct from another void Expected.
| Name | Description |
|---|---|
| x | The object to copy construct from |
Construct from another Expected with potentially different types.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class G>
requires std::is_constructible_v<T, U const&> &&
std::is_constructible_v<E, G const&> &&
(!constructible_from_expected<U, G>)
constexpr
explicit(explicit_conv<const U &, const G &>)
Expected(Expected<U, G> const& x) noexcept(std::is_nothrow_constructible_v<T, const U &> && std::is_nothrow_constructible_v<E, const G &>);
| Name | Description |
|---|---|
| x | The object to copy construct from |
Default move constructor. Default move constructor.
| Name | Description |
|---|---|
| other | The object to move construct from |
Move-construct, handling non-trivial alternatives.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_move_constructible_v<E>)
requires std::is_move_constructible_v<T> &&
std::is_move_constructible_v<E> &&
(!std::is_trivially_move_constructible_v<T> ||
!std::is_trivially_move_constructible_v<E>);
Move-construct from another void Expected.
| Name | Description |
|---|---|
| x | The object to move construct from |
Move-construct from another Expected with potentially different types.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class G>
requires std::is_constructible_v<T, U> &&
std::is_constructible_v<E, G> &&
(!constructible_from_expected<U, G>)
constexpr
explicit(explicit_conv<U, G>)
Expected(Expected<U, G>&& x) noexcept(std::is_nothrow_constructible_v<T, U> && std::is_nothrow_constructible_v<E, G>);
| Name | Description |
|---|---|
| x | The object to move construct from |
Construct a disengaged Expected from an unexpected error (copy).
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
requires std::is_constructible_v<E, G const&>
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Unexpected<G> const& u) noexcept(std::is_nothrow_constructible_v<E, const G &>);
| Name | Description |
|---|---|
| u | The object to copy construct from |
Construct an engaged Expected from a convertible value.
Declared in <mrdocs/Support/Expected.hpp>
template<class U = T>
requires (!std::is_same_v<std::remove_cvref_t<U>, Expected>) &&
(!std::is_same_v<std::remove_cvref_t<U>, std::in_place_t>) &&
(!detail::isUnexpected<std::remove_cvref_t<U>>) &&
std::is_constructible_v<T, U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Expected(U&& v) noexcept(std::is_nothrow_constructible_v<T, U>);
| Name | Description |
|---|---|
| v | The object to move construct from |
Construct a disengaged Expected from an unexpected error (move).
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
requires std::is_constructible_v<E, G>
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Unexpected<G>&& u) noexcept(std::is_nothrow_constructible_v<E, G>);
| Name | Description |
|---|---|
| u | The object to move construct from |
Construct an engaged Expected in-place.
Declared in <mrdocs/Support/Expected.hpp>
template<class... Args>
requires std::is_constructible_v<T, Args...>
constexpr
explicit
Expected(
std::in_place_t,
Args&&... args) noexcept(std::is_nothrow_constructible_v<T, Args...>);
| Name | Description |
|---|---|
| args | Arguments forwarded to the value constructor. |
Construct a disengaged Expected holding an error.
Declared in <mrdocs/Support/Expected.hpp>
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Expected(
unexpect_t,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
| Name | Description |
|---|---|
| args | Arguments forwarded to the error constructor. |
Construct an engaged Expected from an initializer list.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class... Args>
requires std::is_constructible_v<T, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
std::in_place_t,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<T, std::initializer_list<U> &, Args...>);
| Name | Description |
|---|---|
| il | Initializer list forwarded to the value constructor. |
| args | Additional arguments forwarded to the value constructor. |
Construct a disengaged Expected from an initializer list.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
unexpect_t,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);
| Name | Description |
|---|---|
| il | Initializer list forwarded to the error constructor. |
| args | Additional arguments forwarded to the error constructor. |
Destructors
Declared in <mrdocs/Support/Expected.hpp>
Defaulted trivial destructor when both alternatives are trivial.
constexpr
~Expected() = default;
» more...
Destroy the active alternative when a non-trivial destructor is required.
constexpr
~Expected()
requires (!std::is_trivially_destructible_v<T>)
|| (!std::is_trivially_destructible_v<E>);
» more...
Defaulted trivial destructor when both alternatives are trivial.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
~Expected() = default;
Destroy the active alternative when a non-trivial destructor is required.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
~Expected()
requires (!std::is_trivially_destructible_v<T>)
|| (!std::is_trivially_destructible_v<E>);
Assignment operators
Declared in <mrdocs/Support/Expected.hpp>
Copy-assign from another Expected.
Expected&
operator=(Expected const& other) = delete;
» more...
Assign from another Expected with compatible value/error types.
constexpr
Expected&
operator=(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<T> && std::is_nothrow_copy_constructible_v<E> && std::is_nothrow_copy_assignable_v<T> && std::is_nothrow_copy_assignable_v<E>)
requires std::is_copy_assignable_v<T> &&
std::is_copy_constructible_v<T> &&
std::is_copy_assignable_v<E> &&
std::is_copy_constructible_v<E> &&
(std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>);
» more...
Move-assign from another Expected with compatible value/error types.
constexpr
Expected&
operator=(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_move_constructible_v<E> && std::is_nothrow_move_assignable_v<T> && std::is_nothrow_move_assignable_v<E>)
requires std::is_move_assignable_v<T> &&
std::is_move_constructible_v<T> &&
std::is_move_assignable_v<E> &&
std::is_move_constructible_v<E> &&
(std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>);
» more...
Assign a new unexpected error from lvalue.
template<class G>
requires std::is_constructible_v<E, G const&> &&
std::is_assignable_v<E&, G const&> &&
(std::is_nothrow_constructible_v<E, G const&> ||
std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>)
constexpr
Expected&
operator=(Unexpected<G> const& e);
» more...
Assign a new value, reconstructing if currently disengaged.
template<class U = T>
requires (!std::is_same_v<Expected, std::remove_cvref_t<U>>) &&
(!detail::isUnexpected<std::remove_cvref_t<U>>) &&
std::is_constructible_v<T, U> &&
std::is_assignable_v<T&, U> &&
(std::is_nothrow_constructible_v<T, U> ||
std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>)
constexpr
Expected&
operator=(U&& v);
» more...
Assign a new unexpected error from rvalue.
template<class G>
requires std::is_constructible_v<E, G> &&
std::is_assignable_v<E&, G> &&
(std::is_nothrow_constructible_v<E, G> ||
std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>)
constexpr
Expected&
operator=(Unexpected<G>&& e);
» more...
Copy-assign from another Expected.
Declared in <mrdocs/Support/Expected.hpp>
Expected&
operator=(Expected const& other) = delete;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Assign from another Expected with compatible value/error types.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected&
operator=(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<T> && std::is_nothrow_copy_constructible_v<E> && std::is_nothrow_copy_assignable_v<T> && std::is_nothrow_copy_assignable_v<E>)
requires std::is_copy_assignable_v<T> &&
std::is_copy_constructible_v<T> &&
std::is_copy_assignable_v<E> &&
std::is_copy_constructible_v<E> &&
(std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>);
Reference to the current object
| Name | Description |
|---|---|
| x | The object to copy assign from |
Move-assign from another Expected with compatible value/error types.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected&
operator=(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_move_constructible_v<E> && std::is_nothrow_move_assignable_v<T> && std::is_nothrow_move_assignable_v<E>)
requires std::is_move_assignable_v<T> &&
std::is_move_constructible_v<T> &&
std::is_move_assignable_v<E> &&
std::is_move_constructible_v<E> &&
(std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>);
Reference to the current object
| Name | Description |
|---|---|
| x | The object to move assign from |
Assign a new unexpected error from lvalue.
Declared in <mrdocs/Support/Expected.hpp>
template<class G>
requires std::is_constructible_v<E, G const&> &&
std::is_assignable_v<E&, G const&> &&
(std::is_nothrow_constructible_v<E, G const&> ||
std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>)
constexpr
Expected&
operator=(Unexpected<G> const& e);
Reference to the current object
| Name | Description |
|---|---|
| e | The object to copy assign from |
Assign a new value, reconstructing if currently disengaged.
Declared in <mrdocs/Support/Expected.hpp>
template<class U = T>
requires (!std::is_same_v<Expected, std::remove_cvref_t<U>>) &&
(!detail::isUnexpected<std::remove_cvref_t<U>>) &&
std::is_constructible_v<T, U> &&
std::is_assignable_v<T&, U> &&
(std::is_nothrow_constructible_v<T, U> ||
std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>)
constexpr
Expected&
operator=(U&& v);
Reference to the current object
| Name | Description |
|---|---|
| v | The object to move assign from |
Assign a new unexpected error from rvalue.
Declared in <mrdocs/Support/Expected.hpp>
template<class G>
requires std::is_constructible_v<E, G> &&
std::is_assignable_v<E&, G> &&
(std::is_nothrow_constructible_v<E, G> ||
std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>)
constexpr
Expected&
operator=(Unexpected<G>&& e);
Reference to the current object
| Name | Description |
|---|---|
| e | The object to move assign from |
and_then overloads
Declared in <mrdocs/Support/Expected.hpp>
Invoke f when engaged, propagate error otherwise.
template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
and_then(Fn&& f) &;
» more...
Invoke f when engaged (const lvalue), propagate error otherwise.
template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
and_then(Fn&& f) const &;
» more...
Invoke f when engaged (rvalue), propagate error otherwise.
template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
and_then(Fn&& f) &&;
» more...
Invoke f when engaged (const rvalue), propagate error otherwise.
template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
and_then(Fn&& f) const &&;
» more...
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation that returns another Expected. |
Invoke f when engaged, propagate error otherwise.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
and_then(Fn&& f) &;
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation that returns another Expected. |
Invoke f when engaged (const lvalue), propagate error otherwise.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
and_then(Fn&& f) const &;
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation that returns another Expected. |
Invoke f when engaged (rvalue), propagate error otherwise.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
and_then(Fn&& f) &&;
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation that returns another Expected. |
Invoke f when engaged (const rvalue), propagate error otherwise.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
and_then(Fn&& f) const &&;
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation that returns another Expected. |
emplace overloads
Declared in <mrdocs/Support/Expected.hpp>
Reconstruct the value in-place, discarding any current state.
template<class... Args>
requires std::is_nothrow_constructible_v<T, Args...>
constexpr
T&
emplace(Args&&... args) noexcept;
» more...
Reconstruct the value from an initializer list.
template<
class U,
class... Args>
requires std::is_nothrow_constructible_v<
T, std::initializer_list<U>&, Args...>
constexpr
T&
emplace(
std::initializer_list<U> il,
Args&&... args) noexcept;
» more...
Reference to the newly emplaced value.
| Name | Description |
|---|---|
| args | Arguments forwarded to the value constructor. |
| il | Initializer list forwarded to the value constructor. |
Reconstruct the value in-place, discarding any current state.
Declared in <mrdocs/Support/Expected.hpp>
template<class... Args>
requires std::is_nothrow_constructible_v<T, Args...>
constexpr
T&
emplace(Args&&... args) noexcept;
Reference to the newly emplaced value.
| Name | Description |
|---|---|
| args | Arguments forwarded to the value constructor. |
Reconstruct the value from an initializer list.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class... Args>
requires std::is_nothrow_constructible_v<
T, std::initializer_list<U>&, Args...>
constexpr
T&
emplace(
std::initializer_list<U> il,
Args&&... args) noexcept;
Reference to the newly emplaced value.
| Name | Description |
|---|---|
| il | Initializer list forwarded to the value constructor. |
| args | Additional constructor arguments. |
Access the stored error; precondition: !has_value().
Declared in <mrdocs/Support/Expected.hpp>
Access the stored error; precondition: !has_value().
constexpr
E const&
error() const & noexcept;
» more...
Access the stored error; precondition: !has_value().
constexpr
E&
error() & noexcept;
» more...
Access the stored error; precondition: !has_value().
constexpr
E const&&
error() const && noexcept;
» more...
Access the stored error; precondition: !has_value().
constexpr
E&&
error() && noexcept;
» more...
Access the stored error; precondition: !has_value().
Declared in <mrdocs/Support/Expected.hpp>
constexpr
E const&
error() const & noexcept;
Reference to the contained error.
Access the stored error; precondition: !has_value().
Declared in <mrdocs/Support/Expected.hpp>
constexpr
E&
error() & noexcept;
Reference to the contained error.
Access the stored error; precondition: !has_value().
Declared in <mrdocs/Support/Expected.hpp>
constexpr
E const&&
error() const && noexcept;
Rvalue reference to the contained error.
Access the stored error; precondition: !has_value().
Declared in <mrdocs/Support/Expected.hpp>
constexpr
E&&
error() && noexcept;
Rvalue reference to the contained error.
error_or overloads
Declared in <mrdocs/Support/Expected.hpp>
Return the contained error or a fallback copy.
template<class G = E>
constexpr
E
error_or(G&& e) const &;
» more...
Return the contained error or a fallback move.
template<class G = E>
constexpr
E
error_or(G&& e) &&;
» more...
Contained error or the fallback converted to E.
| Name | Description |
|---|---|
| e | Fallback error to use when engaged. |
Return the contained error or a fallback copy.
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
constexpr
E
error_or(G&& e) const &;
Contained error or the fallback converted to E.
| Name | Description |
|---|---|
| e | Fallback error to use when engaged. |
Return the contained error or a fallback move.
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
constexpr
E
error_or(G&& e) &&;
Contained error or the fallback converted to E.
| Name | Description |
|---|---|
| e | Fallback error to use when engaged. |
Return true when the Expected contains a value.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
bool
has_value() const noexcept;
true when the Expected contains a value.
Dereference operators
Declared in <mrdocs/Support/Expected.hpp>
Dereference to a const lvalue value reference.
[[nodiscard]]
constexpr
T const&
operator*() const & noexcept;
» more...
Dereference to an lvalue value reference.
[[nodiscard]]
constexpr
T&
operator*() & noexcept;
» more...
Dereference to a const rvalue value reference.
[[nodiscard]]
constexpr
T const&&
operator*() const && noexcept;
» more...
Dereference to an rvalue value reference.
[[nodiscard]]
constexpr
T&&
operator*() && noexcept;
» more...
Reference to the contained value.
Dereference to a const lvalue value reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T const&
operator*() const & noexcept;
Reference to the contained value.
Dereference to an lvalue value reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T&
operator*() & noexcept;
Reference to the contained value.
Dereference to a const rvalue value reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T const&&
operator*() const && noexcept;
Reference to the contained value.
Dereference to an rvalue value reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T&&
operator*() && noexcept;
Reference to the contained value.
Access value members through pointer syntax.
Declared in <mrdocs/Support/Expected.hpp>
Access value members through pointer syntax.
[[nodiscard]]
constexpr
T const*
operator->() const noexcept;
» more...
Access value members through pointer syntax.
[[nodiscard]]
constexpr
T*
operator->() noexcept;
» more...
Pointer to the contained value.
Access value members through pointer syntax.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T const*
operator->() const noexcept;
Pointer to the contained value.
Access value members through pointer syntax.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T*
operator->() noexcept;
Pointer to the contained value.
or_else overloads
Declared in <mrdocs/Support/Expected.hpp>
Invoke f when in error, otherwise return current value.
template<class Fn>
requires std::is_constructible_v<T, T&>
constexpr
auto
or_else(Fn&& f) &;
» more...
Invoke f when in error (const lvalue).
template<class Fn>
requires std::is_constructible_v<T, T const&>
constexpr
auto
or_else(Fn&& f) const &;
» more...
Invoke f when in error (rvalue).
template<class Fn>
requires std::is_constructible_v<T, T>
constexpr
auto
or_else(Fn&& f) &&;
» more...
Invoke f when in error (const rvalue).
template<class Fn>
requires std::is_constructible_v<T, const T>
constexpr
auto
or_else(Fn&& f) const &&;
» more...
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Invoke f when in error, otherwise return current value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<T, T&>
constexpr
auto
or_else(Fn&& f) &;
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Invoke f when in error (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<T, T const&>
constexpr
auto
or_else(Fn&& f) const &;
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Invoke f when in error (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<T, T>
constexpr
auto
or_else(Fn&& f) &&;
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Invoke f when in error (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<T, const T>
constexpr
auto
or_else(Fn&& f) const &&;
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Swap the stored state with another Expected.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
swap(Expected& x) noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_move_constructible_v<E> && std::is_nothrow_swappable_v<T &> && std::is_nothrow_swappable_v<E &>)
requires std::is_swappable_v<T> &&
std::is_swappable_v<E> &&
std::is_move_constructible_v<T> &&
std::is_move_constructible_v<E> &&
(std::is_nothrow_move_constructible_v<T> ||
std::is_nothrow_move_constructible_v<E>);
| Name | Description |
|---|---|
| x | A container holding an error or a value. |
transform overloads
Declared in <mrdocs/Support/Expected.hpp>
Map the contained value, propagate error.
template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
transform(Fn&& f) &;
» more...
Map the contained value (const overload), propagate error.
template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
transform(Fn&& f) const &;
» more...
Map the contained value (rvalue), propagate error.
template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
transform(Fn&& f) &&;
» more...
Map the contained value (const rvalue), propagate error.
template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
transform(Fn&& f) const &&;
» more...
Expected holding the mapped value or the original error.
| Name | Description |
|---|---|
| f | Mapping function applied to the value. |
Map the contained value, propagate error.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
transform(Fn&& f) &;
Expected holding the mapped value or the original error.
| Name | Description |
|---|---|
| f | Mapping function applied to the value. |
Map the contained value (const overload), propagate error.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
transform(Fn&& f) const &;
Expected holding the mapped value or the original error.
| Name | Description |
|---|---|
| f | Mapping function applied to the value. |
Map the contained value (rvalue), propagate error.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
transform(Fn&& f) &&;
Expected holding the mapped value or the original error.
| Name | Description |
|---|---|
| f | Mapping function applied to the value. |
Map the contained value (const rvalue), propagate error.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
transform(Fn&& f) const &&;
Expected holding the mapped value or the original error.
| Name | Description |
|---|---|
| f | Mapping function applied to the value. |
transform_error overloads
Declared in <mrdocs/Support/Expected.hpp>
Map the contained error, preserve value.
template<class Fn>
requires std::is_constructible_v<T, T&>
constexpr
auto
transform_error(Fn&& f) &;
» more...
Map the contained error (const lvalue), preserve value.
template<class Fn>
requires std::is_constructible_v<T, T const&>
constexpr
auto
transform_error(Fn&& f) const &;
» more...
Map the contained error (rvalue), preserve value.
template<class Fn>
requires std::is_constructible_v<T, T>
constexpr
auto
transform_error(Fn&& f) &&;
» more...
Map the contained error (const rvalue), preserve value.
template<class Fn>
requires std::is_constructible_v<T, const T>
constexpr
auto
transform_error(Fn&& f) const &&;
» more...
Expected holding the original value or mapped error.
| Name | Description |
|---|---|
| f | Mapping function applied to the error. |
Map the contained error, preserve value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<T, T&>
constexpr
auto
transform_error(Fn&& f) &;
Expected holding the original value or mapped error.
| Name | Description |
|---|---|
| f | Mapping function applied to the error. |
Map the contained error (const lvalue), preserve value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<T, T const&>
constexpr
auto
transform_error(Fn&& f) const &;
Expected holding the original value or mapped error.
| Name | Description |
|---|---|
| f | Mapping function applied to the error. |
Map the contained error (rvalue), preserve value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<T, T>
constexpr
auto
transform_error(Fn&& f) &&;
Expected holding the original value or mapped error.
| Name | Description |
|---|---|
| f | Mapping function applied to the error. |
Map the contained error (const rvalue), preserve value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<T, const T>
constexpr
auto
transform_error(Fn&& f) const &&;
Expected holding the original value or mapped error.
| Name | Description |
|---|---|
| f | Mapping function applied to the error. |
value overloads
Declared in <mrdocs/Support/Expected.hpp>
Access the stored value or throw BadExpectedAccess.
constexpr
T const&
value() const &;
» more...
Access the stored value or throw BadExpectedAccess.
constexpr
T&
value() &;
» more...
Access the stored value or throw BadExpectedAccess (rvalue overload).
constexpr
T const&&
value() const &&;
» more...
Access the stored value or throw BadExpectedAccess (rvalue overload).
constexpr
T&&
value() &&;
» more...
Access the stored value or throw BadExpectedAccess.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
T const&
value() const &;
Reference to the contained value.
Access the stored value or throw BadExpectedAccess.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
T&
value() &;
Reference to the contained value.
Access the stored value or throw BadExpectedAccess (rvalue overload).
Declared in <mrdocs/Support/Expected.hpp>
constexpr
T const&&
value() const &&;
Rvalue reference to the contained value.
Access the stored value or throw BadExpectedAccess (rvalue overload).
Declared in <mrdocs/Support/Expected.hpp>
constexpr
T&&
value() &&;
Rvalue reference to the contained value.
value_or overloads
Declared in <mrdocs/Support/Expected.hpp>
Return the contained value or a fallback copy.
template<class U>
constexpr
T
value_or(U&& v) const & noexcept(std::is_nothrow_copy_constructible_v<T> && std::is_nothrow_convertible_v<U, T>);
» more...
Return the contained value or a fallback move.
template<class U>
constexpr
T
value_or(U&& v) && noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_convertible_v<U, T>);
» more...
Contained value or the fallback converted to T.
| Name | Description |
|---|---|
| v | Fallback value to use when disengaged. |
Return the contained value or a fallback copy.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
constexpr
T
value_or(U&& v) const & noexcept(std::is_nothrow_copy_constructible_v<T> && std::is_nothrow_convertible_v<U, T>);
Contained value or the fallback converted to T.
| Name | Description |
|---|---|
| v | Fallback value to use when disengaged. |
Return the contained value or a fallback move.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
constexpr
T
value_or(U&& v) && noexcept(std::is_nothrow_move_constructible_v<T> && std::is_nothrow_convertible_v<U, T>);
Contained value or the fallback converted to T.
| Name | Description |
|---|---|
| v | Fallback value to use when disengaged. |
Return true when the Expected contains a value.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
explicit
operator bool() const noexcept;
true when the Expected contains a value.
Storage for the unexpected error.
Declared in <mrdocs/Support/Expected.hpp>
E unex_;
Storage for the engaged value.
Declared in <mrdocs/Support/Expected.hpp>
T val_;
Expected specialization for void values. Holds either success (no payload) or an unexpected error E.
Declared in <mrdocs/Support/Expected.hpp>
template<
class T,
class E>
requires std::is_void_v<T>
class Expected<T, E>;
| Name | Description |
|---|---|
error_type | Error type stored when disengaged. |
rebind | Rebind to another value type with the same error type. |
unexpected_type | Alias for the unexpected wrapper. |
value_type | Value type for this specialization (always void). |
| Name | Description |
|---|---|
Expected [constructor] | Constructors |
~Expected [destructor] | Destructors |
operator= [deleted] | Assignment operators |
and_then | and_then overloads |
emplace | Reset to engaged state (no error). |
error | error overloads |
error_or | error_or overloads |
has_value | Return true when the Expected holds a value. |
operator* | Ensure the Expected is engaged; throws if it holds an error. |
or_else | or_else overloads |
swap | Swap states with another void Expected. |
transform | transform overloads |
transform_error | transform_error overloads |
value | value overloads |
operator bool | Return true when the Expected holds a value. |
| Name | Description |
|---|---|
unex_ [variant member] | Stored unexpected error. |
void_ [variant member] | Placeholder for the engaged state. |
| Name | Description |
|---|---|
mrdocs::swap | Swap contents with another Expected. |
mrdocs::operator== | Equality operator |
mrdocs::operator== | Equality operator |
mrdocs::Expected | A container holding an error or a value. |
Error type stored when disengaged.
Declared in <mrdocs/Support/Expected.hpp>
using error_type = E;
Rebind to another value type with the same error type.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
using rebind = Expected<U, error_type>;
Alias for the unexpected wrapper.
Value type for this specialization (always void).
Declared in <mrdocs/Support/Expected.hpp>
using value_type = T;
Constructors
Declared in <mrdocs/Support/Expected.hpp>
Construct an engaged Expected<void>.
constexpr
Expected() noexcept;
» more...
Default copy constructor.
Expected(Expected const& other) = default;
» more...
Copy-construct with explicit error handling for non-trivial E.
constexpr
Expected(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<E>)
requires std::is_copy_constructible_v<E> &&
(!std::is_trivially_copy_constructible_v<E>);
» more...
Default move constructor.
Expected(Expected&& other) = default;
» more...
Move-construct with explicit error handling for non-trivial E.
constexpr
Expected(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<E>)
requires std::is_move_constructible_v<E> &&
(!std::is_trivially_move_constructible_v<E>);
» more...
Construct an engaged Expected with in-place tag.
constexpr
explicit
Expected(std::in_place_t value) noexcept;
» more...
Construct a disengaged Expected from an unexpected error (copy).
template<class G = E>
requires std::is_constructible_v<E, G const&>
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Unexpected<G> const& u) noexcept(std::is_nothrow_constructible_v<E, const G &>);
» more...
Construct a disengaged Expected from an unexpected error (move).
template<class G = E>
requires std::is_constructible_v<E, G>
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Unexpected<G>&& u) noexcept(std::is_nothrow_constructible_v<E, G>);
» more...
Copy-construct from a compatible Expected carrying void.
template<
class U,
class G>
requires std::is_void_v<U> &&
std::is_constructible_v<E, G const&> &&
(!constructible_from_expected<U, G>)
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Expected<U, G> const& x) noexcept(std::is_nothrow_constructible_v<E, const G &>);
» more...
Move-construct from a compatible Expected carrying void.
template<
class U,
class G>
requires std::is_void_v<U> &&
std::is_constructible_v<E, G> &&
(!constructible_from_expected<U, G>)
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Expected<U, G>&& x) noexcept(std::is_nothrow_constructible_v<E, G>);
» more...
Construct a disengaged Expected from error arguments.
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Expected(
unexpect_t,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
» more...
Construct a disengaged Expected from an initializer list of errors.
template<
class U,
class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
unexpect_t,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);
» more...
| Name | Description |
|---|---|
| args | Arguments forwarded to the error constructor. |
| il | Initializer list forwarded to the error constructor. |
Construct an engaged Expected<void>.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected() noexcept;
Default copy constructor.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Copy-construct with explicit error handling for non-trivial E.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<E>)
requires std::is_copy_constructible_v<E> &&
(!std::is_trivially_copy_constructible_v<E>);
| Name | Description |
|---|---|
| x | The object to copy construct from |
Default move constructor.
| Name | Description |
|---|---|
| other | The object to move construct from |
Move-construct with explicit error handling for non-trivial E.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<E>)
requires std::is_move_constructible_v<E> &&
(!std::is_trivially_move_constructible_v<E>);
| Name | Description |
|---|---|
| x | The object to move construct from |
Construct an engaged Expected with in-place tag.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
explicit
Expected(std::in_place_t value) noexcept;
| Name | Description |
|---|---|
| value | The object to construct from |
Construct a disengaged Expected from an unexpected error (copy).
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
requires std::is_constructible_v<E, G const&>
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Unexpected<G> const& u) noexcept(std::is_nothrow_constructible_v<E, const G &>);
| Name | Description |
|---|---|
| u | The object to copy construct from |
Construct a disengaged Expected from an unexpected error (move).
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
requires std::is_constructible_v<E, G>
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Unexpected<G>&& u) noexcept(std::is_nothrow_constructible_v<E, G>);
| Name | Description |
|---|---|
| u | The object to move construct from |
Copy-construct from a compatible Expected carrying void.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class G>
requires std::is_void_v<U> &&
std::is_constructible_v<E, G const&> &&
(!constructible_from_expected<U, G>)
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Expected<U, G> const& x) noexcept(std::is_nothrow_constructible_v<E, const G &>);
| Name | Description |
|---|---|
| x | The object to copy construct from |
Move-construct from a compatible Expected carrying void.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class G>
requires std::is_void_v<U> &&
std::is_constructible_v<E, G> &&
(!constructible_from_expected<U, G>)
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Expected<U, G>&& x) noexcept(std::is_nothrow_constructible_v<E, G>);
| Name | Description |
|---|---|
| x | The object to move construct from |
Construct a disengaged Expected from error arguments.
Declared in <mrdocs/Support/Expected.hpp>
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Expected(
unexpect_t,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
| Name | Description |
|---|---|
| args | Arguments forwarded to the error constructor. |
Construct a disengaged Expected from an initializer list of errors.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
unexpect_t,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);
| Name | Description |
|---|---|
| il | Initializer list forwarded to the error constructor. |
| args | Additional arguments forwarded to the error constructor. |
Destructors
Defaulted trivial destructor.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
~Expected() = default;
Destroy the stored error when non-trivial.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
~Expected()
requires (!std::is_trivially_destructible_v<E>);
Assignment operators
Declared in <mrdocs/Support/Expected.hpp>
Copy assignment disabled to keep semantics explicit.
Expected&
operator=(Expected const& other) = delete;
» more...
Copy-assign from another void Expected.
constexpr
Expected&
operator=(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<E> && std::is_nothrow_copy_assignable_v<E>)
requires std::is_copy_constructible_v<E> &&
std::is_copy_assignable_v<E>;
» more...
Move-assign from another void Expected.
constexpr
Expected&
operator=(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<E> && std::is_nothrow_move_assignable_v<E>)
requires std::is_move_constructible_v<E> &&
std::is_move_assignable_v<E>;
» more...
Assign a new unexpected error (lvalue).
template<class G>
requires std::is_constructible_v<E, G const&> &&
std::is_assignable_v<E&, G const&>
constexpr
Expected&
operator=(Unexpected<G> const& e);
» more...
Assign a new unexpected error (rvalue).
template<class G>
requires std::is_constructible_v<E, G> &&
std::is_assignable_v<E&, G>
constexpr
Expected&
operator=(Unexpected<G>&& e);
» more...
Copy assignment disabled to keep semantics explicit.
Declared in <mrdocs/Support/Expected.hpp>
Expected&
operator=(Expected const& other) = delete;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Copy-assign from another void Expected.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected&
operator=(Expected const& x) noexcept(std::is_nothrow_copy_constructible_v<E> && std::is_nothrow_copy_assignable_v<E>)
requires std::is_copy_constructible_v<E> &&
std::is_copy_assignable_v<E>;
Reference to the current object
| Name | Description |
|---|---|
| x | The object to copy assign from |
Move-assign from another void Expected.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected&
operator=(Expected&& x) noexcept(std::is_nothrow_move_constructible_v<E> && std::is_nothrow_move_assignable_v<E>)
requires std::is_move_constructible_v<E> &&
std::is_move_assignable_v<E>;
Reference to the current object
| Name | Description |
|---|---|
| x | The object to move assign from |
Assign a new unexpected error (lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class G>
requires std::is_constructible_v<E, G const&> &&
std::is_assignable_v<E&, G const&>
constexpr
Expected&
operator=(Unexpected<G> const& e);
Reference to the current object
| Name | Description |
|---|---|
| e | The object to copy assign from |
Assign a new unexpected error (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class G>
requires std::is_constructible_v<E, G> &&
std::is_assignable_v<E&, G>
constexpr
Expected&
operator=(Unexpected<G>&& e);
Reference to the current object
| Name | Description |
|---|---|
| e | The object to move assign from |
and_then overloads
Declared in <mrdocs/Support/Expected.hpp>
Invoke f when engaged, propagate error otherwise.
template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
and_then(Fn&& f) &;
» more...
Invoke f when engaged (const lvalue), propagate error otherwise.
template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
and_then(Fn&& f) const &;
» more...
Invoke f when engaged (rvalue), propagate error otherwise.
template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
and_then(Fn&& f) &&;
» more...
Invoke f when engaged (const rvalue), propagate error otherwise.
template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
and_then(Fn&& f) const &&;
» more...
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation returning another Expected. |
Invoke f when engaged, propagate error otherwise.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
and_then(Fn&& f) &;
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation returning another Expected. |
Invoke f when engaged (const lvalue), propagate error otherwise.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
and_then(Fn&& f) const &;
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation returning another Expected. |
Invoke f when engaged (rvalue), propagate error otherwise.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
and_then(Fn&& f) &&;
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation returning another Expected. |
Invoke f when engaged (const rvalue), propagate error otherwise.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
and_then(Fn&& f) const &&;
Result of f or this error.
| Name | Description |
|---|---|
| f | Continuation returning another Expected. |
Reset to engaged state (no error).
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
emplace() noexcept;
error overloads
Declared in <mrdocs/Support/Expected.hpp>
Return a const reference to the contained error; precondition: disengaged.
constexpr
E const&
error() const & noexcept;
» more...
Return a reference to the contained error; precondition: disengaged.
constexpr
E&
error() & noexcept;
» more...
Return an rvalue reference to the contained error; precondition: disengaged.
constexpr
E const&&
error() const && noexcept;
» more...
Return an rvalue reference to the contained error; precondition: disengaged.
constexpr
E&&
error() && noexcept;
» more...
Return a const reference to the contained error; precondition: disengaged.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
E const&
error() const & noexcept;
a const reference to the contained error; precondition: disengaged.
Return a reference to the contained error; precondition: disengaged.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
E&
error() & noexcept;
a reference to the contained error; precondition: disengaged.
Return an rvalue reference to the contained error; precondition: disengaged.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
E const&&
error() const && noexcept;
an rvalue reference to the contained error; precondition: disengaged.
Return an rvalue reference to the contained error; precondition: disengaged.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
E&&
error() && noexcept;
an rvalue reference to the contained error; precondition: disengaged.
error_or overloads
Declared in <mrdocs/Support/Expected.hpp>
Return the error or a fallback copy.
template<class G = E>
constexpr
E
error_or(G&& e) const &;
» more...
Return the error or a fallback move.
template<class G = E>
constexpr
E
error_or(G&& e) &&;
» more...
Contained error or the fallback converted to E.
| Name | Description |
|---|---|
| e | Fallback to return if engaged. |
Return the error or a fallback copy.
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
constexpr
E
error_or(G&& e) const &;
Contained error or the fallback converted to E.
| Name | Description |
|---|---|
| e | Fallback to return if engaged. |
Return the error or a fallback move.
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
constexpr
E
error_or(G&& e) &&;
Contained error or the fallback converted to E.
| Name | Description |
|---|---|
| e | Fallback to return if engaged. |
Return true when the Expected holds a value.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
bool
has_value() const noexcept;
true when the Expected holds a value.
Ensure the Expected is engaged; throws if it holds an error.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
operator*() const noexcept;
or_else overloads
Declared in <mrdocs/Support/Expected.hpp>
Invoke f when in error, otherwise return current value.
template<class Fn>
constexpr
auto
or_else(Fn&& f) &;
» more...
Invoke f when in error (const lvalue), otherwise return current value.
template<class Fn>
constexpr
auto
or_else(Fn&& f) const &;
» more...
Invoke f when in error (rvalue), otherwise return current value.
template<class Fn>
constexpr
auto
or_else(Fn&& f) &&;
» more...
Invoke f when in error (const rvalue), otherwise return current value.
template<class Fn>
constexpr
auto
or_else(Fn&& f) const &&;
» more...
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Invoke f when in error, otherwise return current value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
or_else(Fn&& f) &;
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Invoke f when in error (const lvalue), otherwise return current value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
or_else(Fn&& f) const &;
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Invoke f when in error (rvalue), otherwise return current value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
or_else(Fn&& f) &&;
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Invoke f when in error (const rvalue), otherwise return current value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
or_else(Fn&& f) const &&;
Current value or result of f.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Swap states with another void Expected.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
swap(Expected& x) noexcept(std::is_nothrow_swappable_v<E &> && std::is_nothrow_move_constructible_v<E>)
requires std::is_swappable_v<E> &&
std::is_move_constructible_v<E>;
| Name | Description |
|---|---|
| x | Other instance to exchange with. |
transform overloads
Declared in <mrdocs/Support/Expected.hpp>
Transform the contained error type when engaged (lvalue).
template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
transform(Fn&& f) &;
» more...
Transform the contained error type when engaged (const lvalue).
template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
transform(Fn&& f) const &;
» more...
Transform the contained error type when engaged (rvalue).
template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
transform(Fn&& f) &&;
» more...
Transform the contained error type when engaged (const rvalue).
template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
transform(Fn&& f) const &&;
» more...
New Expected produced from f or the existing error.
| Name | Description |
|---|---|
| f | Transformation to apply. |
Transform the contained error type when engaged (lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E&>
constexpr
auto
transform(Fn&& f) &;
New Expected produced from f or the existing error.
| Name | Description |
|---|---|
| f | Transformation to apply. |
Transform the contained error type when engaged (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E const&>
constexpr
auto
transform(Fn&& f) const &;
New Expected produced from f or the existing error.
| Name | Description |
|---|---|
| f | Transformation to apply. |
Transform the contained error type when engaged (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, E>
constexpr
auto
transform(Fn&& f) &&;
New Expected produced from f or the existing error.
| Name | Description |
|---|---|
| f | Transformation to apply. |
Transform the contained error type when engaged (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
requires std::is_constructible_v<E, const E>
constexpr
auto
transform(Fn&& f) const &&;
New Expected produced from f or the existing error.
| Name | Description |
|---|---|
| f | Transformation to apply. |
transform_error overloads
Declared in <mrdocs/Support/Expected.hpp>
Transform the stored error value when disengaged.
template<class Fn>
constexpr
auto
transform_error(Fn&& f) &;
» more...
Transform the stored error value when disengaged (const lvalue).
template<class Fn>
constexpr
auto
transform_error(Fn&& f) const &;
» more...
Transform the stored error value when disengaged (rvalue).
template<class Fn>
constexpr
auto
transform_error(Fn&& f) &&;
» more...
Transform the stored error value when disengaged (const rvalue).
template<class Fn>
constexpr
auto
transform_error(Fn&& f) const &&;
» more...
Expected containing the transformed error or the current value.
| Name | Description |
|---|---|
| f | Transformation to apply. |
Transform the stored error value when disengaged.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform_error(Fn&& f) &;
Expected containing the transformed error or the current value.
| Name | Description |
|---|---|
| f | Transformation to apply. |
Transform the stored error value when disengaged (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform_error(Fn&& f) const &;
Expected containing the transformed error or the current value.
| Name | Description |
|---|---|
| f | Transformation to apply. |
Transform the stored error value when disengaged (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform_error(Fn&& f) &&;
Expected containing the transformed error or the current value.
| Name | Description |
|---|---|
| f | Transformation to apply. |
Transform the stored error value when disengaged (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform_error(Fn&& f) const &&;
Expected containing the transformed error or the current value.
| Name | Description |
|---|---|
| f | Transformation to apply. |
value overloads
Ensure the Expected is engaged; throws BadExpectedAccess if not.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
value() const &;
Ensure the Expected is engaged; throws BadExpectedAccess if not (rvalue overload).
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
value() &&;
Return true when the Expected holds a value.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
explicit
operator bool() const noexcept;
true when the Expected holds a value.
Stored unexpected error.
Declared in <mrdocs/Support/Expected.hpp>
E unex_;
Placeholder for the engaged state.
Declared in <mrdocs/Support/Expected.hpp>
engaged_state void_;
Expected specialization for lvalue references. Holds either a bound reference to T or an unexpected error E.
Declared in <mrdocs/Support/Expected.hpp>
template<
class T,
class E>
class Expected<T&, E>;
| Name | Description |
|---|---|
error_type | Error type carried when disengaged. |
rebind | Rebind the reference to another value type while keeping E. |
unexpected_type | Convenience alias for the unexpected wrapper. |
value_type | Referenced value type. |
| Name | Description |
|---|---|
Expected [constructor] | Constructors |
~Expected [destructor] | Destroy the held error when disengaged. |
operator= | Assignment operators |
and_then | and_then overloads |
emplace | emplace overloads |
error | error overloads |
error_or | error_or overloads |
has_value | Check whether the Expected currently contains a reference. |
operator* | Dereference operators |
operator-> | Access the bound reference pointer; undefined if disengaged. |
or_else | or_else overloads |
swap | Swap state with another reference Expected. |
transform | transform overloads |
transform_error | transform_error overloads |
value | value overloads |
value_or | value_or overloads |
operator bool | Return true when a reference is bound. |
| Name | Description |
|---|---|
p_ [variant member] | Pointer to the referenced value when engaged. |
unex_ [variant member] | Stored unexpected error when disengaged. |
| Name | Description |
|---|---|
mrdocs::operator== | Equality operator |
mrdocs::operator== | Equality operator |
mrdocs::operator== | Equality operator |
mrdocs::swap |
Error type carried when disengaged.
Declared in <mrdocs/Support/Expected.hpp>
using error_type = E;
Rebind the reference to another value type while keeping E.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
using rebind = Expected<U, error_type>;
Convenience alias for the unexpected wrapper.
Referenced value type.
Declared in <mrdocs/Support/Expected.hpp>
using value_type = T&;
Constructors
Declared in <mrdocs/Support/Expected.hpp>
Construct a disengaged Expected with no bound reference.
constexpr
Expected() noexcept;
» more...
Copy-construct from another reference Expected.
constexpr
Expected(Expected const& other) = default;
» more...
Move-construct from another reference Expected.
constexpr
Expected(Expected&& other) = default;
» more...
Bind to an lvalue result, marking the expected engaged.
template<class U>
requires (!std::is_same_v<std::remove_cvref_t<U>, Expected>
&& !std::is_same_v<std::remove_cvref_t<U>, std::in_place_t>
&& !detail::isUnexpected<std::remove_cvref_t<U>> && ok_bind_v<U&>)
constexpr
explicit(!std::is_convertible_v<U &, R>)
Expected(U& u) noexcept(std::is_nothrow_constructible_v<R, U &>);
» more...
Bind to the result stored inside another Expected value.
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
explicit(!std::is_convertible_v<U &, R>)
Expected(Expected<U, E>& other) noexcept(std::is_nothrow_constructible_v<R, U &> && std::is_nothrow_copy_constructible_v<E>);
» more...
Copy-construct from another reference Expected.
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
explicit(!std::is_convertible_v<U &, R>)
Expected(Expected<U&, E> const& other) noexcept(std::is_nothrow_constructible_v<R, U &> && std::is_nothrow_copy_constructible_v<E>);
» more...
Construct from an unexpected error (copy).
template<class G = E>
requires std::is_constructible_v<E, G const&>
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Unexpected<G> const& u) noexcept(std::is_nothrow_constructible_v<E, const G &>);
» more...
Deleted: binding a reference Expected from a temporary would dangle.
template<class U>
requires (!std::is_same_v<std::remove_cvref_t<U>, Expected>
&& !std::is_same_v<std::remove_cvref_t<U>, std::in_place_t>
&& !detail::isUnexpected<std::remove_cvref_t<U>>
&& !ok_bind_v<U &&>)
constexpr
Expected(U&& u) = delete;
» more...
Deleted: rebinding from a temporary Expected<U, E> would dangle.
template<class U>
constexpr
Expected(Expected<U, E>&& value) = delete;
» more...
Move-construct from another reference Expected.
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
explicit(!std::is_convertible_v<U &, R>)
Expected(Expected<U&, E>&& other) noexcept(std::is_nothrow_constructible_v<R, U &> && std::is_nothrow_move_constructible_v<E>);
» more...
Construct from an unexpected error (move).
template<class G = E>
requires std::is_constructible_v<E, G>
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Unexpected<G>&& u) noexcept(std::is_nothrow_constructible_v<E, G>);
» more...
Invoke a factory to obtain the bound reference in-place.
template<class Fn>
constexpr
explicit
Expected(
/* implementation-defined */ tag,
Fn&& fn);
» more...
Bind in-place to an existing lvalue.
template<class U>
requires ok_bind_v<U&>
constexpr
explicit
Expected(
std::in_place_t tag,
U& u) noexcept;
» more...
Construct an unexpected state by invoking a factory.
template<class Fn>
constexpr
explicit
Expected(
/* implementation-defined */ tag,
Fn&& fn);
» more...
Construct a disengaged Expected from error arguments.
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Expected(
unexpect_t tag,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
» more...
Construct a disengaged Expected from an initializer list.
template<
class U,
class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
unexpect_t tag,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);
» more...
| Name | Description |
|---|---|
| other | Source instance providing the lvalue. |
| u | Unexpected wrapper to copy. |
| fn | Callable that returns a bindable lvalue. |
| tag | Tag selecting in-place construction. |
| args | Arguments forwarded to the error constructor. |
| il | Initializer list forwarded to the error constructor. |
Construct a disengaged Expected with no bound reference.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected() noexcept;
Copy-construct from another reference Expected.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected(Expected const& other) = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Move-construct from another reference Expected.
| Name | Description |
|---|---|
| other | The object to move construct from |
Bind to an lvalue result, marking the expected engaged.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires (!std::is_same_v<std::remove_cvref_t<U>, Expected>
&& !std::is_same_v<std::remove_cvref_t<U>, std::in_place_t>
&& !detail::isUnexpected<std::remove_cvref_t<U>> && ok_bind_v<U&>)
constexpr
explicit(!std::is_convertible_v<U &, R>)
Expected(U& u) noexcept(std::is_nothrow_constructible_v<R, U &>);
| Name | Description |
|---|---|
| u | The object to copy construct from |
Bind to the result stored inside another Expected value.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
explicit(!std::is_convertible_v<U &, R>)
Expected(Expected<U, E>& other) noexcept(std::is_nothrow_constructible_v<R, U &> && std::is_nothrow_copy_constructible_v<E>);
| Name | Description |
|---|---|
| other | Source instance providing the lvalue. |
Copy-construct from another reference Expected.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
explicit(!std::is_convertible_v<U &, R>)
Expected(Expected<U&, E> const& other) noexcept(std::is_nothrow_constructible_v<R, U &> && std::is_nothrow_copy_constructible_v<E>);
| Name | Description |
|---|---|
| other | Source instance to bind to. |
Construct from an unexpected error (copy).
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
requires std::is_constructible_v<E, G const&>
constexpr
explicit(!std::is_convertible_v<const G &, E>)
Expected(Unexpected<G> const& u) noexcept(std::is_nothrow_constructible_v<E, const G &>);
| Name | Description |
|---|---|
| u | Unexpected wrapper to copy. |
Deleted: binding a reference Expected from a temporary would dangle.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires (!std::is_same_v<std::remove_cvref_t<U>, Expected>
&& !std::is_same_v<std::remove_cvref_t<U>, std::in_place_t>
&& !detail::isUnexpected<std::remove_cvref_t<U>>
&& !ok_bind_v<U &&>)
constexpr
Expected(U&& u) = delete;
| Name | Description |
|---|---|
| u | Temporary value (deleted). |
Deleted: rebinding from a temporary Expected<U, E> would dangle.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
constexpr
Expected(Expected<U, E>&& value) = delete;
| Name | Description |
|---|---|
| value | The object to move construct from |
Move-construct from another reference Expected.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
explicit(!std::is_convertible_v<U &, R>)
Expected(Expected<U&, E>&& other) noexcept(std::is_nothrow_constructible_v<R, U &> && std::is_nothrow_move_constructible_v<E>);
| Name | Description |
|---|---|
| other | Source instance to bind to. |
Construct from an unexpected error (move).
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
requires std::is_constructible_v<E, G>
constexpr
explicit(!std::is_convertible_v<G, E>)
Expected(Unexpected<G>&& u) noexcept(std::is_nothrow_constructible_v<E, G>);
| Name | Description |
|---|---|
| u | Unexpected wrapper to move from. |
Invoke a factory to obtain the bound reference in-place.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
explicit
Expected(
/* implementation-defined */ tag,
Fn&& fn);
| Name | Description |
|---|---|
| fn | Callable that returns a bindable lvalue. |
| tag | The object to construct from |
Bind in-place to an existing lvalue.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires ok_bind_v<U&>
constexpr
explicit
Expected(
std::in_place_t tag,
U& u) noexcept;
| Name | Description |
|---|---|
| tag | Tag selecting in-place construction. |
| u | Lvalue to bind this Expected to. |
Construct an unexpected state by invoking a factory.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
explicit
Expected(
/* implementation-defined */ tag,
Fn&& fn);
| Name | Description |
|---|---|
| fn | Callable that produces an error value. |
| tag | The object to construct from |
Construct a disengaged Expected from error arguments.
Declared in <mrdocs/Support/Expected.hpp>
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Expected(
unexpect_t tag,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
| Name | Description |
|---|---|
| tag | Tag selecting unexpected construction. |
| args | Arguments forwarded to the error constructor. |
Construct a disengaged Expected from an initializer list.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Expected(
unexpect_t tag,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);
| Name | Description |
|---|---|
| tag | Tag selecting unexpected construction. |
| il | Initializer list forwarded to the error constructor. |
| args | Additional arguments forwarded to the error constructor. |
Destroy the held error when disengaged.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
~Expected();
Assignment operators
Declared in <mrdocs/Support/Expected.hpp>
Copy-assign, rebinding or copying the error.
constexpr
Expected&
operator=(Expected const& other) = default;
» more...
Move-assign, rebinding or moving the error.
constexpr
Expected&
operator=(Expected&& other) = default;
» more...
Assign a new binding from an lvalue.
template<class U>
requires ok_bind_v<U&>
constexpr
Expected&
operator=(U& u) noexcept(std::is_nothrow_constructible_v<R, U &>);
» more...
Bind to the value contained in another Expected instance.
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
Expected&
operator=(Expected<U, E>& other);
» more...
Assign from another reference Expected (copy).
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
Expected&
operator=(Expected<U&, E> const& other);
» more...
Replace the stored state with an unexpected error (copy).
template<class G>
requires std::is_constructible_v<E, G const&>
&& std::is_assignable_v<E&, G const&>
constexpr
Expected&
operator=(Unexpected<G> const& e);
» more...
Deleted: rebinding from a temporary would dangle.
template<class U>
requires (!ok_bind_v<U &&>)
constexpr
Expected&
operator=(U&& u) = delete;
» more...
Deleted: cannot bind to a temporary Expected holding a value.
template<class U>
constexpr
Expected&
operator=(Expected<U, E>&& value) = delete;
» more...
Assign from another reference Expected (move).
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
Expected&
operator=(Expected<U&, E>&& other);
» more...
Replace the stored state with an unexpected error (move).
template<class G>
requires std::is_constructible_v<E, G> && std::is_assignable_v<E&, G>
constexpr
Expected&
operator=(Unexpected<G>&& e);
» more...
| Name | Description |
|---|---|
| other | Source lvalue Expected to bind to. |
| e | Unexpected wrapper to copy from. |
| u | Temporary value (deleted). |
Copy-assign, rebinding or copying the error.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected&
operator=(Expected const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move-assign, rebinding or moving the error.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Expected&
operator=(Expected&& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Assign a new binding from an lvalue.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires ok_bind_v<U&>
constexpr
Expected&
operator=(U& u) noexcept(std::is_nothrow_constructible_v<R, U &>);
Reference to the current object
| Name | Description |
|---|---|
| u | The object to copy assign from |
Bind to the value contained in another Expected instance.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
Expected&
operator=(Expected<U, E>& other);
Reference to the current object
| Name | Description |
|---|---|
| other | Source lvalue Expected to bind to. |
Assign from another reference Expected (copy).
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
Expected&
operator=(Expected<U&, E> const& other);
Reference to the current object
| Name | Description |
|---|---|
| other | Source instance to bind to or copy error from. |
Replace the stored state with an unexpected error (copy).
Declared in <mrdocs/Support/Expected.hpp>
template<class G>
requires std::is_constructible_v<E, G const&>
&& std::is_assignable_v<E&, G const&>
constexpr
Expected&
operator=(Unexpected<G> const& e);
Reference to the current object
| Name | Description |
|---|---|
| e | Unexpected wrapper to copy from. |
Deleted: rebinding from a temporary would dangle.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires (!ok_bind_v<U &&>)
constexpr
Expected&
operator=(U&& u) = delete;
Reference to the current object
| Name | Description |
|---|---|
| u | Temporary value (deleted). |
Deleted: cannot bind to a temporary Expected holding a value.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
constexpr
Expected&
operator=(Expected<U, E>&& value) = delete;
Reference to the current object
| Name | Description |
|---|---|
| value | The object to move assign from |
Assign from another reference Expected (move).
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires detail::ok_bind_ref_v<R, U&>
constexpr
Expected&
operator=(Expected<U&, E>&& other);
Reference to the current object
| Name | Description |
|---|---|
| other | Source instance to bind to or move error from. |
Replace the stored state with an unexpected error (move).
Declared in <mrdocs/Support/Expected.hpp>
template<class G>
requires std::is_constructible_v<E, G> && std::is_assignable_v<E&, G>
constexpr
Expected&
operator=(Unexpected<G>&& e);
Reference to the current object
| Name | Description |
|---|---|
| e | Unexpected wrapper to move from. |
and_then overloads
Declared in <mrdocs/Support/Expected.hpp>
Invoke f with the bound reference when engaged.
template<class Fn>
constexpr
auto
and_then(Fn&& f) &;
» more...
Invoke f with the bound reference when engaged (const lvalue).
template<class Fn>
constexpr
auto
and_then(Fn&& f) const &;
» more...
Invoke f with the bound reference when engaged (rvalue).
template<class Fn>
constexpr
auto
and_then(Fn&& f) &&;
» more...
Invoke f with the bound reference when engaged (const rvalue).
template<class Fn>
constexpr
auto
and_then(Fn&& f) const &&;
» more...
Result of f or current error.
| Name | Description |
|---|---|
| f | Continuation producing another Expected. |
Invoke f with the bound reference when engaged.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
and_then(Fn&& f) &;
Result of f or current error.
| Name | Description |
|---|---|
| f | Continuation producing another Expected. |
Invoke f with the bound reference when engaged (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
and_then(Fn&& f) const &;
Result of f or current error.
| Name | Description |
|---|---|
| f | Continuation producing another Expected. |
Invoke f with the bound reference when engaged (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
and_then(Fn&& f) &&;
Result of f or current error.
| Name | Description |
|---|---|
| f | Continuation producing another Expected. |
Invoke f with the bound reference when engaged (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
and_then(Fn&& f) const &&;
Result of f or current error.
| Name | Description |
|---|---|
| f | Continuation producing another Expected. |
emplace overloads
Declared in <mrdocs/Support/Expected.hpp>
Rebind to a new lvalue, returning the stored reference.
template<class U>
requires ok_bind_v<U&>
constexpr
T&
emplace(U& u) noexcept;
» more...
Deleted: cannot bind reference Expected to a temporary.
template<class U>
requires (!ok_bind_v<U &&>)
constexpr
T&
emplace(U&& u) = delete;
» more...
Bound reference.
| Name | Description |
|---|---|
| u | Reference to bind to. |
Rebind to a new lvalue, returning the stored reference.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires ok_bind_v<U&>
constexpr
T&
emplace(U& u) noexcept;
Bound reference.
| Name | Description |
|---|---|
| u | Reference to bind to. |
Deleted: cannot bind reference Expected to a temporary.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
requires (!ok_bind_v<U &&>)
constexpr
T&
emplace(U&& u) = delete;
error overloads
Declared in <mrdocs/Support/Expected.hpp>
Access the stored error; requires disengaged state.
[[nodiscard]]
constexpr
E&
error() & noexcept;
» more...
Access the stored error (const lvalue).
[[nodiscard]]
constexpr
E const&
error() const & noexcept;
» more...
Access the stored error (rvalue).
[[nodiscard]]
constexpr
E&&
error() && noexcept;
» more...
Access the stored error (const rvalue).
[[nodiscard]]
constexpr
E const&&
error() const && noexcept;
» more...
Access the stored error; requires disengaged state.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
E&
error() & noexcept;
Reference to the stored error.
Access the stored error (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
E const&
error() const & noexcept;
Reference to the stored error.
Access the stored error (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
E&&
error() && noexcept;
Rvalue reference to the stored error.
Access the stored error (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
E const&&
error() const && noexcept;
Rvalue reference to the stored error.
error_or overloads
Declared in <mrdocs/Support/Expected.hpp>
Return the stored error or the provided fallback (copy).
template<class G = E>
constexpr
E
error_or(G&& g) const &;
» more...
Return the stored error or the provided fallback (move).
template<class G = E>
constexpr
E
error_or(G&& g) &&;
» more...
Error value.
| Name | Description |
|---|---|
| g | Fallback error to return when engaged. |
Return the stored error or the provided fallback (copy).
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
constexpr
E
error_or(G&& g) const &;
Error value.
| Name | Description |
|---|---|
| g | Fallback error to return when engaged. |
Return the stored error or the provided fallback (move).
Declared in <mrdocs/Support/Expected.hpp>
template<class G = E>
constexpr
E
error_or(G&& g) &&;
Error value.
| Name | Description |
|---|---|
| g | Fallback error to move when engaged. |
Check whether the Expected currently contains a reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
bool
has_value() const noexcept;
true if a reference is bound.
Dereference operators
Declared in <mrdocs/Support/Expected.hpp>
Dereference the bound reference.
[[nodiscard]]
constexpr
T&
operator*() & noexcept;
» more...
Dereference the bound reference (const).
[[nodiscard]]
constexpr
T const&
operator*() const & noexcept;
» more...
Dereference the bound reference, preserving value category.
[[nodiscard]]
constexpr
T&&
operator*() && noexcept;
» more...
Dereference the bound reference, preserving value category (const rvalue).
[[nodiscard]]
constexpr
T const&&
operator*() const && noexcept;
» more...
Reference to the bound value.
Dereference the bound reference.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T&
operator*() & noexcept;
Reference to the bound value.
Dereference the bound reference (const).
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T const&
operator*() const & noexcept;
Reference to the bound value.
Dereference the bound reference, preserving value category.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T&&
operator*() && noexcept;
Reference to the bound value.
Dereference the bound reference, preserving value category (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T const&&
operator*() const && noexcept;
Reference to the bound value.
Access the bound reference pointer; undefined if disengaged.
Declared in <mrdocs/Support/Expected.hpp>
Access the bound reference pointer; undefined if disengaged.
[[nodiscard]]
constexpr
T*
operator->() noexcept;
» more...
Access the bound reference pointer; undefined if disengaged.
[[nodiscard]]
constexpr
T const*
operator->() const noexcept;
» more...
Pointer to the bound value.
Access the bound reference pointer; undefined if disengaged.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T*
operator->() noexcept;
Pointer to the bound value.
Access the bound reference pointer; undefined if disengaged.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
T const*
operator->() const noexcept;
Pointer to the bound value.
or_else overloads
Declared in <mrdocs/Support/Expected.hpp>
Recover with f if disengaged, otherwise return this value.
template<class Fn>
constexpr
Expected
or_else(Fn&& f) &;
» more...
Recover with f if disengaged (const lvalue).
template<class Fn>
constexpr
Expected
or_else(Fn&& f) const &;
» more...
Recover with f if disengaged (rvalue).
template<class Fn>
constexpr
Expected
or_else(Fn&& f) &&;
» more...
Recover with f if disengaged (const rvalue).
template<class Fn>
constexpr
Expected
or_else(Fn&& f) const &&;
» more...
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Recover with f if disengaged, otherwise return this value.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
Expected
or_else(Fn&& f) &;
Expected specialization for lvalue references. Holds either a bound reference to T or an unexpected error E.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Recover with f if disengaged (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
Expected
or_else(Fn&& f) const &;
Expected specialization for lvalue references. Holds either a bound reference to T or an unexpected error E.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Recover with f if disengaged (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
Expected
or_else(Fn&& f) &&;
Expected specialization for lvalue references. Holds either a bound reference to T or an unexpected error E.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Recover with f if disengaged (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
Expected
or_else(Fn&& f) const &&;
Expected specialization for lvalue references. Holds either a bound reference to T or an unexpected error E.
| Name | Description |
|---|---|
| f | Recovery function returning an Expected. |
Swap state with another reference Expected.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
swap(Expected& x) noexcept(std::is_nothrow_move_constructible_v<E> && std::is_nothrow_swappable_v<E &>)
requires std::is_swappable_v<E>;
| Name | Description |
|---|---|
| x | Other instance to exchange with. |
transform overloads
Declared in <mrdocs/Support/Expected.hpp>
Transform the bound value when engaged.
template<class Fn>
constexpr
auto
transform(Fn&& f) &;
» more...
Transform the bound value when engaged (const lvalue).
template<class Fn>
constexpr
auto
transform(Fn&& f) const &;
» more...
Transform the bound value when engaged (rvalue).
template<class Fn>
constexpr
auto
transform(Fn&& f) &&;
» more...
Transform the bound value when engaged (const rvalue).
template<class Fn>
constexpr
auto
transform(Fn&& f) const &&;
» more...
Expected containing transformed value or current error.
| Name | Description |
|---|---|
| f | Transformation applied to the bound reference. |
Transform the bound value when engaged.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform(Fn&& f) &;
Expected containing transformed value or current error.
| Name | Description |
|---|---|
| f | Transformation applied to the bound reference. |
Transform the bound value when engaged (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform(Fn&& f) const &;
Expected containing transformed value or current error.
| Name | Description |
|---|---|
| f | Transformation applied to the bound reference. |
Transform the bound value when engaged (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform(Fn&& f) &&;
Expected containing transformed value or current error.
| Name | Description |
|---|---|
| f | Transformation applied to the bound reference. |
Transform the bound value when engaged (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform(Fn&& f) const &&;
Expected containing transformed value or current error.
| Name | Description |
|---|---|
| f | Transformation applied to the bound reference. |
transform_error overloads
Declared in <mrdocs/Support/Expected.hpp>
Transform the stored error when disengaged.
template<class Fn>
constexpr
auto
transform_error(Fn&& f) &;
» more...
Transform the stored error when disengaged (const lvalue).
template<class Fn>
constexpr
auto
transform_error(Fn&& f) const &;
» more...
Transform the stored error when disengaged (rvalue).
template<class Fn>
constexpr
auto
transform_error(Fn&& f) &&;
» more...
Transform the stored error when disengaged (const rvalue).
template<class Fn>
constexpr
auto
transform_error(Fn&& f) const &&;
» more...
Expected with transformed error or current value.
| Name | Description |
|---|---|
| f | Transformation applied to the error. |
Transform the stored error when disengaged.
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform_error(Fn&& f) &;
Expected with transformed error or current value.
| Name | Description |
|---|---|
| f | Transformation applied to the error. |
Transform the stored error when disengaged (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform_error(Fn&& f) const &;
Expected with transformed error or current value.
| Name | Description |
|---|---|
| f | Transformation applied to the error. |
Transform the stored error when disengaged (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform_error(Fn&& f) &&;
Expected with transformed error or current value.
| Name | Description |
|---|---|
| f | Transformation applied to the error. |
Transform the stored error when disengaged (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
template<class Fn>
constexpr
auto
transform_error(Fn&& f) const &&;
Expected with transformed error or current value.
| Name | Description |
|---|---|
| f | Transformation applied to the error. |
value overloads
Declared in <mrdocs/Support/Expected.hpp>
Return the bound reference or throw on disengaged state.
constexpr
T&
value() &;
» more...
Return the bound reference or throw on disengaged state (const lvalue).
constexpr
T const&
value() const &;
» more...
Return the bound reference or throw on disengaged state (rvalue).
constexpr
T&&
value() &&;
» more...
Return the bound reference or throw on disengaged state (const rvalue).
constexpr
T const&&
value() const &&;
» more...
Return the bound reference or throw on disengaged state.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
T&
value() &;
the bound reference or throw on disengaged state.
Return the bound reference or throw on disengaged state (const lvalue).
Declared in <mrdocs/Support/Expected.hpp>
constexpr
T const&
value() const &;
the bound reference or throw on disengaged state (const lvalue).
Return the bound reference or throw on disengaged state (rvalue).
Declared in <mrdocs/Support/Expected.hpp>
constexpr
T&&
value() &&;
the bound reference or throw on disengaged state (rvalue).
Return the bound reference or throw on disengaged state (const rvalue).
Declared in <mrdocs/Support/Expected.hpp>
constexpr
T const&&
value() const &&;
the bound reference or throw on disengaged state (const rvalue).
value_or overloads
Declared in <mrdocs/Support/Expected.hpp>
Return the bound value or a fallback copy when disengaged.
template<class U>
constexpr
std::remove_reference_t<T>
value_or(U&& u) const &;
» more...
Return the bound value or a fallback move when disengaged.
template<class U>
constexpr
std::remove_reference_t<T>
value_or(U&& u) &&;
» more...
| Name | Description |
|---|---|
| u | Fallback value to return if no reference is bound. |
Return the bound value or a fallback copy when disengaged.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
constexpr
std::remove_reference_t<T>
value_or(U&& u) const &;
Bound value or fallback copy.
| Name | Description |
|---|---|
| u | Fallback value to return if no reference is bound. |
Return the bound value or a fallback move when disengaged.
Declared in <mrdocs/Support/Expected.hpp>
template<class U>
constexpr
std::remove_reference_t<T>
value_or(U&& u) &&;
Bound value or fallback.
| Name | Description |
|---|---|
| u | Fallback value to move if no reference is bound. |
Return true when a reference is bound.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
explicit
operator bool() const noexcept;
true when a reference is bound.
Pointer to the referenced value when engaged.
Declared in <mrdocs/Support/Expected.hpp>
T* p_;
Stored unexpected error when disengaged.
Declared in <mrdocs/Support/Expected.hpp>
E unex_;
Stores only the operand of the explicit-specifier or noexcept-specifier as a string. The complete expression is not preserved at this time. This is a temporary design and may be improved in the future.
Declared in <mrdocs/Metadata/Specifiers/ExplicitInfo.hpp>
struct ExplicitInfo;
| Name | Description |
|---|---|
operator<=> | Compare explicit-specifier info. |
| Name | Description |
|---|---|
Implicit | Whether an explicit-specifier was user-written. |
Kind | The evaluated exception specification. |
Operand | The operand of the explicit-specifier, if any. |
| Name | Description |
|---|---|
toString | Convert ExplicitInfo to a string. |
Compare explicit-specifier info.
Declared in <mrdocs/Metadata/Specifiers/ExplicitInfo.hpp>
constexpr
auto
operator<=>(ExplicitInfo const& rhs) const = default;
The relative order of the objects
| Name | Description |
|---|---|
| rhs | The right operand |
Whether an explicit-specifier was user-written.
Declared in <mrdocs/Metadata/Specifiers/ExplicitInfo.hpp>
bool Implicit = true;
The evaluated exception specification.
Declared in <mrdocs/Metadata/Specifiers/ExplicitInfo.hpp>
ExplicitKind Kind = ExplicitKind::False;
The operand of the explicit-specifier, if any.
Declared in <mrdocs/Metadata/Specifiers/ExplicitInfo.hpp>
std::string Operand;
Represents an expression
Declared in <mrdocs/Metadata/Expression.hpp>
struct ExprInfo;
| Name | Description |
|---|---|
asExpr | View this object as its base expression. |
operator<=> | Order expressions by written form. |
| Name | Description |
|---|---|
Written | The expression, as written |
| Name | Description |
|---|---|
merge | Merge metadata from another expression. |
| Name | Description |
|---|---|
ConstantExprInfo | Represents an expression with a (possibly known) value |
View this object as its base expression.
View this object as its base expression.
Represents an expression
View this object as its base expression.
Represents an expression
Order expressions by written form.
Declared in <mrdocs/Metadata/Expression.hpp>
constexpr
auto
operator<=>(ExprInfo const& rhs) const = default;
The relative order of the objects
| Name | Description |
|---|---|
| rhs | The right operand |
The expression, as written
Declared in <mrdocs/Metadata/Expression.hpp>
std::string Written;
A format string with source location.
Declared in <mrdocs/Support/Error.hpp>
template<class... Args>
struct FormatString;
| Name | Description |
|---|---|
FormatString [constructor] | Capture a format string and its originating location. |
| Name | Description |
|---|---|
fs | Format string view. |
loc | Originating source location for diagnostics. |
| Name | Description |
|---|---|
formatError | Return a formatted error. |
Capture a format string and its originating location.
Declared in <mrdocs/Support/Error.hpp>
template<class T>
FormatString(
T const& fs_,
std::source_location loc_ = source_location::current());
| Name | Description |
|---|---|
| fs_ | The format string to copy. |
| loc_ | Source location where formatting is requested. |
Format string view.
Declared in <mrdocs/Support/Error.hpp>
std::string_view fs;
Originating source location for diagnostics.
Declared in <mrdocs/Support/Error.hpp>
std::source_location loc;
Info for friend declarations.
Declared in <mrdocs/Metadata/Symbol/Friend.hpp>
struct FriendInfo final
Friendship is not transitive
Friendship is not inherited
Access specifiers do not affect the meaning of friend declarations
The friends of a record are stored directly in the record's metadata.
If the friend declaration is documented, the documentation is stored in the befriended symbol's metadata rather than in the relationship.
| Name | Description |
|---|---|
Type | Befriended type. |
id | Befriended symbol. |
Befriended type.
Declared in <mrdocs/Metadata/Symbol/Friend.hpp>
Optional<Polymorphic<Type>> Type = std::nullopt;
This member is nullable and only used when befriending a type.
Befriended symbol.
Metadata for a function or method.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
struct FunctionSymbol final
: SymbolCommonBase<SymbolKind::Function>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Function> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
FunctionSymbol [constructor] | Construct a function symbol with its ID. |
operator<=> | Compare functions by signature, qualifiers, and metadata. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
Attributes | Collected attributes attached to the declaration. |
Constexpr | constexpr/consteval specifier. |
Explicit | explicit-specifier information. |
FuncClass | The class of function this is |
FunctionObjectImpl | Back-reference to the function object implementation type. |
HasOverrideAttr | True when annotated with override. |
HasTrailingReturn | True when using a trailing return type. |
IsConst | True when qualified const. |
IsDefaulted | True when this declaration is implicitly defaulted. |
IsDeleted | True when this declaration is deleted. |
IsDeletedAsWritten | True when deleted as written (vs deduced). |
IsExplicitObjectMemberFunction | True when explicit object parameter syntax is used. |
IsExplicitlyDefaulted | True when explicitly defaulted with = default. |
IsFinal | True when final-qualified. |
IsNoReturn | True when marked [[noreturn]]or equivalent. |
IsNodiscard | True when declared [[nodiscard]]. |
IsPure | True when the function is pure virtual. |
IsRecordMethod | True when this is a non-static member function. |
IsVariadic | True when the function is variadic. |
IsVirtual | True when declared virtual (after overrides). |
IsVirtualAsWritten | True when explicitly written virtual. |
IsVolatile | True when qualified volatile. |
Noexcept | Exception specification for the function. |
OverloadedOperator | Overloaded operator kind, if any. |
Params | List of parameters. |
RefQualifier | Reference qualifier on the member function, if any. |
Requires | Constrained requires-clause if present. |
ReturnType | Info about the return type of this function. |
StorageClass | Storage class specifier. |
Template | When present, this function is a template or specialization. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
isCopyAssignment | Check whether a function is a copy assignment operator. |
isCopyConstructor | Check whether a function is a copy constructor. |
isDefaultConstructor | Check whether a function is a default constructor. |
isMoveAssignment | Check whether a function is a move assignment operator. |
isMoveConstructor | Check whether a function is a move constructor. |
isSpecialMemberFunction | Check whether a function is a special member function. |
overrides | Determine if one function would override the other |
Construct a function symbol with its ID.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
explicit
FunctionSymbol(SymbolID const& ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to copy construct from |
Compare functions by signature, qualifiers, and metadata.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
std::strong_ordering
operator<=>(FunctionSymbol const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
Collected attributes attached to the declaration.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
std::vector<std::string> Attributes;
constexpr/consteval specifier.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
ConstexprKind Constexpr = ConstexprKind::None;
explicit-specifier information.
The class of function this is
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
FunctionClass FuncClass = FunctionClass::Normal;
Back-reference to the function object implementation type.
When set, this function was synthesized from a function object variable: the function does not participate in ADL and taking its address is undefined behavior.
True when annotated with override.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool HasOverrideAttr = false;
True when using a trailing return type.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool HasTrailingReturn = false;
True when qualified const.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsConst = false;
True when this declaration is implicitly defaulted.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsDefaulted = false;
True when this declaration is deleted.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsDeleted = false;
True when deleted as written (vs deduced).
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsDeletedAsWritten = false;
True when explicit object parameter syntax is used.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsExplicitObjectMemberFunction = false;
True when explicitly defaulted with = default.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsExplicitlyDefaulted = false;
True when final-qualified.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsFinal = false;
True when marked [[noreturn]]or equivalent.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsNoReturn = false;
True when declared [[nodiscard]].
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsNodiscard = false;
True when the function is pure virtual.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsPure = false;
True when this is a non-static member function.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsRecordMethod = false;
True when the function is variadic.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsVariadic = false;
True when declared virtual (after overrides).
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsVirtual = false;
True when explicitly written virtual.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsVirtualAsWritten = false;
True when qualified volatile.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool IsVolatile = false;
Exception specification for the function.
Overloaded operator kind, if any.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
OperatorKind OverloadedOperator = OperatorKind::None;
List of parameters.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
std::vector<Param> Params;
Reference qualifier on the member function, if any.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
ReferenceKind RefQualifier = ReferenceKind::None;
Constrained requires-clause if present.
Info about the return type of this function.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
Polymorphic<Type> ReturnType = Polymorphic<Type>(AutoType{});
If the function has a deduced return type, this contains auto to indicate that.
By default, we also use auto in the member to indicate an unknown return type.
Storage class specifier.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
StorageClassKind StorageClass = StorageClassKind::None;
When present, this function is a template or specialization.
Function type with parameters, qualifiers, and noexcept info.
Declared in <mrdocs/Metadata/Type/FunctionType.hpp>
struct FunctionType final
: TypeCommonBase<TypeKind::Function>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::Function> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
ExceptionSpec | Exception specification information. |
IsVariadic | True when this function type is variadic. |
ParamTypes | Parameter types in declaration order. |
RefQualifier | Reference qualifier (if present). |
ReturnType | Return type, defaults to auto when unknown. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
Exception specification information.
True when this function type is variadic.
Declared in <mrdocs/Metadata/Type/FunctionType.hpp>
bool IsVariadic = false;
Parameter types in declaration order.
Declared in <mrdocs/Metadata/Type/FunctionType.hpp>
std::vector<Polymorphic<Type>> ParamTypes;
Reference qualifier (if present).
Declared in <mrdocs/Metadata/Type/FunctionType.hpp>
ReferenceKind RefQualifier = ReferenceKind::None;
Return type, defaults to auto when unknown.
Declared in <mrdocs/Metadata/Type/FunctionType.hpp>
Polymorphic<Type> ReturnType = Polymorphic<Type>(AutoType{});
Base class for documentation generators.
Declared in <mrdocs/Generator.hpp>
class Generator;
| Name | Description |
|---|---|
~Generator [destructor] [virtual] | Destructor. |
build | Build reference documentation for the corpus. |
buildOne | buildOne overloads |
buildOneString | Build the reference as a single page to a string. |
displayName [virtual] | Return the display name of the generator. |
fileExtension [virtual] | Return the extension or tag of the generator. |
id [virtual] | Return the symbolic name of the generator. |
| Name | Description |
|---|---|
findGenerator | Find a generator by its id. |
Destructor.
Declared in <mrdocs/Generator.hpp>
virtual
~Generator() noexcept;
Build reference documentation for the corpus.
Declared in <mrdocs/Generator.hpp>
Build reference documentation for the corpus.
Expected<void>
build(Corpus const& corpus) const;
» more...
Build reference documentation for the corpus.
virtual
Expected<void>
build(
std::string_view outputPath,
Corpus const& corpus) const;
» more...
The error, if any occurred.
| Name | Description |
|---|---|
| corpus | The symbols to emit. The generator may modify the contents of the object before returning. |
| outputPath | A directory or filename. |
Build reference documentation for the corpus.
This function invokes the generator to emit the documentation using the corpus configuration options to determine the output location.
The error, if any occurred.
| Name | Description |
|---|---|
| corpus | The symbols to emit. The generator may modify the contents of the object before returning. |
Build reference documentation for the corpus.
Declared in <mrdocs/Generator.hpp>
virtual
Expected<void>
build(
std::string_view outputPath,
Corpus const& corpus) const;
This function invokes the generator to emit the documentation using outputPath as a parameter indicating where the output should go. This can be a directory or a filename depending on the generator and how it is configured.
The default implentation assumes the output is single-page and emits the file reference.ext using buildOne to generate the content.
The typical implementation will have behavior similar to the default implementation if the output is single-page, or will iterate over the symbols in the corpus to generate multiple files if the output is multi-page.
The error, if any occurred.
| Name | Description |
|---|---|
| outputPath | A directory or filename. |
| corpus | The symbols to emit. The generator may modify the contents of the object before returning. |
buildOne overloads
Declared in <mrdocs/Generator.hpp>
Build the reference as a single page to a file.
Expected<void>
buildOne(
std::string_view fileName,
Corpus const& corpus) const;
» more...
Build reference documentation for the corpus.
virtual
Expected<void>
buildOne(
std::ostream& os,
Corpus const& corpus) const = 0;
» more...
The error, if any occurred.
| Name | Description |
|---|---|
| fileName | The file to write. If the file already exists, it will be overwritten. |
| corpus | The metadata to emit. |
| os | The stream to write to. |
Build the reference as a single page to a file.
Declared in <mrdocs/Generator.hpp>
Expected<void>
buildOne(
std::string_view fileName,
Corpus const& corpus) const;
Different corpus object: may be called concurrently.
Same corpus object: may not be called concurrently.
The error, if any occurred.
| Name | Description |
|---|---|
| fileName | The file to write. If the file already exists, it will be overwritten. |
| corpus | The metadata to emit. |
Build reference documentation for the corpus.
Declared in <mrdocs/Generator.hpp>
virtual
Expected<void>
buildOne(
std::ostream& os,
Corpus const& corpus) const = 0;
This function invokes the generator to emit the full documentation to an output stream, as a single entity.
Different corpus object: may be called concurrently.
Same corpus object: may not be called concurrently.
The error, if any occurred.
| Name | Description |
|---|---|
| os | The stream to write to. |
| corpus | The metadata to emit. |
Build the reference as a single page to a string.
Declared in <mrdocs/Generator.hpp>
Expected<void>
buildOneString(
std::string& dest,
Corpus const& corpus) const;
The error, if any occurred.
| Name | Description |
|---|---|
| dest | The string to hold the result. For the duration of the call, this must not be accessed by any other threads. |
| corpus | The metadata to emit. |
Return the display name of the generator.
Declared in <mrdocs/Generator.hpp>
virtual
std::string_view
displayName() const noexcept = 0;
the display name of the generator.
Return the extension or tag of the generator.
Declared in <mrdocs/Generator.hpp>
virtual
std::string_view
fileExtension() const noexcept = 0;
This should be in all lower case. Examples of tags are:
"adoc" Asciidoctor
"xml" XML
"html" HTML
The returned string should not include a leading period.
the extension or tag of the generator.
Return the symbolic name of the generator.
Declared in <mrdocs/Generator.hpp>
virtual
std::string_view
id() const noexcept = 0;
This is a short, unique string which identifies the generator in command line options and in configuration files.
the symbolic name of the generator.
A glob pattern matcher
Declared in <mrdocs/Support/Glob.hpp>
class GlobPattern;
"*" matches all characters except delimiters.
"**" matches all characters
"?" matches any single character.
"[<chars>]" matches one character in the bracket.
"[<char>-<char>]" matches one character in the bracket range.
"[]" or "[!<chars>]" matches one character not in the bracket.
"{<glob>,...}" matches one of the globs in the list.
"" escapes the next character so it is treated as a literal.
Nested brace expansions "{<glob>,"{<glob>,...}",...}" are not supported.
| Name | Description |
|---|---|
GlobPattern [constructor] | Constructors |
~GlobPattern [destructor] | Destructor |
operator= | Assignment operators |
isLiteral | Checks if the glob pattern is a literal string. |
match | Matches the given string against the glob pattern. |
matchPatternPrefix | Matches the start of a given string against the glob pattern. |
pattern | Returns the glob pattern. |
| Name | Description |
|---|---|
create | create overloads |
Constructors
Declared in <mrdocs/Support/Glob.hpp>
Construct an empty GlobPattern.
GlobPattern();
» more...
Copy constructor
GlobPattern(GlobPattern const& other);
» more...
Move constructor
GlobPattern(GlobPattern&& other) noexcept;
» more...
Construct an empty GlobPattern.
Declared in <mrdocs/Support/Glob.hpp>
GlobPattern();
An empty GlobPattern will never match any string.
Copy constructor
| Name | Description |
|---|---|
| other | The object to copy construct from |
Move constructor
| Name | Description |
|---|---|
| other | The object to move construct from |
Destructor
Declared in <mrdocs/Support/Glob.hpp>
~GlobPattern();
Assignment operators
Declared in <mrdocs/Support/Glob.hpp>
Copy assignment
GlobPattern&
operator=(GlobPattern const& other);
» more...
Move assignment
GlobPattern&
operator=(GlobPattern&& other) noexcept;
» more...
Copy assignment
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move assignment
Declared in <mrdocs/Support/Glob.hpp>
GlobPattern&
operator=(GlobPattern&& other) noexcept;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Checks if the glob pattern is a literal string.
Declared in <mrdocs/Support/Glob.hpp>
bool
isLiteral() const;
This function determines if the glob pattern does not contain any special characters. In other words, it matches a single string.
true if the glob pattern is a literal string, false otherwise.
Matches the given string against the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
bool
match(
std::string_view str,
char delimiter) const;
true if the string matches the pattern, false otherwise.
| Name | Description |
|---|---|
| str | The string to match against the pattern. |
| delimiter | The character that * does not match. |
Matches the start of a given string against the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
bool
matchPatternPrefix(
std::string_view prefix,
char delimiter) const;
This function determines if the given string with the specified prefix can potentially match the glob pattern.
If the string matches the start of the pattern without failure, even if there are characters left in the string or the pattern, the function returns true.
true if the string prefix matches the pattern, false otherwise.
| Name | Description |
|---|---|
| prefix | The string to match against the pattern. |
| delimiter | The character that * does not match. |
Returns the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
std::string_view
pattern() const;
The glob pattern as a string view.
create overloads
Declared in <mrdocs/Support/Glob.hpp>
Create a glob pattern without limiting subpattern count.
static
Expected<GlobPattern>
create(std::string_view pattern);
» more...
Constructs a GlobPattern with the given pattern.
static
Expected<GlobPattern>
create(
std::string_view pattern,
Optional<std::size_t> maxSubGlobs);
» more...
| Name | Description |
|---|---|
| pattern | Glob expression to compile. |
| maxSubGlobs | The maximum number of subpatterns allowed. If the pattern contains more subpatterns than this value, an error is returned. If not specified, there is no limit. |
Create a glob pattern without limiting subpattern count.
Declared in <mrdocs/Support/Glob.hpp>
static
Expected<GlobPattern>
create(std::string_view pattern);
Compiled pattern or an error.
| Name | Description |
|---|---|
| pattern | Glob expression to compile. |
Constructs a GlobPattern with the given pattern.
Declared in <mrdocs/Support/Glob.hpp>
static
Expected<GlobPattern>
create(
std::string_view pattern,
Optional<std::size_t> maxSubGlobs);
The constructed GlobPattern, or an error if the pattern is invalid.
| Name | Description |
|---|---|
| pattern | The glob pattern to use for matching. |
| maxSubGlobs | The maximum number of subpatterns allowed. If the pattern contains more subpatterns than this value, an error is returned. If not specified, there is no limit. |
Info for deduction guides.
Declared in <mrdocs/Metadata/Symbol/Guide.hpp>
struct GuideSymbol final
: SymbolCommonBase<SymbolKind::Guide>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Guide> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
GuideSymbol [constructor] | Construct a deduction guide symbol with its ID. |
operator<=> | Compare guides by params/deduced/template/explicit. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
Deduced | The pattern for the deduced specialization. |
Explicit | The explicit-specifier, if any. |
Params | The parameters of the deduction guide. |
Template | Template head, if any. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Construct a deduction guide symbol with its ID.
| Name | Description |
|---|---|
| ID | The object to construct from |
Compare guides by params/deduced/template/explicit.
Declared in <mrdocs/Metadata/Symbol/Guide.hpp>
std::strong_ordering
operator<=>(GuideSymbol const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
The pattern for the deduced specialization.
Declared in <mrdocs/Metadata/Symbol/Guide.hpp>
Polymorphic<Type> Deduced = Polymorphic<Type>(AutoType{});
This is always a SpecializationType.
The explicit-specifier, if any.
The parameters of the deduction guide.
Declared in <mrdocs/Metadata/Symbol/Guide.hpp>
std::vector<Param> Params;
Template head, if any.
A handlebars environment
Declared in <mrdocs/Support/Handlebars.hpp>
class Handlebars;
This class implements a handlebars template environment.
It is analogous to the complete state held by the handlebars.js module, including registered helpers and partials.
In the general case, handlebars.js provides a global Handlebars environment where helpers and partials are registered:
{.js}
let template = Handlebars.compile("{{foo}}");
let result = template({foo: "bar"});
but also provides a way to create a new isolated environment with its own helpers and partials:
{.js}
let OtherHandlebars = Handlebars.create();
let template = OtherHandlebars.compile("{{foo}}");
let result = template({foo: "bar"});
In this implementation, however, there's no global environment. A new environment needs to be created explicitly be instantiating this class:
{.cpp}
Handlebars env;
dom::Object context;
context["foo"] = "bar";
std::string result = env.render("{{ foo }}", context);
assert(result == "bar");
A handlebars template can be rendered using the context data provided as a dom::Value, which is usually a dom::Object at the first level when calling render.
In the most general case, the result can returned as a string or rendered directly to a buffer or stream. The render function provides an overload that allows the caller to provide an output stream where the template will be rendered directly without allocating a string:
{.cpp}
Handlebars env;
dom::Object context;
context["foo"] = "bar";
env.render_to(std::cout, "{{ foo }}", context);
// prints "bar" to stdout
{.cpp}
Handlebars env;
dom::Object context;
context["foo"] = "bar";
std::string result;
env.render_to(result, "{{ foo }}", context);
assert(result == "bar");
Design considerations:
The following notes include some design considerations for the current implementation of this class. These are intended to describe the current state of the class rather than to provide the final specification of the class behavior.
Compiled templates:
Unlike handlebars.js, this implementation renders the template directly to the output stream, without requiring an intermediary object to store a representation of the compiled template (Handlebars.precompile) or an intermediary callable object required to ultimately render the template (Handlebars.precompile).
The rationale is that there is not much benefit in pre-compiling templates in C++, since both iterating the input string and a pre-compiled template would have very similar costs even in optimal implementations of the compiled template.
The most significant benefit of pre-compiling templates in C++ would be the faster identification of the ends of blocks, which would allow the engine iterate the block only once. For this reason, compiled templates will still be considered in a future version of this sub-library.
Also note that compiled templates cannot avoid exceptions, because a compiled template can still invoke a helper that throws exceptions and evaluate dynamic expressions that cannot be identified during the first pass.
Incremental rendering and compilation:
Although this is not supported by handlebars.js, it's common for C++ template engines to support incremental rendering, where the template is compiled or rendered in chunks as it is parsed. This implementation does not yet support this feature.
This is useful for streaming templates, where the template is rendered to a stream as it is parsed, without requiring the entire template to be parsed and compiled before rendering starts.
There are two types of incremental rendering and compilation supported by this implementation:
Incremental rendering of a partial template input to a stream
Incremental rendering into an output buffer of fixed size
In each of these cases, the template is rendered in chunks until the end of the partial template is reached or the output buffer is full.
In a scenario with compiled templates, the complexity of incremental rendering needs to be implemented for both compilation and rendering.
The main difficulty to implement incremental rendering for handlebars.js is that helpers can be invoked from anywhere in the template, and most content is actually rendered by helpers. This means that helpers would need to be able to interoperate with whatever mechanism is designed to support suspension in this recursive-coroutine-like interface.
Error propagation:
The main logic to render a template is implemented in the render function, does not throws by itself. How identifying the next tag in a template string, the algorithms uses a loose implementation where unclosed tags are rendered as-is instead of throwing errors.
However, helpers are allowed to throw exceptions to propagate errors, so the render function is not noexcept.
For this reason, exceptions thrown by helpers are in fact exceptional conditions that should be handled by the caller. In general, exceptions can be avoided completely by not throwing exceptions from helpers.
| Name | Description |
|---|---|
Tag | Internal representation of a parsed Handlebars tag. |
| Name | Description |
|---|---|
Handlebars [constructor] | Construct a handlebars environment |
registerHelper | Register a helper accessible by any template in the environment. |
registerLogger | Register a logger |
registerPartial | Register a partial |
render | Render a handlebars template |
render_to | Render a handlebars template |
try_render | Render a handlebars template |
try_render_to | Render a handlebars template |
unregisterHelper | Unregister a helper |
unregisterPartial | Unregister a partial |
| Name | Description |
|---|---|
helpers::registerAntoraHelpers | Register all the Antora helpers into a Handlebars instance |
helpers::registerBuiltinHelpers | Register all the built-in helpers into a Handlebars instance |
helpers::registerConstructorHelpers | Register contructor helpers into a Handlebars instance |
helpers::registerContainerHelpers | Register helpers to manipulate composite data types |
helpers::registerLogicalHelpers | Register logical helpers into a Handlebars instance |
helpers::registerMathHelpers | Register math helpers into a Handlebars instance |
helpers::registerStringHelpers | Register string helpers into a Handlebars instance |
helpers::registerTypeHelpers | Register type helpers into a Handlebars instance |
js::registerHelper | Register a JavaScript helper function |
lua::registerHelper | Register a Lua helper function |
https://handlebarsjs.com/
Internal representation of a parsed Handlebars tag.
Declared in <mrdocs/Support/Handlebars.hpp>
struct Tag;
Construct a handlebars environment
Declared in <mrdocs/Support/Handlebars.hpp>
Handlebars();
This constructor creates a new handlebars environment with the built-in helpers and default logger.
Each environment has its own helpers and partials. Multiple environments are only necessary for use cases that demand distinct helpers or partials.
helpers::registerBuiltinHelpers
Register a helper accessible by any template in the environment.
Declared in <mrdocs/Support/Handlebars.hpp>
void
registerHelper(
std::string_view name,
dom::Function const& helper);
The helper type is a type erased function of type dom::Function, which receives the resolved template arguments as parameters as a dom::Value for each parameter.
The helper function also receives an object populated with variables that are accessible in the current context as its N+1-th parameter. This object contains information about the current context and is useful for helpers that want to change the current context or render internal blocks.
As all instances of dom::Function, the helper should also return a dom::Value. If the function semantics does not require a return value, the function should return a dom::Value of type dom::Kind::Undefined.
When the helper is used in an subexpression, the dom::Value return value is used as the intermediary result. When the helper is used in a block or a final expression, the dom::Value return value will be formatted to the output.
| Name | Description |
|---|---|
| name | The name of the helper in the handlebars template |
| helper | The helper function |
https://handlebarsjs.com/guide/expressions.html
https://handlebarsjs.com/guide/block-helpers.html
https://handlebarsjs.com/guide/builtin-helpers.html
Register a logger
This function registers a logger with the handlebars environment. A logger is a function that is called from the built-in "log" helper function.
The logger can also be called from any helper through the HandlebarsCallback parameter.
The logger function is called with a dom::Value indicating the current level and a dom::Array containing values to be logged.
| Name | Description |
|---|---|
| fn | The logger function |
Register a partial
Declared in <mrdocs/Support/Handlebars.hpp>
void
registerPartial(
std::string_view name,
std::string_view text);
This function registers a partial with the handlebars environment.
A partial is a template that can be referenced from another template. The partial is rendered in the context of the template that references it.
For instance, a partial can be used to render a header or footer that is common to several pages. It can also be used to render a list of items that is used in several places.
The following example template uses the partial item to render a list of items:
{.handlebars}
<ul>
{{#each items}}
{{> item}}
{{/each}}
</ul>
| Name | Description |
|---|---|
| name | The name of the partial |
| text | The content of the partial |
https://handlebarsjs.com/guide/partials.html
Render a handlebars template
Declared in <mrdocs/Support/Handlebars.hpp>
std::string
render(std::string_view templateText) const;
» more...
std::string
render(
std::string_view templateText,
dom::Value const& context) const;
» more...
Render a handlebars template
std::string
render(
std::string_view templateText,
dom::Value const& context,
HandlebarsOptions const& options) const;
» more...
The rendered text
| Name | Description |
|---|---|
| templateText | The handlebars template text |
| context | The data to render |
| options | The options to use |
Declared in <mrdocs/Support/Handlebars.hpp>
std::string
render(std::string_view templateText) const;
Declared in <mrdocs/Support/Handlebars.hpp>
std::string
render(
std::string_view templateText,
dom::Value const& context) const;
Render a handlebars template
Declared in <mrdocs/Support/Handlebars.hpp>
std::string
render(
std::string_view templateText,
dom::Value const& context,
HandlebarsOptions const& options) const;
This function renders the specified handlebars template and returns the result as a string.
The context data to render is passed as a dom::Value, which is usually a dom::Object at the first level. When the context is not an object, it is accessed from the handlebars template with the this keyword.
The rendered text
| Name | Description |
|---|---|
| templateText | The handlebars template text |
| context | The data to render |
| options | The options to use |
Render a handlebars template
Declared in <mrdocs/Support/Handlebars.hpp>
void
render_to(
OutputRef& out,
std::string_view templateText) const;
» more...
void
render_to(
OutputRef& out,
std::string_view templateText,
dom::Value const& context) const;
» more...
Render a handlebars template
void
render_to(
OutputRef& out,
std::string_view templateText,
dom::Value const& context,
HandlebarsOptions const& options) const;
» more...
The rendered text
| Name | Description |
|---|---|
| out | The output stream reference |
| templateText | The handlebars template text |
| context | The data to render |
| options | The options to use |
Declared in <mrdocs/Support/Handlebars.hpp>
void
render_to(
OutputRef& out,
std::string_view templateText) const;
Declared in <mrdocs/Support/Handlebars.hpp>
void
render_to(
OutputRef& out,
std::string_view templateText,
dom::Value const& context) const;
Render a handlebars template
Declared in <mrdocs/Support/Handlebars.hpp>
void
render_to(
OutputRef& out,
std::string_view templateText,
dom::Value const& context,
HandlebarsOptions const& options) const;
This function renders the specified handlebars template and writes the result to the specified output stream.
The output stream can be any type convertible to OutputRef, which is a reference to a stream that can be written to with the << operator.
The rendered text
| Name | Description |
|---|---|
| out | The output stream reference |
| templateText | The handlebars template text |
| context | The data to render |
| options | The options to use |
Render a handlebars template
Declared in <mrdocs/Support/Handlebars.hpp>
Expected<std::string, HandlebarsError>
try_render(std::string_view templateText) const;
» more...
Expected<std::string, HandlebarsError>
try_render(
std::string_view templateText,
dom::Value const& context) const;
» more...
Render a handlebars template
Expected<std::string, HandlebarsError>
try_render(
std::string_view templateText,
dom::Value const& context,
HandlebarsOptions const& options) const;
» more...
The rendered text
| Name | Description |
|---|---|
| templateText | The handlebars template text |
| context | The data to render |
| options | The options to use |
Declared in <mrdocs/Support/Handlebars.hpp>
Expected<std::string, HandlebarsError>
try_render(std::string_view templateText) const;
Declared in <mrdocs/Support/Handlebars.hpp>
Expected<std::string, HandlebarsError>
try_render(
std::string_view templateText,
dom::Value const& context) const;
Render a handlebars template
Declared in <mrdocs/Support/Handlebars.hpp>
Expected<std::string, HandlebarsError>
try_render(
std::string_view templateText,
dom::Value const& context,
HandlebarsOptions const& options) const;
This function renders the specified handlebars template and writes the result to the specified output stream.
The output stream can be any type convertible to OutputRef, which is a reference to a stream that can be written to with the << operator.
The rendered text
| Name | Description |
|---|---|
| templateText | The handlebars template text |
| context | The data to render |
| options | The options to use |
Render a handlebars template
Declared in <mrdocs/Support/Handlebars.hpp>
Expected<void, HandlebarsError>
try_render_to(
OutputRef& out,
std::string_view templateText) const;
» more...
Expected<void, HandlebarsError>
try_render_to(
OutputRef& out,
std::string_view templateText,
dom::Value const& context) const;
» more...
Render a handlebars template
Expected<void, HandlebarsError>
try_render_to(
OutputRef& out,
std::string_view templateText,
dom::Value const& context,
HandlebarsOptions const& options) const;
» more...
The rendered text
| Name | Description |
|---|---|
| out | The output stream reference |
| templateText | The handlebars template text |
| context | The data to render |
| options | The options to use |
Declared in <mrdocs/Support/Handlebars.hpp>
Expected<void, HandlebarsError>
try_render_to(
OutputRef& out,
std::string_view templateText) const;
Declared in <mrdocs/Support/Handlebars.hpp>
Expected<void, HandlebarsError>
try_render_to(
OutputRef& out,
std::string_view templateText,
dom::Value const& context) const;
Render a handlebars template
Declared in <mrdocs/Support/Handlebars.hpp>
Expected<void, HandlebarsError>
try_render_to(
OutputRef& out,
std::string_view templateText,
dom::Value const& context,
HandlebarsOptions const& options) const;
This function renders the specified handlebars template and writes the result to the specified output stream.
The output stream can be any type convertible to OutputRef, which is a reference to a stream that can be written to with the << operator.
The rendered text
| Name | Description |
|---|---|
| out | The output stream reference |
| templateText | The handlebars template text |
| context | The data to render |
| options | The options to use |
Unregister a helper
Declared in <mrdocs/Support/Handlebars.hpp>
void
unregisterHelper(std::string_view name);
This function unregisters a helper with the handlebars environment.
| Name | Description |
|---|---|
| name | The name of the helper |
Unregister a partial
Declared in <mrdocs/Support/Handlebars.hpp>
void
unregisterPartial(std::string_view name);
This function unregisters a partial with the handlebars environment.
| Name | Description |
|---|---|
| name | The name of the partial |
An error thrown or returned by Handlebars
Declared in <mrdocs/Support/Handlebars.hpp>
struct HandlebarsError
: std::runtime_error
An error returned or thrown by Handlebars environment when an error occurs during template rendering.
The error message will be the same as the error message returned by Handlebars.js.
The object will also contain the line, column and position of the error in the template. These can be used to by the caller to provide more detailed error messages.
| Name | Description |
|---|---|
std::runtime_error | One of two subclasses of exception. |
| Name | Description |
|---|---|
HandlebarsError [constructor] | Constructors |
operator= | Assignment operators |
what [virtual] | Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor). |
| Name | Description |
|---|---|
column | Column of the error in the template. |
line | Line number in the template where the error occurred. |
pos | Absolute character position of the error. |
Constructors
Declared in <mrdocs/Support/Handlebars.hpp>
Construct an error with a message.
HandlebarsError(std::string_view msg);
» more...
Construct an error with location information.
HandlebarsError(
std::string_view msg,
std::size_t line_,
std::size_t column_,
std::size_t pos_);
» more...
| Name | Description |
|---|---|
| msg | Description of the failure. |
| line_ | Line number where it occurred. |
| column_ | Column number where it occurred. |
| pos_ | Absolute character position. |
Construct an error with a message.
Declared in <mrdocs/Support/Handlebars.hpp>
HandlebarsError(std::string_view msg);
| Name | Description |
|---|---|
| msg | Description of the failure. |
Construct an error with location information.
Declared in <mrdocs/Support/Handlebars.hpp>
HandlebarsError(
std::string_view msg,
std::size_t line_,
std::size_t column_,
std::size_t pos_);
| Name | Description |
|---|---|
| msg | Description of the failure. |
| line_ | Line number where it occurred. |
| column_ | Column number where it occurred. |
| pos_ | Absolute character position. |
Assignment operators
Assignment operator
Declared in <stdexcept>
runtime_error&
operator=(runtime_error const& value) noexcept;
One of two subclasses of exception.
| Name | Description |
|---|---|
| value | The object to copy assign from |
Assignment operator
Declared in <stdexcept>
runtime_error&
operator=(runtime_error&& value) noexcept;
One of two subclasses of exception.
| Name | Description |
|---|---|
| value | The object to move assign from |
Returns a C-style character string describing the general cause of the current error (the same string passed to the ctor).
Declared in <stdexcept>
virtual
char const*
what() const noexcept;
Column of the error in the template.
Declared in <mrdocs/Support/Handlebars.hpp>
std::size_t column = static_cast<std::size_t>(-1);
Line number in the template where the error occurred.
Declared in <mrdocs/Support/Handlebars.hpp>
std::size_t line = static_cast<std::size_t>(-1);
Absolute character position of the error.
Declared in <mrdocs/Support/Handlebars.hpp>
std::size_t pos = static_cast<std::size_t>(-1);
Options for handlebars
Declared in <mrdocs/Support/Handlebars.hpp>
struct HandlebarsOptions;
This struct is analogous to the Handlebars.compile options.
| Name | Description |
|---|---|
assumeObjects | Removes object existence checks when traversing paths |
compat | Enable recursive field lookup |
data | Custom private data object |
escapeFunction | Function to escape entities |
explicitPartialContext | Disables implicit context for partials |
ignoreStandalone | Disables standalone tag removal when set to true |
noEscape | Escape HTML entities or entities defined by the escape function |
preventIndent | Disable the auto-indent feature |
strict | Templates will throw rather than ignore missing fields |
trackIds | Enable tracking of ids |
https://handlebarsjs.com/api-reference/compilation.html
Removes object existence checks when traversing paths
Declared in <mrdocs/Support/Handlebars.hpp>
bool assumeObjects = false;
This is a subset of strict mode that generates optimized templates when the data inputs are known to be safe.
Enable recursive field lookup
Declared in <mrdocs/Support/Handlebars.hpp>
bool compat = false;
When enabled, fields will be looked up recursively in objects and arrays.
This mode should be used to enable complete compatibility with Mustache templates.
Custom private data object
This variable can be used to pass in an object to define custom private variables.
Function to escape entities
Declared in <mrdocs/Support/Handlebars.hpp>
std::function<void(OutputRef&, std::string_view)> escapeFunction = static_cast<void(*)(OutputRef&, std::string_view)>(HTMLEscape);
It's initialized with a reference to the HTMLEscape function overload that takes an OutputRef and a string_view. This function can be replaced with a custom function that escapes entities in a different way.
Disables implicit context for partials
Declared in <mrdocs/Support/Handlebars.hpp>
bool explicitPartialContext = false;
When enabled, partials that are not passed a context value will execute against an empty object.
Disables standalone tag removal when set to true
Declared in <mrdocs/Support/Handlebars.hpp>
bool ignoreStandalone = false;
By default, Handlebars removes whitespace around block and partial expressions. For instance, the partial:
{.handlebars}
A
and the template:
{.handlebars}
<div>
{{> partial}}
</div>
will render as:
{.html}
<div>
A</div>
because the whitespace up to the newline after the partial is removed.
A double newline is required to ensure that the whitespace is not removed. For instance, the template:
{.handlebars}
<div>
{{> partial}}
</div>
will render as:
{.html}
<div>
A
</div>
This can be disabled by setting this option to true.
When set, blocks and partials that are on their own line will not remove the whitespace on that line.
Escape HTML entities or entities defined by the escape function
Declared in <mrdocs/Support/Handlebars.hpp>
bool noEscape = false;
Disable the auto-indent feature
Declared in <mrdocs/Support/Handlebars.hpp>
bool preventIndent = false;
By default, an indented partial-call causes the output of the whole partial being indented by the same amount.
For instance, the partial:
{.handlebars}
A
B
C
and the template:
{.handlebars}
<div>
{{> partial}}
</div>
will render as:
{.html}
<div>
A
B
C
</div>
because the partial is indented by the same amount as the partial call.
This can be disabled by setting this option to true. In this case, the partial above would be rendered as:
{.html}
<div>
A
B
C
</div>
Templates will throw rather than ignore missing fields
Declared in <mrdocs/Support/Handlebars.hpp>
bool strict = false;
Run in strict mode. In this mode, templates will throw rather than silently ignore missing fields.
Enable tracking of ids
Declared in <mrdocs/Support/Handlebars.hpp>
bool trackIds = false;
When enabled, the ids of the expressions are tracked and passed to the helpers.
Helpers often use this information to update the context path to the current expression, which can later be used to look up the value of the expression with ".." segments.
Represents an identifier
This class is used to represent an identifier that could be in the corpus or not.
When the symbol is in the corpus, the id field will be set to the symbol ID of the symbol.
When the symbol is not in the corpus, the id field will be set to SymbolID::invalid.
| Name | Description |
|---|---|
Name | Represents a name for a named Type |
| Name | Description |
|---|---|
IdentifierName [constructor] | Default-construct an identifier with kind Identifier. |
asName | asName overloads |
operator== | Equality compares all fields. |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
Identifier | The unqualified name. |
Kind | The kind of name this is. |
Prefix | The parent name info, if any. |
id | The SymbolID of the named symbol, if it exists. |
| Name | Description |
|---|---|
toString | Convert the name to a human-readable string. |
Default-construct an identifier with kind Identifier.
Declared in <mrdocs/Metadata/Name/IdentifierName.hpp>
constexpr
IdentifierName() noexcept;
Three-way comparison operators
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
Compare identifiers by their base name state.
auto
operator<=>(IdentifierName const& other) const;
» more...
Order names by kind, identifier, id, and prefix.
std::strong_ordering
operator<=>(Name const& other) const;
» more...
Compare identifiers by their base name state.
Declared in <mrdocs/Metadata/Name/IdentifierName.hpp>
auto
operator<=>(IdentifierName const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Order names by kind, identifier, id, and prefix.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
std::strong_ordering
operator<=>(Name const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
An lvalue reference type.
Declared in <mrdocs/Metadata/Type/LValueReferenceType.hpp>
struct LValueReferenceType final
: TypeCommonBase<TypeKind::LValueReference>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::LValueReference> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
PointeeType | The referenced type. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
The referenced type.
Declared in <mrdocs/Metadata/Type/LValueReferenceType.hpp>
Polymorphic<Type> PointeeType = Polymorphic<Type>(AutoType{});
Source location of a symbol or entity.
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
struct Location;
| Name | Description |
|---|---|
Location [constructor] | Construct a location with optional fields. |
| Name | Description |
|---|---|
ColumnNumber | Column number within the line |
Documented | Whether this location has documentation. |
FullPath | The full file path |
LineNumber | Line number within the file |
ShortPath | The file path relative to one of the search directories |
SourcePath | The file path relative to the source-root directory |
| Name | Description |
|---|---|
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
getPrimaryLocation | Choose the best location to display for a symbol. |
Construct a location with optional fields.
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
constexpr
Location(
std::string_view const full_path = {},
std::string_view const short_path = {},
std::string_view const source_path = {},
unsigned int const line = 0,
unsigned int const col = 0,
bool const documented = false);
| Name | Description |
|---|---|
| full_path | Absolute path to the file on disk. |
| short_path | Repository- or search-root relative path, may be empty. |
| source_path | Path relative to the documented source root. |
| line | Line number within the file. |
| col | Column number within the line. |
| documented | Whether the location already carries user documentation. |
Column number within the line
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
unsigned int ColumnNumber = 0;
Whether this location has documentation.
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
bool Documented = false;
The full file path
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
std::string FullPath;
Line number within the file
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
unsigned int LineNumber = 0;
The file path relative to one of the search directories
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
std::string ShortPath;
The file path relative to the source-root directory
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
std::string SourcePath;
Pointer-to-member type (object or function).
Declared in <mrdocs/Metadata/Type/MemberPointerType.hpp>
struct MemberPointerType final
: TypeCommonBase<TypeKind::MemberPointer>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::MemberPointer> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
ParentType | Containing class type. |
PointeeType | Pointee type being referenced. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
Containing class type.
Declared in <mrdocs/Metadata/Type/MemberPointerType.hpp>
Polymorphic<Type> ParentType = Polymorphic<Type>(AutoType{});
Pointee type being referenced.
Declared in <mrdocs/Metadata/Type/MemberPointerType.hpp>
Polymorphic<Type> PointeeType = Polymorphic<Type>(AutoType{});
Represents a name for a named Type
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
struct Name;
When the Type is a named type, this class represents the name of the type.
It also includes the symbol ID of the named type, so that it can be referenced in the documentation.
This allows the Type to store either a Name or a SpecializationName, which contains the arguments for a template specialization without requiring the application to extract an unnecessary symbol.
| Name | Description |
|---|---|
~Name [destructor] [virtual] | Virtual destructor for polymorphic cleanup. |
asName | asName overloads |
operator== | Equality compares all fields. |
operator<=> | Order names by kind, identifier, id, and prefix. |
| Name | Description |
|---|---|
Identifier | The unqualified name. |
Kind | The kind of name this is. |
Prefix | The parent name info, if any. |
id | The SymbolID of the named symbol, if it exists. |
| Name | Description |
|---|---|
Name [constructor] | Constructors |
| Name | Description |
|---|---|
toString | Convert the name to a human-readable string. |
| Name | Description |
|---|---|
IdentifierName | Represents an identifier |
SpecializationName | Represents a (possibly qualified) symbol name with template arguments. |
Virtual destructor for polymorphic cleanup.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
constexpr
virtual
~Name() = default;
asName overloads
View as a const Name reference.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
constexpr
Name const&
asName() const noexcept;
Represents a name for a named Type
View as a mutable Name reference.
Represents a name for a named Type
Equality compares all fields.
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| other | The right operand |
Order names by kind, identifier, id, and prefix.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
std::strong_ordering
operator<=>(Name const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
The unqualified name.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
std::string Identifier;
The kind of name this is.
The parent name info, if any.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
Optional<Polymorphic<Name>> Prefix = std::nullopt;
This recursively includes information about the parent, such as the symbol ID and potentially template arguments, when the parent is a SpecializationName.
This is particularly useful because the parent of id could be a primary template. In this case, the Prefix will contain this primary template information and the template arguments.
The SymbolID of the named symbol, if it exists.
Constructors
Construct an identifier name.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
constexpr
Name() noexcept;
Construct with an explicit name kind.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
constexpr
explicit
Name(NameKind const kind) noexcept;
| Name | Description |
|---|---|
| kind | The object to construct from |
A type identified by name (possibly fundamental).
Declared in <mrdocs/Metadata/Type/NamedType.hpp>
struct NamedType final
: TypeCommonBase<TypeKind::Named>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::Named> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
FundamentalType | Fundamental kind if this named type is a built-in. |
Name | The name of the type (identifier or specialization). |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
Fundamental kind if this named type is a built-in.
Declared in <mrdocs/Metadata/Type/NamedType.hpp>
Optional<FundamentalTypeKind> FundamentalType;
The name of the type (identifier or specialization).
Declared in <mrdocs/Metadata/Type/NamedType.hpp>
Polymorphic<Name> Name = Polymorphic<struct Name>(std::in_place_type<IdentifierName>);
Info for namespace aliases.
Declared in <mrdocs/Metadata/Symbol/NamespaceAlias.hpp>
struct NamespaceAliasSymbol final
: SymbolCommonBase<SymbolKind::NamespaceAlias>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::NamespaceAlias> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
NamespaceAliasSymbol [constructor] | Create an alias symbol bound to an ID. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
AliasedSymbol | The aliased symbol. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Create an alias symbol bound to an ID.
Declared in <mrdocs/Metadata/Symbol/NamespaceAlias.hpp>
explicit
NamespaceAliasSymbol(SymbolID const& ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to copy construct from |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
The aliased symbol.
This is another namespace that might or might not be in the same project.
Describes a namespace and its members.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
struct NamespaceSymbol final
: SymbolCommonBase<SymbolKind::Namespace>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Namespace> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
NamespaceSymbol [constructor] | Create a namespace symbol bound to an ID. |
operator<=> | Compare namespaces by attributes and member lists. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
IsAnonymous | Whether this represents an unnamed namespace. |
IsInline | Whether this declaration is inline. |
Members | The members of this namespace. |
UsingDirectives | Namespaces nominated by using-directives. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
allMembers | View all members of the namespace across tranches. |
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Create a namespace symbol bound to an ID.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
explicit
NamespaceSymbol(SymbolID const& ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to copy construct from |
Compare namespaces by attributes and member lists.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::strong_ordering
operator<=>(NamespaceSymbol const& rhs) const;
The relative order of the objects
| Name | Description |
|---|---|
| rhs | The right operand |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
Whether this represents an unnamed namespace.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
bool IsAnonymous = false;
Whether this declaration is inline.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
bool IsInline = false;
The members of this namespace.
Namespaces nominated by using-directives.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<Name> UsingDirectives;
Buckets the members that appear inside a namespace.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
struct NamespaceTranche;
| Name | Description |
|---|---|
Concepts | Concepts. |
Enums | Enumerations. |
Functions | Functions and overload sets. |
Guides | Deduction guides. |
NamespaceAliases | Namespace aliases declared here. |
Namespaces | Nested namespaces. |
Records | Record types (classes/structs). |
Typedefs | Typedef or using declarations. |
Usings | Using-declarations that introduce members. |
Variables | Variables. |
| Name | Description |
|---|---|
allMembers | Join all tranche member lists into a single view. |
Concepts.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Concepts;
Enumerations.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Enums;
Functions and overload sets.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Functions;
Deduction guides.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Guides;
Namespace aliases declared here.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> NamespaceAliases;
Nested namespaces.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Namespaces;
Record types (classes/structs).
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Records;
Typedef or using declarations.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Typedefs;
Using-declarations that introduce members.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Usings;
Variables.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
std::vector<SymbolID> Variables;
Captures a noexcept specification and its evaluated form.
Declared in <mrdocs/Metadata/Specifiers/NoexceptInfo.hpp>
struct NoexceptInfo;
| Name | Description |
|---|---|
operator<=> | Compare noexcept-specifier info. |
| Name | Description |
|---|---|
Implicit | Whether a noexcept-specifier was user-written. |
Kind | The evaluated exception specification. |
Operand | The operand of the noexcept-specifier, if any. |
| Name | Description |
|---|---|
toString | Convert NoexceptInfo to a string. |
Compare noexcept-specifier info.
Declared in <mrdocs/Metadata/Specifiers/NoexceptInfo.hpp>
constexpr
auto
operator<=>(NoexceptInfo const& rhs) const = default;
The relative order of the objects
| Name | Description |
|---|---|
| rhs | The right operand |
Whether a noexcept-specifier was user-written.
Declared in <mrdocs/Metadata/Specifiers/NoexceptInfo.hpp>
bool Implicit = true;
The evaluated exception specification.
Declared in <mrdocs/Metadata/Specifiers/NoexceptInfo.hpp>
NoexceptKind Kind = NoexceptKind::False;
The operand of the noexcept-specifier, if any.
Declared in <mrdocs/Metadata/Specifiers/NoexceptInfo.hpp>
std::string Operand;
A compact optional that automatically uses nullable_traits<T> when available.
Declared in <mrdocs/ADT/Optional.hpp>
template<class T>
class Optional;
Design
If nullable_traits<T> exists, the null state is encoded inside T (via sentinel or clearable-empty semantics). Storage is exactly one T.
Otherwise, this falls back to std::optional<T> and uses its discriminator.
This single implementation uses a conditional storage type plus if constexpr on has_nullable_traits_v<T> to select the appropriate behavior at compile time.
| Name | Description |
|---|---|
value_type | Value type stored by this Optional. |
| Name | Description |
|---|---|
Optional [constructor] | Constructors |
operator= | Assignment operators |
emplace | In-place construct a new value, replacing any existing one. |
has_value | True if engaged (contains a value). |
operator* | Dereference-like access. |
operator-> | Pointer-like access. |
reset | Reset to the null state. * |
value | Value access. Preconditions: has_value() is true. |
operator bool | Contextual bool. |
| Name | Description |
|---|---|
is_inlined | Determine if the value is inlined via nullable traits. |
| Name | Description |
|---|---|
getOperatorReadableName | Return the human-readable name of the operator |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
getPrimaryLocation | Choose the best location to display for a symbol. |
innerType | Return the inner type. |
innerType | Return the inner type. |
operator!= | Compares an Optional to a value for inequality. Returns true if the Optional is disengaged or its value does not equal rhs. |
operator!= | Compares two Optional values for inequality. Returns true if their engagement states differ or their contained values are not equal. |
operator< | Checks if the Optional is less than a value. Returns true if the Optional is disengaged or its value is less than rhs. |
operator< | Checks if the left Optional is less than the right Optional. Returns true if the right is engaged and either the left is disengaged or its value is less. |
operator<= | Checks if the Optional is less than or equal to a value. Returns true if the Optional is disengaged or its value is less than or equal to rhs. |
operator<= | Checks if the left Optional is less than or equal to the right Optional. Returns true if the left is disengaged or the right is engaged and the left's value is less or equal. |
operator<=> | Performs a three-way comparison between an Optional and a value. If the Optional is engaged, compares its value to v; otherwise, returns less. |
operator<=> | Performs a three-way comparison between two Optional values. If both are engaged, compares their contained values; otherwise, compares engagement state. |
operator<=> | Performs a three-way comparison between an Optional and std::nullopt. Returns std::strong_ordering::greater if engaged, std::strong_ordering::equal if disengaged. |
operator== | Compares two Optional values for equality. Returns true if both are engaged and their contained values are equal, or both are disengaged. |
operator== | Compares an engaged Optional to a value for equality. Returns true if the Optional is engaged and its value equals rhs. |
operator== | Checks if the Optional is disengaged (equal to std::nullopt). Returns true if the Optional does not contain a value. |
operator> | Checks if the Optional is greater than a value. Returns true if the Optional is engaged and its value is greater than rhs. |
operator> | Checks if the left Optional is greater than the right Optional. Returns true if the left is engaged and either the right is disengaged or its value is greater. |
operator>= | Checks if the left Optional is greater than or equal to the right Optional. Returns true if the right is disengaged or the left is engaged and its value is greater or equal. |
operator>= | Checks if the Optional is greater than or equal to a value. Returns true if the Optional is engaged and its value is greater than or equal to rhs. |
swap | Swap two Optional references. |
dom::stringOrNull | Return a non-empty string, or a null. |
Value type stored by this Optional.
Declared in <mrdocs/ADT/Optional.hpp>
using value_type = T;
Constructors
Declared in <mrdocs/ADT/Optional.hpp>
Default-constructs to the “null” state.
constexpr
Optional() noexcept(default_ctor_noex_());
» more...
Copy constructor
constexpr
Optional(Optional const& other) = default;
» more...
Construct from another Optional with a convertible contained value.
template<typename U>
requires (!std::is_same_v<T, U>) && std::is_constructible_v<T, U const&>
&& ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<const U &, T>)
Optional(Optional<U> const& t) noexcept(std::is_nothrow_constructible_v<T, const U &>);
» more...
Move constructor
constexpr
Optional(Optional&& other) = default;
» more...
Construct from another Optional rvalue with a convertible value.
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, U> && ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Optional(Optional<U>&& t) noexcept(std::is_nothrow_constructible_v<T, U>);
» more...
Construct from std::nullopt
constexpr
Optional(std::nullopt_t value) noexcept(default_ctor_noex_());
» more...
Construct from std::optional lvalue with convertible value.
template<typename U>
requires std::is_constructible_v<T, U const&> &&
ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<const U &, T>)
Optional(std::optional<U> const& t) noexcept(std::is_nothrow_constructible_v<T, const U &>);
» more...
Construct from a value.
template<typename U = std::remove_cv_t<T>>
requires (!std::is_same_v<Optional, std::remove_cvref_t<U>>)
&& (!std::is_same_v<std::in_place_t, std::remove_cvref_t<U>>)
&& std::is_constructible_v<T, U>
&& NotConstructingBoolFromOptional<U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Optional(U&& u) noexcept(std::is_nothrow_constructible_v<T, U>);
» more...
Construct from std::optional rvalue with convertible value.
template<typename U>
requires std::is_constructible_v<T, U> &&
ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Optional(std::optional<U>&& t) noexcept(std::is_nothrow_constructible_v<T, U>);
» more...
In-place construct the contained value.
template<typename... Args>
requires std::is_constructible_v<T, Args...>
constexpr
explicit
Optional(
std::in_place_t,
Args&&... args) noexcept(std::is_nothrow_constructible_v<T, Args...>);
» more...
In-place construct the contained value from an initializer list.
template<
typename U,
typename... Args>
requires std::is_constructible_v<T, std::initializer_list<U>&, Args...>
constexpr
explicit
Optional(
std::in_place_t,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<T, std::initializer_list<U> &, Args...>);
» more...
| Name | Description |
|---|---|
| t | Source optional. |
| u | The value to store. It must be convertible to T. |
| args | Arguments forwarded to T's constructor. |
| il | Initializer list forwarded to T's constructor. |
Default-constructs to the “null” state.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional() noexcept(default_ctor_noex_());
Copy constructor
| Name | Description |
|---|---|
| other | The object to copy construct from |
Construct from another Optional with a convertible contained value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U>
requires (!std::is_same_v<T, U>) && std::is_constructible_v<T, U const&>
&& ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<const U &, T>)
Optional(Optional<U> const& t) noexcept(std::is_nothrow_constructible_v<T, const U &>);
| Name | Description |
|---|---|
| t | Source optional. |
Move constructor
| Name | Description |
|---|---|
| other | The object to move construct from |
Construct from another Optional rvalue with a convertible value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, U> && ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Optional(Optional<U>&& t) noexcept(std::is_nothrow_constructible_v<T, U>);
| Name | Description |
|---|---|
| t | Source optional. |
Construct from std::nullopt
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional(std::nullopt_t value) noexcept(default_ctor_noex_());
| Name | Description |
|---|---|
| value | The object to construct from |
Construct from std::optional lvalue with convertible value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U>
requires std::is_constructible_v<T, U const&> &&
ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<const U &, T>)
Optional(std::optional<U> const& t) noexcept(std::is_nothrow_constructible_v<T, const U &>);
| Name | Description |
|---|---|
| t | Source optional. |
Construct from a value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U = std::remove_cv_t<T>>
requires (!std::is_same_v<Optional, std::remove_cvref_t<U>>)
&& (!std::is_same_v<std::in_place_t, std::remove_cvref_t<U>>)
&& std::is_constructible_v<T, U>
&& NotConstructingBoolFromOptional<U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Optional(U&& u) noexcept(std::is_nothrow_constructible_v<T, U>);
| Name | Description |
|---|---|
| u | The value to store. It must be convertible to T. |
Construct from std::optional rvalue with convertible value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U>
requires std::is_constructible_v<T, U> &&
ConstructFromContainedValue<U>
constexpr
explicit(!std::is_convertible_v<U, T>)
Optional(std::optional<U>&& t) noexcept(std::is_nothrow_constructible_v<T, U>);
| Name | Description |
|---|---|
| t | Source optional. |
In-place construct the contained value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename... Args>
requires std::is_constructible_v<T, Args...>
constexpr
explicit
Optional(
std::in_place_t,
Args&&... args) noexcept(std::is_nothrow_constructible_v<T, Args...>);
| Name | Description |
|---|---|
| args | Arguments forwarded to T's constructor. |
In-place construct the contained value from an initializer list.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename U,
typename... Args>
requires std::is_constructible_v<T, std::initializer_list<U>&, Args...>
constexpr
explicit
Optional(
std::in_place_t,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<T, std::initializer_list<U> &, Args...>);
| Name | Description |
|---|---|
| il | Initializer list forwarded to T's constructor. |
| args | Additional arguments forwarded to T's constructor. |
Assignment operators
Declared in <mrdocs/ADT/Optional.hpp>
Copy assignment.
constexpr
Optional&
operator=(Optional const& other) = default;
» more...
Assign from another Optional with convertible contained value.
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, const U&>
&& std::is_assignable_v<T&, const U&>
&& (!detail::ConvertsFromOptional<T, U>::value)
&& (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(Optional<U> const& u) noexcept(std::is_nothrow_constructible_v<T, const U &> && std::is_nothrow_assignable_v<T &, const U &>);
» more...
Move assignment.
constexpr
Optional&
operator=(Optional&& other) = default;
» more...
Assign from another Optional rvalue with convertible contained value.
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, U>
&& std::is_assignable_v<T&, U>
&& (!detail::ConvertsFromOptional<T, U>::value)
&& (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(Optional<U>&& u) noexcept(std::is_nothrow_constructible_v<T, U> && std::is_nothrow_assignable_v<T &, U>);
» more...
Reset to disengaged state from nullptr tag.
constexpr
Optional&
operator=(std::nullptr_t value) noexcept(reset_noex_());
» more...
Assign from std::optional lvalue with convertible value.
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, const U&>
&& std::is_assignable_v<T&, const U&>
&& (!detail::ConvertsFromOptional<T, U>::value)
&& (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(std::optional<U> const& u) noexcept(std::is_nothrow_constructible_v<T, const U &> && std::is_nothrow_assignable_v<T &, const U &>);
» more...
Assign from a value.
template<typename U = std::remove_cv_t<T>>
requires (!std::is_same_v<Optional, std::remove_cvref_t<U>>)
&& std::is_constructible_v<T, U> && std::is_assignable_v<T&, U>
constexpr
Optional&
operator=(U&& u) noexcept(std::is_nothrow_constructible_v<T, U> && std::is_nothrow_assignable_v<T &, U>);
» more...
Assign from std::optional rvalue with convertible value.
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, U>
&& std::is_assignable_v<T&, U>
&& (!detail::ConvertsFromOptional<T, U>::value)
&& (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(std::optional<U>&& u) noexcept(std::is_nothrow_constructible_v<T, U> && std::is_nothrow_assignable_v<T &, U>);
» more...
*this.
| Name | Description |
|---|---|
| u | Source optional. |
Copy assignment.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional&
operator=(Optional const& other) = default;
*this.
| Name | Description |
|---|---|
| other | The object to copy assign from |
Assign from another Optional with convertible contained value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, const U&>
&& std::is_assignable_v<T&, const U&>
&& (!detail::ConvertsFromOptional<T, U>::value)
&& (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(Optional<U> const& u) noexcept(std::is_nothrow_constructible_v<T, const U &> && std::is_nothrow_assignable_v<T &, const U &>);
Reference to the current object
| Name | Description |
|---|---|
| u | Source optional. |
Move assignment.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional&
operator=(Optional&& other) = default;
*this.
| Name | Description |
|---|---|
| other | The object to move assign from |
Assign from another Optional rvalue with convertible contained value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, U>
&& std::is_assignable_v<T&, U>
&& (!detail::ConvertsFromOptional<T, U>::value)
&& (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(Optional<U>&& u) noexcept(std::is_nothrow_constructible_v<T, U> && std::is_nothrow_assignable_v<T &, U>);
Reference to the current object
| Name | Description |
|---|---|
| u | Source optional. |
Reset to disengaged state from nullptr tag.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional&
operator=(std::nullptr_t value) noexcept(reset_noex_());
*this.
| Name | Description |
|---|---|
| value | The object to assign from |
Assign from std::optional lvalue with convertible value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, const U&>
&& std::is_assignable_v<T&, const U&>
&& (!detail::ConvertsFromOptional<T, U>::value)
&& (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(std::optional<U> const& u) noexcept(std::is_nothrow_constructible_v<T, const U &> && std::is_nothrow_assignable_v<T &, const U &>);
Reference to the current object
| Name | Description |
|---|---|
| u | Source optional. |
Assign from a value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U = std::remove_cv_t<T>>
requires (!std::is_same_v<Optional, std::remove_cvref_t<U>>)
&& std::is_constructible_v<T, U> && std::is_assignable_v<T&, U>
constexpr
Optional&
operator=(U&& u) noexcept(std::is_nothrow_constructible_v<T, U> && std::is_nothrow_assignable_v<T &, U>);
Reference to the current object
| Name | Description |
|---|---|
| u | The value to store. It must be convertible to T. |
Assign from std::optional rvalue with convertible value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename U>
requires (!std::is_same_v<T, U>)
&& std::is_constructible_v<T, U>
&& std::is_assignable_v<T&, U>
&& (!detail::ConvertsFromOptional<T, U>::value)
&& (!detail::AssignsFromOptional<T, U>::value)
constexpr
Optional&
operator=(std::optional<U>&& u) noexcept(std::is_nothrow_constructible_v<T, U> && std::is_nothrow_assignable_v<T &, U>);
Reference to the current object
| Name | Description |
|---|---|
| u | Source optional. |
In-place construct a new value, replacing any existing one.
Declared in <mrdocs/ADT/Optional.hpp>
template<class... Args>
requires std::is_constructible_v<T, Args...>
constexpr
value_type&
emplace(Args&&... args) noexcept(std::is_nothrow_constructible_v<T, Args...>);
A reference to the newly constructed value.
| Name | Description |
|---|---|
| args | The arguments to forward to T's constructor. |
True if engaged (contains a value).
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
bool
has_value() const noexcept(has_value_noex_());
true if the optional contains a value.
Dereference-like access.
Declared in <mrdocs/ADT/Optional.hpp>
Dereference-like access.
constexpr
value_type&
operator*() noexcept;
» more...
Dereference-like access.
constexpr
value_type const&
operator*() const noexcept;
» more...
A reference to the contained value.
Dereference-like access.
A reference to the contained value.
Dereference-like access.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
value_type const&
operator*() const noexcept;
A reference to the contained value.
Pointer-like access.
Declared in <mrdocs/ADT/Optional.hpp>
Pointer-like access.
constexpr
value_type*
operator->() noexcept;
» more...
Pointer-like access.
constexpr
value_type const*
operator->() const noexcept;
» more...
A pointer to the contained value.
Pointer-like access.
A pointer to the contained value.
Pointer-like access.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
value_type const*
operator->() const noexcept;
A pointer to the contained value.
Reset to the null state. *
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
void
reset() noexcept(reset_noex_());
Value access. Preconditions: has_value() is true.
Declared in <mrdocs/ADT/Optional.hpp>
Value access. Preconditions: has_value() is true.
constexpr
value_type&
value() & noexcept;
» more...
Value access. Preconditions: has_value() is true.
constexpr
value_type const&
value() const & noexcept;
» more...
Value access. Preconditions: has_value() is true.
constexpr
value_type&&
value() && noexcept;
» more...
Value access. Preconditions: has_value() is true.
constexpr
value_type const&&
value() const && noexcept;
» more...
A reference to the contained value.
Value access. Preconditions: has_value() is true.
A reference to the contained value.
Value access. Preconditions: has_value() is true.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
value_type const&
value() const & noexcept;
A reference to the contained value.
Value access. Preconditions: has_value() is true.
A reference to the contained value.
Value access. Preconditions: has_value() is true.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
value_type const&&
value() const && noexcept;
A reference to the contained value.
Contextual bool.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
explicit
operator bool() const noexcept(noexcept(this->has_value()));
The object converted to bool
Determine if the value is inlined via nullable traits.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
static
bool
is_inlined() noexcept;
This is a compile-time property of T. If nullable_traits<T> is not specialized, this function returns false to indicate that the optional uses std::optional<T> as storage with an extra discriminator. If nullable_traits<T> is specialized, this function returns true to suggest that the null state is encoded inside T and no extra storage is used.
true if the optional uses nullable_traits<T> for storage.
Optional reference wrapper that never owns storage.
Stores a pointer to an externally owned object; the disengaged state is nullptr.
| Name | Description |
|---|---|
value_type | Referenced value type. |
| Name | Description |
|---|---|
Optional [constructor] | Constructors |
operator= | Assignment operators |
emplace | Bind to a new referenced value. |
has_value | Check whether the optional holds a reference. |
operator* | Dereference the referenced object. |
operator-> | Return pointer to the referenced object. |
reset | Disengage the optional. |
swap | Exchange the contained value with another Optional. |
value | value overloads |
operator bool | Return true when the optional holds a reference. |
| Name | Description |
|---|---|
is_inlined | Return true because Optional<T&> never allocates storage. |
Referenced value type.
Declared in <mrdocs/ADT/Optional.hpp>
using value_type = T;
Constructors
Declared in <mrdocs/ADT/Optional.hpp>
Construct an empty optional reference.
constexpr
Optional() noexcept = default;
» more...
Copy constructor.
constexpr
Optional(Optional const& other) noexcept = default;
» more...
Move constructor.
constexpr
Optional(Optional&& other) noexcept = default;
» more...
Construct disengaged from std::nullopt.
constexpr
Optional(std::nullopt_t value) noexcept;
» more...
Construct from another Optional holding a related reference.
template<class U>
requires ok_bind_v<U&>
constexpr
explicit(!std::is_convertible_v<U &, T &>)
Optional(Optional<U>& rhs) noexcept(std::is_nothrow_constructible_v<T &, U &>);
» more...
Construct from std::optional lvalue.
template<class U>
requires ok_bind_v<U&>
constexpr
Optional(std::optional<U>& o) noexcept(std::is_nothrow_constructible_v<T &, U &>);
» more...
Construct from a const Optional holding a related reference.
template<class U>
requires ok_bind_v<U const&>
constexpr
explicit(!std::is_convertible_v<const U &, T &>)
Optional(Optional<U> const& rhs) noexcept(std::is_nothrow_constructible_v<T &, const U &>);
» more...
Construct from const std::optional lvalue.
template<class U>
requires ok_bind_v<U const&>
constexpr
Optional(std::optional<U> const& o) noexcept(std::is_nothrow_constructible_v<T &, const U &>);
» more...
Bind to a referenceable object.
template<class U>
requires (
!std::is_same_v<std::remove_cvref_t<U>, Optional> &&
!std::is_same_v<std::remove_cvref_t<U>, std::in_place_t> &&
ok_bind_v<U>)
constexpr
explicit(!std::is_convertible_v<U, T &>)
Optional(U&& u) noexcept(std::is_nothrow_constructible_v<T &, U>);
» more...
| Name | Description |
|---|---|
| rhs | Optional to bind to if engaged. |
| o | Source optional to bind if engaged. |
| u | Object to bind to. |
Construct an empty optional reference.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional() noexcept = default;
Copy constructor.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional(Optional const& other) noexcept = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Move constructor.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional(Optional&& other) noexcept = default;
| Name | Description |
|---|---|
| other | The object to move construct from |
Construct disengaged from std::nullopt.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional(std::nullopt_t value) noexcept;
| Name | Description |
|---|---|
| value | The object to construct from |
Construct from another Optional holding a related reference.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U&>
constexpr
explicit(!std::is_convertible_v<U &, T &>)
Optional(Optional<U>& rhs) noexcept(std::is_nothrow_constructible_v<T &, U &>);
| Name | Description |
|---|---|
| rhs | Optional to bind to if engaged. |
Construct from std::optional lvalue.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U&>
constexpr
Optional(std::optional<U>& o) noexcept(std::is_nothrow_constructible_v<T &, U &>);
| Name | Description |
|---|---|
| o | Source optional to bind if engaged. |
Construct from a const Optional holding a related reference.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U const&>
constexpr
explicit(!std::is_convertible_v<const U &, T &>)
Optional(Optional<U> const& rhs) noexcept(std::is_nothrow_constructible_v<T &, const U &>);
| Name | Description |
|---|---|
| rhs | Optional to bind to if engaged. |
Construct from const std::optional lvalue.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U const&>
constexpr
Optional(std::optional<U> const& o) noexcept(std::is_nothrow_constructible_v<T &, const U &>);
| Name | Description |
|---|---|
| o | Source optional to bind if engaged. |
Bind to a referenceable object.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires (
!std::is_same_v<std::remove_cvref_t<U>, Optional> &&
!std::is_same_v<std::remove_cvref_t<U>, std::in_place_t> &&
ok_bind_v<U>)
constexpr
explicit(!std::is_convertible_v<U, T &>)
Optional(U&& u) noexcept(std::is_nothrow_constructible_v<T &, U>);
| Name | Description |
|---|---|
| u | Object to bind to. |
Assignment operators
Declared in <mrdocs/ADT/Optional.hpp>
Copy assignment.
constexpr
Optional&
operator=(Optional const& other) noexcept = default;
» more...
Move assignment.
constexpr
Optional&
operator=(Optional&& other) noexcept = default;
» more...
Reset from std::nullopt.
constexpr
Optional&
operator=(std::nullopt_t value) noexcept;
» more...
Assign from another Optional reference.
template<class U>
requires ok_bind_v<U&>
constexpr
Optional&
operator=(Optional<U>& rhs) noexcept(std::is_nothrow_constructible_v<T &, U &>);
» more...
Assign from a const Optional reference.
template<class U>
requires ok_bind_v<U const&>
constexpr
Optional&
operator=(Optional<U> const& rhs) noexcept(std::is_nothrow_constructible_v<T &, const U &>);
» more...
Assign from a referenceable value.
template<class U>
requires ok_bind_v<U>
constexpr
Optional&
operator=(U&& u) noexcept(std::is_nothrow_constructible_v<T &, U>);
» more...
Assign from a movable Optional reference.
template<class U>
requires ok_bind_v<U>
constexpr
Optional&
operator=(Optional<U>&& rhs) noexcept(std::is_nothrow_constructible_v<T &, U>);
» more...
*this.
| Name | Description |
|---|---|
| rhs | Source optional. |
| u | Reference to bind. |
Copy assignment.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional&
operator=(Optional const& other) noexcept = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move assignment.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional&
operator=(Optional&& other) noexcept = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
Reset from std::nullopt.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
Optional&
operator=(std::nullopt_t value) noexcept;
Reference to the current object
| Name | Description |
|---|---|
| value | The object to assign from |
Assign from another Optional reference.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U&>
constexpr
Optional&
operator=(Optional<U>& rhs) noexcept(std::is_nothrow_constructible_v<T &, U &>);
*this.
| Name | Description |
|---|---|
| rhs | Source optional. |
Assign from a const Optional reference.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U const&>
constexpr
Optional&
operator=(Optional<U> const& rhs) noexcept(std::is_nothrow_constructible_v<T &, const U &>);
*this.
| Name | Description |
|---|---|
| rhs | Source optional. |
Assign from a referenceable value.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U>
constexpr
Optional&
operator=(U&& u) noexcept(std::is_nothrow_constructible_v<T &, U>);
*this.
| Name | Description |
|---|---|
| u | Reference to bind. |
Assign from a movable Optional reference.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U>
constexpr
Optional&
operator=(Optional<U>&& rhs) noexcept(std::is_nothrow_constructible_v<T &, U>);
*this.
| Name | Description |
|---|---|
| rhs | Source optional. |
Bind to a new referenced value.
Declared in <mrdocs/ADT/Optional.hpp>
template<class U>
requires ok_bind_v<U>
constexpr
value_type&
emplace(U&& u) noexcept(std::is_nothrow_constructible_v<T &, U>);
Reference to the bound value.
| Name | Description |
|---|---|
| u | Referenceable value to bind. |
Check whether the optional holds a reference.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
bool
has_value() const noexcept;
true if engaged.
Dereference the referenced object.
Declared in <mrdocs/ADT/Optional.hpp>
Dereference the referenced object.
constexpr
value_type&
operator*() noexcept;
» more...
Dereference the referenced object.
constexpr
value_type const&
operator*() const noexcept;
» more...
Reference to the bound value.
Dereference the referenced object.
Reference to the bound value.
Dereference the referenced object.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
value_type const&
operator*() const noexcept;
Reference to the bound value.
Return pointer to the referenced object.
Declared in <mrdocs/ADT/Optional.hpp>
Return pointer to the referenced object.
constexpr
value_type*
operator->() noexcept;
» more...
Return pointer to the referenced object.
constexpr
value_type const*
operator->() const noexcept;
» more...
Pointer to the bound value.
Return pointer to the referenced object.
Pointer to the bound value.
Return pointer to the referenced object.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
value_type const*
operator->() const noexcept;
Pointer to the bound value.
Disengage the optional.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
void
reset() noexcept;
Exchange the contained value with another Optional.
| Name | Description |
|---|---|
| other | Optional to swap with. |
value overloads
Declared in <mrdocs/ADT/Optional.hpp>
Access the referenced object.
constexpr
value_type&
value() & noexcept;
» more...
Access the referenced object.
constexpr
value_type const&
value() const & noexcept;
» more...
Access the referenced object (rvalue overload).
constexpr
value_type&
value() && noexcept;
» more...
Access the referenced object (const rvalue overload).
constexpr
value_type const&
value() const && noexcept;
» more...
Access the referenced object.
Reference to the bound value.
Access the referenced object.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
value_type const&
value() const & noexcept;
Const reference to the bound value.
Access the referenced object (rvalue overload).
Reference to the bound value.
Access the referenced object (const rvalue overload).
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
value_type const&
value() const && noexcept;
Const reference to the bound value.
Return true when the optional holds a reference.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
explicit
operator bool() const noexcept;
true when the optional holds a reference.
Return true because Optional<T&> never allocates storage.
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
static
bool
is_inlined() noexcept;
true always.
Reference to output stream used by handlebars
Declared in <mrdocs/Support/Handlebars.hpp>
class OutputRef;
This class is used to internally pass an output stream to the handlebars environment.
It allows many types to be used as output streams, including std::string, std::ostream, llvm::raw_string_ostream, and others.
| Name | Description |
|---|---|
OutputRef [constructor] | Constructors |
getIndent | Return the current indentation level. |
setIndent | Set the indentation level applied to writes. |
| Name | Description |
|---|---|
mrdocs::operator<< | Write to output |
mrdocs::operator<< | Write to output |
mrdocs::operator<< | Write to output |
mrdocs::operator<< | Write to output |
mrdocs::Handlebars | A handlebars environment |
| Name | Description |
|---|---|
HTMLEscape | HTML escapes the specified string |
Constructors
Declared in <mrdocs/Support/Handlebars.hpp>
Constructor for std::ostream& output
template</* implementation-defined */ Os>
requires std::is_convertible_v<Os*, std::ostream*> &&
(!detail::StdLHROStreamable<Os>)
OutputRef(Os& os);
» more...
Constructor for llvm::raw_string_ostream output
template</* implementation-defined */ Os>
requires std::is_convertible_v<Os*, std::ostream*>
OutputRef(Os& os);
» more...
Constructor for std::string output
template</* implementation-defined */ St>
requires std::same_as<typename St::value_type, char>
OutputRef(St& st);
» more...
| Name | Description |
|---|---|
| os | The output stream to write to |
| st | The string to append to |
Constructor for std::ostream& output
Declared in <mrdocs/Support/Handlebars.hpp>
template</* implementation-defined */ Os>
requires std::is_convertible_v<Os*, std::ostream*> &&
(!detail::StdLHROStreamable<Os>)
OutputRef(Os& os);
| Name | Description |
|---|---|
| os | The output stream to write to |
Constructor for llvm::raw_string_ostream output
Declared in <mrdocs/Support/Handlebars.hpp>
template</* implementation-defined */ Os>
requires std::is_convertible_v<Os*, std::ostream*>
OutputRef(Os& os);
| Name | Description |
|---|---|
| os | The output stream to write to |
Constructor for std::string output
Declared in <mrdocs/Support/Handlebars.hpp>
template</* implementation-defined */ St>
requires std::same_as<typename St::value_type, char>
OutputRef(St& st);
| Name | Description |
|---|---|
| st | The string to append to |
Return the current indentation level.
Declared in <mrdocs/Support/Handlebars.hpp>
std::size_t
getIndent() const noexcept;
the current indentation level.
Set the indentation level applied to writes.
Declared in <mrdocs/Support/Handlebars.hpp>
void
setIndent(std::size_t indent);
| Name | Description |
|---|---|
| indent | Number of spaces to indent. |
Combines multiple callable types into a single overloaded function object.
Declared in <mrdocs/ADT/Overload.hpp>
template<class... Ts>
struct Overload
: Ts...
This is the canonical "overloaded pattern" implemented as a class template. It inherits from all provided callables and brings in their operator()s, so the resulting object can be called with whichever overload matches.
Typical use-cases include visiting std::variant and building small ad-hoc pattern-matching style dispatchers.
auto f = fn::makeOverload(
[](int i) { return i * 2; },
[](const std::string& s) { return s.size(); }
);
auto a = f(21); // calls int overload
auto b = f(std::string("hello")); // calls string overload
| Name | Description |
|---|---|
Ts... |
| Name | Description |
|---|---|
Overload [constructor] | Constructs an Overload from the given callables. |
| Name | Description |
|---|---|
makeOverload | Factory function that creates an Overload from the given callables. |
| Name | Description |
|---|---|
| Ts | The callable types to combine (lambdas, function objects, etc.) |
Constructs an Overload from the given callables.
Declared in <mrdocs/ADT/Overload.hpp>
constexpr
explicit
Overload(Ts... xs) noexcept((std::is_nothrow_move_constructible_v<Ts> && ...));
| Name | Description |
|---|---|
| xs | The callables to store. |
Represents a set of function overloads.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
struct OverloadsSymbol final
: SymbolCommonBase<SymbolKind::Overloads>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Overloads> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
OverloadsSymbol [constructor] | Constructors |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
FuncClass | The class of the functions. |
Members | The members of the overload set. |
OverloadedOperator | The overloaded operator, if any. |
ReturnType | Info about the return type of these function overloads. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
addMember | Append a new function overload to the set. |
allMembers | Access the list of overload members. |
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Constructors
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
Create an empty overload set for the given ID.
explicit
OverloadsSymbol(SymbolID const& ID) noexcept;
» more...
Create an overload set under the given parent and name.
explicit
OverloadsSymbol(
SymbolID const& Parent,
std::string_view Name,
AccessKind Access,
bool isStatic) noexcept;
» more...
| Name | Description |
|---|---|
| Parent | Owning symbol ID. |
| Name | Unqualified name shared by the overloads. |
| Access | Access specifier when the overloads are members. |
| isStatic | Whether the overload set refers to static functions. |
Create an empty overload set for the given ID.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
explicit
OverloadsSymbol(SymbolID const& ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to copy construct from |
Create an overload set under the given parent and name.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
explicit
OverloadsSymbol(
SymbolID const& Parent,
std::string_view Name,
AccessKind Access,
bool isStatic) noexcept;
| Name | Description |
|---|---|
| Parent | Owning symbol ID. |
| Name | Unqualified name shared by the overloads. |
| Access | Access specifier when the overloads are members. |
| isStatic | Whether the overload set refers to static functions. |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
The class of the functions.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
FunctionClass FuncClass = FunctionClass::Normal;
The members of the overload set.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
std::vector<SymbolID> Members;
The overloaded operator, if any.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
OperatorKind OverloadedOperator = OperatorKind::None;
Info about the return type of these function overloads.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
Polymorphic<Type> ReturnType = Polymorphic<Type>(AutoType{});
If all overloads have the same return type, this contains that type. Otherwise, it contains auto to indicate that the return type varies according to the parameters.
Represents a single function parameter
Declared in <mrdocs/Metadata/Symbol/Param.hpp>
struct Param final
| Name | Description |
|---|---|
Param [constructor] | Constructors |
| Name | Description |
|---|---|
Default | The default argument for this parameter, if any |
Name | The parameter name. |
Type | The type of this parameter |
Constructors
Declared in <mrdocs/Metadata/Symbol/Param.hpp>
Create an empty parameter with an auto type.
constexpr
Param() = default;
» more...
Construct a parameter with type, name, and default expression.
Param(
Polymorphic<Type>&& type,
std::string&& name,
std::string&& def_arg);
» more...
| Name | Description |
|---|---|
| type | Parameter type. |
| name | Parameter identifier. |
| def_arg | Default argument expression, if present. |
Create an empty parameter with an auto type.
Declared in <mrdocs/Metadata/Symbol/Param.hpp>
constexpr
Param() = default;
Construct a parameter with type, name, and default expression.
Declared in <mrdocs/Metadata/Symbol/Param.hpp>
Param(
Polymorphic<Type>&& type,
std::string&& name,
std::string&& def_arg);
| Name | Description |
|---|---|
| type | Parameter type. |
| name | Parameter identifier. |
| def_arg | Default argument expression, if present. |
The default argument for this parameter, if any
The parameter name.
The type of this parameter
Declared in <mrdocs/Metadata/Symbol/Param.hpp>
Polymorphic<Type> Type = Polymorphic<struct Type>(AutoType{});
The result of a parse operation.
Declared in <mrdocs/Support/Parse.hpp>
struct ParseResult;
This class holds the result of a parse operation. The structure is similar to std::from_chars_result, where we have a ptr member that points to the first character not parsed, and a ec member that holds the error code.
If parsing was successful, then ec stores a default constructed Error object, which indicates success. The operator bool can also be used to check for success.
The typical format of a parsing function is:
ParseResult
parseType(
char const* first,
char const* last,
Type& value);
where more parameters can be defined as needed for parsing options.
| Name | Description |
|---|---|
operator bool | Return true if parsing succeeded. |
| Name | Description |
|---|---|
ec | Error status for the parse operation. |
ptr | Pointer to the first unparsed character. |
| Name | Description |
|---|---|
mrdocs::operator== | Equality operator |
| Name | Description |
|---|---|
parse | Parse a string view |
Return true if parsing succeeded.
Declared in <mrdocs/Support/Parse.hpp>
constexpr
explicit
operator bool() const noexcept;
true when ec is not a failure.
Error status for the parse operation.
Pointer to the first unparsed character.
Declared in <mrdocs/Support/Parse.hpp>
char const* ptr;
A glob pattern matcher for paths
Declared in <mrdocs/Support/Glob.hpp>
class PathGlobPattern;
A glob pattern matcher where "*" does not match path separators. The pattern "**" can be used to match any number of path separators.
| Name | Description |
|---|---|
PathGlobPattern [constructor] | Construct an empty PathGlobPattern. |
isLiteral | Checks if the glob pattern is a literal string. |
match | Matches the given string against the glob pattern. |
matchPatternPrefix | Matches the start of a given string against the glob pattern. |
pattern | Returns the glob pattern. |
| Name | Description |
|---|---|
create | Constructs a PathGlobPattern with the given pattern. |
Construct an empty PathGlobPattern.
Declared in <mrdocs/Support/Glob.hpp>
Construct an empty PathGlobPattern.
constexpr
PathGlobPattern() = default;
» more...
Construct an empty PathGlobPattern.
explicit
PathGlobPattern(GlobPattern glob);
» more...
Construct an empty PathGlobPattern.
Declared in <mrdocs/Support/Glob.hpp>
constexpr
PathGlobPattern() = default;
An empty PathGlobPattern will never match any string.
Construct an empty PathGlobPattern.
An empty PathGlobPattern will never match any string.
| Name | Description |
|---|---|
| glob | The object to construct from |
Checks if the glob pattern is a literal string.
Declared in <mrdocs/Support/Glob.hpp>
bool
isLiteral() const;
This function determines if the glob pattern does not contain any special characters. In other words, it matches a single string.
true if the glob pattern is a literal string, false otherwise.
Matches the given string against the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
bool
match(std::string_view const str) const;
true if the string matches the pattern, false otherwise.
| Name | Description |
|---|---|
| str | The string to match against the pattern. |
Matches the start of a given string against the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
bool
matchPatternPrefix(std::string_view prefix) const;
This function determines if the given string with the specified prefix can potentially match the glob pattern.
If the string matches the start of the pattern without failure, even if there are characters left in the string or the pattern, the function returns true.
true if the string prefix matches the pattern, false otherwise.
| Name | Description |
|---|---|
| prefix | The string to match against the pattern. |
Returns the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
std::string_view
pattern() const;
The glob pattern as a string view.
Constructs a PathGlobPattern with the given pattern.
Declared in <mrdocs/Support/Glob.hpp>
Constructs a PathGlobPattern with the given pattern.
static
Expected<PathGlobPattern>
create(std::string_view const pattern);
» more...
Constructs a PathGlobPattern with the given pattern.
static
Expected<PathGlobPattern>
create(
std::string_view const pattern,
Optional<std::size_t> maxSubGlobs);
» more...
| Name | Description |
|---|---|
| pattern | The glob pattern to use for matching. |
| maxSubGlobs | The maximum number of subpatterns allowed. |
Constructs a PathGlobPattern with the given pattern.
Declared in <mrdocs/Support/Glob.hpp>
static
Expected<PathGlobPattern>
create(std::string_view const pattern);
A container holding an error or a value.
| Name | Description |
|---|---|
| pattern | The glob pattern to use for matching. |
Constructs a PathGlobPattern with the given pattern.
Declared in <mrdocs/Support/Glob.hpp>
static
Expected<PathGlobPattern>
create(
std::string_view const pattern,
Optional<std::size_t> maxSubGlobs);
A container holding an error or a value.
| Name | Description |
|---|---|
| pattern | The glob pattern to use for matching. |
| maxSubGlobs | The maximum number of subpatterns allowed. |
Pointer type wrapper.
Declared in <mrdocs/Metadata/Type/PointerType.hpp>
struct PointerType final
: TypeCommonBase<TypeKind::Pointer>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::Pointer> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
PointeeType | The pointee type, defaults to auto when unknown. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
The pointee type, defaults to auto when unknown.
Declared in <mrdocs/Metadata/Type/PointerType.hpp>
Polymorphic<Type> PointeeType = Polymorphic<Type>(AutoType{});
A polymorphic value-type.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<class T>
class Polymorphic;
This class supports polymorphic objects with value-like semantics.
It implements a tweaked version of std::polymorphic, based on the reference implementation for P3019R14. Differences are: It implements comparison operators with a very project-specific design. Fixed allocator, not parametrizable. No initializer_list constructor.
To copy polymorphic objects, the class uses the copy constructor of the owned derived-type object when copying to another value. Similarly, to allow the correct destruction of derived objects, it uses the destructor of the owned derived-type object in the destructor.
| Name | Description |
|---|---|
const_pointer | Const pointer to the held object. |
pointer | Mutable pointer to the held object. |
value_type | Base value type. |
| Name | Description |
|---|---|
Polymorphic [constructor] | Constructors |
~Polymorphic [destructor] | Destructor. |
operator= | Assignment operators |
operator* | Dereference operators |
operator-> | Member access operators |
valueless_after_move | Return true if the object has been moved-from and is disengaged. |
| Name | Description |
|---|---|
mrdocs::swap | |
mrdocs::nullable_traits | nullable_traits<T> defines how to treat a T as “nullable” without an external engaged bit. |
| Name | Description |
|---|---|
CompareDerived | Compares two polymorphic objects that have visit functions |
cast | Dynamic cast returning const reference; asserts on failure. |
cast | Dynamic cast returning reference; asserts on failure. |
cast_or_null | Dynamic cast pointer; returns nullptr when pp is null. |
cast_or_null | Dynamic cast pointer; returns nullptr when pp is null (const). |
dyn_cast | Dynamic cast returning pointer or nullptr. |
dyn_cast | Dynamic cast returning pointer or nullptr (const overload). |
dyn_cast_or_null | Dynamic cast if pointer is non-null and engaged, else nullptr (const). |
dyn_cast_or_null | Dynamic cast if pointer is non-null and engaged, else nullptr. |
innerType | Return the inner type. |
innerType | Return the inner type. |
innermostType | Return the innermost type (mutable overload). |
innermostType | Return the innermost type. |
isa | Return true if the polymorphic object holds a value of type To. |
isa_or_null | Return true if pointer is non-null and referent is of type To. |
operator<=> | Compare polymorphic template arguments. |
operator<=> | Compare two polymorphic names by visitor dispatch. |
operator<=> | Compare polymorphic template parameters. |
operator<=> | Three-way comparison of two polymorphic objects. |
operator<=> | Compare two polymorphic types by visitor dispatch. |
operator== | Equality for two polymorphic types. |
operator== | Equality comparison of two polymorphic objects. |
operator== | Equality for two polymorphic names. |
operator== | Equality for polymorphic template arguments. |
operator== | Equality helper for polymorphic template parameters. |
doc::isEmpty | Determine if the inline is empty |
doc::isEmpty | Determine if the inline is empty |
doc::ltrim | Removes leading whitespace from the inline element. |
doc::ltrim | Removes leading whitespace from the block. |
doc::operator<=> | Three-way comparison between polymorphic block wrappers. |
doc::operator<=> | Three-way comparison for polymorphic inline elements. |
doc::operator== | Equality delegates to the three-way comparison. |
doc::operator== | Equality delegates to the three-way comparison. |
doc::rtrim | Removes trailing whitespace from the block. |
doc::rtrim | Removes trailing whitespace from the inline element. |
doc::trim | Removes leading and trailing whitespace from the block. |
doc::trim | Removes leading and trailing whitespace from the inline element. |
Const pointer to the held object.
Declared in <mrdocs/ADT/Polymorphic.hpp>
using const_pointer = T const*;
Mutable pointer to the held object.
Declared in <mrdocs/ADT/Polymorphic.hpp>
using pointer = T*;
Base value type.
Declared in <mrdocs/ADT/Polymorphic.hpp>
using value_type = T;
Constructors
Declared in <mrdocs/ADT/Polymorphic.hpp>
Copy constructor.
constexpr
Polymorphic(Polymorphic const& V);
» more...
Move constructor.
constexpr
Polymorphic(Polymorphic&& V) noexcept;
» more...
Forwarding constructor from a derived U.
template<class U>
constexpr
explicit
Polymorphic(U&& u)
requires (!std::same_as<Polymorphic, std::remove_cvref_t<U>>) &&
std::copy_constructible<std::remove_cvref_t<U>> &&
std::derived_from<std::remove_cvref_t<U>, T>;
» more...
In-place constructor for a specific derived U.
template<
class U,
class... Ts>
constexpr
explicit
Polymorphic(
std::in_place_type_t<U>,
Ts&&... ts)
requires std::same_as<std::remove_cvref_t<U>, U> &&
std::constructible_from<U, Ts&&...> &&
std::copy_constructible<U> && std::derived_from<U, T>;
» more...
| Name | Description |
|---|---|
| V | Source object. |
| ts | Arguments to forward to U's constructor. |
Copy constructor.
| Name | Description |
|---|---|
| V | Source object. |
Move constructor.
| Name | Description |
|---|---|
| V | Source object (emptied on return). |
Forwarding constructor from a derived U.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<class U>
constexpr
explicit
Polymorphic(U&& u)
requires (!std::same_as<Polymorphic, std::remove_cvref_t<U>>) &&
std::copy_constructible<std::remove_cvref_t<U>> &&
std::derived_from<std::remove_cvref_t<U>, T>;
| Name | Description |
|---|---|
| u | The object to move construct from |
In-place constructor for a specific derived U.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class U,
class... Ts>
constexpr
explicit
Polymorphic(
std::in_place_type_t<U>,
Ts&&... ts)
requires std::same_as<std::remove_cvref_t<U>, U> &&
std::constructible_from<U, Ts&&...> &&
std::copy_constructible<U> && std::derived_from<U, T>;
| Name | Description |
|---|---|
| ts | Arguments to forward to U's constructor. |
Destructor.
Declared in <mrdocs/ADT/Polymorphic.hpp>
constexpr
~Polymorphic();
Assignment operators
Declared in <mrdocs/ADT/Polymorphic.hpp>
Copy assignment.
constexpr
Polymorphic&
operator=(Polymorphic const& V);
» more...
Move assignment.
constexpr
Polymorphic&
operator=(Polymorphic&& V) noexcept;
» more...
*this.
| Name | Description |
|---|---|
| V | Source object. |
Copy assignment.
Declared in <mrdocs/ADT/Polymorphic.hpp>
constexpr
Polymorphic&
operator=(Polymorphic const& V);
*this.
| Name | Description |
|---|---|
| V | Source object. |
Move assignment.
Declared in <mrdocs/ADT/Polymorphic.hpp>
constexpr
Polymorphic&
operator=(Polymorphic&& V) noexcept;
*this.
| Name | Description |
|---|---|
| V | Source object (emptied on return). |
Dereference operators
Declared in <mrdocs/ADT/Polymorphic.hpp>
Dereference to the held object.
[[nodiscard]]
constexpr
T&
operator*() noexcept;
» more...
Dereference to the held object (const).
[[nodiscard]]
constexpr
T const&
operator*() const noexcept;
» more...
Dereference to the held object.
Declared in <mrdocs/ADT/Polymorphic.hpp>
[[nodiscard]]
constexpr
T&
operator*() noexcept;
Reference to the contained value.
Dereference to the held object (const).
Declared in <mrdocs/ADT/Polymorphic.hpp>
[[nodiscard]]
constexpr
T const&
operator*() const noexcept;
Const reference to the contained value.
Member access operators
Declared in <mrdocs/ADT/Polymorphic.hpp>
Pointer-like access to the held object.
[[nodiscard]]
constexpr
pointer
operator->() noexcept;
» more...
Pointer-like access to the held object (const).
[[nodiscard]]
constexpr
const_pointer
operator->() const noexcept;
» more...
Pointer to the contained value.
Pointer-like access to the held object.
Declared in <mrdocs/ADT/Polymorphic.hpp>
[[nodiscard]]
constexpr
pointer
operator->() noexcept;
Pointer to the contained value.
Pointer-like access to the held object (const).
Declared in <mrdocs/ADT/Polymorphic.hpp>
[[nodiscard]]
constexpr
const_pointer
operator->() const noexcept;
Pointer to the contained value.
Return true if the object has been moved-from and is disengaged.
Declared in <mrdocs/ADT/Polymorphic.hpp>
constexpr
bool
valueless_after_move() const noexcept;
true when empty.
An rvalue reference type.
Declared in <mrdocs/Metadata/Type/RValueReferenceType.hpp>
struct RValueReferenceType final
: TypeCommonBase<TypeKind::RValueReference>
| Name | Description |
|---|---|
TypeCommonBase<TypeKind::RValueReference> | CRTP base that ties a concrete type to a fixed TypeKind. |
| Name |
|---|
isArray |
isAuto |
isDecltype |
isFunction |
isLValueReference |
isMemberPointer |
isNamed |
isPointer |
isRValueReference |
| Name | Description |
|---|---|
PointeeType | The referenced type, defaults to auto when unknown. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
The referenced type, defaults to auto when unknown.
Declared in <mrdocs/Metadata/Type/RValueReferenceType.hpp>
Polymorphic<Type> PointeeType = Polymorphic<Type>(AutoType{});
Range adapter to expose first/last flags inside range-for loops.
Declared in <mrdocs/Support/RangeFor.hpp>
template<class Container>
class RangeFor;
| Name | Description |
|---|---|
iterator | Iterator yielding RangeFor::value_type proxies with first/last flags. |
value_type | Proxy describing an element plus first/last flags. |
| Name | Description |
|---|---|
const_pointer | Pointer to const proxy. |
const_reference | Reference to const proxy. |
difference_type | Signed distance type. |
pointer | Pointer to proxy. |
reference | Reference to proxy. |
size_type | Unsigned size type. |
| Name | Description |
|---|---|
RangeFor [constructor] | Construct a range wrapper over a container. |
begin | Iterator to first element. |
end | Iterator past the last element. |
Pointer to const proxy.
Reference to const proxy.
Signed distance type.
Declared in <mrdocs/Support/RangeFor.hpp>
using difference_type = std::ptrdiff_t;
Pointer to proxy.
Reference to proxy.
Unsigned size type.
Declared in <mrdocs/Support/RangeFor.hpp>
using size_type = std::size_t;
Iterator yielding RangeFor::value_type proxies with first/last flags.
Declared in <mrdocs/Support/RangeFor.hpp>
class iterator;
| Name | Description |
|---|---|
iterator_category | Iterator category forwarded from container. |
pointer | Pointer type (unused). |
reference | Reference type. |
size_type | Size type alias. |
value_type | Proxy value type. |
| Name | Description |
|---|---|
iterator [constructor] | Constructors |
operator= | Copy assignment. |
operator* | Dereference to proxy value. |
operator++ | Increment operators |
operator-> | Return proxy for current element. |
operator== | Equality comparison. |
operator!= | Inequality comparison. |
| Name | Description |
|---|---|
mrdocs::RangeFor::value_type | Proxy describing an element plus first/last flags. |
mrdocs::RangeFor | Range adapter to expose first/last flags inside range-for loops. |
Iterator category forwarded from container.
Declared in <mrdocs/Support/RangeFor.hpp>
using iterator_category = std::iterator_traits<Container::iterator>::iterator_category;
Pointer type (unused).
Declared in <mrdocs/Support/RangeFor.hpp>
using pointer = void;
Reference type.
Size type alias.
Declared in <mrdocs/Support/RangeFor.hpp>
using size_type = std::size_t;
Proxy value type.
Declared in <mrdocs/Support/RangeFor.hpp>
using value_type = RangeFor<Container>::value_type;
Constructors
Default constructor.
Declared in <mrdocs/Support/RangeFor.hpp>
iterator() = default;
Copy constructor.
| Name | Description |
|---|---|
| other | The object to copy construct from |
Copy assignment.
Declared in <mrdocs/Support/RangeFor.hpp>
iterator&
operator=(iterator const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Dereference to proxy value.
Reference type.
Increment operators
Declared in <mrdocs/Support/RangeFor.hpp>
Pre-increment.
iterator&
operator++() noexcept;
» more...
Post-increment.
iterator
operator++(int unused) noexcept;
» more...
| Name | Description |
|---|---|
| unused | Dummy parameter for postfix form. |
Pre-increment.
*this advanced to next element.
Post-increment.
Iterator prior to increment.
| Name | Description |
|---|---|
| unused | Dummy parameter for postfix form. |
Return proxy for current element.
proxy for current element.
Equality comparison.
Declared in <mrdocs/Support/RangeFor.hpp>
bool
operator==(iterator const& it) const noexcept;
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| it | The right operand |
Inequality comparison.
Declared in <mrdocs/Support/RangeFor.hpp>
bool
operator!=(iterator const& it) const noexcept;
true if the objects are not equal, false otherwise
| Name | Description |
|---|---|
| it | The right operand |
Proxy describing an element plus first/last flags.
Declared in <mrdocs/Support/RangeFor.hpp>
struct value_type;
Reference to current element.
| Name | Description |
|---|---|
operator-> | Access members through pointer syntax. |
| Name | Description |
|---|---|
first | True if this element is the first in the range. |
last | True if this element is the last in the range. |
value | The contained value. |
Access members through pointer syntax.
Pointer to this proxy.
True if this element is the first in the range.
Declared in <mrdocs/Support/RangeFor.hpp>
bool const first;
True if this element is the last in the range.
Declared in <mrdocs/Support/RangeFor.hpp>
bool const last;
The contained value.
Declared in <mrdocs/Support/RangeFor.hpp>
Container::value_type const& value;
Construct a range wrapper over a container.
Declared in <mrdocs/Support/RangeFor.hpp>
explicit
RangeFor(Container const& C) noexcept;
| Name | Description |
|---|---|
| C | Container to iterate. |
Iterator to first element.
Iterator yielding RangeFor::value_type proxies with first/last flags.
Iterator past the last element.
Iterator yielding RangeFor::value_type proxies with first/last flags.
The aggregated interface for a given struct, class, or union.
Declared in <mrdocs/Metadata/Symbol/RecordInterface.hpp>
class RecordInterface;
This class represents the public, protected, and private interfaces of a record. It is used to generate the "interface" value of the DOM for symbols that represent records or namespaces.
The interface is not part of the Corpus. It is a temporary structure generated to aggregate the symbols of a record. This structure is provided to the user via the DOM.
While the members of a Namespace are directly represented with a Tranche, the members of a Record are represented with an Interface.
| Name | Description |
|---|---|
Private | The aggregated private interfaces. |
Protected | The aggregated protected interfaces. |
Public | The aggregated public interfaces. |
| Name | Description |
|---|---|
allMembers | Flatten all public/protected/private members. |
The aggregated private interfaces.
This tranche contains all private members of a record or namespace.
The aggregated protected interfaces.
This tranche contains all protected members of a record or namespace.
The aggregated public interfaces.
This tranche contains all public members of a record or namespace.
Metadata for struct, class, or union.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
struct RecordSymbol final
: SymbolCommonBase<SymbolKind::Record>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Record> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
RecordSymbol [constructor] | Create a record symbol bound to an ID. |
operator<=> | Compare records including bases, members, and flags. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
Bases | List of immediate bases. |
Derived | List of derived classes |
Friends | List of friends. |
Interface | Lists of members. |
IsFinal | Whether the class is marked final. |
IsFinalDestructor | Whether the destructor is marked final. |
IsTypeDef | Whether the record originated from a typedef-style declaration. |
KeyKind | Kind of record this is (class, struct, or union). |
Template | When present, this record is a template or specialization. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
allMembers | View all record members across access levels. |
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Create a record symbol bound to an ID.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
explicit
RecordSymbol(SymbolID const& ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to copy construct from |
Compare records including bases, members, and flags.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
std::strong_ordering
operator<=>(RecordSymbol const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
List of immediate bases.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
std::vector<BaseInfo> Bases;
List of derived classes
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
std::vector<SymbolID> Derived;
List of friends.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
std::vector<FriendInfo> Friends;
Lists of members.
Whether the class is marked final.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
bool IsFinal = false;
Whether the destructor is marked final.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
bool IsFinalDestructor = false;
Whether the record originated from a typedef-style declaration.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
bool IsTypeDef = false;
Things like anonymous structs in a typedef:
typedef struct { ... } foo_t;
are converted into records with the typedef as the Name + this flag set.
Alias-declarations are not yet distinguished here.
Kind of record this is (class, struct, or union).
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
RecordKeyKind KeyKind = RecordKeyKind::Struct;
When present, this record is a template or specialization.
A group of members that have the same access specifier.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
struct RecordTranche;
This struct represents a collection of symbols that share the same access specifier within a record.
It includes one vector for each info type allowed in a record, and individual vectors for static functions, types, and function overloads.
| Name | Description |
|---|---|
Concepts | Member concepts. |
Enums | Enumerations. |
Functions | Member functions. |
Guides | Deduction guides in the class scope. |
NamespaceAliases | Namespace aliases declared with this access. |
Records | Nested records. |
StaticFunctions | Static member functions. |
StaticVariables | Static data members. |
Typedefs | Typedefs and using aliases. |
Usings | Using-declarations that pull members into the class. |
Variables | Data members. |
| Name | Description |
|---|---|
allMembers | Join every member list into a single view. |
Member concepts.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> Concepts;
Enumerations.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> Enums;
Member functions.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> Functions;
Deduction guides in the class scope.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> Guides;
Namespace aliases declared with this access.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> NamespaceAliases;
Nested records.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> Records;
Static member functions.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> StaticFunctions;
Static data members.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> StaticVariables;
Typedefs and using aliases.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> Typedefs;
Using-declarations that pull members into the class.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> Usings;
Data members.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
std::vector<SymbolID> Variables;
Reference directories used to resolve paths
Declared in <mrdocs/Config/ReferenceDirectories.hpp>
struct ReferenceDirectories;
These are the main reference directories used to resolve paths in the application.
All other reference directories come directly from the configuration file.
| Name | Description |
|---|---|
cwd | Absolute path to the current working directory. |
mrdocsRoot | Absolute path to the MrDocs repository root. |
Absolute path to the current working directory.
Declared in <mrdocs/Config/ReferenceDirectories.hpp>
std::string cwd;
Absolute path to the MrDocs repository root.
Declared in <mrdocs/Config/ReferenceDirectories.hpp>
std::string mrdocsRoot;
Execute a callable when the enclosing scope exits unless dismissed.
Declared in <mrdocs/Support/ScopeExit.hpp>
template<class F>
class ScopeExit;
| Name | Description |
|---|---|
ScopeExit [constructor] | Construct with a callable to invoke on scope exit. |
~ScopeExit [destructor] | Invoke the stored callable if the guard was not dismissed. |
dismiss | Prevent the callable from running on destruction. |
Construct with a callable to invoke on scope exit.
Declared in <mrdocs/Support/ScopeExit.hpp>
explicit
ScopeExit(F onExitScope);
| Name | Description |
|---|---|
| onExitScope | Callable executed unless dismissed. |
Invoke the stored callable if the guard was not dismissed.
Declared in <mrdocs/Support/ScopeExit.hpp>
~ScopeExit();
Prevent the callable from running on destruction.
Declared in <mrdocs/Support/ScopeExit.hpp>
void
dismiss();
RAII helper that restores a referenced value on scope exit.
Declared in <mrdocs/Support/ScopeExit.hpp>
template<class T>
class ScopeExitRestore;
| Name | Description |
|---|---|
ScopeExitRestore [constructor] | Constructors |
~ScopeExitRestore [destructor] | Restore the previous value unless dismissed. |
dismiss | Prevent restoration on destruction. |
Constructors
Declared in <mrdocs/Support/ScopeExit.hpp>
Restore ref to its previous value when the scope ends
explicit
ScopeExitRestore(T& ref);
» more...
Temporarily set ref to next and restore it when the scope ends
template<std::convertible_to<T> T2>
explicit
ScopeExitRestore(
T& ref,
T2 next);
» more...
| Name | Description |
|---|---|
| ref | The variable to modify and eventually restore. |
| next | The temporary value assigned to ref for the scope. |
Restore ref to its previous value when the scope ends
Declared in <mrdocs/Support/ScopeExit.hpp>
explicit
ScopeExitRestore(T& ref);
Store the current value of ref and restore it when this object goes out of scope, unless dismiss() is called.
| Name | Description |
|---|---|
| ref | The object to copy construct from |
Temporarily set ref to next and restore it when the scope ends
Declared in <mrdocs/Support/ScopeExit.hpp>
template<std::convertible_to<T> T2>
explicit
ScopeExitRestore(
T& ref,
T2 next);
Store the current value of ref, set it to next, and restore the previous value when this object goes out of scope, unless dismiss() is called.
| Name | Description |
|---|---|
| ref | The variable to modify and eventually restore. |
| next | The temporary value assigned to ref for the scope. |
Restore the previous value unless dismissed.
Declared in <mrdocs/Support/ScopeExit.hpp>
~ScopeExitRestore();
Prevent restoration on destruction.
Declared in <mrdocs/Support/ScopeExit.hpp>
void
dismiss();
Stores source information for a declaration.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
struct SourceInfo;
| Name | Description |
|---|---|
SourceInfo [constructor] | Construct with no locations. |
~SourceInfo [destructor] [virtual] | Polymorphic base needs a virtual destructor. |
| Name | Description |
|---|---|
DefLoc | Location where the entity was defined |
Loc | Locations where the entity was declared. |
| Name | Description |
|---|---|
getPrimaryLocation | Choose the best location to display for a symbol. |
merge | Merge, transferring ownership from the right-hand side. |
merge | Merge the location sets, preferring existing def/primary. |
Construct with no locations.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
constexpr
SourceInfo() = default;
Polymorphic base needs a virtual destructor.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
constexpr
virtual
~SourceInfo() = default;
Location where the entity was defined
KRYSTIAN NOTE: this is used for entities which cannot be redeclared -- regardless of whether such a declaration is actually a definition (e.g. alias-declarations and typedef declarations are never definition).
Locations where the entity was declared.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
std::vector<Location> Loc;
This does not include the definition.
A source location with filename prettification.
Declared in <mrdocs/Support/Error.hpp>
class SourceLocation;
| Name | Description |
|---|---|
SourceLocation [constructor] | Build a location wrapper from a source_location. |
column | Column number (1-based) within the file. |
file_name | File name associated with the location. |
function_name | Function name captured at the location. |
line | Line number (1-based) within the file. |
Build a location wrapper from a source_location.
Declared in <mrdocs/Support/Error.hpp>
SourceLocation(std::source_location const& loc) noexcept;
| Name | Description |
|---|---|
| loc | The object to copy construct from |
Column number (1-based) within the file.
Declared in <mrdocs/Support/Error.hpp>
uint_least32_t
column() const noexcept;
One-based column index.
File name associated with the location.
Declared in <mrdocs/Support/Error.hpp>
std::string_view
file_name() const noexcept;
Path of the source file.
Function name captured at the location.
Declared in <mrdocs/Support/Error.hpp>
std::string_view
function_name() const noexcept;
Name of the function where the location was recorded.
Line number (1-based) within the file.
Declared in <mrdocs/Support/Error.hpp>
uint_least32_t
line() const noexcept;
One-based line index.
Represents a (possibly qualified) symbol name with template arguments.
Declared in <mrdocs/Metadata/Name/SpecializationName.hpp>
struct SpecializationName final
: Name
| Name | Description |
|---|---|
Name | Represents a name for a named Type |
| Name | Description |
|---|---|
SpecializationName [constructor] | Construct an empty specialization name. |
asName | asName overloads |
operator== | Equality compares all fields. |
operator<=> | Three-way comparison operators |
| Name | Description |
|---|---|
Identifier | The unqualified name. |
Kind | The kind of name this is. |
Prefix | The parent name info, if any. |
TemplateArgs | The template arguments. |
id | The SymbolID of the named symbol, if it exists. |
specializationID | The SymbolID of the named symbol, if it exists. |
| Name | Description |
|---|---|
toString | Convert the name to a human-readable string. |
Construct an empty specialization name.
Declared in <mrdocs/Metadata/Name/SpecializationName.hpp>
constexpr
SpecializationName() noexcept;
Three-way comparison operators
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
Compare specialization names by base name and template arguments.
auto
operator<=>(SpecializationName const& other) const;
» more...
Order names by kind, identifier, id, and prefix.
std::strong_ordering
operator<=>(Name const& other) const;
» more...
Compare specialization names by base name and template arguments.
Declared in <mrdocs/Metadata/Name/SpecializationName.hpp>
auto
operator<=>(SpecializationName const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Order names by kind, identifier, id, and prefix.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
std::strong_ordering
operator<=>(Name const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
The template arguments.
Declared in <mrdocs/Metadata/Name/SpecializationName.hpp>
std::vector<Polymorphic<TArg>> TemplateArgs;
The SymbolID of the named symbol, if it exists.
Declared in <mrdocs/Metadata/Name/SpecializationName.hpp>
SymbolID specializationID = = SymbolID::invalid;
A lazy input range of std::string_view lines split on all known line breaks.
Declared in <mrdocs/Support/SplitLines.hpp>
struct SplitLinesView
: std::ranges::view_interface<SplitLinesView>
| Name | Description |
|---|---|
std::ranges::view_interface<SplitLinesView> |
| Name | Description |
|---|---|
Iterator | Iterator over lines produced by SplitLinesView. |
| Name | Description |
|---|---|
SplitLinesView [constructor] | Constructors |
back | |
begin | Return an iterator to the first line. |
cbegin | |
cend | |
data | |
empty | |
end | Return the end sentinel for the view. |
front | |
operator[] | Subscript operators |
size | |
operator bool | Conversion operators |
| Name | Description |
|---|---|
sv_ | Underlying string to split. |
Iterator over lines produced by SplitLinesView.
Declared in <mrdocs/Support/SplitLines.hpp>
struct Iterator;
| Name | Description |
|---|---|
difference_type | Signed distance type for the iterator. |
value_type | Line view type exposed by the iterator. |
| Name | Description |
|---|---|
Iterator [constructor] | Constructors |
findBreak | Compute the next line break position. |
operator* | Return the current line segment. |
operator++ | Increment operators |
| Name | Description |
|---|---|
atEnd | Flag indicating the end iterator. |
cur | Start of the current line. |
nextBreak | Index of the next break delimiter or npos. |
sv | Reference to the source string. |
| Name | Description |
|---|---|
mrdocs::operator== | Equality operator |
Signed distance type for the iterator.
Declared in <mrdocs/Support/SplitLines.hpp>
using difference_type = std::ptrdiff_t;
Line view type exposed by the iterator.
Declared in <mrdocs/Support/SplitLines.hpp>
using value_type = std::string_view;
Constructors
Declared in <mrdocs/Support/SplitLines.hpp>
Construct an end iterator.
constexpr
Iterator() = default;
» more...
Construct a begin or end iterator.
constexpr
explicit
Iterator(
std::string_view s,
bool begin);
» more...
| Name | Description |
|---|---|
| s | Source string. |
| begin | If true, position at the first line; otherwise create end iterator. |
Construct an end iterator.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
Iterator() = default;
Construct a begin or end iterator.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
explicit
Iterator(
std::string_view s,
bool begin);
| Name | Description |
|---|---|
| s | Source string. |
| begin | If true, position at the first line; otherwise create end iterator. |
Compute the next line break position.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
std::size_t
findBreak(std::size_t from) const noexcept;
Offset of the next break or npos.
| Name | Description |
|---|---|
| from | Index to start searching. |
Return the current line segment.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
value_type
operator*() const noexcept;
View of the current line.
Increment operators
Declared in <mrdocs/Support/SplitLines.hpp>
Advance to the next line.
constexpr
Iterator&
operator++() noexcept;
» more...
Advance to the next line (post-increment).
constexpr
void
operator++(int unused);
» more...
Reference to this iterator.
| Name | Description |
|---|---|
| unused | Dummy parameter for postfix form. |
Advance to the next line.
Reference to this iterator.
Advance to the next line (post-increment).
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
void
operator++(int unused);
| Name | Description |
|---|---|
| unused | Dummy parameter for postfix form. |
Flag indicating the end iterator.
Declared in <mrdocs/Support/SplitLines.hpp>
bool atEnd = false;
Start of the current line.
Declared in <mrdocs/Support/SplitLines.hpp>
std::size_t cur = 0;
Index of the next break delimiter or npos.
Declared in <mrdocs/Support/SplitLines.hpp>
std::size_t nextBreak = 0;
Reference to the source string.
Declared in <mrdocs/Support/SplitLines.hpp>
std::string_view sv = {};
Constructors
Declared in <mrdocs/Support/SplitLines.hpp>
Construct an empty view.
constexpr
SplitLinesView() = default;
» more...
Construct a view over sv.
constexpr
explicit
SplitLinesView(std::string_view sv);
» more...
| Name | Description |
|---|---|
| sv | String to split into lines. |
Construct an empty view.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
SplitLinesView() = default;
Construct a view over sv.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
explicit
SplitLinesView(std::string_view sv);
| Name | Description |
|---|---|
| sv | String to split into lines. |
Declared in <bits/ranges_util.h>
constexpr
decltype(auto)
back()
requires bidirectional_range<_Derived> && common_range<_Derived>;
Declared in <bits/ranges_util.h>
constexpr
decltype(auto)
back() const
requires bidirectional_range<const _Derived>
&& common_range<const _Derived>;
Return an iterator to the first line.
Iterator positioned at the first line.
Declared in <bits/ranges_util.h>
constexpr
auto
cbegin()
requires input_range<_Derived>;
Declared in <bits/ranges_util.h>
constexpr
auto
cbegin() const
requires input_range<const _Derived>;
Declared in <bits/ranges_util.h>
constexpr
auto
cend()
requires input_range<_Derived>;
Declared in <bits/ranges_util.h>
constexpr
auto
cend() const
requires input_range<const _Derived>;
Declared in <bits/ranges_util.h>
constexpr
auto
data() noexcept(noexcept(ranges::begin(_M_derived())))
requires contiguous_iterator<iterator_t<_Derived>>;
» more...
constexpr
auto
data() const noexcept(noexcept(ranges::begin(_M_derived())))
requires range<const _Derived>
&& contiguous_iterator<iterator_t<const _Derived>>;
» more...
Declared in <bits/ranges_util.h>
constexpr
auto
data() noexcept(noexcept(ranges::begin(_M_derived())))
requires contiguous_iterator<iterator_t<_Derived>>;
Declared in <bits/ranges_util.h>
constexpr
auto
data() const noexcept(noexcept(ranges::begin(_M_derived())))
requires range<const _Derived>
&& contiguous_iterator<iterator_t<const _Derived>>;
Declared in <bits/ranges_util.h>
constexpr
bool
empty() noexcept(noexcept(_S_empty(_M_derived())))
requires forward_range<_Derived> && (!sized_range<_Derived>);
» more...
constexpr
bool
empty() const noexcept(noexcept(_S_empty(_M_derived())))
requires forward_range<const _Derived> && (!sized_range<const _Derived>);
» more...
Declared in <bits/ranges_util.h>
constexpr
bool
empty() noexcept(noexcept(_S_empty(_M_derived())))
requires forward_range<_Derived> && (!sized_range<_Derived>);
Declared in <bits/ranges_util.h>
constexpr
bool
empty() const noexcept(noexcept(_S_empty(_M_derived())))
requires forward_range<const _Derived> && (!sized_range<const _Derived>);
Return the end sentinel for the view.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
std::default_sentinel_t
end() const noexcept;
Default sentinel representing the end.
Declared in <bits/ranges_util.h>
constexpr
decltype(auto)
front()
requires forward_range<_Derived>;
Declared in <bits/ranges_util.h>
constexpr
decltype(auto)
front() const
requires forward_range<const _Derived>;
Subscript operators
Declared in <bits/ranges_util.h>
template<random_access_range _Range = SplitLinesView>
constexpr
decltype(auto)
operator[](range_difference_t<_Range> __n);
» more...
template<random_access_range _Range = SplitLinesView const>
constexpr
decltype(auto)
operator[](range_difference_t<_Range> __n) const;
» more...
Declared in <bits/ranges_util.h>
template<random_access_range _Range = SplitLinesView>
constexpr
decltype(auto)
operator[](range_difference_t<_Range> __n);
Declared in <bits/ranges_util.h>
template<random_access_range _Range = SplitLinesView const>
constexpr
decltype(auto)
operator[](range_difference_t<_Range> __n) const;
Declared in <bits/ranges_util.h>
constexpr
auto
size() noexcept(noexcept(_S_size(_M_derived())))
requires forward_range<_Derived>
&& sized_sentinel_for<sentinel_t<_Derived>, iterator_t<_Derived>>;
» more...
constexpr
auto
size() const noexcept(noexcept(_S_size(_M_derived())))
requires forward_range<const _Derived>
&& sized_sentinel_for<sentinel_t<const _Derived>,
iterator_t<const _Derived>>;
» more...
Declared in <bits/ranges_util.h>
constexpr
auto
size() noexcept(noexcept(_S_size(_M_derived())))
requires forward_range<_Derived>
&& sized_sentinel_for<sentinel_t<_Derived>, iterator_t<_Derived>>;
Declared in <bits/ranges_util.h>
constexpr
auto
size() const noexcept(noexcept(_S_size(_M_derived())))
requires forward_range<const _Derived>
&& sized_sentinel_for<sentinel_t<const _Derived>,
iterator_t<const _Derived>>;
Conversion operators
Declared in <bits/ranges_util.h>
Conversion to bool
constexpr
explicit
operator bool() noexcept(noexcept(ranges::empty(_M_derived())))
requires requires { ranges::empty(_M_derived()); };
» more...
Conversion to bool
constexpr
explicit
operator bool() const noexcept(noexcept(ranges::empty(_M_derived())))
requires requires { ranges::empty(_M_derived()); };
» more...
Conversion to bool
Declared in <bits/ranges_util.h>
constexpr
explicit
operator bool() noexcept(noexcept(ranges::empty(_M_derived())))
requires requires { ranges::empty(_M_derived()); };
The object converted to bool
Conversion to bool
Declared in <bits/ranges_util.h>
constexpr
explicit
operator bool() const noexcept(noexcept(ranges::empty(_M_derived())))
requires requires { ranges::empty(_M_derived()); };
The object converted to bool
Underlying string to split.
Declared in <mrdocs/Support/SplitLines.hpp>
std::string_view sv_;
Transparent hash functor for string-like keys.
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
struct StringHash;
| Name | Description |
|---|---|
hash_type | Underlying hash implementation. |
is_transparent | Marker for heterogeneous lookup. |
| Name | Description |
|---|---|
operator() | Function call operators |
Underlying hash implementation.
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
using hash_type = std::hash<std::string_view>;
Marker for heterogeneous lookup.
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
using is_transparent = void;
Function call operators
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
Hash string_view input.
std::size_t
operator()(std::string_view str) const;
» more...
Hash std::string input.
std::size_t
operator()(std::string const& str) const;
» more...
Hash C-string input.
std::size_t
operator()(char const* str) const;
» more...
Hash string_view input.
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
std::size_t
operator()(std::string_view str) const;
Hash value of the string view.
| Name | Description |
|---|---|
| str | The right operand |
Hash std::string input.
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
std::size_t
operator()(std::string const& str) const;
Hash value of the string.
| Name | Description |
|---|---|
| str | The right operand |
Hash C-string input.
Declared in <mrdocs/ADT/UnorderedStringMap.hpp>
std::size_t
operator()(char const* str) const;
Hash value of the string.
| Name | Description |
|---|---|
| str | The right operand |
A list of strings that accepts several input forms.
Declared in <mrdocs/Support/StringList.hpp>
struct StringList;
A configuration option of this type can be written as a single scalar (generator: xml), a YAML sequence (generator: [xml, adoc]), or a comma-separated scalar (generator: "xml,adoc"). All three forms normalize to the same list of strings.
The type models a range of std::string, so generic configuration code (normalization, DOM exposure) treats it like any other list of strings.
| Name | Description |
|---|---|
StringList [constructor] | Constructors |
begin | begin overloads |
empty | Return true if the list has no strings. |
end | end overloads |
size | Return the number of strings. |
splitCommaSeparated | Expand comma-separated entries in place. |
| Name | Description |
|---|---|
values | The individual strings, in order. |
Constructors
Declared in <mrdocs/Support/StringList.hpp>
Construct an empty list.
constexpr
StringList() = default;
» more...
Construct from a braced list of strings.
StringList(std::initializer_list<std::string> il);
» more...
Construct from a vector of strings.
StringList(std::vector<std::string> v);
» more...
| Name | Description |
|---|---|
| il | The strings to store. |
| v | The strings to store. |
Construct an empty list.
Declared in <mrdocs/Support/StringList.hpp>
constexpr
StringList() = default;
Construct from a braced list of strings.
Declared in <mrdocs/Support/StringList.hpp>
StringList(std::initializer_list<std::string> il);
| Name | Description |
|---|---|
| il | The strings to store. |
Construct from a vector of strings.
Declared in <mrdocs/Support/StringList.hpp>
StringList(std::vector<std::string> v);
| Name | Description |
|---|---|
| v | The strings to store. |
begin overloads
Return an iterator to the first string.
Declared in <mrdocs/Support/StringList.hpp>
auto
begin();
an iterator to the first string.
Return a const iterator to the first string.
Declared in <mrdocs/Support/StringList.hpp>
auto
begin() const;
a const iterator to the first string.
Return true if the list has no strings.
Declared in <mrdocs/Support/StringList.hpp>
bool
empty() const noexcept;
true if the list has no strings.
end overloads
Return an iterator past the last string.
Declared in <mrdocs/Support/StringList.hpp>
auto
end();
an iterator past the last string.
Return a const iterator past the last string.
Declared in <mrdocs/Support/StringList.hpp>
auto
end() const;
a const iterator past the last string.
Return the number of strings.
Declared in <mrdocs/Support/StringList.hpp>
std::size_t
size() const noexcept;
the number of strings.
Expand comma-separated entries in place.
Declared in <mrdocs/Support/StringList.hpp>
void
splitCommaSeparated();
Each element is split on commas, surrounding whitespace is trimmed, and empty tokens are dropped. This lets a single element such as "xml,adoc" become two entries.
The individual strings, in order.
Declared in <mrdocs/Support/StringList.hpp>
std::vector<std::string> values;
Base class with common properties of all symbols
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
struct Symbol;
| Name | Description |
|---|---|
~Symbol [destructor] [virtual] | Polymorphic base needs a virtual destructor. |
asInfo | asInfo overloads |
| Name | Description |
|---|---|
Access | Declaration access. |
Extraction | Determine why a symbol is extracted. |
IsCopyFromInherited | Whether this a copy of an inherited method, as produced when inherit-base-members is not never. |
Kind | Kind of declaration. |
Loc | The source location information. |
Name | The unqualified name. |
Parent | The parent symbol, if any. |
doc | The extracted documentation for this declaration. |
id | The unique identifier for this symbol. |
| Name | Description |
|---|---|
Symbol [constructor] | Constructors |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
| Name | Description |
|---|---|
SymbolCommonBase | Base class for providing variant discriminator functions. |
Polymorphic base needs a virtual destructor.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
constexpr
virtual
~Symbol() = default;
asInfo overloads
View this instance as a const Symbol reference.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
constexpr
Symbol const&
asInfo() const noexcept;
Base class with common properties of all symbols
View this instance as a mutable Symbol reference.
Base class with common properties of all symbols
Declaration access.
Class members use:
AccessKind::Public,
AccessKind::Protected, and
AccessKind::Private.
Namespace members use AccessKind::None.
Determine why a symbol is extracted.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
ExtractionMode Extraction = ExtractionMode::Dependency;
This flag distinguishes Info from its dependencies and indicates why it was extracted.
Non-dependencies can be extracted in normal mode, see-below mode, or implementation-defined mode.
A dependency is a symbol that does not meet the configured conditions for extraction, but had to be extracted due to it being used transitively by a primary Info.
Whether this a copy of an inherited method, as produced when inherit-base-members is not never.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
bool IsCopyFromInherited = false;
Kind of declaration.
The source location information.
The unqualified name.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
std::string Name;
The parent symbol, if any.
This is the parent namespace or record where the symbol is defined.
The extracted documentation for this declaration.
The unique identifier for this symbol.
Constructors
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
Default constructor for derived types.
constexpr
Symbol() = default;
» more...
Copy constructor.
constexpr
Symbol(Symbol const& Other) = default;
» more...
Move constructor.
constexpr
Symbol(Symbol&& Other) = default;
» more...
Construct a Symbol.
explicit
Symbol(
SymbolKind const kind,
SymbolID const& ID) noexcept;
» more...
| Name | Description |
|---|---|
| kind | The kind of symbol |
| ID | The unique identifier for this symbol |
Default constructor for derived types.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
constexpr
Symbol() = default;
Copy constructor.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
constexpr
Symbol(Symbol const& Other) = default;
| Name | Description |
|---|---|
| Other | The object to copy construct from |
Move constructor.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
constexpr
Symbol(Symbol&& Other) = default;
| Name | Description |
|---|---|
| Other | The object to move construct from |
Construct a Symbol.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
explicit
Symbol(
SymbolKind const kind,
SymbolID const& ID) noexcept;
| Name | Description |
|---|---|
| kind | The kind of symbol |
| ID | The unique identifier for this symbol |
Base class for providing variant discriminator functions.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
template<SymbolKind K>
struct SymbolCommonBase
: Symbol
This offers functions that return a boolean at compile-time, indicating if the most-derived class is a certain type.
| Name | Description |
|---|---|
Symbol | Base class with common properties of all symbols |
| Name | Description |
|---|---|
asInfo | asInfo overloads |
| Name | Description |
|---|---|
Access | Declaration access. |
Extraction | Determine why a symbol is extracted. |
IsCopyFromInherited | Whether this a copy of an inherited method, as produced when inherit-base-members is not never. |
Kind | Kind of declaration. |
Loc | The source location information. |
Name | The unqualified name. |
Parent | The parent symbol, if any. |
doc | The extracted documentation for this declaration. |
id | The unique identifier for this symbol. |
| Name | Description |
|---|---|
kind_id | The variant discriminator constant of the most-derived class. |
| Name | Description |
|---|---|
SymbolCommonBase [constructor] | Constructors |
| Name | Description |
|---|---|
mrdocs::mrdocs_member_descriptor_fn | |
mrdocs::mrdocs_base_descriptor_fn |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
| Name | Description |
|---|---|
ConceptSymbol | Info for concepts. |
EnumConstantSymbol | Info for enum constants. |
EnumSymbol | Metadata for an enumeration declaration. |
FunctionSymbol | Metadata for a function or method. |
GuideSymbol | Info for deduction guides. |
NamespaceAliasSymbol | Info for namespace aliases. |
NamespaceSymbol | Describes a namespace and its members. |
OverloadsSymbol | Represents a set of function overloads. |
RecordSymbol | Metadata for struct, class, or union. |
TypedefSymbol | Info for typedef and using declarations. |
UsingSymbol | Info for using declarations. |
VariableSymbol | A variable. |
The variant discriminator constant of the most-derived class.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
inline constexpr static
SymbolKind kind_id = K;
It only distinguishes from Symbol::kind in that it is a constant.
Constructors
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
Default constructor.
SymbolCommonBase() = default;
» more...
Construct bound to an ID.
constexpr
explicit
SymbolCommonBase(SymbolID const& ID);
» more...
Default constructor.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
SymbolCommonBase() = default;
Construct bound to an ID.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
constexpr
explicit
SymbolCommonBase(SymbolID const& ID);
| Name | Description |
|---|---|
| ID | The object to copy construct from |
A glob pattern matcher for C++ symbols
Declared in <mrdocs/Support/Glob.hpp>
class SymbolGlobPattern;
A glob pattern matcher where "*" does not match "::". The pattern "**" can be used to match any number of "::".
| Name | Description |
|---|---|
SymbolGlobPattern [constructor] | Construct an empty SymbolGlobPattern. |
isLiteral | Checks if the glob pattern is a literal string. |
match | Matches the given string against the glob pattern. |
matchPatternPrefix | Matches the start of a given string against the glob pattern. |
pattern | Returns the glob pattern. |
| Name | Description |
|---|---|
create | Constructs a SymbolGlobPattern with the given pattern. |
Construct an empty SymbolGlobPattern.
Declared in <mrdocs/Support/Glob.hpp>
Construct an empty SymbolGlobPattern.
constexpr
SymbolGlobPattern() = default;
» more...
Construct an empty SymbolGlobPattern.
explicit
SymbolGlobPattern(GlobPattern glob);
» more...
Construct an empty SymbolGlobPattern.
Declared in <mrdocs/Support/Glob.hpp>
constexpr
SymbolGlobPattern() = default;
An empty SymbolGlobPattern will never match any string.
Construct an empty SymbolGlobPattern.
An empty SymbolGlobPattern will never match any string.
| Name | Description |
|---|---|
| glob | The object to construct from |
Checks if the glob pattern is a literal string.
Declared in <mrdocs/Support/Glob.hpp>
bool
isLiteral() const;
This function determines if the glob pattern does not contain any special characters. In other words, it matches a single string.
true if the glob pattern is a literal string, false otherwise.
Matches the given string against the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
bool
match(std::string_view const str) const;
true if the string matches the pattern, false otherwise.
| Name | Description |
|---|---|
| str | The string to match against the pattern. |
Matches the start of a given string against the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
bool
matchPatternPrefix(std::string_view prefix) const;
This function determines if the given string with the specified prefix can potentially match the glob pattern.
If the string matches the start of the pattern without failure, even if there are characters left in the string or the pattern, the function returns true.
true if the string prefix matches the pattern, false otherwise.
| Name | Description |
|---|---|
| prefix | The string to match against the pattern. |
Returns the glob pattern.
Declared in <mrdocs/Support/Glob.hpp>
std::string_view
pattern() const;
The glob pattern as a string view.
Constructs a SymbolGlobPattern with the given pattern.
Declared in <mrdocs/Support/Glob.hpp>
Constructs a SymbolGlobPattern with the given pattern.
static
Expected<SymbolGlobPattern>
create(std::string_view const pattern);
» more...
Constructs a SymbolGlobPattern with the given pattern.
static
Expected<SymbolGlobPattern>
create(
std::string_view const pattern,
Optional<std::size_t> maxSubGlobs);
» more...
| Name | Description |
|---|---|
| pattern | The glob pattern to use for matching. |
| maxSubGlobs | The maximum number of subpatterns allowed. |
Constructs a SymbolGlobPattern with the given pattern.
Declared in <mrdocs/Support/Glob.hpp>
static
Expected<SymbolGlobPattern>
create(std::string_view const pattern);
A container holding an error or a value.
| Name | Description |
|---|---|
| pattern | The glob pattern to use for matching. |
Constructs a SymbolGlobPattern with the given pattern.
Declared in <mrdocs/Support/Glob.hpp>
static
Expected<SymbolGlobPattern>
create(
std::string_view const pattern,
Optional<std::size_t> maxSubGlobs);
A container holding an error or a value.
| Name | Description |
|---|---|
| pattern | The glob pattern to use for matching. |
| maxSubGlobs | The maximum number of subpatterns allowed. |
A unique identifier for a symbol.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
class SymbolID;
This is calculated as the SHA1 digest of the USR. A USRs is a string that provides an unambiguous reference to a symbol.
| Name | Description |
|---|---|
value_type | Underlying byte storage. |
| Name | Description |
|---|---|
SymbolID [constructor] | Constructors |
begin | Return an iterator to the first byte of the SymbolID. |
data | Return the raw data for this SymbolID. |
end | Return an iterator to one past the last byte of the SymbolID. |
size | Return the size of the SymbolID. |
operator std::string_view | Return a string view of the SymbolID. |
operator bool | Return true if this is a valid SymbolID. |
operator== | Compare two SymbolIDs for equality. |
operator<=> | Compare two SymbolIDs with strong ordering. |
| Name | Description |
|---|---|
createFromString | Construct a SymbolID by hashing a string |
| Name | Description |
|---|---|
global | Sentinel ID representing the global namespace. |
invalid | Sentinel ID used to represent “no symbol.” |
| Name | Description |
|---|---|
getParents | Return a list of the parent symbols of the specified Symbol. |
toBase16Str | Convert a SymbolID to a string |
Underlying byte storage.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
using value_type = uint8_t;
Constructors
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
Construct a zero-initialized identifier.
constexpr
SymbolID() = default;
» more...
Construct a SymbolID from a null-terminated string.
template<std::convertible_to<value_type> Char>
constexpr
SymbolID(Char const* src);
» more...
| Name | Description |
|---|---|
| src | The string to construct from. |
Construct a zero-initialized identifier.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
constexpr
SymbolID() = default;
Construct a SymbolID from a null-terminated string.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
template<std::convertible_to<value_type> Char>
constexpr
SymbolID(Char const* src);
This function constructs a SymbolID from a string. The string must be exactly 20 characters long.
| Name | Description |
|---|---|
| src | The string to construct from. |
Return an iterator to the first byte of the SymbolID.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
constexpr
auto
begin() const noexcept;
an iterator to the first byte of the SymbolID.
Return the raw data for this SymbolID.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
constexpr
auto
data() const noexcept;
the raw data for this SymbolID.
Return an iterator to one past the last byte of the SymbolID.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
constexpr
auto
end() const noexcept;
an iterator to one past the last byte of the SymbolID.
Return the size of the SymbolID.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
constexpr
std::size_t
size() const noexcept;
The size of a SymbolID is always 20.
the size of the SymbolID.
Return a string view of the SymbolID.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
operator std::string_view() const noexcept;
a string view of the SymbolID.
Return true if this is a valid SymbolID.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
explicit
operator bool() const noexcept;
true if this is a valid SymbolID.
Compare two SymbolIDs for equality.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
constexpr
bool
operator==(SymbolID const& other) const noexcept = default;
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| other | The right operand |
Compare two SymbolIDs with strong ordering.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
auto
operator<=>(SymbolID const& other) const noexcept;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Construct a SymbolID by hashing a string
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
static
SymbolID
createFromString(std::string_view input);
The SymbolID created by hashing the string.
| Name | Description |
|---|---|
| input | The string to hash. |
Sentinel ID representing the global namespace.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
inline constexpr static
SymbolID global = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
"\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF";
Symbol ID of the global namespace.
Sentinel ID used to represent “no symbol.”
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
inline constexpr static
SymbolID invalid = SymbolID();
Base class for any template argument.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
struct TArg;
| Name | Description |
|---|---|
~TArg [destructor] [virtual] | Polymorphic base needs a virtual destructor. |
asTArg | asTArg overloads |
| Name | Description |
|---|---|
IsPackExpansion | Whether this template argument is a parameter expansion. |
Kind | The kind of template argument this is. |
| Name | Description |
|---|---|
TArg [constructor] | Constructors |
| Name | Description |
|---|---|
toString | Convert a template argument to a human-readable string. |
| Name | Description |
|---|---|
TArgCommonBase | CRTP base that fixes the argument kind. |
Polymorphic base needs a virtual destructor.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
virtual
~TArg() = default;
asTArg overloads
View this object as a TArg reference.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
TArg const&
asTArg() const noexcept;
Base class for any template argument.
View this object as a mutable TArg reference.
Base class for any template argument.
Whether this template argument is a parameter expansion.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
bool IsPackExpansion = false;
The kind of template argument this is.
Constructors
Defaulted base constructor.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
TArg() noexcept = default;
Construct with a specific argument kind.
| Name | Description |
|---|---|
| kind | The object to construct from |
CRTP base that fixes the argument kind.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
template<TArgKind K>
struct TArgCommonBase
: TArg
| Name | Description |
|---|---|
TArg | Base class for any template argument. |
| Name | Description |
|---|---|
asTArg | asTArg overloads |
| Name | Description |
|---|---|
isConstant | Test whether the kind is a non-type constant argument. |
isTemplate | Test whether the kind is a template argument. |
isType | Test whether the kind is a type argument. |
| Name | Description |
|---|---|
IsPackExpansion | Whether this template argument is a parameter expansion. |
Kind | The kind of template argument this is. |
| Name | Description |
|---|---|
kind_id | Static discriminator for the concrete argument. |
| Name | Description |
|---|---|
TArgCommonBase [constructor] | Construct with the fixed kind. |
| Name | Description |
|---|---|
mrdocs::mrdocs_member_descriptor_fn | |
mrdocs::mrdocs_base_descriptor_fn |
| Name | Description |
|---|---|
toString | Convert a template argument to a human-readable string. |
| Name | Description |
|---|---|
ConstantTArg | Non-type template argument. |
TemplateTArg | Template template argument. |
TypeTArg | Type template argument. |
Test whether the kind is a non-type constant argument.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isConstant() noexcept;
true if kind_id equals TypeKind::Constant.
Test whether the kind is a template argument.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isTemplate() noexcept;
true if kind_id equals TypeKind::Template.
Test whether the kind is a type argument.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isType() noexcept;
true if kind_id equals TypeKind::Type.
Static discriminator for the concrete argument.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
inline constexpr static
TArgKind kind_id = K;
Construct with the fixed kind.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
TArgCommonBase() noexcept;
Base class for a template parameter declaration.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
struct TParam;
| Name | Description |
|---|---|
~TParam [destructor] [virtual] | Polymorphic base needs a virtual destructor. |
asTParam | asTParam overloads |
| Name | Description |
|---|---|
Default | The default template argument, if any |
IsParameterPack | Whether this template parameter is a parameter pack |
Kind | The kind of template parameter this is |
Name | The template parameters name, if any |
| Name | Description |
|---|---|
TParam [constructor] | Constructors |
| Name | Description |
|---|---|
TParamCommonBase | CRTP base that fixes the parameter kind. |
Polymorphic base needs a virtual destructor.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
virtual
~TParam() = default;
asTParam overloads
View this object as a TParam reference.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
TParam const&
asTParam() const noexcept;
Base class for a template parameter declaration.
View this object as a mutable TParam reference.
Base class for a template parameter declaration.
The default template argument, if any
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
Optional<Polymorphic<TArg>> Default = std::nullopt;
Whether this template parameter is a parameter pack
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
bool IsParameterPack = false;
The kind of template parameter this is
The template parameters name, if any
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
std::string Name;
Constructors
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
Defaulted base constructor.
constexpr
TParam() noexcept = default;
» more...
Construct with a fixed parameter kind.
constexpr
TParam(TParamKind kind) noexcept;
» more...
Defaulted base constructor.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
TParam() noexcept = default;
Construct with a fixed parameter kind.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
TParam(TParamKind kind) noexcept;
| Name | Description |
|---|---|
| kind | The object to construct from |
CRTP base that fixes the parameter kind.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
template<TParamKind K>
struct TParamCommonBase
: TParam
| Name | Description |
|---|---|
TParam | Base class for a template parameter declaration. |
| Name | Description |
|---|---|
asTParam | asTParam overloads |
| Name | Description |
|---|---|
isConstant | True if the parameter is a non-type parameter. |
isTemplate | True if the parameter is a template template parameter. |
isType | True if the parameter is a type parameter. |
| Name | Description |
|---|---|
Default | The default template argument, if any |
IsParameterPack | Whether this template parameter is a parameter pack |
Kind | The kind of template parameter this is |
Name | The template parameters name, if any |
| Name | Description |
|---|---|
kind_id | Static discriminator for the concrete parameter. |
| Name | Description |
|---|---|
TParamCommonBase [constructor] | Construct with the fixed kind. |
| Name | Description |
|---|---|
mrdocs::mrdocs_member_descriptor_fn | |
mrdocs::mrdocs_base_descriptor_fn |
| Name | Description |
|---|---|
ConstantTParam | A constant template parameter |
TemplateTParam | Template template parameter. |
TypeTParam | Type template parameter. |
True if the parameter is a non-type parameter.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isConstant() noexcept;
true when kind_id equals TParamKind::Constant.
True if the parameter is a template template parameter.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isTemplate() noexcept;
true when kind_id equals TParamKind::Template.
True if the parameter is a type parameter.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isType() noexcept;
true when kind_id equals TParamKind::Type.
Static discriminator for the concrete parameter.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
inline constexpr static
TParamKind kind_id = K;
Construct with the fixed kind.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
TParamCommonBase() noexcept;
A subset of possible work in a thread pool.
Declared in <mrdocs/Support/ThreadPool.hpp>
class TaskGroup;
| Name | Description |
|---|---|
TaskGroup [constructor] | Constructor. |
~TaskGroup [destructor] | Destructor. |
async | Submit work to be executed. |
wait | Block until all work has completed. |
Constructor.
| Name | Description |
|---|---|
| threadPool | The object to copy construct from |
Destructor.
Declared in <mrdocs/Support/ThreadPool.hpp>
~TaskGroup();
Submit work to be executed.
Declared in <mrdocs/Support/ThreadPool.hpp>
template<class F>
void
async(F&& f);
The signature of the submitted function object should be void(void).
| Name | Description |
|---|---|
| f | The function object to execute. |
Block until all work has completed.
Declared in <mrdocs/Support/ThreadPool.hpp>
[[nodiscard]]
std::vector<Error>
wait();
Zero or more errors which were thrown from submitted work.
Information about templates and specializations thereof.
Declared in <mrdocs/Metadata/Template.hpp>
struct TemplateInfo final
| Name | Description |
|---|---|
specializationKind | Deduce which specialization category this info represents. |
| Name | Description |
|---|---|
Args | Bound arguments for specializations. |
Params | Template parameter list. |
Primary | Primary template ID for partial and explicit specializations. |
Requires | The requires-clause for the template parameter list, if any. |
| Name | Description |
|---|---|
merge | Merge partial template info, filling missing pieces. |
Deduce which specialization category this info represents.
Declared in <mrdocs/Metadata/Template.hpp>
TemplateSpecKind
specializationKind() const noexcept;
The kind of template or specialization.
Bound arguments for specializations.
Declared in <mrdocs/Metadata/Template.hpp>
std::vector<Polymorphic<TArg>> Args;
Template parameter list.
Declared in <mrdocs/Metadata/Template.hpp>
std::vector<Polymorphic<TParam>> Params;
Primary template ID for partial and explicit specializations.
The requires-clause for the template parameter list, if any.
Template template argument.
Declared in <mrdocs/Metadata/TArg/TemplateTArg.hpp>
struct TemplateTArg final
: TArgCommonBase<TArgKind::Template>
| Name | Description |
|---|---|
TArgCommonBase<TArgKind::Template> | CRTP base that fixes the argument kind. |
| Name |
|---|
isConstant |
isTemplate |
isType |
| Name | Description |
|---|---|
Name | Name of the referenced template. |
Template | SymbolID of the referenced template. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
toString | Convert a template argument to a human-readable string. |
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isConstant() noexcept;
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isTemplate() noexcept;
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isType() noexcept;
Name of the referenced template.
Declared in <mrdocs/Metadata/TArg/TemplateTArg.hpp>
std::string Name;
SymbolID of the referenced template.
Template template parameter.
Declared in <mrdocs/Metadata/TParam/TemplateTParam.hpp>
struct TemplateTParam final
: TParamCommonBase<TParamKind::Template>
| Name | Description |
|---|---|
TParamCommonBase<TParamKind::Template> | CRTP base that fixes the parameter kind. |
| Name |
|---|
isConstant |
isTemplate |
isType |
| Name | Description |
|---|---|
Params | Template parameters for the template-template parameter |
| Name |
|---|
kind_id |
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isConstant() noexcept;
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isTemplate() noexcept;
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isType() noexcept;
Template parameters for the template-template parameter
Declared in <mrdocs/Metadata/TParam/TemplateTParam.hpp>
std::vector<Polymorphic<TParam>> Params;
A pool of threads for executing work concurrently.
Declared in <mrdocs/Support/ThreadPool.hpp>
class ThreadPool;
| Name | Description |
|---|---|
arg_ty | Helper that preserves lvalue-ref and constness for references. |
arg_ty<T&> | Alias returning the preserved argument type. |
| Name | Description |
|---|---|
arg_t | Helper that forwards argument qualifiers. |
| Name | Description |
|---|---|
ThreadPool [constructor] | Constructor. |
~ThreadPool [destructor] | Destructor. |
async | Submit work to be executed. |
forEach | Invoke a function object for each element of a range. |
getThreadCount | Return the number of threads in the pool. |
wait | Block until all work has completed. |
| Name | Description |
|---|---|
mrdocs::TaskGroup | A subset of possible work in a thread pool. |
Helper that forwards argument qualifiers.
Declared in <mrdocs/Support/ThreadPool.hpp>
template<class T>
using arg_t = arg_ty<T>::type;
Helper that preserves lvalue-ref and constness for references.
Declared in <mrdocs/Support/ThreadPool.hpp>
template<class T>
struct arg_ty;
| Name | Description |
|---|---|
type | Resulting adjusted type. |
Resulting adjusted type.
Declared in <mrdocs/Support/ThreadPool.hpp>
using type = T;
Alias returning the preserved argument type.
| Name | Description |
|---|---|
type | Resulting adjusted type. |
Argument type with reference/const qualifiers preserved.
| Name | Description |
|---|---|
| T | Original argument type. |
Resulting adjusted type.
Declared in <mrdocs/Support/ThreadPool.hpp>
using type = std::conditional_t<std::is_const_v<T>, T, T&>;
Constructor.
Declared in <mrdocs/Support/ThreadPool.hpp>
Constructor.
explicit
ThreadPool();
» more...
Constructor.
explicit
ThreadPool(unsigned int concurrency);
» more...
Constructor.
Declared in <mrdocs/Support/ThreadPool.hpp>
explicit
ThreadPool();
Default constructed thread pools have concurrency equal to one and never spawn new threads. Submitted work blocks the caller until the work is complete.
Constructor.
Declared in <mrdocs/Support/ThreadPool.hpp>
explicit
ThreadPool(unsigned int concurrency);
| Name | Description |
|---|---|
| concurrency | The value to construct from |
Destructor.
Declared in <mrdocs/Support/ThreadPool.hpp>
~ThreadPool();
Submit work to be executed.
Declared in <mrdocs/Support/ThreadPool.hpp>
template<class F>
void
async(F&& f);
The signature of the submitted function object should be void(void).
| Name | Description |
|---|---|
| f | The function object to execute. |
Invoke a function object for each element of a range.
Declared in <mrdocs/Support/ThreadPool.hpp>
template<
class Range,
class F>
[[nodiscard]]
std::vector<Error>
forEach(
Range&& range,
F const& f);
Zero or more errors which were thrown from submitted work.
| Name | Description |
|---|---|
| range | The range of elements to process. |
| f | The function object to invoke. |
Return the number of threads in the pool.
Declared in <mrdocs/Support/ThreadPool.hpp>
unsigned int
getThreadCount() const noexcept;
the number of threads in the pool.
Block until all work has completed.
Declared in <mrdocs/Support/ThreadPool.hpp>
void
wait();
A possibly qualified type.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
struct Type;
This class represents a type that may have qualifiers (e.g. const, volatile).
This base class is used to store the kind of type. Derived classes are used to store the type information according to the kind.
| Name | Description |
|---|---|
asType | asType overloads |
namedSymbol | Return the symbol named by this type. |
| Name | Description |
|---|---|
Constraints | The constraints associated with the type |
IsConst | The const qualifier |
IsPackExpansion | Whether this is the pattern of a pack expansion. |
IsVolatile | The volatile qualifier |
Kind | The kind of Type this is |
| Name | Description |
|---|---|
Type [constructor] | Construct with a concrete type kind. |
~Type [destructor] [virtual] | Virtual destructor for polymorphic base. |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
| Name | Description |
|---|---|
TypeCommonBase | CRTP base that ties a concrete type to a fixed TypeKind. |
asType overloads
View as const Type.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
Type const&
asType() const noexcept;
A possibly qualified type.
View as mutable Type.
A possibly qualified type.
Return the symbol named by this type.
the symbol named by this type.
The constraints associated with the type
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
std::vector<ExprInfo> Constraints;
This represents the constraints associated with the type, such as SFINAE constraints.
For instance, if SFINAE detection is enabled, the expression std::enable_if_t<std::is_integral_v<T>, T> will have type T (NamedType) and constraints {std::is_integral_v<T>}.
The const qualifier
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
bool IsConst = false;
Whether this is the pattern of a pack expansion.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
bool IsPackExpansion = false;
The volatile qualifier
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
bool IsVolatile = false;
The kind of Type this is
Construct with a concrete type kind.
| Name | Description |
|---|---|
| kind | The object to construct from |
Virtual destructor for polymorphic base.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
virtual
~Type() = default;
CRTP base that ties a concrete type to a fixed TypeKind.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
template<TypeKind K>
struct TypeCommonBase
: Type
| Name | Description |
|---|---|
Type | A possibly qualified type. |
| Name | Description |
|---|---|
asType | asType overloads |
namedSymbol | Return the symbol named by this type. |
| Name | Description |
|---|---|
isArray | True when this is an array type. |
isAuto | True when this concrete kind is auto. |
isDecltype | True when this concrete kind is decltype. |
isFunction | True when this is a function type. |
isLValueReference | True when this is an lvalue reference. |
isMemberPointer | True when this is a member pointer. |
isNamed | True when this concrete kind is a named type. |
isPointer | True when this is a pointer type. |
isRValueReference | True when this is an rvalue reference. |
| Name | Description |
|---|---|
Constraints | The constraints associated with the type |
IsConst | The const qualifier |
IsPackExpansion | Whether this is the pattern of a pack expansion. |
IsVolatile | The volatile qualifier |
Kind | The kind of Type this is |
| Name | Description |
|---|---|
kind_id | Static discriminator for the concrete type. |
| Name | Description |
|---|---|
TypeCommonBase [constructor] | Construct the base with the fixed kind. |
| Name | Description |
|---|---|
mrdocs::mrdocs_member_descriptor_fn | |
mrdocs::mrdocs_base_descriptor_fn |
| Name | Description |
|---|---|
innerType | Return the inner type. |
innerType | Return the inner type. |
innerTypePtr | Return the inner type. |
innerTypePtr | Return the inner type. |
toString | Render a type to a human-readable string. |
| Name | Description |
|---|---|
ArrayType | C++ array type (bounded or unbounded). |
AutoType | Represents auto or decltype(auto) placeholder type. |
DecltypeType | decltype(expr) type wrapper. |
FunctionType | Function type with parameters, qualifiers, and noexcept info. |
LValueReferenceType | An lvalue reference type. |
MemberPointerType | Pointer-to-member type (object or function). |
NamedType | A type identified by name (possibly fundamental). |
PointerType | Pointer type wrapper. |
RValueReferenceType | An rvalue reference type. |
True when this is an array type.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isArray() noexcept;
true if kind_id is TypeKind::Array.
True when this concrete kind is auto.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isAuto() noexcept;
true if kind_id is TypeKind::Auto.
True when this concrete kind is decltype.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isDecltype() noexcept;
true if kind_id is TypeKind::Decltype.
True when this is a function type.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isFunction() noexcept;
true if kind_id is TypeKind::Function.
True when this is an lvalue reference.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isLValueReference() noexcept;
true if kind_id is TypeKind::LValueReference.
True when this is a member pointer.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isMemberPointer() noexcept;
true if kind_id is TypeKind::MemberPointer.
True when this concrete kind is a named type.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isNamed() noexcept;
true if kind_id is TypeKind::Named.
True when this is a pointer type.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isPointer() noexcept;
true if kind_id is TypeKind::Pointer.
True when this is an rvalue reference.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
static
bool
isRValueReference() noexcept;
true if kind_id is TypeKind::RValueReference.
Static discriminator for the concrete type.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
inline constexpr static
TypeKind kind_id = K;
Construct the base with the fixed kind.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
constexpr
TypeCommonBase() noexcept;
Type template argument.
Declared in <mrdocs/Metadata/TArg/TypeTArg.hpp>
struct TypeTArg final
: TArgCommonBase<TArgKind::Type>
| Name | Description |
|---|---|
TArgCommonBase<TArgKind::Type> | CRTP base that fixes the argument kind. |
| Name |
|---|
isConstant |
isTemplate |
isType |
| Name | Description |
|---|---|
Type | Template argument type. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
toString | Convert a template argument to a human-readable string. |
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isConstant() noexcept;
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isTemplate() noexcept;
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
constexpr
static
bool
isType() noexcept;
Template argument type.
Declared in <mrdocs/Metadata/TArg/TypeTArg.hpp>
Polymorphic<Type> Type = Polymorphic<struct Type>(AutoType{});
Type template parameter.
Declared in <mrdocs/Metadata/TParam/TypeTParam.hpp>
struct TypeTParam final
: TParamCommonBase<TParamKind::Type>
| Name | Description |
|---|---|
TParamCommonBase<TParamKind::Type> | CRTP base that fixes the parameter kind. |
| Name |
|---|
isConstant |
isTemplate |
isType |
| Name | Description |
|---|---|
Constraint | The type-constraint for the parameter, if any. |
KeyKind | Keyword (class/typename) the parameter uses |
| Name |
|---|
kind_id |
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isConstant() noexcept;
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isTemplate() noexcept;
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
constexpr
static
bool
isType() noexcept;
The type-constraint for the parameter, if any.
Declared in <mrdocs/Metadata/TParam/TypeTParam.hpp>
Optional<Polymorphic<Name>> Constraint = std::nullopt;
Keyword (class/typename) the parameter uses
Declared in <mrdocs/Metadata/TParam/TypeTParam.hpp>
TParamKeyKind KeyKind = TParamKeyKind::Class;
Info for typedef and using declarations.
Declared in <mrdocs/Metadata/Symbol/Typedef.hpp>
struct TypedefSymbol final
: SymbolCommonBase<SymbolKind::Typedef>
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Typedef> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
TypedefSymbol [constructor] | Create a typedef symbol bound to an ID. |
operator<=> | Compare typedef symbols, including alias target and template. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
IsUsing | Indicates if this is a new C++ "using"-style typedef |
Template | Template information when the alias is templated. |
Type | The aliased type. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Create a typedef symbol bound to an ID.
Declared in <mrdocs/Metadata/Symbol/Typedef.hpp>
explicit
TypedefSymbol(SymbolID ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to construct from |
Compare typedef symbols, including alias target and template.
Declared in <mrdocs/Metadata/Symbol/Typedef.hpp>
std::strong_ordering
operator<=>(TypedefSymbol const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
Indicates if this is a new C++ "using"-style typedef
Declared in <mrdocs/Metadata/Symbol/Typedef.hpp>
bool IsUsing = false;
using MyVector = std::vector<int>
False means it's a C-style typedef:
typedef std::vector<int> MyVector;
Template information when the alias is templated.
The aliased type.
Declared in <mrdocs/Metadata/Symbol/Typedef.hpp>
Polymorphic<Type> Type = Polymorphic<struct Type>(NamedType{});
Holds an unexpected error value for Expected.
Declared in <mrdocs/Support/Expected.hpp>
template<class E>
class Unexpected;
| Name | Description |
|---|---|
Unexpected [constructor] | Constructors |
operator= | Assignment operators |
error | error overloads |
swap | Swap the contained error with another instance. |
| Name | Description |
|---|---|
mrdocs::swap | |
mrdocs::operator== | Equality operator |
Constructors
Declared in <mrdocs/Support/Expected.hpp>
Copy constructor.
constexpr
Unexpected(Unexpected const& other) = default;
» more...
Move constructor.
constexpr
Unexpected(Unexpected&& other) = default;
» more...
Construct from an error value convertible to E.
template<class Er = E>
requires (!std::is_same_v<std::remove_cvref_t<Er>, Unexpected>) &&
(!std::is_same_v<std::remove_cvref_t<Er>, std::in_place_t>) &&
std::is_constructible_v<E, Er>
constexpr
explicit
Unexpected(Er&& e) noexcept(std::is_nothrow_constructible_v<E, Er>);
» more...
In-place construct the error value with arguments.
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Unexpected(
std::in_place_t in_place,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
» more...
In-place construct the error value from an initializer list.
template<
class U,
class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Unexpected(
std::in_place_t in_place,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);
» more...
| Name | Description |
|---|---|
| e | Error value to store. |
| in_place | Tag selecting in-place construction. |
| args | Arguments forwarded to E's constructor. |
| il | Initializer list for the error. |
Copy constructor.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Unexpected(Unexpected const& other) = default;
| Name | Description |
|---|---|
| other | The object to copy construct from |
Move constructor.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Unexpected(Unexpected&& other) = default;
| Name | Description |
|---|---|
| other | The object to move construct from |
Construct from an error value convertible to E.
Declared in <mrdocs/Support/Expected.hpp>
template<class Er = E>
requires (!std::is_same_v<std::remove_cvref_t<Er>, Unexpected>) &&
(!std::is_same_v<std::remove_cvref_t<Er>, std::in_place_t>) &&
std::is_constructible_v<E, Er>
constexpr
explicit
Unexpected(Er&& e) noexcept(std::is_nothrow_constructible_v<E, Er>);
| Name | Description |
|---|---|
| e | Error value to store. |
In-place construct the error value with arguments.
Declared in <mrdocs/Support/Expected.hpp>
template<class... Args>
requires std::is_constructible_v<E, Args...>
constexpr
explicit
Unexpected(
std::in_place_t in_place,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, Args...>);
| Name | Description |
|---|---|
| in_place | Tag selecting in-place construction. |
| args | Arguments forwarded to E's constructor. |
In-place construct the error value from an initializer list.
Declared in <mrdocs/Support/Expected.hpp>
template<
class U,
class... Args>
requires std::is_constructible_v<E, std::initializer_list<U>&, Args...>
constexpr
explicit
Unexpected(
std::in_place_t in_place,
std::initializer_list<U> il,
Args&&... args) noexcept(std::is_nothrow_constructible_v<E, std::initializer_list<U> &, Args...>);
| Name | Description |
|---|---|
| in_place | Tag selecting in-place construction. |
| il | Initializer list for the error. |
| args | Additional constructor arguments. |
Assignment operators
Declared in <mrdocs/Support/Expected.hpp>
Copy assignment.
constexpr
Unexpected&
operator=(Unexpected const& other) = default;
» more...
Move assignment.
constexpr
Unexpected&
operator=(Unexpected&& other) = default;
» more...
Copy assignment.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Unexpected&
operator=(Unexpected const& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to copy assign from |
Move assignment.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
Unexpected&
operator=(Unexpected&& other) = default;
Reference to the current object
| Name | Description |
|---|---|
| other | The object to move assign from |
error overloads
Declared in <mrdocs/Support/Expected.hpp>
Return a const reference to the stored error.
[[nodiscard]]
constexpr
E const&
error() const & noexcept;
» more...
Return a reference to the stored error.
[[nodiscard]]
constexpr
E&
error() & noexcept;
» more...
Return a const rvalue reference to the stored error.
[[nodiscard]]
constexpr
E const&&
error() const && noexcept;
» more...
Return a rvalue reference to the stored error.
[[nodiscard]]
constexpr
E&&
error() && noexcept;
» more...
E.E.E.E.Return a const reference to the stored error.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
E const&
error() const & noexcept;
Const reference to E.
Return a reference to the stored error.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
E&
error() & noexcept;
Reference to E.
Return a const rvalue reference to the stored error.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
E const&&
error() const && noexcept;
Const rvalue reference to E.
Return a rvalue reference to the stored error.
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
E&&
error() && noexcept;
Rvalue reference to E.
Swap the contained error with another instance.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
swap(Unexpected& other) noexcept(std::is_nothrow_swappable_v<E>)
requires std::is_swappable_v<E>;
| Name | Description |
|---|---|
| other | Holds an unexpected error value for Expected. |
Info for using declarations.
Declared in <mrdocs/Metadata/Symbol/Using.hpp>
struct UsingSymbol final
: SymbolCommonBase<SymbolKind::Using>
For instance, the following code:
using A::f; // where f is a function in namespace A
would be represented by a UsingSymbol object.
Using-declarations can be used to introduce namespace members into other namespaces and block scopes, or to introduce base class members into derived class definitions, or to introduce enumerators into namespaces, block, and class scopes.
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Using> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
UsingSymbol [constructor] | Create a using-declaration symbol bound to an ID. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
Class | The using declaration. |
IntroducedName | The symbol being introduced. |
ShadowDeclarations | The shadow declarations. |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
allMembers | Access declarations introduced by this using-declaration. |
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Create a using-declaration symbol bound to an ID.
| Name | Description |
|---|---|
| ID | The object to construct from |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
The using declaration.
The symbol being introduced.
Declared in <mrdocs/Metadata/Symbol/Using.hpp>
Polymorphic<Name> IntroducedName = Polymorphic<struct Name>(std::in_place_type<IdentifierName>);
This is the symbol that is being "used" or introduced into the current scope.
Note that this can be a qualified name, such as A::f in the example above.
The shadow declarations.
Declared in <mrdocs/Metadata/Symbol/Using.hpp>
std::vector<SymbolID> ShadowDeclarations;
A using declaration can refer to and introduce multiple symbols into the current context.
These multiple symbols are considered a special case of declarations: "shadow declarations".
This typically happens when there are conflicting symbol names in the scope being introduced, such as:
Overloaded functions: the base namespace contains overloaded functions. Name conflicts: the base scope contains a function and a type. Enums: a using enum declaration can refer to multiple enumerators.
Also note that more shadow declarations can be introduced later in the same scope, after the using declaration.
The shadow declarations here are only those that are shadowed at the point where the using declaration is located.
A variable.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
struct VariableSymbol final
: SymbolCommonBase<SymbolKind::Variable>
This includes variables at namespace or record scope.
| Name | Description |
|---|---|
SymbolCommonBase<SymbolKind::Variable> | Base class for providing variant discriminator functions. |
| Name | Description |
|---|---|
VariableSymbol [constructor] | Create a variable symbol bound to an ID. |
operator<=> | Compare variables by type, flags, and initializer. |
| Name |
|---|
isConcept |
isEnum |
isEnumConstant |
isFunction |
isGuide |
isNamespace |
isNamespaceAlias |
isOverloads |
isRecord |
isTypedef |
isUsing |
isVariable |
| Name | Description |
|---|---|
Attributes | Raw attribute spellings attached to the variable. |
BitfieldWidth | The width of the bitfield |
HasNoUniqueAddress | Whether the variable uses [[no_unique_address]]. |
Initializer | The default member initializer, if any. |
IsBitfield | Whether the field is a bitfield |
IsConstexpr | Whether the variable is constexpr. |
IsConstinit | Whether the variable is constinit. |
IsDeprecated | Whether the variable is marked deprecated. |
IsInline | Whether the variable is declared inline. |
IsMaybeUnused | Whether the variable carries [[maybe_unused]]. |
IsMutable | Whether the field is declared mutable |
IsRecordField | True if this variable is a data member of a record. |
IsThreadLocal | Whether the variable is thread_local. |
IsVariant | Whether the field is a variant member |
StorageClass | Storage class specifier applied to the variable. |
Template | The template information, if any. |
Type | The type of the variable |
| Name |
|---|
kind_id |
| Name | Description |
|---|---|
canMerge | Check whether two symbols may be merged. |
getPrimaryLocation | Determine a location to use when none is explicitly chosen. |
Create a variable symbol bound to an ID.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
explicit
VariableSymbol(SymbolID const& ID) noexcept;
| Name | Description |
|---|---|
| ID | The object to copy construct from |
Compare variables by type, flags, and initializer.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
std::strong_ordering
operator<=>(VariableSymbol const& other) const;
The relative order of the objects
| Name | Description |
|---|---|
| other | The right operand |
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isConcept() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnum() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isEnumConstant() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isFunction() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isGuide() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespace() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isNamespaceAlias() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isOverloads() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isRecord() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isTypedef() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isUsing() noexcept;
Declared in <mrdocs/Metadata/Symbol/SymbolNodes.inc>
constexpr
static
bool
isVariable() noexcept;
Raw attribute spellings attached to the variable.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
std::vector<std::string> Attributes;
The width of the bitfield
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
ConstantExprInfo<uint64_t> BitfieldWidth;
Whether the variable uses [[no_unique_address]].
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool HasNoUniqueAddress = false;
The default member initializer, if any.
Whether the field is a bitfield
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsBitfield = false;
Whether the variable is constexpr.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsConstexpr = false;
Whether the variable is constinit.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsConstinit = false;
Whether the variable is marked deprecated.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsDeprecated = false;
Whether the variable is declared inline.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsInline = false;
Whether the variable carries [[maybe_unused]].
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsMaybeUnused = false;
Whether the field is declared mutable
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsMutable = false;
True if this variable is a data member of a record.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsRecordField = false;
Whether the variable is thread_local.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsThreadLocal = false;
Whether the field is a variant member
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
bool IsVariant = false;
Storage class specifier applied to the variable.
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
StorageClassKind StorageClass = StorageClassKind::None;
The template information, if any.
The type of the variable
Declared in <mrdocs/Metadata/Symbol/Variable.hpp>
Polymorphic<Type> Type = Polymorphic<struct Type>(NamedType{});
A visitor for a type
Declared in <mrdocs/Support/Visitor.hpp>
template<
typename Base,
typename Fn,
typename... Args>
class Visitor;
This class is used to implement the visitor pattern. It stores a reference to an object of type Base, and a function object Fn which is called with the derived type as the first argument, followed by Args.
The visitor is constructed with the object to visit, the function object, and the arguments to pass to the function object.
The method visit is a template which accepts a derived type of Base. It calls the function object with the derived type as the first argument, followed by the arguments passed to the constructor.
| Name | Description |
|---|---|
Visitor [constructor] | Constructor |
visit | Visit a derived type |
| Name | Description |
|---|---|
| Base | The base type of the object |
| Fn | The function object type |
| Args | The argument types |
Constructor
Declared in <mrdocs/Support/Visitor.hpp>
Visitor(
Base&& obj,
Fn&& fn,
Args&&... args);
| Name | Description |
|---|---|
| obj | The object to visit |
| fn | The function object to call |
| args | The arguments to pass to the function object |
Visit a derived type
Declared in <mrdocs/Support/Visitor.hpp>
template<std::derived_from<std::remove_cvref_t<Base>> Derived>
decltype(auto)
visit();
This method calls the function object with the derived type as the first argument, followed by the arguments passed to the constructor.
The result of calling the function object
| Name | Description |
|---|---|
| Derived | The derived type to visit |
Enables recursive lambdas by passing a self-reference as the first argument.
Declared in <mrdocs/ADT/Overload.hpp>
template<class F>
class YCombinator;
YCombinator stores a callable F and exposes operator() that forwards arguments to F, prepending a reference to *this so that F can recurse.
Overloads are provided for &, const&, &&, const&& to preserve value category.
auto fact = fn::yCombinator( []self, int n) -> long long { return n <= 1 ? 1 : n * self(n - 1); }); auto r = fact(10);
| Name | Description |
|---|---|
YCombinator [constructor] | Constructs a YCombinator from the given callable. |
operator() | Function call operators |
| Name | Description |
|---|---|
yCombinator | Factory that creates a YCombinator from a callable. |
| Name | Description |
|---|---|
| F | The callable to wrap. |
Constructs a YCombinator from the given callable.
Declared in <mrdocs/ADT/Overload.hpp>
constexpr
explicit
YCombinator(F f) noexcept(std::is_nothrow_move_constructible_v<F>);
| Name | Description |
|---|---|
| f | The callable to store. |
Function call operators
Declared in <mrdocs/ADT/Overload.hpp>
Invokes the stored callable, passing *this as the first parameter.
template<class... Args>
constexpr
decltype(auto)
operator()(Args&&... args) &;
» more...
Const lvalue overload of operator().
template<class... Args>
constexpr
decltype(auto)
operator()(Args&&... args) const &;
» more...
Rvalue overload of operator().
template<class... Args>
constexpr
decltype(auto)
operator()(Args&&... args) &&;
» more...
Const rvalue overload of operator().
template<class... Args>
constexpr
decltype(auto)
operator()(Args&&... args) const &&;
» more...
Whatever the callable returns.
| Name | Description |
|---|---|
| args | The arguments to forward to the callable after the self reference. |
Invokes the stored callable, passing *this as the first parameter.
Declared in <mrdocs/ADT/Overload.hpp>
template<class... Args>
constexpr
decltype(auto)
operator()(Args&&... args) &;
Whatever the callable returns.
| Name | Description |
|---|---|
| args | The arguments to forward to the callable after the self reference. |
Const lvalue overload of operator().
Declared in <mrdocs/ADT/Overload.hpp>
template<class... Args>
constexpr
decltype(auto)
operator()(Args&&... args) const &;
Whatever the callable returns.
| Name | Description |
|---|---|
| args | The arguments to forward to the callable after the self reference. |
Rvalue overload of operator().
Declared in <mrdocs/ADT/Overload.hpp>
template<class... Args>
constexpr
decltype(auto)
operator()(Args&&... args) &&;
Whatever the callable returns.
| Name | Description |
|---|---|
| args | The arguments to forward to the callable after the self reference. |
Const rvalue overload of operator().
Declared in <mrdocs/ADT/Overload.hpp>
template<class... Args>
constexpr
decltype(auto)
operator()(Args&&... args) const &&;
Whatever the callable returns.
| Name | Description |
|---|---|
| args | The arguments to forward to the callable after the self reference. |
Propagate const qualification from From to To, keeping references.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
struct add_const_from
: std::conditional<std::is_const_v<std::remove_reference_t<From>>, add_reference_from_t<To, std::remove_reference_t<To> const>, To>
| Name | Description |
|---|---|
std::conditional<std::is_const_v<std::remove_reference_t<From>>, add_reference_from_t<To, std::remove_reference_t<To> const>, To> |
| Name | Description |
|---|---|
add_cv_from | Propagate both const and volatile qualifiers from From to To. |
Propagate both const and volatile qualifiers from From to To.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
struct add_cv_from
: add_const_from<From, add_volatile_from_t<From, To>>
| Name | Description |
|---|---|
add_const_from<From, add_volatile_from_t<From, To>> | Propagate const qualification from From to To, keeping references. |
Propagate cv-qualification and reference category from From to To.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
struct add_cvref_from
: add_reference_from<From, add_cv_from_t<From, To>>
| Name | Description |
|---|---|
add_reference_from<From, add_cv_from_t<From, To>> | Propagate reference qualification from From to To. |
Propagate lvalue-reference from From to To if present.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
struct add_lvalue_reference_from
: std::conditional<std::is_lvalue_reference_v<From>, std::add_lvalue_reference_t<To>, To>
| Name | Description |
|---|---|
std::conditional<std::is_lvalue_reference_v<From>, std::add_lvalue_reference_t<To>, To> |
| Name | Description |
|---|---|
add_reference_from | Propagate reference qualification from From to To. |
Propagate reference qualification from From to To.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
struct add_reference_from
: add_lvalue_reference_from<From, add_rvalue_reference_from_t<From, To>>
| Name | Description |
|---|---|
add_lvalue_reference_from<From, add_rvalue_reference_from_t<From, To>> | Propagate lvalue-reference from From to To if present. |
| Name | Description |
|---|---|
add_cvref_from | Propagate cv-qualification and reference category from From to To. |
Propagate rvalue-reference from From to To if present.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
struct add_rvalue_reference_from
: std::conditional<std::is_rvalue_reference_v<From>, std::add_rvalue_reference_t<To>, To>
| Name | Description |
|---|---|
std::conditional<std::is_rvalue_reference_v<From>, std::add_rvalue_reference_t<To>, To> |
Propagate volatile qualification from From to To, keeping references.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename From,
typename To>
struct add_volatile_from
: std::conditional<std::is_volatile_v<std::remove_reference_t<From>>, add_reference_from_t<To, std::remove_reference_t<To> volatile>, To>
| Name | Description |
|---|---|
std::conditional<std::is_volatile_v<std::remove_reference_t<From>>, add_reference_from_t<To, std::remove_reference_t<To> volatile>, To> |
A movable, type-erased function object.
Declared in <mrdocs/Support/any_callable.hpp>
template<class>
class any_callable;
Usage:
any_callable<void(void)> f;
Type-erased callable wrapper for signature R(Args...).
Declared in <mrdocs/Support/any_callable.hpp>
template<
class R,
class... Args>
class any_callable<R(Args...)>;
| Name | Description |
|---|---|
any_callable [constructor] [deleted] | Constructors |
operator() | Invoke the stored callable. |
Constructors
Declared in <mrdocs/Support/any_callable.hpp>
Deleted default constructor to prevent empty call targets.
any_callable() = delete;
» more...
Construct from a callable object matching the signature.
template<class Callable>
requires std::is_invocable_r_v<R, Callable, Args...>
any_callable(Callable&& f);
» more...
| Name | Description |
|---|---|
| f | Callable to store; must satisfy R(Args...). |
Deleted default constructor to prevent empty call targets.
Declared in <mrdocs/Support/any_callable.hpp>
any_callable() = delete;
Construct from a callable object matching the signature.
Declared in <mrdocs/Support/any_callable.hpp>
template<class Callable>
requires std::is_invocable_r_v<R, Callable, Args...>
any_callable(Callable&& f);
| Name | Description |
|---|---|
| f | Callable to store; must satisfy R(Args...). |
Invoke the stored callable.
Declared in <mrdocs/Support/any_callable.hpp>
R
operator()(Args&&... args) const;
Result of the wrapped callable.
| Name | Description |
|---|---|
| args | Arguments forwarded to the callable. |
Dependent alias of T, useful for delaying instantiation.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<
typename T,
typename U>
struct make_dependent;
| Name | Description |
|---|---|
type | Make a type dependent on another template parameter. |
Make a type dependent on another template parameter.
Declared in <mrdocs/Support/TypeTraits.hpp>
using type = T;
nullable_traits<T> defines how to treat a T as “nullable” without an external engaged bit.
Declared in <mrdocs/ADT/Nullable.hpp>
template<class T>
struct nullable_traits;
This trait is the canonical place to encode nullability semantics used by any optional-like type.
It exposes the minimal operations needed by an optional:
is_null(const T&): test if a value is null.
null(): create a null value.
make_null(T&): turn an existing value into null.
Users may explicitly specialize nullable_traits for their types to define the desired semantics.
nullable_traits specialization for Location.
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
template<>
struct nullable_traits<Location>;
Semantics
The “null” (sentinel) state is any Location whose ShortPath is empty.
Creating a null value produces a Location with all fields defaulted and ShortPath empty.
Making an existing value null clears ShortPath and resets the other fields to their defaults.
Rationale
This mirrors the old LocationEmptyPredicate, which treated an empty ShortPath as “empty/null.”
| Name | Description |
|---|---|
is_null | Test if the location is null (empty ShortPath). |
make_null | Reset a location to the null sentinel state. |
null | Create a null location sentinel. |
Test if the location is null (empty ShortPath).
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
constexpr
static
bool
is_null(Location const& v) noexcept;
True when ShortPath is empty.
| Name | Description |
|---|---|
| v | Source location of a symbol or entity. |
Reset a location to the null sentinel state.
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
constexpr
static
void
make_null(Location& v) noexcept;
| Name | Description |
|---|---|
| v | Source location of a symbol or entity. |
Create a null location sentinel.
Declared in <mrdocs/Metadata/Symbol/Location.hpp>
constexpr
static
Location
null() noexcept;
Location with every field cleared.
nullable_traits for types with a sentinel.
Declared in <mrdocs/ADT/Nullable.hpp>
template<class T>
requires (!HasSentinel<T> && ClearableContainerLike<T>)
struct nullable_traits<T>;
Delegates null handling to sentinel_traits<T>.
nullable_traits for clearable empty types.
Treats the empty state as null, creates null via default construction, and erases via clear().
Return true if v is empty.
| Name | Description |
|---|---|
is_null | Return true if v matches the sentinel for T. |
make_null | Overwrite v with the sentinel null value. |
null | Return the sentinel value representing null. |
true when the container is empty.
| Name | Description |
|---|---|
| v | Value to test. |
Return true if v matches the sentinel for T.
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
bool
is_null(T const& v) noexcept(noexcept(v.empty()));
true when v equals the sentinel.
| Name | Description |
|---|---|
| v | Value to test. |
Overwrite v with the sentinel null value.
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
void
make_null(T& v) noexcept(noexcept(v.clear()));
Clear v to its null (empty) state.
| Name | Description |
|---|---|
| v | Value to clear. |
Return the sentinel value representing null.
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
T
null() noexcept(std::is_nothrow_default_constructible_v<T>);
Construct a null value using the default constructor.
T.T.nullable_traits for Polymorphic<T>.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<class T>
struct nullable_traits<Polymorphic<T>>;
Only this friend specialization can create/reset the null state.
| Name | Description |
|---|---|
is_null | Return true if the polymorphic value is disengaged. |
make_null | Reset the polymorphic value to null. |
null | Return a null polymorphic instance. |
Return true if the polymorphic value is disengaged.
Declared in <mrdocs/ADT/Polymorphic.hpp>
constexpr
static
bool
is_null(Polymorphic<T> const& v) noexcept;
true when v does not hold an object.
| Name | Description |
|---|---|
| v | Value to test. |
Reset the polymorphic value to null.
Declared in <mrdocs/ADT/Polymorphic.hpp>
constexpr
static
void
make_null(Polymorphic<T>& v) noexcept;
| Name | Description |
|---|---|
| v | Value to clear. |
Return a null polymorphic instance.
Disengaged Polymorphic.
Defines a customization point for types that have an intrinsic sentinel value denoting “null”.
Declared in <mrdocs/ADT/Nullable.hpp>
template<class T>
struct sentinel_traits;
Users may specialize this trait for their own types to declare a sentinel-based null representation.
When enabled, nullable semantics can be implemented in terms of the sentinel without storing a separate engaged/disengaged flag.
Contract for specializations:
Provide static constexpr T sentinel() noexcept; which returns the distinguished null value.
Provide static constexpr bool is_sentinel(const T&) noexcept; which recognizes the null value.
If a type does not have a well-defined sentinel, leave the primary template in effect.
Notes
Built-in pointer types and std::nullptr_t are pre-specialized to use nullptr as the sentinel.
sentinel_traits specialization for std::nullptr_t.
| Name | Description |
|---|---|
is_sentinel | Return true if the value equals the sentinel. |
sentinel | Return the sentinel value for std::nullptr_t. |
Return true if the value equals the sentinel.
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
bool
is_sentinel(std::nullptr_t) noexcept;
Always true because the sentinel is unique.
Return the sentinel value for std::nullptr_t.
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
std::nullptr_t
sentinel() noexcept;
the sentinel value for std::nullptr_t.
sentinel_traits specialization for unsigned integral types.
Declared in <mrdocs/ADT/Nullable.hpp>
template<std::floating_point T>
requires std::is_enum_v<T> &&
(requires { T::unknown; } ||
requires { T::Unknown; } ||
requires { T::UNKNOWN; } ||
requires { T::none; } ||
requires { T::None; } ||
requires { T::NONE; })
struct sentinel_traits<T>;
Uses the maximum representable value (~0u) as the sentinel, which corresponds to -1 when converted.
sentinel_traits specialization for floating-point types.
Uses a quiet NaN as the sentinel value. This assumes that T supports NaN and that it is distinguishable from all ordinary values.
Return the floating-point NaN sentinel.
sentinel_traits specialization for enums with a well-known "null" enumerator.
If the enum defines Unknown, UNKNOWN, None, or NONE, this trait uses that enumerator as the sentinel. This requires that such an enumerator exists and is accessible from the scope of T.
Return the enum sentinel value.
| Name | Description |
|---|---|
is_sentinel | Return true if the value equals the sentinel. |
sentinel | Return the sentinel value (~0u). |
Return true if the value equals the sentinel.
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
bool
is_sentinel(T v) noexcept;
Return true if v is the NaN sentinel.
Return true if v equals the sentinel value.
true when v equals the sentinel.true when v is NaN.true when v matches the sentinel enumerator.| Name | Description |
|---|---|
| v | Value to test. |
Return the sentinel value (~0u).
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
T
sentinel() noexcept;
the sentinel value (~0u).
sentinel_traits specialization for raw pointers.
Uses nullptr as the sentinel value.
| Name | Description |
|---|---|
is_sentinel | Return true if the pointer equals the sentinel. |
sentinel | Return the sentinel pointer value (nullptr). |
Return true if the pointer equals the sentinel.
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
bool
is_sentinel(T const* p) noexcept;
true when p is nullptr.
| Name | Description |
|---|---|
| p | Pointer to test. |
Return the sentinel pointer value (nullptr).
Declared in <mrdocs/ADT/Nullable.hpp>
constexpr
static
T*
sentinel() noexcept;
the sentinel pointer value (nullptr).
Tag type used to select unexpected construction.
Declared in <mrdocs/Support/Expected.hpp>
struct unexpect_t;
| Name | Description |
|---|---|
unexpect_t [constructor] | Default constructor. |
Default constructor.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
explicit
unexpect_t() = default;
A scoped guard which unlocks a mutex.
Declared in <mrdocs/Support/unlock_guard.hpp>
class unlock_guard;
| Name | Description |
|---|---|
unlock_guard [constructor] | Constructor. |
~unlock_guard [destructor] | Destructor. |
Constructor.
Declared in <mrdocs/Support/unlock_guard.hpp>
explicit
unlock_guard(std::mutex& m);
| Name | Description |
|---|---|
| m | The object to copy construct from |
Destructor.
Declared in <mrdocs/Support/unlock_guard.hpp>
~unlock_guard();
Access specifier.
Declared in <mrdocs/Metadata/Specifiers/AccessKind.hpp>
enum class AccessKind : int;
None is set to zero since it is the most frequently occurring access, and it is elided by the bitstream encoder because it has an all-zero bit pattern. This improves compression in the bitstream.
None is used for namespace members and friend; such declarations have no access.
| Name | Description |
|---|---|
None | Unspecified access |
Public | Public access |
Protected | Protected access |
Private | Private access |
| Name | Description |
|---|---|
toString | Convert access specifier to its string form. |
The kind of auto keyword used in a declaration.
Declared in <mrdocs/Metadata/Type/AutoKind.hpp>
enum class AutoKind : int;
This is either auto or decltype(auto).
| Name | Description |
|---|---|
Auto | The auto keyword |
DecltypeAuto | The decltype(auto) keyword |
| Name | Description |
|---|---|
toString | Convert an auto-kind to its spelling. |
constexpr/consteval specifier kinds
Declared in <mrdocs/Metadata/Specifiers/ConstexprKind.hpp>
enum class ConstexprKind : int;
[dcl.spec.general]p2: At most one of the constexpr, consteval, and constinit keywords shall appear in a decl-specifier-seq
| Name | Description |
|---|---|
None | No constexpr or consteval specifier |
Constexpr | The constexpr specifier |
Consteval | The consteval specifier only valid for functions |
| Name | Description |
|---|---|
toString | Convert a constexpr/consteval specifier kind to a string. |
Explicit specifier kinds
Declared in <mrdocs/Metadata/Specifiers/ExplicitKind.hpp>
enum class ExplicitKind : int;
| Name | Description |
|---|---|
False | No explicit-specifier or explicit-specifier evaluated to false |
True | explicit-specifier evaluates to true |
Dependent | Dependent explicit-specifier |
| Name | Description |
|---|---|
toString | Convert an explicit kind to its string form. |
Determine why a symbol is extracted
Declared in <mrdocs/Metadata/Symbol/ExtractionMode.hpp>
enum class ExtractionMode : int;
The enum constants are ordered by specificity, with the least specific at the beginning and the most specific at the end.
| Name | Description |
|---|---|
Regular | We're extracting the current symbol because it passes all filters. |
SeeBelow | We're extracting the current symbol because it passes all filters, but we should also tag it as see-below because it passes one of the see-below filters. This symbol has its own page but it has no details and no child members. |
ImplementationDefined | We're extracting the current symbol because it passes all filters, but we should also tag it as implementation-defined because one of its parents matches the implementation-defined filter. This symbol has no page and other symbols that depend on it will just render /implementation-defined/. |
Dependency | We're extracting the current symbol even though it doesn't pass all filters because it's a direct dependency of a symbol that does pass all filters and needs information about it (e.g.: base classes outside the filters). This symbol has no page and it might even deleted from the corpus if no other symbol depends on it after we extracted the information we wanted from it in post-processing steps. |
| Name | Description |
|---|---|
leastSpecific | Compare ExtractionModes and returns the least specific |
merge | Merge two ExtractionMode values. |
mostSpecific | Compare ExtractionModes and returns the most specific |
Classifies where a file originates from.
Declared in <mrdocs/Metadata/Symbol/FileKind.hpp>
enum class FileKind : int;
| Name | Description |
|---|---|
Source | File in the source directory |
System | File in a system include directory |
Other | File outside the source directory |
Function classifications
Declared in <mrdocs/Metadata/Symbol/FunctionClass.hpp>
enum class FunctionClass : int;
| Name | Description |
|---|---|
Normal | The function is a normal function. |
Constructor | The function is a constructor. |
Conversion | The function is a conversion operator. |
Destructor | The function is a destructor. |
Categorically describes a fundamental type.
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
enum class FundamentalTypeKind : int;
| Name | Description |
|---|---|
Void | void |
Nullptr | std::nullptr_t |
Bool | bool |
Char | char |
SignedChar | signed char |
UnsignedChar | unsigned char |
Char8 | char8_t |
Char16 | char16_t |
Char32 | char32_t |
WChar | wchar_t |
Short | short / short int / signed short / signed short int |
UnsignedShort | unsigned short / unsigned short int |
Int | int / signed / signed int |
UnsignedInt | unsigned / unsigned int |
Long | long / long int / signed long / signed long int |
UnsignedLong | unsigned long / unsigned long int |
LongLong | long long / long long int / signed long long / signed long long int |
UnsignedLongLong | unsigned long long / unsigned long long int |
Float | float |
Double | double |
LongDouble | long double |
| Name | Description |
|---|---|
makeChar | Apply the "char" specifier to the type |
makeLong | Apply the "long" specifier to the type |
makeShort | Apply the "short" specifier to the type |
makeSigned | Apply the "signed" specifier to the type |
makeUnsigned | Apply the "unsigned" specifier to the type |
toString | Convert a FundamentalTypeKind to a string. |
https://en.cppreference.com/w/cpp/language/types
Classification of list ordering.
Declared in <mrdocs/Metadata/DocComment/Block/ListKind.hpp>
enum class ListKind : int;
| Name | Description |
|---|---|
Unordered | A bulleted list with no inherent ordering. |
Ordered | A numbered list where item order matters. |
Kinds of names that appear in type and symbol metadata.
Declared in <mrdocs/Metadata/Name/NameKind.hpp>
enum class NameKind : int;
Exception specification kinds
Declared in <mrdocs/Metadata/Specifiers/NoexceptKind.hpp>
enum class NoexceptKind : int;
| Name | Description |
|---|---|
False | Potentially-throwing exception specification |
True | Non-throwing exception specification |
Dependent | Dependent exception specification |
| Name | Description |
|---|---|
toString | Convert a noexcept kind to its string form. |
Operator kinds
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
enum class OperatorKind : int;
| Name | Description |
|---|---|
None | No operator |
New | The new Operator |
Delete | The delete Operator |
ArrayNew | The new[] Operator |
ArrayDelete | The delete[] Operator |
Plus | The + Operator |
Minus | The - Operator |
Star | The * Operator |
Slash | The / Operator |
Percent | The % Operator |
Caret | The ^ Operator |
Amp | The & Operator |
Pipe | The | Operator |
Tilde | The ~ Operator |
Equal | The ! Operator |
PlusEqual | The += Operator |
MinusEqual | The -= Operator |
StarEqual | The *= Operator |
SlashEqual | The /= Operator |
PercentEqual | The %= Operator |
CaretEqual | The ^= Operator |
AmpEqual | The &= Operator |
PipeEqual | The |= Operator |
LessLess | The << Operator |
GreaterGreater | The >> Operator |
LessLessEqual | The <<= Operator |
GreaterGreaterEqual | The >>= Operator |
Exclaim | The ! Operator |
EqualEqual | The == Operator |
ExclaimEqual | The != Operator |
Less | The < Operator |
LessEqual | The <= Operator |
Greater | The > Operator |
GreaterEqual | The >= Operator |
Spaceship | The <=> Operator |
AmpAmp | The && Operator |
PipePipe | The || Operator |
PlusPlus | The ++ Operator |
MinusMinus | The -- Operator |
Comma | The , Operator |
ArrowStar | The ->* Operator |
Arrow | The -> Operator |
Call | The () Operator |
Subscript | The []Operator |
Conditional | The ? : Operator |
Coawait | The coawait Operator |
| Name | Description |
|---|---|
getOperatorKind | Return the short name of an operator as a string. |
getOperatorKindFromSuffix | Return the short name of an operator as a string. |
getOperatorName | Return the name of an operator as a string. |
getOperatorReadableName | Return the human-readable name of the operator |
getSafeOperatorName | Return the safe name of an operator as a string. |
getShortOperatorName | Return the short name of an operator as a string. |
isBinaryOperator | Determines whether the operator is potentially binary. |
isUnaryOperator | Determines whether the operator is potentially unary. |
Type qualifiers
Declared in <mrdocs/Metadata/Type/QualifierKind.hpp>
enum QualifierKind;
| Name | Description |
|---|---|
None | No qualifiers |
Const | The const qualifier |
Volatile | The volatile qualifier |
| Name | Description |
|---|---|
toString | Convert a cv/ref qualifier kind to its string form. |
The kind of record: struct, class, or union.
Declared in <mrdocs/Metadata/Symbol/RecordKeyKind.hpp>
enum class RecordKeyKind : int;
| Name | Description |
|---|---|
Struct | A struct. |
Class | A C++ class. |
Union | A C-style Union |
| Name | Description |
|---|---|
getDefaultAccessString | Return the default accessibility for a record key kind. |
Reference type kinds
Declared in <mrdocs/Metadata/Specifiers/ReferenceKind.hpp>
enum class ReferenceKind : int;
| Name | Description |
|---|---|
None | Not a reference |
LValue | An L-Value reference |
RValue | An R-Value reference |
| Name | Description |
|---|---|
toString | Convert a reference kind to its string representation. |
Storage class kinds
Declared in <mrdocs/Metadata/Specifiers/StorageClassKind.hpp>
enum class StorageClassKind : int;
[dcl.stc]p1: At most one storage-class-specifier shall appear in a given decl-specifier-seq, except that thread_local may appear with static or extern.
| Name | Description |
|---|---|
None | No storage class specifier |
Extern | thread_local storage-class-specifier |
Static | mutable storage-class-specifier |
Auto | auto storage-class-specifier (removed in C++11) only valid for variables |
Register | register storage-class-specifier (removed in C++17) only valid for variables |
| Name | Description |
|---|---|
toString | Convert a storage class kind to its string form. |
Info variant discriminator
Declared in <mrdocs/Metadata/Symbol/SymbolKind.hpp>
enum class SymbolKind : int;
| Name | Description |
|---|---|
None | Kind is not specified. |
The kind of template argument.
Declared in <mrdocs/Metadata/TArg/TArgKind.hpp>
enum class TArgKind : int;
The keyword a template parameter was declared with
Declared in <mrdocs/Metadata/TParam/TParamKeyKind.hpp>
enum class TParamKeyKind : int;
| Name | Description |
|---|---|
Class | Class keyword |
Typename | Typename keyword |
Discriminates the different template parameter categories.
Declared in <mrdocs/Metadata/TParam/TParamKind.hpp>
enum class TParamKind : int;
Horizontal alignment for table columns.
Declared in <mrdocs/Metadata/DocComment/Block/TableAlignmentKind.hpp>
enum class TableAlignmentKind : int;
| Name | Description |
|---|---|
None | No explicit alignment; renderer default applies. |
Left | Align content to the left edge. |
Center | Center the content. |
Right | Align content to the right edge. |
The kind of template or specialization.
Declared in <mrdocs/Metadata/Template.hpp>
enum class TemplateSpecKind : int;
| Name | Description |
|---|---|
Primary | Primary template |
Explicit | Full template specialization |
Partial | Partial template specialization |
| Name | Description |
|---|---|
toString | Convert the specialization kind to a readable string. |
Variants of C++ types captured in metadata.
Declared in <mrdocs/Metadata/Type/TypeKind.hpp>
enum class TypeKind : int;
TypeKind is intentionally NOT registered with MRDOCS_DESCRIBE_ENUM. Describing it would make the reflection- driven XML writer emit a redundant <kind>...</kind> child into every type element (NamedType, LValueReferenceType, ...), which would churn every XML golden test for no semantic gain. Code that needs a string form for a TypeKind value calls toString below; the script side of mrdocs.set falls back to toString for polymorphic kind: matching when the discriminator enum is undescribed, so script names (lvalue-reference, ...) match the DOM and Handlebars side and differ only from the XML writer's tag form (l-value-reference, ...).
| Name | Description |
|---|---|
toString | Convert a TypeKind to its string representation. |
The class of using declaration.
Declared in <mrdocs/Metadata/Symbol/Using.hpp>
enum class UsingClass : int;
This indicates whether the using declaration is a normal using, a using typename, or a using enum.
| Name | Description |
|---|---|
Normal | Using declaration class. |
Typename | Using typename declaration class. |
Enum | Using enum declaration class. |
Compares two polymorphic objects that have visit functions
Declared in <mrdocs/ADT/Polymorphic.hpp>
Compares two polymorphic objects that have visit functions
template<class Base>
requires (!detail::IsPolymorphic<Base>) && detail::CanVisitCompare<Base>
auto
CompareDerived(
Base const& lhs,
Base const& rhs);
» more...
Compares two polymorphic objects that have visit functions
template<class Base>
requires detail::CanVisitCompare<Base>
auto
CompareDerived(
Polymorphic<Base> const& lhs,
Polymorphic<Base> const& rhs);
» more...
true if the two Polymorphic objects are equal, otherwise false.
| Name | Description |
|---|---|
| Base | The type of the Polymorphic. |
| Name | Description |
|---|---|
| lhs | The first Polymorphic to compare. |
| rhs | The second Polymorphic to compare. |
Compares two polymorphic objects that have visit functions
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<class Base>
requires (!detail::IsPolymorphic<Base>) && detail::CanVisitCompare<Base>
auto
CompareDerived(
Base const& lhs,
Base const& rhs);
This function compares two Polymorphic objects that have visit functions for the Base type.
The visit function is used to compare the two objects if they are of the same derived type.
If the two objects are of different derived types, the comparison is based on the type_info of the derived types.
If any of the objects is empty, the comparison is based on the emptiness of the objects.
true if the two Polymorphic objects are equal, otherwise false.
| Name | Description |
|---|---|
| Base | The type of the Polymorphic. |
| Name | Description |
|---|---|
| lhs | The first Polymorphic to compare. |
| rhs | The second Polymorphic to compare. |
Compares two polymorphic objects that have visit functions
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<class Base>
requires detail::CanVisitCompare<Base>
auto
CompareDerived(
Polymorphic<Base> const& lhs,
Polymorphic<Base> const& rhs);
This function compares two Polymorphic objects that have visit functions for the Base type.
The visit function is used to compare the two objects if they are of the same derived type.
If the two objects are of different derived types, the comparison is based on the type_info of the derived types.
If any of the objects is empty, the comparison is based on the emptiness of the objects.
true if the two Polymorphic objects are equal, otherwise false.
| Name | Description |
|---|---|
| Base | The type of the Polymorphic. |
| Name | Description |
|---|---|
| lhs | The first Polymorphic to compare. |
| rhs | The second Polymorphic to compare. |
HTMLEscape overloads
Declared in <mrdocs/Support/Handlebars.hpp>
HTML escapes the specified string.
std::string
HTMLEscape(std::string_view str);
» more...
HTML escapes the specified string
void
HTMLEscape(
OutputRef& out,
std::string_view str);
» more...
The escaped string.
| Name | Description |
|---|---|
| str | The string to escape. |
| out | The output stream reference where the escaped string will be written. |
https://github.com/handlebars-lang/handlebars.js/blob/master/lib/handlebars/utils.js
HTML escapes the specified string.
Declared in <mrdocs/Support/Handlebars.hpp>
std::string
HTMLEscape(std::string_view str);
This function HTML escapes the specified string, making it safe for rendering as text within HTML content.
Replaces &, <, >, ", ', , =` with the HTML entity equivalent value for string values.
The output of all expressions except for triple-braced expressions are passed through this method. Helpers should also use this method when returning HTML content via a SafeString instance, to prevent possible code injection.
Helper values created by the SafeString function are left untouched by the template and are not passed through this function.
The escaped string.
| Name | Description |
|---|---|
| str | The string to escape. |
HTML escapes the specified string
Declared in <mrdocs/Support/Handlebars.hpp>
void
HTMLEscape(
OutputRef& out,
std::string_view str);
This function HTML escapes the specified string, making it safe for rendering as text within HTML content.
Replaces &, <, >, ", ', , =` with the HTML entity equivalent value for string values.
The output of all expressions except for triple-braced expressions are passed through this method. Helpers should also use this method when returning HTML content via a SafeString instance, to prevent possible code injection.
Helper values created by the SafeString function are left untouched by the template and are not passed through this function.
This function has the same behavior as the corresponding utility function in the Handlebars.js library.
| Name | Description |
|---|---|
| out | The output stream reference where the escaped string will be written. |
| str | The string to escape. |
https://github.com/handlebars-lang/handlebars.js/blob/master/lib/handlebars/utils.js
Append a new function overload to the set.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
void
addMember(
OverloadsSymbol& I,
FunctionSymbol const& Member);
| Name | Description |
|---|---|
| I | Represents a set of function overloads. |
| Member | Metadata for a function or method. |
Add a $meta object with type information.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<
typename T,
typename IO>
void
addMetaObject(IO& io);
Creates a $meta object containing:
type: The unqualified C++ class name (e.g., "FunctionSymbol").
bases: Array of base class names (e.g., ["Symbol", "SourceInfo"]).
| Name | Description |
|---|---|
| T | The type whose metadata to add. |
| Name | Description |
|---|---|
| io | The lazy object IO to map into. |
allMembers overloads
Declared in <mrdocs/Metadata/Symbol/Enum.hpp>
Return the list of enum constants for this symbol.
auto&
allMembers(EnumSymbol const& T);
» more...
View all members of the namespace across tranches.
auto
allMembers(NamespaceSymbol const& T);
» more...
Join all tranche member lists into a single view.
auto
allMembers(NamespaceTranche const& T);
» more...
Access the list of overload members.
auto&
allMembers(OverloadsSymbol const& T);
» more...
Flatten all public/protected/private members.
auto
allMembers(RecordInterface const& T);
» more...
View all record members across access levels.
auto
allMembers(RecordSymbol const& T);
» more...
Join every member list into a single view.
auto
allMembers(RecordTranche const& T);
» more...
Access declarations introduced by this using-declaration.
auto&
allMembers(UsingSymbol const& T);
» more...
Return the list of enum constants for this symbol.
the list of enum constants for this symbol.
| Name | Description |
|---|---|
| T | Metadata for an enumeration declaration. |
View all members of the namespace across tranches.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
auto
allMembers(NamespaceSymbol const& T);
Lazy view across every member bucket.
| Name | Description |
|---|---|
| T | Describes a namespace and its members. |
Join all tranche member lists into a single view.
Declared in <mrdocs/Metadata/Symbol/Namespace.hpp>
auto
allMembers(NamespaceTranche const& T);
Lazy view spanning every category stored in the tranche.
| Name | Description |
|---|---|
| T | Buckets the members that appear inside a namespace. |
Access the list of overload members.
Declared in <mrdocs/Metadata/Symbol/Overloads.hpp>
auto&
allMembers(OverloadsSymbol const& T);
Reference to the ID list backing this set.
| Name | Description |
|---|---|
| T | Represents a set of function overloads. |
Flatten all public/protected/private members.
Declared in <mrdocs/Metadata/Symbol/RecordInterface.hpp>
auto
allMembers(RecordInterface const& T);
View concatenating the three access tranches.
| Name | Description |
|---|---|
| T | The aggregated interface for a given struct, class, or union. |
View all record members across access levels.
Lazy view traversing every tranche.
| Name | Description |
|---|---|
| T | Metadata for struct, class, or union. |
Join every member list into a single view.
Declared in <mrdocs/Metadata/Symbol/RecordTranche.hpp>
auto
allMembers(RecordTranche const& T);
Lazy view spanning all member categories.
| Name | Description |
|---|---|
| T | A group of members that have the same access specifier. |
Access declarations introduced by this using-declaration.
Reference to the underlying shadow list.
| Name | Description |
|---|---|
| T | Info for using declarations. |
Handler invoked when MRDOCS_ASSERT fails.
Declared in <mrdocs/Support/Assert.hpp>
void
assert_failed(
char const* msg,
char const* file,
uint_least32_t line);
| Name | Description |
|---|---|
| msg | Expression string that failed. |
| file | Source file where the assertion triggered. |
| line | Line within the source file. |
Traverse a DocComment tree bottom-up (post-order).
Declared in <mrdocs/Metadata/DocComment.hpp>
template<
DocCommentNodeTraversable T,
class F>
void
bottomUpTraverse(
T& node,
F&& func);
| Name | Description |
|---|---|
| node | Root node to traverse. |
| func | Visitor invoked after children are visited. |
Check whether two symbols may be merged.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
bool
canMerge(
Symbol const& I,
Symbol const& Other);
True when kinds and IDs match.
| Name | Description |
|---|---|
| I | Base class with common properties of all symbols |
| Other | Base class with common properties of all symbols |
cast overloads
Declared in <mrdocs/ADT/Polymorphic.hpp>
Dynamic cast returning reference; asserts on failure.
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::remove_reference_t<To>&
cast(Polymorphic<From>& p);
» more...
Dynamic cast returning const reference; asserts on failure.
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::remove_reference_t<To> const&
cast(Polymorphic<From> const& p);
» more...
Dynamic cast returning reference; asserts on failure.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::remove_reference_t<To>&
cast(Polymorphic<From>& p);
Reference to the contained object cast to To.
| Name | Description |
|---|---|
| p | A polymorphic value-type. |
Dynamic cast returning const reference; asserts on failure.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::remove_reference_t<To> const&
cast(Polymorphic<From> const& p);
Const reference to the contained object cast to To.
| Name | Description |
|---|---|
| p | A polymorphic value-type. |
cast_or_null overloads
Declared in <mrdocs/ADT/Polymorphic.hpp>
Dynamic cast pointer; returns nullptr when pp is null.
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To>>
cast_or_null(Polymorphic<From>* pp);
» more...
Dynamic cast pointer; returns nullptr when pp is null (const).
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To> const>
cast_or_null(Polymorphic<From> const* pp);
» more...
Pointer to To when the cast succeeds, otherwise nullptr.
Dynamic cast pointer; returns nullptr when pp is null.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To>>
cast_or_null(Polymorphic<From>* pp);
Pointer to To when the cast succeeds, otherwise nullptr.
| Name | Description |
|---|---|
| pp | A polymorphic value-type. |
Dynamic cast pointer; returns nullptr when pp is null (const).
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To> const>
cast_or_null(Polymorphic<From> const* pp);
Pointer to To when the cast succeeds, otherwise nullptr.
| Name | Description |
|---|---|
| pp | A polymorphic value-type. |
Return the result of comparing s0 to s1.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
std::strong_ordering
compareSymbolNames(
std::string_view symbolName0,
std::string_view symbolName1) noexcept;
This function returns true if the string s0 is less than the string s1. The comparison is first made without regard to case, unless the strings compare equal and then they are compared with lowercase letters coming before uppercase letters.
The result of the comparison.
| Name | Description |
|---|---|
| symbolName0 | The first symbol name to compare. |
| symbolName1 | The second symbol name to compare. |
Determine if a range contains a specific element.
Declared in <mrdocs/Support/Algorithm.hpp>
Determine if a range contains a specific element.
template<
class T,
class U>
requires std::equality_comparable_with<T, U>
bool
contains(
std::initializer_list<T> const& range,
U const& el);
» more...
Determine if a range contains a specific element.
template<
std::ranges::range Range,
class El>
requires std::equality_comparable_with<El, std::ranges::range_value_t<Range>>
bool
contains(
Range&& range,
El const& el);
» more...
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| el | The element to search for. |
Determine if a range contains a specific element.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
class T,
class U>
requires std::equality_comparable_with<T, U>
bool
contains(
std::initializer_list<T> const& range,
U const& el);
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| el | The element to search for. |
Determine if a range contains a specific element.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
std::ranges::range Range,
class El>
requires std::equality_comparable_with<El, std::ranges::range_value_t<Range>>
bool
contains(
Range&& range,
El const& el);
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| el | The element to search for. |
Determine if a range contains any of the specified elements.
Declared in <mrdocs/Support/Algorithm.hpp>
Determine if a range contains any of the specified elements.
template<
std::ranges::range Range,
std::ranges::range Els>
requires std::equality_comparable_with<std::ranges::range_value_t<Els>, std::ranges::range_value_t<Range>>
bool
contains_any(
Range const& range,
Els const& els);
» more...
Determine if a range contains any of the specified elements.
template<
std::ranges::range Range,
class El>
requires std::equality_comparable_with<El, std::ranges::range_value_t<Range>>
bool
contains_any(
Range const& range,
std::initializer_list<El> const& els);
» more...
True if any of the elements are found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| els | The elements to search for. |
Determine if a range contains any of the specified elements.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
std::ranges::range Range,
std::ranges::range Els>
requires std::equality_comparable_with<std::ranges::range_value_t<Els>, std::ranges::range_value_t<Range>>
bool
contains_any(
Range const& range,
Els const& els);
True if any of the elements are found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| els | The elements to search for. |
Determine if a range contains any of the specified elements.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
std::ranges::range Range,
class El>
requires std::equality_comparable_with<El, std::ranges::range_value_t<Range>>
bool
contains_any(
Range const& range,
std::initializer_list<El> const& els);
True if any of the elements are found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| els | The elements to search for. |
Determine if a range contains at least N instances of the specified element.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
std::ranges::range Range,
class El>
requires std::equality_comparable_with<El, std::ranges::range_value_t<Range>>
bool
contains_n(
Range const& range,
El const& el,
std::size_t n);
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| el | The element to search for. |
| n | The number of instances to search for. |
Determine if a range contains at least N instances of any of the specified elements.
Declared in <mrdocs/Support/Algorithm.hpp>
Determine if a range contains at least N instances of any of the specified elements.
template<
std::ranges::range Range,
std::ranges::range Els>
requires std::equality_comparable_with<std::ranges::range_value_t<Els>, std::ranges::range_value_t<Range>>
bool
contains_n_any(
Range const& range,
Els const& els,
std::size_t n);
» more...
Determine if a range contains at least N instances of any of the specified elements.
template<
std::ranges::range Range,
class El>
requires std::equality_comparable_with<El, std::ranges::range_value_t<Range>>
bool
contains_n_any(
Range const& range,
std::initializer_list<El> const& els,
std::size_t n);
» more...
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| els | The elements to search for. |
| n | The number of instances to search for. |
Determine if a range contains at least N instances of any of the specified elements.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
std::ranges::range Range,
std::ranges::range Els>
requires std::equality_comparable_with<std::ranges::range_value_t<Els>, std::ranges::range_value_t<Range>>
bool
contains_n_any(
Range const& range,
Els const& els,
std::size_t n);
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| els | The elements to search for. |
| n | The number of instances to search for. |
Determine if a range contains at least N instances of any of the specified elements.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
std::ranges::range Range,
class El>
requires std::equality_comparable_with<El, std::ranges::range_value_t<Range>>
bool
contains_n_any(
Range const& range,
std::initializer_list<El> const& els,
std::size_t n);
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| range | The range to search. |
| els | The elements to search for. |
| n | The number of instances to search for. |
Count the number of SymbolKind enumerators.
Declared in <mrdocs/Metadata/Symbol/SymbolKind.hpp>
consteval
std::underlying_type_t<SymbolKind>
countSymbolKind();
Number of SymbolKind values generated from SymbolNodes.inc.
Create child data objects.
Declared in <mrdocs/Support/Handlebars.hpp>
Create child data objects.
dom::Object
createFrame(dom::Object const& parent);
» more...
dom::Object
createFrame(dom::Value const& parent);
» more...
dom::Object
createFrame(
dom::Object const& child,
dom::Object const& parent);
» more...
The overlay object
| Name | Description |
|---|---|
| parent | The underlying frame object |
https://mustache.github.io/mustache.5.html#Sections
Create child data objects.
Declared in <mrdocs/Support/Handlebars.hpp>
dom::Object
createFrame(dom::Object const& parent);
This function can be used by block helpers to create child data objects.
The child data object is an overlay frame object implementation that will first look for a value in the child object and if not found will look in the parent object.
Helpers that modify the data state should create a new frame object when doing so, to isolate themselves and avoid corrupting the state of any parents.
Generally, only one frame needs to be created per helper execution. For example, the each iterator creates a single frame which is reused for all child execution.
The overlay object
| Name | Description |
|---|---|
| parent | The underlying frame object |
https://mustache.github.io/mustache.5.html#Sections
Declared in <mrdocs/Support/Handlebars.hpp>
dom::Object
createFrame(dom::Value const& parent);
Declared in <mrdocs/Support/Handlebars.hpp>
dom::Object
createFrame(
dom::Object const& child,
dom::Object const& parent);
dyn_cast overloads
Declared in <mrdocs/ADT/Polymorphic.hpp>
Dynamic cast returning pointer or nullptr.
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To>>
dyn_cast(Polymorphic<From>& p) noexcept;
» more...
Dynamic cast returning pointer or nullptr (const overload).
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To> const>
dyn_cast(Polymorphic<From> const& p) noexcept;
» more...
Pointer to To if the dynamic cast succeeds, otherwise nullptr.
Dynamic cast returning pointer or nullptr.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To>>
dyn_cast(Polymorphic<From>& p) noexcept;
Pointer to To if the dynamic cast succeeds, otherwise nullptr.
| Name | Description |
|---|---|
| p | A polymorphic value-type. |
Dynamic cast returning pointer or nullptr (const overload).
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To> const>
dyn_cast(Polymorphic<From> const& p) noexcept;
Pointer to To if the dynamic cast succeeds, otherwise nullptr.
| Name | Description |
|---|---|
| p | A polymorphic value-type. |
dyn_cast_or_null overloads
Declared in <mrdocs/ADT/Polymorphic.hpp>
Dynamic cast if pointer is non-null and engaged, else nullptr.
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To>>
dyn_cast_or_null(Polymorphic<From>* pp) noexcept;
» more...
Dynamic cast if pointer is non-null and engaged, else nullptr (const).
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To> const>
dyn_cast_or_null(Polymorphic<From> const* pp) noexcept;
» more...
Pointer to To when the cast succeeds, otherwise nullptr.
Dynamic cast if pointer is non-null and engaged, else nullptr.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To>>
dyn_cast_or_null(Polymorphic<From>* pp) noexcept;
Pointer to To when the cast succeeds, otherwise nullptr.
| Name | Description |
|---|---|
| pp | A polymorphic value-type. |
Dynamic cast if pointer is non-null and engaged, else nullptr (const).
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
std::add_pointer_t<std::remove_reference_t<To> const>
dyn_cast_or_null(Polymorphic<From> const* pp) noexcept;
Pointer to To when the cast succeeds, otherwise nullptr.
| Name | Description |
|---|---|
| pp | A polymorphic value-type. |
Determine if a string ends with one of the specified characters
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
endsWithOneOf(
std::string_view s,
std::string_view chars) noexcept;
if a string ends with one of the specified characters
| Name | Description |
|---|---|
| s | The string to check. |
| chars | The characters to check for. |
Declared in <mrdocs/Support/Handlebars.hpp>
void
escapeExpression(
OutputRef out,
std::string_view str,
HandlebarsOptions const& opt);
Find a generator by its id.
Declared in <mrdocs/Generator.hpp>
Generator const*
findGenerator(std::string_view id) noexcept;
This function is thread-safe and may be called concurrently from multiple threads.
A pointer to the generator, or nullptr if no generator with the given id exists.
| Name | Description |
|---|---|
| id | The symbolic name of the generator. The name must be an exact match, including case. |
Find the last element in a range that matches an element in the specified range.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
std::ranges::range Range,
std::ranges::range Els>
requires std::equality_comparable_with<std::ranges::range_value_t<Els>, std::ranges::range_value_t<Range>>
auto
find_last_of(
Range&& range,
Els&& els);
An iterator to the last element found, or std::ranges::end(range) if not found.
| Name | Description |
|---|---|
| range | The range to search. |
| els | The elements to search for. |
forEachFile overloads
Declared in <mrdocs/Support/Path.hpp>
Call a function for each file in a directory.
Expected<void>
forEachFile(
std::string_view dirPath,
bool recursive,
AnyFileVisitor& visitor);
» more...
Visit each file in a directory.
template<class Visitor>
Expected<void>
forEachFile(
std::string_view dirPath,
bool recursive,
Visitor&& visitor);
» more...
An error if any occurred.
| Name | Description |
|---|---|
| dirPath | The path to the directory. |
| recursive | If true, files in subdirectories are also visited, recursively. |
| visitor | The visitor to invoke for each file. |
Call a function for each file in a directory.
Declared in <mrdocs/Support/Path.hpp>
Expected<void>
forEachFile(
std::string_view dirPath,
bool recursive,
AnyFileVisitor& visitor);
This will iterate all the regular files in a directory and invoke the visitor with the path.
An error if any occurred.
| Name | Description |
|---|---|
| dirPath | The path to the directory. |
| recursive | If true, files in subdirectories are also visited, recursively. |
| visitor | The visitor to invoke for each file. |
Visit each file in a directory.
Declared in <mrdocs/Support/Path.hpp>
template<class Visitor>
Expected<void>
forEachFile(
std::string_view dirPath,
bool recursive,
Visitor&& visitor);
An error if any occurred.
| Name | Description |
|---|---|
| dirPath | The path to the directory. |
| recursive | If true, files in subdirectories are also visited, recursively. |
| visitor | A callable object which is invoked for each file. This visitor might return void or Expected<void>. |
Return a formatted error.
Declared in <mrdocs/Support/Error.hpp>
template<class... Args>
Error
formatError(
FormatString<Args...> fs,
Args&&... args);
a formatted error.
| Name | Description |
|---|---|
| fs | The format string. This must not be empty. |
| args | Zero or more values to substitute into the format string. |
Convert a string to a FundamentalTypeKind.
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
bool
fromString(
std::string_view str,
FundamentalTypeKind& kind) noexcept;
This function converts a string to a FundamentalTypeKind.
All variations of the type specifiers are supported.
However, the "long long" specifier cannot be split into two separate specifiers.
true if the string was successfully converted
| Name | Description |
|---|---|
| str | The string to convert |
| kind [out] | The resulting FundamentalTypeKind |
Return the default accessibility for a record key kind.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
constexpr
std::string_view
getDefaultAccessString(RecordKeyKind const& kind) noexcept;
the default accessibility for a record key kind.
| Name | Description |
|---|---|
| kind | The kind of record: struct, class, or union. |
Return the short name of an operator as a string.
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
OperatorKind
getOperatorKind(std::string_view name) noexcept;
The OperatorKind, or OperatorKind::None if not recognized.
| Name | Description |
|---|---|
| name | The operator name, e.g. operator+, operator++, operator[], etc. |
Return the short name of an operator as a string.
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
OperatorKind
getOperatorKindFromSuffix(std::string_view suffix) noexcept;
The OperatorKind, or OperatorKind::None if not recognized.
| Name | Description |
|---|---|
| suffix | The operator suffix, e.g. +, ++, [], etc. |
Return the name of an operator as a string.
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
std::string_view
getOperatorName(
OperatorKind kind,
bool include_keyword = false) noexcept;
the name of an operator as a string.
| Name | Description |
|---|---|
| kind | The kind of operator. |
| include_keyword | Whether the name should be prefixed with the operator keyword. |
Return the human-readable name of the operator
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
Optional<std::string_view>
getOperatorReadableName(
OperatorKind kind,
int nParams);
The readable name, or nullopt if the operator is not recognized.
| Name | Description |
|---|---|
| kind | The kind of operator. |
| nParams | The number of parameters the operator takes. |
getParents overloads
Declared in <mrdocs/Corpus.hpp>
Return a list of the parent symbols of the specified Symbol.
std::vector<SymbolID>
getParents(
Corpus const& C,
Symbol const& I);
» more...
Return a list of the parent symbols of the specified Info.
dom::Array
getParents(
DomCorpus const& C,
Symbol const& I);
» more...
Return a list of the parent symbols of the specified Symbol.
Declared in <mrdocs/Corpus.hpp>
std::vector<SymbolID>
getParents(
Corpus const& C,
Symbol const& I);
a list of the parent symbols of the specified Symbol.
| Name | Description |
|---|---|
| C | The collection of declarations in extracted form. |
| I | Base class with common properties of all symbols |
Return a list of the parent symbols of the specified Info.
Declared in <mrdocs/Metadata/DomCorpus.hpp>
dom::Array
getParents(
DomCorpus const& C,
Symbol const& I);
a list of the parent symbols of the specified Info.
| Name | Description |
|---|---|
| C | Front-end factory for producing Dom nodes. |
| I | Base class with common properties of all symbols |
getPrimaryLocation overloads
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
Determine a location to use when none is explicitly chosen.
Optional<Location>
getPrimaryLocation(Symbol const& I);
» more...
Choose the best location to display for a symbol.
Optional<Location>
getPrimaryLocation(
SourceInfo const& I,
bool preferDefinition);
» more...
The preferred location if available.
| Name | Description |
|---|---|
| I | Source info to examine. |
| preferDefinition | If true, favor a definition location. |
Determine a location to use when none is explicitly chosen.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
Optional<Location>
getPrimaryLocation(Symbol const& I);
a location to use when none is explicitly chosen.
| Name | Description |
|---|---|
| I | Base class with common properties of all symbols |
Choose the best location to display for a symbol.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
Optional<Location>
getPrimaryLocation(
SourceInfo const& I,
bool preferDefinition);
The preferred location if available.
| Name | Description |
|---|---|
| I | Source info to examine. |
| preferDefinition | If true, favor a definition location. |
Return the safe name of an operator as a string.
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
std::string_view
getSafeOperatorName(
OperatorKind kind,
bool include_keyword = false) noexcept;
the safe name of an operator as a string.
| Name | Description |
|---|---|
| kind | The kind of operator. |
| include_keyword | Whether the name should be prefixed with operator_. |
Return the short name of an operator as a string.
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
std::string_view
getShortOperatorName(OperatorKind kind) noexcept;
the short name of an operator as a string.
| Name | Description |
|---|---|
| kind | Operator kinds |
Return the full path for single page output.
Declared in <mrdocs/Generator.hpp>
Expected<std::string>
getSinglePageFullPath(
std::string_view outputPath,
std::string_view extension);
This function determines the full path for a single-page output file based on the provided outputPath and file extension.
If the outputPath already exists:
If it is a directory, appends the default file name with the provided extension.
If it is a file, uses the provided outputPath directly.
If the outputPath does not exist:
If it ends with a '/', assumes it is a directory and appends the default file name.
Otherwise, it returns an error because the path is ambiguous.
The full path or an error if the outputPath is ambiguous.
| Name | Description |
|---|---|
| outputPath | The specified output path, which can be a directory or file. |
| extension | The file extension to use for single-page output. |
Return the inner type.
Declared in <mrdocs/Metadata/Type.hpp>
Return the inner type.
Optional<Polymorphic<Type>&>
innerType(Type& TI) noexcept;
» more...
Return the inner type.
Optional<Polymorphic<Type> const&>
innerType(Type const& TI) noexcept;
» more...
Return the inner type.
Declared in <mrdocs/Metadata/Type.hpp>
Optional<Polymorphic<Type>&>
innerType(Type& TI) noexcept;
The inner type is the type that is modified by a specifier (e.g. "int" in "pointer to int").
the inner type.
| Name | Description |
|---|---|
| TI | A possibly qualified type. |
Return the inner type.
Declared in <mrdocs/Metadata/Type.hpp>
Optional<Polymorphic<Type> const&>
innerType(Type const& TI) noexcept;
The inner type is the type that is modified by a specifier (e.g. "int" in "pointer to int").
the inner type.
| Name | Description |
|---|---|
| TI | A possibly qualified type. |
Return the inner type.
Declared in <mrdocs/Metadata/Type.hpp>
Return the inner type.
Type*
innerTypePtr(Type& TI) noexcept;
» more...
Return the inner type.
Type const*
innerTypePtr(Type const& TI) noexcept;
» more...
Return the inner type.
The inner type is the type that is modified by a specifier (e.g. "int" in "pointer to int").
the inner type.
| Name | Description |
|---|---|
| TI | A possibly qualified type. |
Return the inner type.
The inner type is the type that is modified by a specifier (e.g. "int" in "pointer to int").
the inner type.
| Name | Description |
|---|---|
| TI | A possibly qualified type. |
innermostType overloads
Declared in <mrdocs/Metadata/Type.hpp>
Return the innermost type (mutable overload).
Polymorphic<Type>&
innermostType(Polymorphic<Type>& TI) noexcept;
» more...
Return the innermost type.
Polymorphic<Type> const&
innermostType(Polymorphic<Type> const& TI) noexcept;
» more...
Return the innermost type (mutable overload).
Declared in <mrdocs/Metadata/Type.hpp>
Polymorphic<Type>&
innermostType(Polymorphic<Type>& TI) noexcept;
the innermost type (mutable overload).
| Name | Description |
|---|---|
| TI | A polymorphic value-type. |
Return the innermost type.
Declared in <mrdocs/Metadata/Type.hpp>
Polymorphic<Type> const&
innermostType(Polymorphic<Type> const& TI) noexcept;
The innermost type is the type which is not modified by any specifiers (e.g. "int" in "pointer to const int").
If the type has an inner type, we recursively call this function until we reach the innermost type. If the type has no inner type, we return the current type.
the innermost type.
| Name | Description |
|---|---|
| TI | A polymorphic value-type. |
Install a custom generator.
Declared in <mrdocs/Generator.hpp>
Expected<void>
installGenerator(std::unique_ptr<Generator> G);
This function registers a generator with the global generator registry, making it available for use.
Plugins can use this function to register custom generators.
This function is thread-safe and may be called concurrently from multiple threads.
An error if a generator with the same id already exists.
| Name | Description |
|---|---|
| G | The generator to install. Ownership is transferred to the registry. |
isAlphaNumeric overloads
Declared in <mrdocs/Support/String.hpp>
Determine if a character is ASCII alphanumeric.
constexpr
bool
isAlphaNumeric(char const c) noexcept;
» more...
Determine if every character in a string is ASCII alphanumeric.
constexpr
bool
isAlphaNumeric(std::string_view const s) noexcept;
» more...
true if c is an ASCII letter or digit.true if all characters are ASCII letters or digits.| Name | Description |
|---|---|
| c | Character to inspect. |
| s | String to inspect. |
Determine if a character is ASCII alphanumeric.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isAlphaNumeric(char const c) noexcept;
true if c is an ASCII letter or digit.
| Name | Description |
|---|---|
| c | Character to inspect. |
Determine if every character in a string is ASCII alphanumeric.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isAlphaNumeric(std::string_view const s) noexcept;
true if all characters are ASCII letters or digits.
| Name | Description |
|---|---|
| s | String to inspect. |
isAlphabetic overloads
Declared in <mrdocs/Support/String.hpp>
Determine if a character is an ASCII letter.
constexpr
bool
isAlphabetic(char const c) noexcept;
» more...
Determine if every character in a string is an ASCII letter.
constexpr
bool
isAlphabetic(std::string_view const s) noexcept;
» more...
true if c is in the ranges 'a'-'z' or 'A'-'Z'.true if all characters are alphabetic.| Name | Description |
|---|---|
| c | Character to inspect. |
| s | String to inspect. |
Determine if a character is an ASCII letter.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isAlphabetic(char const c) noexcept;
true if c is in the ranges 'a'-'z' or 'A'-'Z'.
| Name | Description |
|---|---|
| c | Character to inspect. |
Determine if every character in a string is an ASCII letter.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isAlphabetic(std::string_view const s) noexcept;
true if all characters are alphabetic.
| Name | Description |
|---|---|
| s | String to inspect. |
Determines whether the operator is potentially binary.
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
bool
isBinaryOperator(OperatorKind kind) noexcept;
whether the operator is potentially binary.
| Name | Description |
|---|---|
| kind | Operator kinds |
Check whether a function is a copy assignment operator.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool
isCopyAssignment(FunctionSymbol const& func);
A copy assignment operator is a non-template operator= whose parameter is of type X, X&, const X&, volatile X&, or const volatile X& ([class.copy.assign]).
Whether func is a copy assignment operator.
| Name | Description |
|---|---|
| func | The function to check. |
Check whether a function is a copy constructor.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool
isCopyConstructor(FunctionSymbol const& func);
A copy constructor is a non-template constructor whose first parameter is an lvalue reference to the possibly cv-qualified record type, with all remaining parameters having defaults ([class.copy.ctor]).
Whether func is a copy constructor.
| Name | Description |
|---|---|
| func | The function to check. |
Check whether a function is a default constructor.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool
isDefaultConstructor(FunctionSymbol const& func);
A default constructor is a constructor for which each parameter that is not a function parameter pack has a default argument (including the case of a constructor with no parameters) ([class.default.ctor]).
Whether func is a default constructor.
| Name | Description |
|---|---|
| func | The function to check. |
isDigit overloads
Declared in <mrdocs/Support/String.hpp>
Determine if a character is an ASCII digit.
constexpr
bool
isDigit(char const c) noexcept;
» more...
Determine if every character in a string is an ASCII digit.
constexpr
bool
isDigit(std::string_view const s) noexcept;
» more...
true if c is between '0' and '9'.true if all characters are digits.| Name | Description |
|---|---|
| c | Character to inspect. |
| s | String to inspect. |
Determine if a character is an ASCII digit.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isDigit(char const c) noexcept;
true if c is between '0' and '9'.
| Name | Description |
|---|---|
| c | Character to inspect. |
Determine if every character in a string is an ASCII digit.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isDigit(std::string_view const s) noexcept;
true if all characters are digits.
| Name | Description |
|---|---|
| s | String to inspect. |
Determine if a value is empty
This is used by the built-in if and with helpers to control their execution flow.
The Handlebars definition of empty is any of:
Array with length 0
falsy values other than 0
This is intended to match the Mustache Behaviour.
True if the value is empty, false otherwise
| Name | Description |
|---|---|
| arg | The value to test |
https://mustache.github.io/mustache.5.html#Sections
isLowerCase overloads
Declared in <mrdocs/Support/String.hpp>
Determine if a character is a lowercase ASCII letter.
constexpr
bool
isLowerCase(char const c) noexcept;
» more...
Determine if every character in a string is lowercase ASCII.
constexpr
bool
isLowerCase(std::string_view const s) noexcept;
» more...
true if c is in the range 'a' to 'z'.true if all characters are lowercase ASCII letters.| Name | Description |
|---|---|
| c | Character to inspect. |
| s | String to inspect. |
Determine if a character is a lowercase ASCII letter.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isLowerCase(char const c) noexcept;
true if c is in the range 'a' to 'z'.
| Name | Description |
|---|---|
| c | Character to inspect. |
Determine if every character in a string is lowercase ASCII.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isLowerCase(std::string_view const s) noexcept;
true if all characters are lowercase ASCII letters.
| Name | Description |
|---|---|
| s | String to inspect. |
Check whether a function is a move assignment operator.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool
isMoveAssignment(FunctionSymbol const& func);
A move assignment operator is a non-template operator= whose parameter is an rvalue reference to the possibly cv-qualified record type ([class.copy.assign]).
Whether func is a move assignment operator.
| Name | Description |
|---|---|
| func | The function to check. |
Check whether a function is a move constructor.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool
isMoveConstructor(FunctionSymbol const& func);
A move constructor is a non-template constructor whose first parameter is an rvalue reference to the possibly cv-qualified record type, with all remaining parameters having defaults ([class.copy.ctor]).
Whether func is a move constructor.
| Name | Description |
|---|---|
| func | The function to check. |
Check whether a function is a special member function.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool
isSpecialMemberFunction(FunctionSymbol const& func);
A special member function is a default constructor, copy/move constructor, copy/move assignment operator, or destructor ([special]).
Whether func is a special member function.
| Name | Description |
|---|---|
| func | The function to check. |
Determines whether the operator is potentially unary.
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
bool
isUnaryOperator(OperatorKind kind) noexcept;
whether the operator is potentially unary.
| Name | Description |
|---|---|
| kind | Operator kinds |
isUpperCase overloads
Declared in <mrdocs/Support/String.hpp>
Determine if a character is an uppercase ASCII letter.
constexpr
bool
isUpperCase(char const c) noexcept;
» more...
Determine if every character in a string is uppercase ASCII.
constexpr
bool
isUpperCase(std::string_view const s) noexcept;
» more...
true if c is in the range 'A' to 'Z'.true if all characters are uppercase ASCII letters.| Name | Description |
|---|---|
| c | Character to inspect. |
| s | String to inspect. |
Determine if a character is an uppercase ASCII letter.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isUpperCase(char const c) noexcept;
true if c is in the range 'A' to 'Z'.
| Name | Description |
|---|---|
| c | Character to inspect. |
Determine if every character in a string is uppercase ASCII.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isUpperCase(std::string_view const s) noexcept;
true if all characters are uppercase ASCII letters.
| Name | Description |
|---|---|
| s | String to inspect. |
isWhitespace overloads
Declared in <mrdocs/Support/String.hpp>
Determine if a character is whitespace.
constexpr
bool
isWhitespace(char c) noexcept;
» more...
Determine if a string is only whitespace.
constexpr
bool
isWhitespace(std::string_view s) noexcept;
» more...
true if c is a horizontal or vertical whitespace character.| Name | Description |
|---|---|
| c | Character to inspect. |
| s | The string to check. |
Determine if a character is whitespace.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isWhitespace(char c) noexcept;
true if c is a horizontal or vertical whitespace character.
| Name | Description |
|---|---|
| c | Character to inspect. |
Determine if a string is only whitespace.
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
isWhitespace(std::string_view s) noexcept;
true if the string is empty or contains only whitespace characters (space, tab, newline, vertical tab, form feed, carriage return). false otherwise.
| Name | Description |
|---|---|
| s | The string to check. |
is_null helper that uses nullable_traits<T> if available.
Declared in <mrdocs/ADT/Nullable.hpp>
template<has_nullable_traits_v T>
bool
is_null(T const& v) noexcept(noexcept(nullable_traits<T>::is_null(v)));
true if v is null, false otherwise.
| Name | Description |
|---|---|
| v | The value to test for null. |
Determine if an element is equal to any of the elements in the specified range.
Declared in <mrdocs/Support/Algorithm.hpp>
Determine if an element is equal to any of the elements in the specified range.
template<
class El,
std::ranges::range Range>
requires std::equality_comparable_with<std::ranges::range_value_t<Range>, El>
bool
is_one_of(
El const& el,
Range const& range);
» more...
Determine if an element is equal to any of the elements in the specified range.
template<
class U,
class T>
requires std::equality_comparable_with<U, T>
bool
is_one_of(
U const& el,
std::initializer_list<T> const& range);
» more...
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| el | The element to search for. |
| range | The range to search. |
Determine if an element is equal to any of the elements in the specified range.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
class El,
std::ranges::range Range>
requires std::equality_comparable_with<std::ranges::range_value_t<Range>, El>
bool
is_one_of(
El const& el,
Range const& range);
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| el | The element to search for. |
| range | The range to search. |
Determine if an element is equal to any of the elements in the specified range.
Declared in <mrdocs/Support/Algorithm.hpp>
template<
class U,
class T>
requires std::equality_comparable_with<U, T>
bool
is_one_of(
U const& el,
std::initializer_list<T> const& range);
True if the element is found, false otherwise.
| Name | Description |
|---|---|
| el | The element to search for. |
| range | The range to search. |
Return true if the polymorphic object holds a value of type To.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
bool
isa(Polymorphic<From> const& p) noexcept;
true if the polymorphic object holds a value of type To.
| Name | Description |
|---|---|
| p | A polymorphic value-type. |
Return true if pointer is non-null and referent is of type To.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<
class To,
class From>
requires ( std::derived_from<std::remove_cvref_t<To>, std::remove_cvref_t<From>> )
[[nodiscard]]
bool
isa_or_null(Polymorphic<From> const* pp) noexcept;
true if pointer is non-null and referent is of type To.
| Name | Description |
|---|---|
| pp | A polymorphic value-type. |
Compare ExtractionModes and returns the least specific
Declared in <mrdocs/Metadata/Symbol/ExtractionMode.hpp>
constexpr
ExtractionMode
leastSpecific(
ExtractionMode const a,
ExtractionMode const b) noexcept;
This function returns the least specific of the two ExtractionModes in terms of the number of filters passed.
If the symbol passes the filter that categorizes it as a, then it also passes the filter that categorizes it as b (or vice-versa), then this function will return the final category for the symbol.
Determine why a symbol is extracted
| Name | Description |
|---|---|
| a | Determine why a symbol is extracted |
| b | Determine why a symbol is extracted |
ltrim overloads
Declared in <mrdocs/Support/String.hpp>
Return the substring without leading horizontal whitespace.
constexpr
std::string_view
ltrim(std::string_view const s) noexcept;
» more...
Return the substring without leading specified characters.
constexpr
std::string_view
ltrim(
std::string_view const s,
std::string_view const chars) noexcept;
» more...
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
| chars | The characters to remove. |
Return the substring without leading horizontal whitespace.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string_view
ltrim(std::string_view const s) noexcept;
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
Return the substring without leading specified characters.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string_view
ltrim(
std::string_view const s,
std::string_view const chars) noexcept;
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
| chars | The characters to remove. |
Apply the "char" specifier to the type
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
bool
makeChar(FundamentalTypeKind& kind) noexcept;
If applying the "char" specifier to a type that might have been declared only with "signed/unsigned" or "short/long" specifiers, the function changes the type and returns true.
For instance, applying "char" to FundamentalTypeKind::Int ("int", which could be declared as "signed") results in FundamentalTypeKind::SignedChar ("signed char").
Whether the operation was successful
| Name | Description |
|---|---|
| kind [in] | The type to modify |
Apply the "long" specifier to the type
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
bool
makeLong(FundamentalTypeKind& kind) noexcept;
If applying "long" the specifier is a valid operation the function changes the type and returns true.
For instance, applying "long" to FundamentalTypeKind::Int ("int") results in FundamentalTypeKind::Long ("long int").
Whether the operation was successful
| Name | Description |
|---|---|
| kind [in] | The type to modify |
Factory function that creates an Overload from the given callables.
Declared in <mrdocs/ADT/Overload.hpp>
template<class... Ts>
[[nodiscard]]
constexpr
Overload<std::decay_t<Ts>...>
makeOverload(Ts&&... xs) noexcept((std::is_nothrow_constructible_v<std::decay_t<Ts>, Ts &&> && ...));
Prefer this over constructing Overload directly when you need perfect forwarding and decayed storage.
auto visitor = fn::makeOverload(
[](int) { return 1; },
[](double) { return 2; }
);
An Overload whose base classes are the decayed types of the provided callables.
| Name | Description |
|---|---|
| xs | The callables to combine. |
Apply the "short" specifier to the type
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
bool
makeShort(FundamentalTypeKind& kind) noexcept;
If applying "short" the specifier is a valid operation the function changes the type and returns true.
For instance, applying "short" to FundamentalTypeKind::Int ("int") results in FundamentalTypeKind::Short ("short int").
Whether the operation was successful
| Name | Description |
|---|---|
| kind [in] | The type to modify |
Apply the "signed" specifier to the type
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
bool
makeSigned(FundamentalTypeKind& kind) noexcept;
If applying the "signed" specifier is a valid operation the function changes the type and returns true.
For instance, applying "signed" to FundamentalTypeKind::Char ("char") results in FundamentalTypeKind::SignedChar ("signed char").
It also returns true if applying the "signed" specifier is a valid operation but doesn't affect the type.
For instance, applying "signed" to FundamentalTypeKind::Int ("int") doesn't change the type but returns true, even though FundamentalTypeKind::Int could be declared as "int" or "signed" and multiple "signed" specifiers are not allowed.
Whether the operation was successful
| Name | Description |
|---|---|
| kind [in] | The type to modify |
Apply the "unsigned" specifier to the type
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
bool
makeUnsigned(FundamentalTypeKind& kind) noexcept;
If applying the "unsigned" specifier is a valid operation the function changes the type and returns true.
For instance, applying "unsigned" to FundamentalTypeKind::Char ("char") results in FundamentalTypeKind::UnsignedChar ("unsigned char") and applying "unsigned" to FundamentalTypeKind::Int ("int") results in FundamentalTypeKind::UnsignedInt ("unsigned int").
Whether the operation was successful
| Name | Description |
|---|---|
| kind [in] | The type to modify |
Make a visitor for a base type
Declared in <mrdocs/Support/Visitor.hpp>
template<
typename BaseTy,
typename ObjectTy,
typename FnTy,
typename... ArgsTy>
auto
makeVisitor(
ObjectTy&& obj,
FnTy&& fn,
ArgsTy&&... args);
The returned visitor is an object with a template method visit which can be called with a derived type of the object being visited.
The visitor stores the arguments args passed to this function, and its method visit calls the function fn with the derived type as the first argument, followed by args.
The common return type of fn when called with a derived type of obj and args
| Name | Description |
|---|---|
| obj | The object to visit |
| fn | The function object to call |
| args | The arguments to pass to the function object |
make_array_view overloads
Declared in <mrdocs/ADT/ArrayView.hpp>
Create an ArrayView from a C-style array.
template<
class T,
std::size_t N>
constexpr
ArrayView<T>
make_array_view(T const(& arr)[N]) noexcept;
» more...
Create an ArrayView from a pointer and count.
template<class T>
constexpr
ArrayView<T>
make_array_view(
T const* data,
std::size_t count) noexcept;
» more...
| Name | Description |
|---|---|
| arr | Array to view. |
| data | Pointer to the first element. |
| count | Number of elements. |
Create an ArrayView from a C-style array.
Declared in <mrdocs/ADT/ArrayView.hpp>
template<
class T,
std::size_t N>
constexpr
ArrayView<T>
make_array_view(T const(& arr)[N]) noexcept;
View over the provided array.
| Name | Description |
|---|---|
| arr | Array to view. |
Create an ArrayView from a pointer and count.
Declared in <mrdocs/ADT/ArrayView.hpp>
template<class T>
constexpr
ArrayView<T>
make_array_view(
T const* data,
std::size_t count) noexcept;
View over the provided range.
| Name | Description |
|---|---|
| data | Pointer to the first element. |
| count | Number of elements. |
make_null helper that uses nullable_traits<T> if available.
Declared in <mrdocs/ADT/Nullable.hpp>
template<has_nullable_traits_v T>
void
make_null(T& v) noexcept(noexcept(nullable_traits<T>::make_null(v)));
| Name | Description |
|---|---|
| v | The value to make null. |
mapReflectedType overloads
Declared in <mrdocs/Support/MapReflectedType.hpp>
Map all described members without converting values.
template<
bool isMostDerived,
typename IO,
typename T>
requires describe::has_describe_members<T>::value
void
mapReflectedType(
IO& io,
T const& obj);
» more...
Automatically map all described members of a type to the DOM.
template<
bool isMostDerived,
typename IO,
typename T>
requires describe::has_describe_members<T>::value
void
mapReflectedType(
IO& io,
T const& obj,
DomCorpus const* domCorpus);
» more...
| Name | Description |
|---|---|
| isMostDerived | Whether this is the most-derived type (adds $meta if true). |
| Name | Description |
|---|---|
| io | The IO object to use for mapping. |
| obj | The object to be mapped. |
| domCorpus | The DomCorpus used to create the DOM values, or a null pointer. |
Map all described members without converting values.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<
bool isMostDerived,
typename IO,
typename T>
requires describe::has_describe_members<T>::value
void
mapReflectedType(
IO& io,
T const& obj);
This version passes raw member values to io.map(), letting the IO object handle conversion with its stored context.
| Name | Description |
|---|---|
| isMostDerived | Whether this is the most-derived type (adds $meta if true). |
| Name | Description |
|---|---|
| io | The IO object to use for mapping. |
| obj | The object to be mapped. |
Automatically map all described members of a type to the DOM.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<
bool isMostDerived,
typename IO,
typename T>
requires describe::has_describe_members<T>::value
void
mapReflectedType(
IO& io,
T const& obj,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| isMostDerived | Whether this is the most-derived type. When true, adds the $meta object. |
| Name | Description |
|---|---|
| io | The IO object to use for mapping. |
| obj | The object to be mapped. |
| domCorpus | The DomCorpus used to create the DOM values, or a null pointer. |
Applies a set of callables to a std::variant using std::visit and Overload.
Declared in <mrdocs/ADT/Overload.hpp>
template<
class Variant,
class... Ts>
constexpr
decltype(auto)
match(
Variant&& v,
Ts&&... xs);
This is a convenience wrapper around std::visit(makeOverload(...), variant). It forwards the variant and the callables and returns whatever std::visit returns.
std::variant<int, std::string> v = 42;
auto r = fn::match(v,
[](int i) { return i + 1; },
[](const std::string& s) { return s.size(); }
);
The result of std::visit.
| Name | Description |
|---|---|
| v | The variant to visit (can be lvalue or rvalue; const-qualification is preserved). |
| xs | The callables to be combined with makeOverload and passed to std::visit. |
merge overloads
Declared in <mrdocs/Metadata/Expression.hpp>
Append blocks from other into I, preserving order.
void
merge(
DocComment& I,
DocComment&& other);
» more...
Merge metadata from another expression.
void
merge(
ExprInfo& I,
ExprInfo&& Other);
» more...
Merge two ExtractionMode values.
void
merge(
ExtractionMode& dst,
ExtractionMode&& src) noexcept;
» more...
Merge the location sets, preferring existing def/primary.
void
merge(
SourceInfo& I,
SourceInfo const& Other);
» more...
Merge, transferring ownership from the right-hand side.
void
merge(
SourceInfo& I,
SourceInfo&& Other);
» more...
Merge partial template info, filling missing pieces.
void
merge(
TemplateInfo& I,
TemplateInfo&& Other);
» more...
Merge friend declarations, deduplicating by symbol ID.
void
merge(
std::vector<FriendInfo>& dst,
std::vector<FriendInfo>&& src);
» more...
Merge parameters element-wise, appending extras from src.
void
merge(
std::vector<Param>& dst,
std::vector<Param>&& src);
» more...
Merges two Symbol objects according to the behavior of the derived class.
template<polymorphic_storage_for<Symbol> SymbolTy>
void
merge(
SymbolTy& I,
SymbolTy&& Other);
» more...
Generic merge for any described type.
template<typename T>
requires describe::has_describe_members<T>::value
void
merge(
T& dst,
T&& src);
» more...
Merge metadata from another constant expression.
template<class T>
static
void
merge(
ConstantExprInfo<T>& I,
ConstantExprInfo<T>&& Other);
» more...
| Name | Description |
|---|---|
| T | The type to merge (must have MRDOCS_DESCRIBE_STRUCT). |
| Name | Description |
|---|---|
| dst | The destination. |
| src | The source (moved from). |
| I | The Symbol object to merge into. |
| Other | The Symbol object to merge from. |
Append blocks from other into I, preserving order.
Declared in <mrdocs/Metadata/DocComment.hpp>
void
merge(
DocComment& I,
DocComment&& other);
| Name | Description |
|---|---|
| I | A processed documentation comment attached to a declaration. |
| other | A processed documentation comment attached to a declaration. |
Merge metadata from another expression.
| Name | Description |
|---|---|
| I | Represents an expression |
| Other | Represents an expression |
Merge two ExtractionMode values.
Declared in <mrdocs/Metadata/Symbol/ExtractionMode.hpp>
void
merge(
ExtractionMode& dst,
ExtractionMode&& src) noexcept;
Takes the least specific (most conservative) of the two, so that a symbol demoted in any TU stays demoted.
| Name | Description |
|---|---|
| dst | Determine why a symbol is extracted |
| src | Determine why a symbol is extracted |
Merge the location sets, preferring existing def/primary.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
void
merge(
SourceInfo& I,
SourceInfo const& Other);
| Name | Description |
|---|---|
| I | Stores source information for a declaration. |
| Other | Stores source information for a declaration. |
Merge, transferring ownership from the right-hand side.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
void
merge(
SourceInfo& I,
SourceInfo&& Other);
| Name | Description |
|---|---|
| I | Stores source information for a declaration. |
| Other | Stores source information for a declaration. |
Merge partial template info, filling missing pieces.
Declared in <mrdocs/Metadata/Template.hpp>
void
merge(
TemplateInfo& I,
TemplateInfo&& Other);
| Name | Description |
|---|---|
| I | Information about templates and specializations thereof. |
| Other | Information about templates and specializations thereof. |
Merge friend declarations, deduplicating by symbol ID.
Declared in <mrdocs/Metadata/Symbol/Friend.hpp>
void
merge(
std::vector<FriendInfo>& dst,
std::vector<FriendInfo>&& src);
| Name | Description |
|---|---|
| dst | The destination. |
| src | The source (moved from). |
Merge parameters element-wise, appending extras from src.
Declared in <mrdocs/Metadata/Symbol/Param.hpp>
void
merge(
std::vector<Param>& dst,
std::vector<Param>&& src);
| Name | Description |
|---|---|
| dst | The destination. |
| src | The source (moved from). |
Merges two Symbol objects according to the behavior of the derived class.
Declared in <mrdocs/Metadata/Symbol.hpp>
template<polymorphic_storage_for<Symbol> SymbolTy>
void
merge(
SymbolTy& I,
SymbolTy&& Other);
| Name | Description |
|---|---|
| I | The Symbol object to merge into. |
| Other | The Symbol object to merge from. |
Generic merge for any described type.
Declared in <mrdocs/Support/MergeReflectedType.hpp>
template<typename T>
requires describe::has_describe_members<T>::value
void
merge(
T& dst,
T&& src);
Found via ADL for any type with MRDOCS_DESCRIBE_STRUCT. Non-template overloads (custom merge functions) are preferred by overload resolution, so types with special merge semantics are unaffected.
Iterates base classes (via describe_bases) and own members (via describe_members).
Base classes are merged first by calling `merge(base_dst, base_src)`, which must be found via ADL.
For each own member, a default merge strategy is applied based on the member type (see mergeByType for the full list of strategies).
| Name | Description |
|---|---|
| T | The type to merge (must have MRDOCS_DESCRIBE_STRUCT). |
| Name | Description |
|---|---|
| dst | The destination object. |
| src | The source object. Members are moved from individually. |
Merge metadata from another constant expression.
Declared in <mrdocs/Metadata/Expression.hpp>
template<class T>
static
void
merge(
ConstantExprInfo<T>& I,
ConstantExprInfo<T>&& Other);
| Name | Description |
|---|---|
| I | Represents an expression with a (possibly known) value |
| Other | Represents an expression with a (possibly known) value |
Compare ExtractionModes and returns the most specific
Declared in <mrdocs/Metadata/Symbol/ExtractionMode.hpp>
constexpr
ExtractionMode
mostSpecific(
ExtractionMode const a,
ExtractionMode const b) noexcept;
This function returns the most specific of the two ExtractionModes in terms of number of filters passed.
Determine why a symbol is extracted
| Name | Description |
|---|---|
| a | Determine why a symbol is extracted |
| b | Determine why a symbol is extracted |
null_of helper that constructs a null T using nullable_traits<T>.
Declared in <mrdocs/ADT/Nullable.hpp>
template<has_nullable_traits_v T>
T
null_of() noexcept(noexcept(nullable_traits<T>::null()));
A null T value.
Pipe a contiguous character range into the adaptor.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
auto
operator|(
R&& r,
/* implementation-defined */ const& a);
View over the lines in r.
| Name | Description |
|---|---|
| r | Range to split. |
| a | SplitLines adaptor instance. |
Determine if one function would override the other
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
bool
overrides(
FunctionSymbol const& base,
FunctionSymbol const& derived);
if one function would override the other
| Name | Description |
|---|---|
| base | The base function |
| derived | The derived function |
Parse a string view
Declared in <mrdocs/Support/Parse.hpp>
Parse a string view
template<HasParse T>
Expected<T>
parse(std::string_view sv);
» more...
Parse a string view
template<HasParse T>
ParseResult
parse(
std::string_view sv,
T& value);
» more...
| Name | Description |
|---|---|
| sv | The string view to parse |
| value | The value to store the result |
Parse a string view
Declared in <mrdocs/Support/Parse.hpp>
template<HasParse T>
Expected<T>
parse(std::string_view sv);
Parse a string view sv as an object of type T. If parsing fails, the function returns an error.
This overload does not return the ParseResult object containing the pointer to the first character not parsed. Instead, the position of the error is calculated and the error message is formatted with the error position.
This function parses a string view sv into a value of type T. The function calls the parse function for the type T with the sv.data() and sv.data() + sv.size() as the first and last pointers, respectively.
If the parse function returns an error, then the function returns the error.
If the parse function returns success, but there are characters left in the string view, then the function returns an error with the message "trailing characters".
Otherwise, it returns the value.
A container holding an error or a value.
| Name | Description |
|---|---|
| sv | The string view to parse |
Parse a string view
Declared in <mrdocs/Support/Parse.hpp>
template<HasParse T>
ParseResult
parse(
std::string_view sv,
T& value);
This function parses a string view sv into a value of type T. The function calls the parse function for the type T with the sv.data() and sv.data() + sv.size() as the first and last pointers, respectively.
If the parse function returns an error, then the function returns the error.
If the parse function returns success, but there are characters left in the string view, then the function returns an error with the message "trailing characters".
Otherwise, it returns the value.
The result of a parse operation.
| Name | Description |
|---|---|
| sv | The string view to parse |
| value | The value to store the result |
Get the unqualified name of a type.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<typename T>
constexpr
std::string_view
readableTypeName();
Extracts the name from PRETTY_FUNCTION (Clang/GCC) or FUNCSIG (MSVC).
E.g.: readableTypeName<mrdocs::FunctionSymbol>() -> "FunctionSymbol".
the unqualified name of a type.
Reindent code by removing the common leading spaces and adding the specified indent.
Declared in <mrdocs/Support/String.hpp>
std::string
reindentCode(
std::string_view code,
std::size_t indent = 0);
The modified code block.
| Name | Description |
|---|---|
| code | The code block to unindent. |
| indent | The number of spaces to insert in front of each line after trimming. |
Return the substring without leading and trailing horizontal whitespace.
Declared in <mrdocs/Support/String.hpp>
void
replace(
std::string& s,
std::string_view from,
std::string_view to);
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
| from | The substring to remove. |
| to | The substring to replace with. If this is empty, the substring is removed. |
rtrim overloads
Declared in <mrdocs/Support/String.hpp>
Return the substring without trailing horizontal whitespace.
constexpr
std::string_view
rtrim(std::string_view const s) noexcept;
» more...
Return the substring without trailing specified characters.
constexpr
std::string_view
rtrim(
std::string_view const s,
std::string_view const chars) noexcept;
» more...
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
| chars | The characters to remove. |
Return the substring without trailing horizontal whitespace.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string_view
rtrim(std::string_view const s) noexcept;
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
Return the substring without trailing specified characters.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string_view
rtrim(
std::string_view const s,
std::string_view const chars) noexcept;
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
| chars | The characters to remove. |
safeString overloads
Declared in <mrdocs/Dom/Value.hpp>
Create a wrapper for a safe string.
dom::Value
safeString(std::string_view str);
» more...
Mark an existing string-like value as safe to emit without escaping.
dom::Value
safeString(dom::Value const& str);
» more...
Return a DOM string ensuring special characters are escaped.
template<std::convertible_to<std::string_view> SV>
dom::Value
safeString(SV const& str);
» more...
| Name | Description |
|---|---|
| str | The string to mark as safe |
https://handlebarsjs.com/api-reference/utilities.html#handlebars-safestring-string
Create a wrapper for a safe string.
This string wrapper prevents the string from being escaped when the template is rendered.
When a helper returns a safe string, it will be marked as safe and will not be escaped when rendered. The string will be rendered as if converted to a dom::Value and rendered as-is.
When constructing the string that will be marked as safe, any external content should be properly escaped using the escapeExpression function to avoid potential security concerns.
The safe string wrapper
| Name | Description |
|---|---|
| str | The string to mark as safe |
https://handlebarsjs.com/api-reference/utilities.html#handlebars-safestring-string
Mark an existing string-like value as safe to emit without escaping.
This overload is useful when a helper already produced a dom::Value and only needs to flip the safe-string flag before it is rendered.
A variant container for any kind of Dom value.
| Name | Description |
|---|---|
| str | A variant container for any kind of Dom value. |
Return a DOM string ensuring special characters are escaped.
Declared in <mrdocs/Dom/Value.hpp>
template<std::convertible_to<std::string_view> SV>
dom::Value
safeString(SV const& str);
dom::Value containing the safe string.
| Name | Description |
|---|---|
| str | Source string view convertible type. |
splitLines overloads
Declared in <mrdocs/Support/SplitLines.hpp>
Split a string view into lines.
constexpr
auto
splitLines(std::string_view sv);
» more...
Split any contiguous character range into lines.
template<std::ranges::contiguous_range R>
requires std::same_as<std::remove_cv_t<std::ranges::range_value_t<R>>, char>
constexpr
auto
splitLines(R&& r);
» more...
sv.| Name | Description |
|---|---|
| sv | Source string. |
| r | Range of characters. |
Split a string view into lines.
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
auto
splitLines(std::string_view sv);
This function is defined as an Algorithm Function Object (AFO).
View over the lines in sv.
| Name | Description |
|---|---|
| sv | Source string. |
Split any contiguous character range into lines.
Declared in <mrdocs/Support/SplitLines.hpp>
template<std::ranges::contiguous_range R>
requires std::same_as<std::remove_cv_t<std::ranges::range_value_t<R>>, char>
constexpr
auto
splitLines(R&& r);
This function is defined as an Algorithm Function Object (AFO).
View over the lines in the range.
| Name | Description |
|---|---|
| r | Range of characters. |
Determine if a string starts with one of the specified characters
Declared in <mrdocs/Support/String.hpp>
constexpr
bool
startsWithOneOf(
std::string_view s,
std::string_view chars) noexcept;
if a string starts with one of the specified characters
| Name | Description |
|---|---|
| s | The string to check. |
| chars | The characters to check for. |
swap overloads
Declared in <mrdocs/ADT/Optional.hpp>
constexpr
void
swap(
Error& lhs,
Error& rhs) noexcept;
» more...
constexpr
void
swap(
Expected& a,
Expected& b) noexcept(noexcept(a.swap(b)))
requires requires { a.swap(b); };
» more...
Swap contents with another Expected.
constexpr
void
swap(
Expected& x,
Expected& y) noexcept(noexcept(x.swap(y)))
requires requires {x.swap(y);};
» more...
constexpr
void
swap(
Polymorphic& lhs,
Polymorphic& rhs) noexcept;
» more...
constexpr
void
swap(
Unexpected& x,
Unexpected& y) noexcept(noexcept(x.swap(y)))
requires std::is_swappable_v<E>;
» more...
Swap two Optional references.
template<class T>
constexpr
void
swap(
Optional<T&>& a,
Optional<T&>& b) noexcept;
» more...
| Name | Description |
|---|---|
| a | First optional reference. |
| b | Second optional reference. |
Swap contents with another Expected.
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
swap(
Expected& x,
Expected& y) noexcept(noexcept(x.swap(y)))
requires requires {x.swap(y);};
| Name | Description |
|---|---|
| x | A container holding an error or a value. |
| y | A container holding an error or a value. |
Declared in <mrdocs/ADT/Polymorphic.hpp>
constexpr
void
swap(
Polymorphic& lhs,
Polymorphic& rhs) noexcept;
Declared in <mrdocs/Support/Expected.hpp>
constexpr
void
swap(
Unexpected& x,
Unexpected& y) noexcept(noexcept(x.swap(y)))
requires std::is_swappable_v<E>;
Swap two Optional references.
Declared in <mrdocs/ADT/Optional.hpp>
template<class T>
constexpr
void
swap(
Optional<T&>& a,
Optional<T&>& b) noexcept;
| Name | Description |
|---|---|
| a | First optional reference. |
| b | Second optional reference. |
tag_invoke overloads
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
Serialize the auto kind into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
AutoKind kind);
» more...
Serialize a FundamentalTypeKind into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
FundamentalTypeKind kind);
» more...
Map an operator kind to a DOM value (its underlying integer).
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
OperatorKind kind);
» more...
Map a QualifierKind into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
QualifierKind kind);
» more...
Return the ReferenceKind as a dom::Value string.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ReferenceKind kind);
» more...
Map a TypeKind into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
TypeKind kind);
» more...
Return the UsingClass as a dom::Value string.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
UsingClass kind);
» more...
Return the AccessKind as a dom::Value string.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
AccessKind const kind);
» more...
Return the ConstexprKind as a dom::Value string.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ConstexprKind const kind);
» more...
Return the StorageClassKind as a dom::Value string.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
StorageClassKind const kind);
» more...
Return the ExplicitInfo as a dom::Value string.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ExplicitInfo const& I);
» more...
Serialize source locations into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
SourceInfo const& I);
» more...
Convert SymbolID to dom::Value string in the DOM using toBase16
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
SymbolID const& id);
» more...
Convert a NoexceptInfo to a DOM value.
void
tag_invoke(
dom::ValueFromTag tag,
dom::Value& v,
NoexceptInfo const& info);
» more...
Map the SourceInfo to a lazy DOM object.
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO&,
SourceInfo const&);
» more...
Generic ValueFrom for any described enum.
template<typename Enum>
requires describe::has_describe_enumerators<Enum>::value
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Enum e);
» more...
Generic tag_invoke for described types without context.
template<
typename IO,
typename T>
requires describe::has_describe_members<T>::value
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
T const& I);
» more...
Map an ExprInfo to a dom::Value object.
void
tag_invoke(
dom::LazyObjectMapTag,
dom::Value& v,
ExprInfo const& expr,
DomCorpus const*);
» more...
Serialize a base description into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
BaseInfo const& I,
DomCorpus const* domCorpus);
» more...
Map an ExprInfo to a dom::Value object.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ExprInfo const& expr,
DomCorpus const*);
» more...
Serialize a name into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Name const& I,
DomCorpus const* domCorpus);
» more...
Return the Param as a dom::Value object.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Param const& p,
DomCorpus const* domCorpus);
» more...
Convert SymbolID to dom::Value object in the DOM using Corpus
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
SymbolID const& id,
DomCorpus const* domCorpus);
» more...
Serialize the argument to a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
TArg const& I,
DomCorpus const* domCorpus);
» more...
Serialize a template parameter into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
TParam const& I,
DomCorpus const* domCorpus);
» more...
Serialize template info into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
TemplateInfo const& I,
DomCorpus const* domCorpus);
» more...
Serialize a Type into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Type const& I,
DomCorpus const* domCorpus);
» more...
Convert an optional SymbolID to dom::Value or null.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<SymbolID> const& id,
DomCorpus const* domCorpus);
» more...
Serialize an optional template info into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<TemplateInfo> const& I,
DomCorpus const* domCorpus);
» more...
Serialize an optional polymorphic name into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<Polymorphic<Name>> const& I,
DomCorpus const* domCorpus);
» more...
Serialize an optional polymorphic type into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<Polymorphic<Type>> const& I,
DomCorpus const* domCorpus);
» more...
Serialize a polymorphic name into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<Name> const& I,
DomCorpus const* domCorpus);
» more...
Serialize a polymorphic template argument into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<TArg> const& I,
DomCorpus const* domCorpus);
» more...
Serialize a polymorphic template parameter.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<TParam> const& I,
DomCorpus const* domCorpus);
» more...
Serialize a polymorphic type into a DOM value.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<Type> const& I,
DomCorpus const* domCorpus);
» more...
Convert SymbolID pointers to dom::Value or null.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
std::unique_ptr<SymbolID> const& t,
DomCorpus const* domCorpus);
» more...
Map a vector of parameters to a dom::Value object.
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
std::vector<Param> const& params,
DomCorpus const* domCorpus);
» more...
Map an ArrayType to a dom::Object with split bounds properties.
template<typename IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
ArrayType const& I,
DomCorpus const* domCorpus);
» more...
Map a BaseInfo to a dom::Object with computed access booleans.
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
BaseInfo const& I,
DomCorpus const* domCorpus);
» more...
Map a FriendInfo to a dom::Object with deferred name lookup.
template<typename IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
FriendInfo const& I,
DomCorpus const* domCorpus);
» more...
Map a Name to a dom::Object via visit-based polymorphic dispatch.
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
Name const& I,
DomCorpus const* domCorpus);
» more...
Map a RecordSymbol to a dom::Object with computed defaultAccess.
template<typename IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
RecordSymbol const& I,
DomCorpus const* domCorpus);
» more...
Map a Symbol to a dom::Object with computed extraction properties.
template<typename IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
Symbol const& I,
DomCorpus const* domCorpus);
» more...
Map a TemplateInfo to a dom::Object with computed specialization kind.
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
TemplateInfo const& I,
DomCorpus const* domCorpus);
» more...
Generic ValueFrom for any described compound type.
template<typename T>
requires (describe::has_describe_members<T>::value &&
!describe::has_describe_enumerators<T>::value)
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
T const& I,
DomCorpus const* domCorpus);
» more...
Map the Polymorphic Symbol to a dom::Object.
template<
class IO,
polymorphic_storage_for<Symbol> PolymorphicSymbol>
requires std::derived_from<PolymorphicSymbol, Symbol>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
PolymorphicSymbol const& I,
DomCorpus const* domCorpus);
» more...
Generic tag_invoke for any described type with DomCorpus context.
template<
typename IO,
typename T>
requires describe::has_describe_members<T>::value
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
T const& I,
DomCorpus const* domCorpus);
» more...
Generic ValueFrom for described enums, with context.
template<
typename Enum,
typename Context>
requires describe::has_describe_enumerators<Enum>::value
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Enum e,
Context const&);
» more...
| Name | Description |
|---|---|
| v | The output value. |
| kind | The UsingClass to convert. |
| I | The ExplicitInfo to convert. |
| e | The enumerator to convert to a dom::Value string. |
| io | The lazy object builder to map fields into. |
| expr | The expression info to convert. |
| t | The SymbolID pointer to convert. If null, the dom::Value is set to null. |
| domCorpus | The DomCorpus to use, or nullptr. If null, the SymbolID is converted to a base16 string. |
| params | The list of parameters to convert. |
Serialize the auto kind into a DOM value.
Declared in <mrdocs/Metadata/Type/AutoKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
AutoKind kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | The kind of auto keyword used in a declaration. |
Serialize a FundamentalTypeKind into a DOM value.
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
FundamentalTypeKind kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Categorically describes a fundamental type. |
Map an operator kind to a DOM value (its underlying integer).
Declared in <mrdocs/Metadata/Specifiers/OperatorKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
OperatorKind kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Operator kinds |
Map a QualifierKind into a DOM value.
Declared in <mrdocs/Metadata/Type/QualifierKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
QualifierKind kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Type qualifiers |
Return the ReferenceKind as a dom::Value string.
Declared in <mrdocs/Metadata/Specifiers/ReferenceKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ReferenceKind kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Reference type kinds |
Map a TypeKind into a DOM value.
Declared in <mrdocs/Metadata/Type/TypeKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
TypeKind kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Variants of C++ types captured in metadata. |
Return the UsingClass as a dom::Value string.
Declared in <mrdocs/Metadata/Symbol/Using.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
UsingClass kind);
| Name | Description |
|---|---|
| v | The output value. |
| kind | The UsingClass to convert. |
Return the AccessKind as a dom::Value string.
Declared in <mrdocs/Metadata/Specifiers/AccessKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
AccessKind const kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Access specifier. |
Return the ConstexprKind as a dom::Value string.
Declared in <mrdocs/Metadata/Specifiers/ConstexprKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ConstexprKind const kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | constexpr/consteval specifier kinds |
Return the StorageClassKind as a dom::Value string.
Declared in <mrdocs/Metadata/Specifiers/StorageClassKind.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
StorageClassKind const kind);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| kind | Storage class kinds |
Return the ExplicitInfo as a dom::Value string.
Declared in <mrdocs/Metadata/Specifiers/ExplicitInfo.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ExplicitInfo const& I);
| Name | Description |
|---|---|
| v | The output parameter to receive the dom::Value. |
| I | The ExplicitInfo to convert. |
Serialize source locations into a DOM value.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
SourceInfo const& I);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | Stores source information for a declaration. |
Convert SymbolID to dom::Value string in the DOM using toBase16
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
SymbolID const& id);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| id | A unique identifier for a symbol. |
Convert a NoexceptInfo to a DOM value.
Declared in <mrdocs/Metadata/Specifiers/NoexceptInfo.hpp>
void
tag_invoke(
dom::ValueFromTag tag,
dom::Value& v,
NoexceptInfo const& info);
| Name | Description |
|---|---|
| tag | Customization point tag. |
| v | A variant container for any kind of Dom value. |
| info | Captures a noexcept specification and its evaluated form. |
Map the SourceInfo to a lazy DOM object.
Declared in <mrdocs/Metadata/Symbol/Source.hpp>
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO&,
SourceInfo const&);
Generic ValueFrom for any described enum.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<typename Enum>
requires describe::has_describe_enumerators<Enum>::value
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Enum e);
| Name | Description |
|---|---|
| e | The enumerator to convert to a dom::Value string. |
| v | A variant container for any kind of Dom value. |
Generic tag_invoke for described types without context.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<
typename IO,
typename T>
requires describe::has_describe_members<T>::value
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
T const& I);
Same as above but for types that don't need a DomCorpus (e.g. Location).
| Name | Description |
|---|---|
| io | The lazy object builder to map fields into. |
| I | The described instance to serialize. |
Map an ExprInfo to a dom::Value object.
Declared in <mrdocs/Metadata/Expression.hpp>
void
tag_invoke(
dom::LazyObjectMapTag,
dom::Value& v,
ExprInfo const& expr,
DomCorpus const*);
| Name | Description |
|---|---|
| v | The output parameter to receive the dom::Value. |
| expr | The expression info to convert. |
Serialize a base description into a DOM value.
Declared in <mrdocs/Metadata/Symbol/RecordBase.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
BaseInfo const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | Metadata for a direct base. |
| domCorpus | Front-end factory for producing Dom nodes. |
Map an ExprInfo to a dom::Value object.
Declared in <mrdocs/Metadata/Expression.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
ExprInfo const& expr,
DomCorpus const*);
| Name | Description |
|---|---|
| v | The output parameter to receive the dom::Value. |
| expr | The expression info to convert. |
Serialize a name into a DOM value.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Name const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | Represents a name for a named Type |
| domCorpus | Front-end factory for producing Dom nodes. |
Return the Param as a dom::Value object.
Declared in <mrdocs/Metadata/Symbol/Param.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Param const& p,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| p | Represents a single function parameter |
| domCorpus | Front-end factory for producing Dom nodes. |
Convert SymbolID to dom::Value object in the DOM using Corpus
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
SymbolID const& id,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| id | A unique identifier for a symbol. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize the argument to a DOM value.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
TArg const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | Base class for any template argument. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize a template parameter into a DOM value.
Declared in <mrdocs/Metadata/TParam/TParamBase.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
TParam const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | Base class for a template parameter declaration. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize template info into a DOM value.
Declared in <mrdocs/Metadata/Template.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
TemplateInfo const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | Information about templates and specializations thereof. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize a Type into a DOM value.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Type const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | A possibly qualified type. |
| domCorpus | Front-end factory for producing Dom nodes. |
Convert an optional SymbolID to dom::Value or null.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<SymbolID> const& id,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| id | A compact optional that automatically uses nullable_traits<T> when available. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize an optional template info into a DOM value.
Declared in <mrdocs/Metadata/Template.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<TemplateInfo> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | A compact optional that automatically uses nullable_traits<T> when available. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize an optional polymorphic name into a DOM value.
Declared in <mrdocs/Metadata/Name.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<Polymorphic<Name>> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | A compact optional that automatically uses nullable_traits<T> when available. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize an optional polymorphic type into a DOM value.
Declared in <mrdocs/Metadata/Type.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Optional<Polymorphic<Type>> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | A compact optional that automatically uses nullable_traits<T> when available. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize a polymorphic name into a DOM value.
Declared in <mrdocs/Metadata/Name.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<Name> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | A polymorphic value-type. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize a polymorphic template argument into a DOM value.
Declared in <mrdocs/Metadata/TArg.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<TArg> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | A polymorphic value-type. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize a polymorphic template parameter.
Declared in <mrdocs/Metadata/TParam.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<TParam> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | A polymorphic value-type. |
| domCorpus | Front-end factory for producing Dom nodes. |
Serialize a polymorphic type into a DOM value.
Declared in <mrdocs/Metadata/Type.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Polymorphic<Type> const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | A variant container for any kind of Dom value. |
| I | A polymorphic value-type. |
| domCorpus | Front-end factory for producing Dom nodes. |
Convert SymbolID pointers to dom::Value or null.
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
std::unique_ptr<SymbolID> const& t,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | The output parameter to receive the dom::Value. |
| t | The SymbolID pointer to convert. If null, the dom::Value is set to null. |
| domCorpus | The DomCorpus to use, or nullptr. If null, the SymbolID is converted to a base16 string. |
Map a vector of parameters to a dom::Value object.
Declared in <mrdocs/Metadata/Symbol/Function.hpp>
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
std::vector<Param> const& params,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | The output parameter to receive the dom::Value. |
| params | The list of parameters to convert. |
| domCorpus | The DomCorpus used to resolve references. |
Map an ArrayType to a dom::Object with split bounds properties.
Declared in <mrdocs/Metadata/Type/ArrayType.hpp>
template<typename IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
ArrayType const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The IO object to map into. |
| I | The ArrayType to map. |
| domCorpus | The DomCorpus context. |
Map a BaseInfo to a dom::Object with computed access booleans.
Declared in <mrdocs/Metadata/Symbol/RecordBase.hpp>
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
BaseInfo const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The IO object to map into. |
| I | The BaseInfo to map. |
| domCorpus | The DomCorpus context. |
Map a FriendInfo to a dom::Object with deferred name lookup.
Declared in <mrdocs/Metadata/Symbol/Friend.hpp>
template<typename IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
FriendInfo const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The IO object to map into. |
| I | The FriendInfo to map. |
| domCorpus | The DomCorpus context. |
Map a Name to a dom::Object via visit-based polymorphic dispatch.
Declared in <mrdocs/Metadata/Name.hpp>
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
Name const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The IO object to map into. |
| I | The Name to map. |
| domCorpus | The DomCorpus context. |
Map a RecordSymbol to a dom::Object with computed defaultAccess.
Declared in <mrdocs/Metadata/Symbol/Record.hpp>
template<typename IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
RecordSymbol const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The IO object to map into. |
| I | The RecordSymbol to map. |
| domCorpus | The DomCorpus context. |
Map a Symbol to a dom::Object with computed extraction properties.
Declared in <mrdocs/Metadata/Symbol/SymbolBase.hpp>
template<typename IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
Symbol const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The IO object to map into. |
| I | The Symbol to map. |
| domCorpus | The DomCorpus context. |
Map a TemplateInfo to a dom::Object with computed specialization kind.
Declared in <mrdocs/Metadata/Template.hpp>
template<class IO>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
TemplateInfo const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The IO object to map into. |
| I | The TemplateInfo to map. |
| domCorpus | The DomCorpus context. |
Generic ValueFrom for any described compound type.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<typename T>
requires (describe::has_describe_members<T>::value &&
!describe::has_describe_enumerators<T>::value)
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
T const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| v | The output value. |
| I | The object to convert. |
| domCorpus | The DomCorpus context. |
Map the Polymorphic Symbol to a dom::Object.
Declared in <mrdocs/Metadata/Symbol.hpp>
template<
class IO,
polymorphic_storage_for<Symbol> PolymorphicSymbol>
requires std::derived_from<PolymorphicSymbol, Symbol>
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
PolymorphicSymbol const& I,
DomCorpus const* domCorpus);
| Name | Description |
|---|---|
| io | The output parameter to receive the dom::Object. |
| I | The polymorphic Symbol to convert. |
| domCorpus | The DomCorpus used to resolve references. |
Generic tag_invoke for any described type with DomCorpus context.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<
typename IO,
typename T>
requires describe::has_describe_members<T>::value
void
tag_invoke(
dom::LazyObjectMapTag,
IO& io,
T const& I,
DomCorpus const* domCorpus);
Handles all types whose mapping is a straightforward mapReflectedType<true>. Custom overloads (more-specialized template or non-template) are preferred by overload resolution.
| Name | Description |
|---|---|
| io | The lazy object builder to map fields into. |
| I | The described instance to serialize. |
| domCorpus | Optional corpus used to resolve cross-references. |
Generic ValueFrom for described enums, with context.
Declared in <mrdocs/Support/MapReflectedType.hpp>
template<
typename Enum,
typename Context>
requires describe::has_describe_enumerators<Enum>::value
void
tag_invoke(
dom::ValueFromTag,
dom::Value& v,
Enum e,
Context const&);
Same as above, ignoring the context.
| Name | Description |
|---|---|
| e | The enumerator to convert to a dom::Value string. |
| v | A variant container for any kind of Dom value. |
Convert a SymbolID to a string
Declared in <mrdocs/Metadata/Symbol/SymbolID.hpp>
std::string
toBase16Str(SymbolID const& id);
The base16 string representation of the SymbolID.
| Name | Description |
|---|---|
| id | The SymbolID to convert. |
Convert a string to camelCase using ASCII letter rules.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string
toCamelCase(std::string_view const input);
New string converted to camelCase.
| Name | Description |
|---|---|
| input | Source string. |
Convert a string to kebab-case using ASCII letter rules.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string
toKebabCase(std::string_view const input);
New string converted to kebab-case.
| Name | Description |
|---|---|
| input | Source string. |
toLowerCase overloads
Declared in <mrdocs/Support/String.hpp>
Convert a character to lowercase ASCII without locale.
constexpr
char
toLowerCase(char const c) noexcept;
» more...
Return a lowercase copy of the string without locale.
constexpr
std::string
toLowerCase(std::string_view const s) noexcept;
» more...
c if it is uppercase; otherwise c.s.| Name | Description |
|---|---|
| c | Character to convert. |
| s | Input string. |
Convert a character to lowercase ASCII without locale.
Declared in <mrdocs/Support/String.hpp>
constexpr
char
toLowerCase(char const c) noexcept;
Lowercase version of c if it is uppercase; otherwise c.
| Name | Description |
|---|---|
| c | Character to convert. |
Return a lowercase copy of the string without locale.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string
toLowerCase(std::string_view const s) noexcept;
Lowercase copy of s.
| Name | Description |
|---|---|
| s | Input string. |
Convert a string to PascalCase using ASCII letter rules.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string
toPascalCase(std::string_view const input);
New string converted to PascalCase.
| Name | Description |
|---|---|
| input | Source string. |
Convert a string to snake_case using ASCII letter rules.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string
toSnakeCase(std::string_view const input);
New string converted to snake_case.
| Name | Description |
|---|---|
| input | Source string. |
toString overloads
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
Convert access specifier to its string form.
dom::String
toString(AccessKind kind) noexcept;
» more...
Convert an auto-kind to its spelling.
dom::String
toString(AutoKind kind) noexcept;
» more...
Convert a constexpr/consteval specifier kind to a string.
dom::String
toString(ConstexprKind kind) noexcept;
» more...
Convert an explicit kind to its string form.
dom::String
toString(ExplicitKind kind) noexcept;
» more...
Convert a FundamentalTypeKind to a string.
std::string_view
toString(FundamentalTypeKind kind) noexcept;
» more...
Convert a noexcept kind to its string form.
dom::String
toString(NoexceptKind kind) noexcept;
» more...
Convert a cv/ref qualifier kind to its string form.
dom::String
toString(QualifierKind kind) noexcept;
» more...
Convert a reference kind to its string representation.
dom::String
toString(ReferenceKind kind) noexcept;
» more...
Convert a storage class kind to its string form.
dom::String
toString(StorageClassKind kind) noexcept;
» more...
Convert the specialization kind to a readable string.
std::string_view
toString(TemplateSpecKind kind);
» more...
Convert a TypeKind to its string representation.
dom::String
toString(TypeKind kind) noexcept;
» more...
Convert the name to a human-readable string.
std::string
toString(Name const& N);
» more...
Convert a template argument to a human-readable string.
std::string
toString(TArg const& arg) noexcept;
» more...
Convert a described enumerator to string form.
template<typename Enum>
requires describe::has_describe_enumerators<Enum>::value
std::string
toString(Enum e);
» more...
Render a type to a human-readable string.
std::string
toString(
Type const& T,
std::string_view Name = "");
» more...
Convert ExplicitInfo to a string.
dom::String
toString(
ExplicitInfo const& info,
bool resolved = false,
bool implicit = false);
» more...
Convert NoexceptInfo to a string.
dom::String
toString(
NoexceptInfo const& info,
bool resolved = false,
bool implicit = false);
» more...
| Name | Description |
|---|---|
| e | The enumerator to convert. |
| T | Type to render. |
| Name | Optional identifier to append. |
| info | The explicit-specifier information. |
| resolved | If true, the operand is not shown when the explicit-specifier is non-dependent. |
| implicit | If true, implicit explicit-specifiers are shown. |
Convert access specifier to its string form.
Declared in <mrdocs/Metadata/Specifiers/AccessKind.hpp>
dom::String
toString(AccessKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Access specifier. |
Convert an auto-kind to its spelling.
Declared in <mrdocs/Metadata/Type/AutoKind.hpp>
dom::String
toString(AutoKind kind) noexcept;
String naming the keyword.
| Name | Description |
|---|---|
| kind | The kind of auto keyword used in a declaration. |
Convert a constexpr/consteval specifier kind to a string.
Declared in <mrdocs/Metadata/Specifiers/ConstexprKind.hpp>
dom::String
toString(ConstexprKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | constexpr/consteval specifier kinds |
Convert an explicit kind to its string form.
Declared in <mrdocs/Metadata/Specifiers/ExplicitKind.hpp>
dom::String
toString(ExplicitKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Explicit specifier kinds |
Convert a FundamentalTypeKind to a string.
Declared in <mrdocs/Metadata/Type/FundamentalTypeKind.hpp>
std::string_view
toString(FundamentalTypeKind kind) noexcept;
This function converts a FundamentalTypeKind to the shortest canonical string representing the type.
The string representation of the kind
| Name | Description |
|---|---|
| kind | Categorically describes a fundamental type. |
Convert a noexcept kind to its string form.
Declared in <mrdocs/Metadata/Specifiers/NoexceptKind.hpp>
dom::String
toString(NoexceptKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Exception specification kinds |
Convert a cv/ref qualifier kind to its string form.
Declared in <mrdocs/Metadata/Type/QualifierKind.hpp>
dom::String
toString(QualifierKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Type qualifiers |
Convert a reference kind to its string representation.
Declared in <mrdocs/Metadata/Specifiers/ReferenceKind.hpp>
dom::String
toString(ReferenceKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Reference type kinds |
Convert a storage class kind to its string form.
Declared in <mrdocs/Metadata/Specifiers/StorageClassKind.hpp>
dom::String
toString(StorageClassKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Storage class kinds |
Convert the specialization kind to a readable string.
Declared in <mrdocs/Metadata/Template.hpp>
std::string_view
toString(TemplateSpecKind kind);
String view naming the specialization category.
| Name | Description |
|---|---|
| kind | The kind of template or specialization. |
Convert a TypeKind to its string representation.
Declared in <mrdocs/Metadata/Type/TypeKind.hpp>
dom::String
toString(TypeKind kind) noexcept;
UTF-8 string value used by the DOM.
| Name | Description |
|---|---|
| kind | Variants of C++ types captured in metadata. |
Convert the name to a human-readable string.
The textual form of the name.
| Name | Description |
|---|---|
| N | Represents a name for a named Type |
Convert a template argument to a human-readable string.
Declared in <mrdocs/Metadata/TArg/TArgBase.hpp>
std::string
toString(TArg const& arg) noexcept;
Descriptive text for the argument.
| Name | Description |
|---|---|
| arg | Base class for any template argument. |
Convert a described enumerator to string form.
Declared in <mrdocs/Support/EnumToString.hpp>
template<typename Enum>
requires describe::has_describe_enumerators<Enum>::value
std::string
toString(Enum e);
The string form of the enumerator.
| Name | Description |
|---|---|
| e | The enumerator to convert. |
Render a type to a human-readable string.
Declared in <mrdocs/Metadata/Type.hpp>
std::string
toString(
Type const& T,
std::string_view Name = "");
Text representation of the type.
| Name | Description |
|---|---|
| T | Type to render. |
| Name | Optional identifier to append. |
Convert ExplicitInfo to a string.
Declared in <mrdocs/Metadata/Specifiers/ExplicitInfo.hpp>
dom::String
toString(
ExplicitInfo const& info,
bool resolved = false,
bool implicit = false);
The string representation of the explicit-specifier.
| Name | Description |
|---|---|
| info | The explicit-specifier information. |
| resolved | If true, the operand is not shown when the explicit-specifier is non-dependent. |
| implicit | If true, implicit explicit-specifiers are shown. |
Convert NoexceptInfo to a string.
Declared in <mrdocs/Metadata/Specifiers/NoexceptInfo.hpp>
dom::String
toString(
NoexceptInfo const& info,
bool resolved = false,
bool implicit = false);
The string representation of the noexcept-specifier.
| Name | Description |
|---|---|
| info | The noexcept-specifier information. |
| resolved | If true, the operand is not shown when the exception specification is non-dependent. |
| implicit | If true, implicit exception specifications are shown. |
toUpperCase overloads
Declared in <mrdocs/Support/String.hpp>
Convert a character to uppercase ASCII without locale.
constexpr
char
toUpperCase(char const c) noexcept;
» more...
Return an uppercase copy of the string without locale.
constexpr
std::string
toUpperCase(std::string_view const s) noexcept;
» more...
c if it is lowercase; otherwise c.s.| Name | Description |
|---|---|
| c | Character to convert. |
| s | Input string. |
Convert a character to uppercase ASCII without locale.
Declared in <mrdocs/Support/String.hpp>
constexpr
char
toUpperCase(char const c) noexcept;
Uppercase version of c if it is lowercase; otherwise c.
| Name | Description |
|---|---|
| c | Character to convert. |
Return an uppercase copy of the string without locale.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string
toUpperCase(std::string_view const s) noexcept;
Uppercase copy of s.
| Name | Description |
|---|---|
| s | Input string. |
Return the value as its underlying type.
Declared in <mrdocs/Support/TypeTraits.hpp>
template<class Enum>
requires std::is_enum_v<Enum>
constexpr
std::underlying_type_t<Enum>
to_underlying(Enum value) noexcept;
the value as its underlying type.
| Name | Description |
|---|---|
| value | The enum value to convert |
Traverse a DocComment tree top-down (pre-order).
Declared in <mrdocs/Metadata/DocComment.hpp>
template<
DocCommentNodeTraversable T,
class F>
void
topDownTraverse(
T& node,
F&& func);
| Name | Description |
|---|---|
| node | Root node to traverse. |
| func | Visitor invoked before children are visited. |
trim overloads
Declared in <mrdocs/Support/String.hpp>
Return the substring without leading and trailing horizontal whitespace.
constexpr
std::string_view
trim(std::string_view const s) noexcept;
» more...
Return the substring without leading and trailing specified characters.
constexpr
std::string_view
trim(
std::string_view const s,
std::string_view const chars) noexcept;
» more...
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
| chars | The characters to remove. |
Return the substring without leading and trailing horizontal whitespace.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string_view
trim(std::string_view const s) noexcept;
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
Return the substring without leading and trailing specified characters.
Declared in <mrdocs/Support/String.hpp>
constexpr
std::string_view
trim(
std::string_view const s,
std::string_view const chars) noexcept;
The modified string.
| Name | Description |
|---|---|
| s | The string to trim. |
| chars | The characters to remove. |
visit overloads
Declared in <mrdocs/Metadata/TParam.hpp>
Visit a template parameter, dispatching to its concrete type.
template<
typename TParamTy,
typename F,
typename... Args>
requires std::derived_from<TParamTy, TParam>
constexpr
decltype(auto)
visit(
TParamTy& P,
F&& f,
Args&&... args);
» more...
Visit a Type with the provided callable.
template<
std::derived_from<Symbol> TypeTy,
class F,
class... Args>
constexpr
decltype(auto)
visit(
TypeTy& info,
F&& fn,
Args&&... args);
» more...
| Name | Description |
|---|---|
| P | Parameter to visit. |
| f | Callable to receive the concrete parameter. |
| args | Additional arguments forwarded to the callable. |
| info | The type instance to visit. |
| fn | The callable to dispatch to the concrete type. |
Visit a template parameter, dispatching to its concrete type.
Declared in <mrdocs/Metadata/TParam.hpp>
template<
typename TParamTy,
typename F,
typename... Args>
requires std::derived_from<TParamTy, TParam>
constexpr
decltype(auto)
visit(
TParamTy& P,
F&& f,
Args&&... args);
Whatever the callable returns.
| Name | Description |
|---|---|
| P | Parameter to visit. |
| f | Callable to receive the concrete parameter. |
| args | Additional arguments forwarded to the callable. |
Visit a Type with the provided callable.
Declared in <mrdocs/Metadata/Type.hpp>
template<
std::derived_from<Symbol> TypeTy,
class F,
class... Args>
constexpr
decltype(auto)
visit(
TypeTy& info,
F&& fn,
Args&&... args);
Visit a template argument, dispatching on its concrete kind.
Invoke a function object with a type derived from Symbol
This function will invoke the function object fn with a type derived from Symbol as the first argument, followed by args.... The type of the first argument is determined by the SymbolKind of the Symbol object.
| Name | Description |
|---|---|
| info | The type instance to visit. |
| fn | The callable to dispatch to the concrete type. |
| args | Additional arguments forwarded to the callable. |
Visits a std::variant and calls the combined callable with the active index and the value.
Declared in <mrdocs/ADT/Overload.hpp>
template<
class Variant,
class... Ts>
constexpr
decltype(auto)
visitIndexed(
Variant&& v,
Ts&&... xs);
Unlike match, visitIndexed passes an additional first parameter to your callable set: the runtime index of the active alternative (as a std::size_t).
This is useful when you need both the value and which alternative was selected, without relying on type-unique alternatives.
The supplied callables are combined via makeOverload and are expected to accept a signature like (std::size_t index, T value) for the relevant T.
std::variant<int, double, std::string> v = 3.14;
fn::visitIndexed(v,
[](std::size_t i, int x) { return i + x; },
[](std::size_t i, double d) { return d + i; },
[](std::size_t i, const std::string& s) { return s.size() + i; });
The result of invoking the selected callable.
| Name | Description |
|---|---|
| v | The variant to visit. |
| xs | The callables to be combined with makeOverload and invoked with (index, value). |
Factory that creates a YCombinator from a callable.
Declared in <mrdocs/ADT/Overload.hpp>
template<class F>
[[nodiscard]]
constexpr
YCombinator<std::decay_t<F>>
yCombinator(F&& f) noexcept(std::is_nothrow_constructible_v<std::decay_t<F>, F &&>);
Prefer this helper to avoid spelling template arguments explicitly.
auto fib = fn::yCombinator( []self, int n) -> int { return n <= 1 ? n : self(n - 1) + self(n - 2); });
A YCombinator storing a decayed copy of the callable.
| Name | Description |
|---|---|
| f | The callable to wrap. |
Write to output
Declared in <mrdocs/Support/Handlebars.hpp>
Write to output
OutputRef&
operator<<(
OutputRef& os,
T v);
» more...
Write to output
OutputRef&
operator<<(
OutputRef& os,
char const* c);
» more...
Write to output
OutputRef&
operator<<(
OutputRef& os,
char c);
» more...
Write to output
OutputRef&
operator<<(
OutputRef& os,
std::string_view sv);
» more...
A reference to this object
| Name | Description |
|---|---|
| os | The output stream reference |
| v | The character to write |
| c | The string to write |
| sv | The string to write |
Write to output
A reference to this object
| Name | Description |
|---|---|
| os | The output stream reference |
| v | The character to write |
Write to output
Declared in <mrdocs/Support/Handlebars.hpp>
OutputRef&
operator<<(
OutputRef& os,
char const* c);
A reference to this object
| Name | Description |
|---|---|
| os | The output stream reference |
| c | The string to write |
Write to output
A reference to this object
| Name | Description |
|---|---|
| os | The output stream reference |
| c | The character to write |
Write to output
Declared in <mrdocs/Support/Handlebars.hpp>
OutputRef&
operator<<(
OutputRef& os,
std::string_view sv);
A reference to this object
| Name | Description |
|---|---|
| os | The output stream reference |
| sv | The string to write |
Equality operators
Declared in <mrdocs/ADT/Optional.hpp>
Equality operator
constexpr
bool
operator==(
Expected const& x,
Expected<U, E2> const& y) noexcept(noexcept(bool(x.error() == y.error())));
» more...
Equality operator
constexpr
bool
operator==(
Iterator const& it,
std::default_sentinel_t rhs) noexcept;
» more...
Equality operator
constexpr
bool
operator==(
ParseResult const& lhs,
ParseResult const& rhs) = default;
» more...
Equality helper for polymorphic template parameters.
bool
operator==(
Polymorphic<TParam> const& lhs,
Polymorphic<TParam> const& rhs);
» more...
Equality for polymorphic template arguments.
bool
operator==(
Polymorphic<TArg> const& a,
Polymorphic<TArg> const& b);
» more...
Equality for two polymorphic types.
bool
operator==(
Polymorphic<Type> const& a,
Polymorphic<Type> const& b);
» more...
Equality for two polymorphic names.
bool
operator==(
Polymorphic<Name> const& a,
Polymorphic<Name> const& b);
» more...
Equality for any described type.
template<typename T>
requires DescribedComparable<T>
bool
operator==(
T const& a,
T const& b);
» more...
Equality operator
constexpr
bool
operator==(
Expected const& x,
Expected<U, E2> const& y) noexcept(noexcept(bool(*x == *y)) && noexcept(bool(x.error() == y.error())))
requires (!std::is_void_v<U>);
» more...
Equality operator
constexpr
bool
operator==(
Expected const& x,
U const& v) noexcept(noexcept(bool(*x == v)));
» more...
Equality operator
constexpr
bool
operator==(
Expected const& x,
Unexpected<E2> const& e) noexcept(noexcept(bool(x.error() == e.error())));
» more...
Equality operator
constexpr
bool
operator==(
ArrayView a,
ArrayView b) noexcept
requires requires (const T& x, const T& y) { { x == y } -> std::convertible_to<bool>; };
» more...
Equality operator
constexpr
bool
operator==(
Expected const& x,
Expected<U, E2> const& y) noexcept(noexcept(bool(*x == *y)) && noexcept(bool(x.error() == y.error())));
» more...
Equality operator
constexpr
bool
operator==(
Expected const& x,
U const& v) noexcept(noexcept(bool(*x == v)));
» more...
Equality operator
constexpr
bool
operator==(
Expected const& x,
Unexpected<E2> const& e) noexcept(noexcept(bool(x.error() == e.error())));
» more...
Equality operator
[[nodiscard]]
constexpr
bool
operator==(
Unexpected const& x,
Unexpected<Er> const& y);
» more...
Equality comparison of two polymorphic objects.
template<class Base>
requires detail::CanVisitCompare<Base>
bool
operator==(
Polymorphic<Base> const& lhs,
Polymorphic<Base> const& rhs);
» more...
Compares a value to an engaged Optional for equality. Returns true if the Optional is engaged and its value equals lhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator==(
T const& lhs,
Optional<U> const& rhs);
» more...
Compares an engaged Optional to a value for equality. Returns true if the Optional is engaged and its value equals rhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator==(
Optional<T> const& lhs,
U const& rhs);
» more...
Checks if the Optional is disengaged (equal to std::nullopt). Returns true if the Optional does not contain a value.
template<typename T>
[[nodiscard]]
constexpr
bool
operator==(
Optional<T> const& lhs,
std::nullopt_t rhs) noexcept;
» more...
Compares two Optional values for equality. Returns true if both are engaged and their contained values are equal, or both are disengaged.
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator==(
Optional<T> const& lhs,
Optional<U> const& rhs);
» more...
true if the optional is engaged and equal to lhs; otherwise, false.true if the optional is engaged and equal to rhs; otherwise, false.true if the optional is disengaged; otherwise, false.true if both optionals are engaged and equal, or both are disengaged; otherwise, false.Equality operator
Declared in <mrdocs/Support/Expected.hpp>
constexpr
bool
operator==(
Expected const& x,
Expected<U, E2> const& y) noexcept(noexcept(bool(x.error() == y.error())));
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| x | The left operand |
| y | The right operand |
Equality operator
Declared in <mrdocs/Support/SplitLines.hpp>
constexpr
bool
operator==(
Iterator const& it,
std::default_sentinel_t rhs) noexcept;
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| it | The left operand |
| rhs | The right operand |
Equality operator
Declared in <mrdocs/Support/Parse.hpp>
constexpr
bool
operator==(
ParseResult const& lhs,
ParseResult const& rhs) = default;
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Equality helper for polymorphic template parameters.
Declared in <mrdocs/Metadata/TParam.hpp>
bool
operator==(
Polymorphic<TParam> const& lhs,
Polymorphic<TParam> const& rhs);
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Equality for polymorphic template arguments.
Declared in <mrdocs/Metadata/TArg.hpp>
bool
operator==(
Polymorphic<TArg> const& a,
Polymorphic<TArg> const& b);
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Equality for two polymorphic types.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
bool
operator==(
Polymorphic<Type> const& a,
Polymorphic<Type> const& b);
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Equality for two polymorphic names.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
bool
operator==(
Polymorphic<Name> const& a,
Polymorphic<Name> const& b);
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Equality for any described type.
Declared in <mrdocs/Support/CompareReflectedType.hpp>
template<typename T>
requires DescribedComparable<T>
bool
operator==(
T const& a,
T const& b);
Needed because removing a defaulted member operator<=>() also removes the implicitly-generated operator==().
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Equality operator
Declared in <mrdocs/Support/Expected.hpp>
constexpr
bool
operator==(
Expected const& x,
Expected<U, E2> const& y) noexcept(noexcept(bool(*x == *y)) && noexcept(bool(x.error() == y.error())))
requires (!std::is_void_v<U>);
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| x | The left operand |
| y | The right operand |
Equality operator
Declared in <mrdocs/Support/Expected.hpp>
constexpr
bool
operator==(
Expected const& x,
U const& v) noexcept(noexcept(bool(*x == v)));
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| x | The left operand |
| v | The right operand |
Equality operator
Declared in <mrdocs/Support/Expected.hpp>
constexpr
bool
operator==(
Expected const& x,
Unexpected<E2> const& e) noexcept(noexcept(bool(x.error() == e.error())));
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| x | The left operand |
| e | The right operand |
Equality operator
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
bool
operator==(
ArrayView a,
ArrayView b) noexcept
requires requires (const T& x, const T& y) { { x == y } -> std::convertible_to<bool>; };
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Equality operator
Declared in <mrdocs/Support/Expected.hpp>
constexpr
bool
operator==(
Expected const& x,
Expected<U, E2> const& y) noexcept(noexcept(bool(*x == *y)) && noexcept(bool(x.error() == y.error())));
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| x | The left operand |
| y | The right operand |
Equality operator
Declared in <mrdocs/Support/Expected.hpp>
constexpr
bool
operator==(
Expected const& x,
U const& v) noexcept(noexcept(bool(*x == v)));
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| x | The left operand |
| v | The right operand |
Equality operator
Declared in <mrdocs/Support/Expected.hpp>
constexpr
bool
operator==(
Expected const& x,
Unexpected<E2> const& e) noexcept(noexcept(bool(x.error() == e.error())));
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| x | The left operand |
| e | The right operand |
Equality operator
Declared in <mrdocs/Support/Expected.hpp>
[[nodiscard]]
constexpr
bool
operator==(
Unexpected const& x,
Unexpected<Er> const& y);
true if the objects are equal, false otherwise
| Name | Description |
|---|---|
| x | The left operand |
| y | The right operand |
Equality comparison of two polymorphic objects.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<class Base>
requires detail::CanVisitCompare<Base>
bool
operator==(
Polymorphic<Base> const& lhs,
Polymorphic<Base> const& rhs);
true when objects compare equal.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compares a value to an engaged Optional for equality. Returns true if the Optional is engaged and its value equals lhs.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator==(
T const& lhs,
Optional<U> const& rhs);
true if the optional is engaged and equal to lhs; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compares an engaged Optional to a value for equality. Returns true if the Optional is engaged and its value equals rhs.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator==(
Optional<T> const& lhs,
U const& rhs);
true if the optional is engaged and equal to rhs; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if the Optional is disengaged (equal to std::nullopt). Returns true if the Optional does not contain a value.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename T>
[[nodiscard]]
constexpr
bool
operator==(
Optional<T> const& lhs,
std::nullopt_t rhs) noexcept;
true if the optional is disengaged; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compares two Optional values for equality. Returns true if both are engaged and their contained values are equal, or both are disengaged.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator==(
Optional<T> const& lhs,
Optional<U> const& rhs);
true if both optionals are engaged and equal, or both are disengaged; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Inequality operators
Declared in <mrdocs/ADT/Optional.hpp>
Compares two Optional values for inequality. Returns true if their engagement states differ or their contained values are not equal.
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator!=(
Optional<T> const& lhs,
Optional<U> const& rhs);
» more...
Compares an Optional to a value for inequality. Returns true if the Optional is disengaged or its value does not equal rhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator!=(
Optional<T> const& lhs,
U const& rhs);
» more...
Compares a value to an Optional for inequality. Returns true if the Optional is disengaged or its value does not equal lhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator!=(
T const& lhs,
Optional<U> const& rhs);
» more...
true if the optionals differ in engagement or value; otherwise, false.true if the optional is disengaged or not equal to rhs; otherwise, false.true if the optional is disengaged or not equal to lhs; otherwise, false.Compares two Optional values for inequality. Returns true if their engagement states differ or their contained values are not equal.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator!=(
Optional<T> const& lhs,
Optional<U> const& rhs);
true if the optionals differ in engagement or value; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compares an Optional to a value for inequality. Returns true if the Optional is disengaged or its value does not equal rhs.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator!=(
Optional<T> const& lhs,
U const& rhs);
true if the optional is disengaged or not equal to rhs; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compares a value to an Optional for inequality. Returns true if the Optional is disengaged or its value does not equal lhs.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator!=(
T const& lhs,
Optional<U> const& rhs);
true if the optional is disengaged or not equal to lhs; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Less-than operators
Declared in <mrdocs/ADT/Optional.hpp>
Checks if the left Optional is less than the right Optional. Returns true if the right is engaged and either the left is disengaged or its value is less.
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator<(
Optional<T> const& lhs,
Optional<U> const& rhs);
» more...
Checks if the Optional is less than a value. Returns true if the Optional is disengaged or its value is less than rhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
[[nodiscard]]
constexpr
/* implementation-defined */
operator<(
Optional<T> const& lhs,
U const& rhs);
» more...
Checks if a value is less than an engaged Optional. Returns true if the Optional is engaged and lhs is less than its value.
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
[[nodiscard]]
constexpr
/* implementation-defined */
operator<(
T const& lhs,
Optional<U> const& rhs);
» more...
true if lhs is less than rhs according to the described rules; otherwise, false.true if the optional is disengaged or less than rhs; otherwise, false.true if the optional is engaged and lhs is less than its value; otherwise, false.Checks if the left Optional is less than the right Optional. Returns true if the right is engaged and either the left is disengaged or its value is less.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator<(
Optional<T> const& lhs,
Optional<U> const& rhs);
true if lhs is less than rhs according to the described rules; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if the Optional is less than a value. Returns true if the Optional is disengaged or its value is less than rhs.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
[[nodiscard]]
constexpr
/* implementation-defined */
operator<(
Optional<T> const& lhs,
U const& rhs);
true if the optional is disengaged or less than rhs; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if a value is less than an engaged Optional. Returns true if the Optional is engaged and lhs is less than its value.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
[[nodiscard]]
constexpr
/* implementation-defined */
operator<(
T const& lhs,
Optional<U> const& rhs);
true if the optional is engaged and lhs is less than its value; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Less-than-or-equal operators
Declared in <mrdocs/ADT/Optional.hpp>
Checks if the left Optional is less than or equal to the right Optional. Returns true if the left is disengaged or the right is engaged and the left's value is less or equal.
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator<=(
Optional<T> const& lhs,
Optional<U> const& rhs);
» more...
Checks if the Optional is less than or equal to a value. Returns true if the Optional is disengaged or its value is less than or equal to rhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator<=(
Optional<T> const& lhs,
U const& rhs);
» more...
Checks if a value is less than or equal to an engaged Optional. Returns true if the Optional is engaged and lhs is less than or equal to its value.
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator<=(
T const& lhs,
Optional<U> const& rhs);
» more...
true if lhs is less than or equal to rhs according to the described rules; otherwise, false.true if the optional is disengaged or less than or equal to rhs; otherwise, false.true if the optional is engaged and lhs is less than or equal to its value; otherwise, false.Checks if the left Optional is less than or equal to the right Optional. Returns true if the left is disengaged or the right is engaged and the left's value is less or equal.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator<=(
Optional<T> const& lhs,
Optional<U> const& rhs);
true if lhs is less than or equal to rhs according to the described rules; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if the Optional is less than or equal to a value. Returns true if the Optional is disengaged or its value is less than or equal to rhs.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator<=(
Optional<T> const& lhs,
U const& rhs);
true if the optional is disengaged or less than or equal to rhs; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if a value is less than or equal to an engaged Optional. Returns true if the Optional is engaged and lhs is less than or equal to its value.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator<=(
T const& lhs,
Optional<U> const& rhs);
true if the optional is engaged and lhs is less than or equal to its value; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Greater-than operators
Declared in <mrdocs/ADT/Optional.hpp>
Checks if the left Optional is greater than the right Optional. Returns true if the left is engaged and either the right is disengaged or its value is greater.
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator>(
Optional<T> const& lhs,
Optional<U> const& rhs);
» more...
Checks if the Optional is greater than a value. Returns true if the Optional is engaged and its value is greater than rhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator>(
Optional<T> const& lhs,
U const& rhs);
» more...
Checks if a value is greater than an Optional. Returns true if the Optional is disengaged or lhs is greater than its value.
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator>(
T const& lhs,
Optional<U> const& rhs);
» more...
true if lhs is greater than rhs according to the described rules; otherwise, false.true if the optional is engaged and greater than rhs; otherwise, false.true if the optional is disengaged or lhs is greater than its value; otherwise, false.Checks if the left Optional is greater than the right Optional. Returns true if the left is engaged and either the right is disengaged or its value is greater.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator>(
Optional<T> const& lhs,
Optional<U> const& rhs);
true if lhs is greater than rhs according to the described rules; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if the Optional is greater than a value. Returns true if the Optional is engaged and its value is greater than rhs.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator>(
Optional<T> const& lhs,
U const& rhs);
true if the optional is engaged and greater than rhs; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if a value is greater than an Optional. Returns true if the Optional is disengaged or lhs is greater than its value.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator>(
T const& lhs,
Optional<U> const& rhs);
true if the optional is disengaged or lhs is greater than its value; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Greater-than-or-equal operators
Declared in <mrdocs/ADT/Optional.hpp>
Checks if the left Optional is greater than or equal to the right Optional. Returns true if the right is disengaged or the left is engaged and its value is greater or equal.
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator>=(
Optional<T> const& lhs,
Optional<U> const& rhs);
» more...
Checks if the Optional is greater than or equal to a value. Returns true if the Optional is engaged and its value is greater than or equal to rhs.
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator>=(
Optional<T> const& lhs,
U const& rhs);
» more...
Checks if a value is greater than or equal to an Optional. Returns true if the Optional is disengaged or lhs is greater than or equal to its value.
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator>=(
T const& lhs,
Optional<U> const& rhs);
» more...
true if lhs is greater than or equal to rhs according to the described rules; otherwise, false.true if the optional is engaged and greater than or equal to rhs; otherwise, false.true if the optional is disengaged or lhs is greater than or equal to its value; otherwise, false.Checks if the left Optional is greater than or equal to the right Optional. Returns true if the right is disengaged or the left is engaged and its value is greater or equal.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
constexpr
/* implementation-defined */
operator>=(
Optional<T> const& lhs,
Optional<U> const& rhs);
true if lhs is greater than or equal to rhs according to the described rules; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if the Optional is greater than or equal to a value. Returns true if the Optional is engaged and its value is greater than or equal to rhs.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<U>)
constexpr
/* implementation-defined */
operator>=(
Optional<T> const& lhs,
U const& rhs);
true if the optional is engaged and greater than or equal to rhs; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Checks if a value is greater than or equal to an Optional. Returns true if the Optional is disengaged or lhs is greater than or equal to its value.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isOptionalV<T>)
constexpr
/* implementation-defined */
operator>=(
T const& lhs,
Optional<U> const& rhs);
true if the optional is disengaged or lhs is greater than or equal to its value; otherwise, false.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Three-way comparison operators
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
Three-way comparison operator
constexpr
auto
operator<=>(
ArrayView a,
ArrayView b) noexcept
requires requires (const T& x, const T& y) { x <=> y; };
» more...
Performs a three-way comparison between two Optional values. If both are engaged, compares their contained values; otherwise, compares engagement state.
template<
typename T,
std::three_way_comparable_with<T> U>
[[nodiscard]]
constexpr
std::compare_three_way_result_t<T, U>
operator<=>(
Optional<T> const& x,
Optional<U> const& y);
» more...
Performs a three-way comparison between an Optional and std::nullopt. Returns std::strong_ordering::greater if engaged, std::strong_ordering::equal if disengaged.
template<typename T>
[[nodiscard]]
constexpr
std::strong_ordering
operator<=>(
Optional<T> const& x,
std::nullopt_t rhs) noexcept;
» more...
Performs a three-way comparison between an Optional and a value. If the Optional is engaged, compares its value to v; otherwise, returns less.
template<
typename T,
typename U>
requires (!detail::isDerivedFromOptional<U>)
&& requires { typename std::compare_three_way_result_t<T, U>; }
&& std::three_way_comparable_with<T, U>
constexpr
std::compare_three_way_result_t<T, U>
operator<=>(
Optional<T> const& x,
U const& v);
» more...
Three-way comparison of two polymorphic objects.
template<class Base>
requires detail::CanVisitCompare<Base>
auto
operator<=>(
Polymorphic<Base> const& lhs,
Polymorphic<Base> const& rhs);
» more...
Three-way comparison for any described type.
template<typename T>
requires DescribedComparable<T>
std::strong_ordering
operator<=>(
T const& a,
T const& b);
» more...
Compare two polymorphic names by visitor dispatch.
std::strong_ordering
operator<=>(
Polymorphic<Name> const& lhs,
Polymorphic<Name> const& rhs);
» more...
Compare two polymorphic types by visitor dispatch.
std::strong_ordering
operator<=>(
Polymorphic<Type> const& lhs,
Polymorphic<Type> const& rhs);
» more...
Compare polymorphic template arguments.
std::strong_ordering
operator<=>(
Polymorphic<TArg> const& lhs,
Polymorphic<TArg> const& rhs);
» more...
Compare polymorphic template parameters.
std::strong_ordering
operator<=>(
Polymorphic<TParam> const& lhs,
Polymorphic<TParam> const& rhs);
» more...
std::nullopt.Three-way comparison operator
Declared in <mrdocs/ADT/ArrayView.hpp>
constexpr
auto
operator<=>(
ArrayView a,
ArrayView b) noexcept
requires requires (const T& x, const T& y) { x <=> y; };
The relative order of the objects
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Performs a three-way comparison between two Optional values. If both are engaged, compares their contained values; otherwise, compares engagement state.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
std::three_way_comparable_with<T> U>
[[nodiscard]]
constexpr
std::compare_three_way_result_t<T, U>
operator<=>(
Optional<T> const& x,
Optional<U> const& y);
The result of the three-way comparison between the optionals or their values.
| Name | Description |
|---|---|
| x | The left operand |
| y | The right operand |
Performs a three-way comparison between an Optional and std::nullopt. Returns std::strong_ordering::greater if engaged, std::strong_ordering::equal if disengaged.
Declared in <mrdocs/ADT/Optional.hpp>
template<typename T>
[[nodiscard]]
constexpr
std::strong_ordering
operator<=>(
Optional<T> const& x,
std::nullopt_t rhs) noexcept;
The result of the three-way comparison with std::nullopt.
| Name | Description |
|---|---|
| x | The left operand |
| rhs | The right operand |
Performs a three-way comparison between an Optional and a value. If the Optional is engaged, compares its value to v; otherwise, returns less.
Declared in <mrdocs/ADT/Optional.hpp>
template<
typename T,
typename U>
requires (!detail::isDerivedFromOptional<U>)
&& requires { typename std::compare_three_way_result_t<T, U>; }
&& std::three_way_comparable_with<T, U>
constexpr
std::compare_three_way_result_t<T, U>
operator<=>(
Optional<T> const& x,
U const& v);
The result of the three-way comparison with the value.
| Name | Description |
|---|---|
| x | The left operand |
| v | The right operand |
Three-way comparison of two polymorphic objects.
Declared in <mrdocs/ADT/Polymorphic.hpp>
template<class Base>
requires detail::CanVisitCompare<Base>
auto
operator<=>(
Polymorphic<Base> const& lhs,
Polymorphic<Base> const& rhs);
strong_ordering comparing held objects.
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Three-way comparison for any described type.
Declared in <mrdocs/Support/CompareReflectedType.hpp>
template<typename T>
requires DescribedComparable<T>
std::strong_ordering
operator<=>(
T const& a,
T const& b);
Compares base classes first (in description order), then own members.
The relative order of the objects
| Name | Description |
|---|---|
| a | The left operand |
| b | The right operand |
Compare two polymorphic names by visitor dispatch.
Declared in <mrdocs/Metadata/Name/NameBase.hpp>
std::strong_ordering
operator<=>(
Polymorphic<Name> const& lhs,
Polymorphic<Name> const& rhs);
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compare two polymorphic types by visitor dispatch.
Declared in <mrdocs/Metadata/Type/TypeBase.hpp>
std::strong_ordering
operator<=>(
Polymorphic<Type> const& lhs,
Polymorphic<Type> const& rhs);
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compare polymorphic template arguments.
Declared in <mrdocs/Metadata/TArg.hpp>
std::strong_ordering
operator<=>(
Polymorphic<TArg> const& lhs,
Polymorphic<TArg> const& rhs);
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Compare polymorphic template parameters.
Declared in <mrdocs/Metadata/TParam.hpp>
std::strong_ordering
operator<=>(
Polymorphic<TParam> const& lhs,
Polymorphic<TParam> const& rhs);
The relative order of the objects
| Name | Description |
|---|---|
| lhs | The left operand |
| rhs | The right operand |
Character-to-entity table used by HTMLEscape.
Declared in <mrdocs/Support/Handlebars.hpp>
inline constexpr std::pair<char, std::string_view> const htmlEscapeEntities[7] = {
{'&', "&"},
{'<', "<"},
{'>', ">"},
{'"', """},
{'\'', "'"},
{'`', "`"},
{'=', "="}
};
Tag object to request unexpected construction.
Declared in <mrdocs/Support/Expected.hpp>
inline constexpr unexpect_t unexpect = unexpect{};
Internal concept that matches “empty-clear default-constructible” types.
Declared in <mrdocs/ADT/Nullable.hpp>
template<class T>
concept ClearableContainerLike = requires {
typename T::value_type;
typename T::size_type;
typename T::difference_type;
typename T::reference;
typename T::const_reference;
typename T::iterator;
typename T::const_iterator;
} &&
// size_type should be integral for normal containers
std::is_integral_v<typename T::size_type> &&
// ---- member begin/end with expected iterator types ----
requires(T& t, const T& ct) {
{ t.begin() } -> std::convertible_to<typename T::iterator>;
{ t.end() } -> std::convertible_to<typename T::iterator>;
{ ct.begin() } -> std::convertible_to<typename T::const_iterator>;
{ ct.end() } -> std::convertible_to<typename T::const_iterator>;
} &&
// ---- iterator “shape”: deref and increment ----
requires(T& t, const T& ct) {
{ *t.begin() } -> std::convertible_to<typename T::reference>;
{ *ct.begin() } -> std::convertible_to<typename T::const_reference>;
{ ++std::declval<typename T::iterator&>() } -> std::same_as<typename T::iterator&>;
} &&
// ---- size/empty/clear trio ----
requires(T& t, const T& ct) {
{ ct.size() } -> std::same_as<typename T::size_type>;
{ ct.empty() } -> std::convertible_to<bool>;
{ t.clear() } -> std::same_as<void>;
} &&
// ---- default constructible (most std containers satisfy this) ----
std::default_initializable<T>;
This captures the common case of containers and data structures that can be default-constructed to empty, tested with .empty(), and reset with .clear().
Common cases of such containers include std::string, std::vector, std::optional, std::unique_ptr, std::shared_ptr, and many more.
True if T has described members (for comparison).
Declared in <mrdocs/Support/CompareReflectedType.hpp>
template<typename T>
concept DescribedComparable = requires {
typename describe::describe_members<T>;
};
Semantically equivalent to has_describe_members<T>::value, but checked via a requires-expression so that MSVC treats it as a wholly distinct atomic constraint. This avoids an MSVC bug where a constrained operator<=>() in the same namespace breaks constraint evaluation for the unrelated merge() template.
Concept to check if a type represents a DocComment node.
Declared in <mrdocs/Metadata/DocComment.hpp>
template<class T>
concept DocCommentNode = std::derived_from<T, doc::Block> || std::derived_from<T, doc::Inline>;
Types that can be traversed by DocComment helpers.
Declared in <mrdocs/Metadata/DocComment.hpp>
template<class T>
concept DocCommentNodeTraversable = DocCommentNode<T> ||
std::same_as<DocComment, T> ||
(detail::IsPolymorphic<T> && DocCommentNode<typename T::value_type>);
Concept to determine if there's a parse function for a type.
Declared in <mrdocs/Support/Parse.hpp>
template<class T>
concept HasParse = requires(
char const* first,
char const* last,
T& value)
{
{ parse(first, last, value) } -> std::same_as<ParseResult>;
};
This concept checks if a type T has a parse function with the signature:
ParseResult
parse(
char const* first,
char const* last,
T& value);
Concept that is satisfied when sentinel_traits<T> declares a usable sentinel.
Declared in <mrdocs/ADT/Nullable.hpp>
template<class T>
concept HasSentinel = requires
{
{ sentinel_traits<T>::sentinel() } -> std::same_as<T>;
{ sentinel_traits<T>::is_sentinel(std::declval<const T&>()) } -> std::convertible_to<bool>;
};
A concept for types that have Symbol members.
Declared in <mrdocs/Metadata/Symbol.hpp>
template<class SymbolTy>
concept SymbolParent = requires(SymbolTy const& I)
{
{ allMembers(I) } -> range_of<SymbolID>;
};
In most cases T is another Symbol type that has a Members member which is a range of SymbolID values.
Determine if a type is dereferenceable
Declared in <mrdocs/Support/Concepts.hpp>
template<class T>
concept dereferenceable = requires(T const& t)
{
{ static_cast<bool>(t) };
{ *t };
};
This concept checks if a type can be dereferenced to a value it represents and converted to a boolean value that represents if the object is in a valid state.
Examples of such types are std::optional, std::unique_ptr, std::shared_ptr, Polymorphic, pointers, etc.
Utility concept that returns true if T has a nullable_traits specialization enabled.
Declared in <mrdocs/ADT/Nullable.hpp>
template<class T>
concept has_nullable_traits_v = requires
{
{ nullable_traits<T>::is_null(std::declval<const T&>()) } -> std::convertible_to<bool>;
{ nullable_traits<T>::null() } -> std::same_as<T>;
{ nullable_traits<T>::make_null(std::declval<T&>()) } -> std::same_as<void>;
};
Concept to check if a type is pair-like
Declared in <mrdocs/Support/Concepts.hpp>
template<class T>
concept pair_like = tuple_like<T> &&
(std::tuple_size<std::remove_cvref_t<T>>::value == 2);
This concept checks if a type is tuple-like and has exactly two elements.
Examples of such types are std::pair, std::array with two elements, and user-defined types that provide specializations for std::tuple_size and std::tuple_element with exactly two elements.
Concept to check if a type is representing a polymorphic storage
Declared in <mrdocs/Support/Concepts.hpp>
template<
class T,
class Base>
concept polymorphic_storage_for = requires(T const& t)
{
{ *t } -> std::convertible_to<Base const&>;
{ t.operator->() } -> std::convertible_to<Base const*>;
};
This concept checks if a type is used to store derived objects of a base class.
Examples of such types are std::unique_ptr, std::shared_ptr, Polymorphic, etc.
The get() function might not always be available, but operator* and operator-> should be available and return a reference to the Base class.
Concept to check if a type is a range of T
Declared in <mrdocs/Support/Concepts.hpp>
template<
class Range,
class T>
concept range_of = std::ranges::range<Range> && std::same_as<std::ranges::range_value_t<Range>, T>;
Concept to check if a range is a range of tuple-like elements
Declared in <mrdocs/Support/Concepts.hpp>
template<class Range>
concept range_of_tuple_like = std::ranges::range<Range> && tuple_like<std::ranges::range_value_t<Range>>;
This concept checks if a type is a range and all its elements are tuple-like.
Examples of such types are std::vector<std::tuple<...>>, std::list<std::pair<...>>, and user-defined types that provide specializations for std::tuple_size and std::tuple_element for their element type.
Concept to check if a type is tuple-like
Declared in <mrdocs/Support/Concepts.hpp>
template<class T>
concept tuple_like = detail::has_tuple_size<T>::value &&
detail::all_tuple_elements<T>::value;
This concept checks if a type has a specialization of std::tuple_size and std::tuple_element for all elements in the range [0, N), where N is the value] of std::tuple_size.
Examples of such types are std::tuple, std::pair, std::array, and user-defined types that provide specializations for std::tuple_size and std::tuple_element.
Deduce ArrayView element type from C-style array.
Declared in <mrdocs/ADT/ArrayView.hpp>
template<
class T,
std::size_t N>
ArrayView<T>(T const(&)[N]) -> ArrayView<T>;
Deduce ArrayView element type from pointer and count.
Declared in <mrdocs/ADT/ArrayView.hpp>
template<class T>
ArrayView<T>(
T const*,
std::size_t) -> ArrayView<T>;
Class template argument deduction guide for Overload.
Declared in <mrdocs/ADT/Overload.hpp>
template<class... Ts>
Overload<Ts...>(Ts...) -> Overload<Ts...>;
Allows writing Overload{lambda1, lambda2, ...} without specifying template parameters.
Deduction guide for RangeFor.
Declared in <mrdocs/Support/RangeFor.hpp>
template<class Container>
RangeFor<Container>(Container const&) -> RangeFor<Container>;
Deduction guide for RangeFor.
Deduction guide for ScopeExit.
Declared in <mrdocs/Support/ScopeExit.hpp>
template<class F>
ScopeExit<F>(F) -> ScopeExit<F>;
Deduction guide for ScopeExitRestore taking a reference.
Declared in <mrdocs/Support/ScopeExit.hpp>
template<class T>
ScopeExitRestore<T>(T&) -> ScopeExitRestore<T>;
Deduction guide for ScopeExitRestore taking a reference and new value.
Declared in <mrdocs/Support/ScopeExit.hpp>
template<
class T,
std::convertible_to<T> T2>
ScopeExitRestore<T>(
T&,
T2) -> ScopeExitRestore<T>;
Deduction guide for Unexpected, forwarding the error type.
Declared in <mrdocs/Support/Expected.hpp>
template<class E>
Unexpected<E>(E) -> Unexpected<E>;
True when binding To from From would require a temporary conversion.
Declared in <mrdocs/Support/Concepts.hpp>
using std::reference_constructs_from_temporary_v;
Like reference_converts_from_temporary_v, but for construction.
Declared in <mrdocs/Support/Concepts.hpp>
using std::reference_converts_from_temporary_v;
Alias to std::source_location when available.
Declared in <mrdocs/Support/source_location.hpp>
using std::source_location;