ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ZMarkupDocs.hpp File Reference

Executable metadata, typed attribute accessor, and fluent TagBuilder for ZMarkup. More...

#include <charconv>
#include <functional>
#include <memory>
#include <stdexcept>
#include <string>
#include <string_view>
#include <type_traits>
#include <unordered_map>
#include <variant>
#include <vector>

Go to the source code of this file.

Classes

struct  ZenitUI::ZMarkup::AttrDoc
 Metadata and single-source default for one tag attribute. More...
struct  ZenitUI::ZMarkup::TagDoc
 Metadata of one ZMarkup tag (only tag-specific attributes live in attrs). More...
struct  ZenitUI::ZMarkup::MarkupSyntaxDoc
 Documentation entry for basic ZMarkup syntax constructs (#id, .class, @ref, ...). More...
class  ZenitUI::ZMarkup::Attrs
 Pre-parsed, type-safe attribute bag passed to factories registered via Registry::tag(). More...
class  ZenitUI::ZMarkup::TagBuilder
 Fluent builder returned by Registry::tag(name). More...

Typedefs

using ZenitUI::ZMarkup::AttrValue = std::variant<std::string, float, int, bool, std::vector<std::string>>
 Typed storage for a parsed or default attribute value.

Enumerations

enum class  ZenitUI::ZMarkup::AttrType {
  String , Float , Int , Bool ,
  AttrType::List
}
 Value type of a declared ZMarkup attribute. More...

Functions

const char * ZenitUI::ZMarkup::toString (AttrType t) noexcept
const std::vector< AttrDoc > & ZenitUI::ZMarkup::universalAttrDocs ()
 Attributes accepted by every tag (besides ZStyle properties).
const std::vector< TagDoc > & ZenitUI::ZMarkup::structuralTagDocs ()
 Documentation of the structural pseudo-tags Slot, If, Each.
const std::vector< MarkupSyntaxDoc > & ZenitUI::ZMarkup::markupSyntaxDocs ()
 Documentation of basic ZMarkup syntax constructs (#id, .class, @ref, ...).

Detailed Description

Executable metadata, typed attribute accessor, and fluent TagBuilder for ZMarkup.

Single source of truth consumed by:

  • Registry::tag(...) (parses and applies defaults before invoking tag factories),
  • Registry::validate(...) (UnknownTag, UnknownAttribute, InvalidValue),
  • zenit_docgen (generates the ZMarkup reference page),
  • ZMarkupDocs unit tests.