welder 0.1.0
Bindings for annotated C++ types, from C++26 reflection
Loading...
Searching...
No Matches
welder::rods::luacats::class_writer Struct Reference

A class handle. More...

#include <welder/rods/lua/luacats/document.hpp>

Public Member Functions

 class_writer ()=default
 class_writer (const class_writer &)=delete
class_writeroperator= (const class_writer &)=delete
 class_writer (class_writer &&o) noexcept
class_writeroperator= (class_writer &&o) noexcept
 ~class_writer ()

Public Attributes

documentdoc {nullptr}
std::string * sink {nullptr}
 Flush target override; null = doc->body.
std::string qualified {}
 Dotted LuaCATS class name.
std::string cls_doc {}
 The class doc.
std::string bases {}
 Comma-joined base names, or empty.
std::string fields {}
 Accumulated ---@field / ---@operator lines.
std::string methods {}
 Accumulated function statements.
std::string trailing {}
 Nested types' flushed blocks (after methods).
std::vector< func_overloadctors {}
 The .new overloads, grouped on flush.

Detailed Description

A class handle.

Accumulates the @field/@operator lines (which sit inside the ---@class block) and the method/constructor statements (which follow it), then flushes the assembled block to the document on destruction — the driver has no explicit "finish class" hook, so RAII is the finalizer. Move-only so a moved-from temporary does not double-flush.

Definition at line 342 of file document.hpp.

Constructor & Destructor Documentation

◆ class_writer() [1/3]

welder::rods::luacats::class_writer::class_writer ( )
default

◆ class_writer() [2/3]

welder::rods::luacats::class_writer::class_writer ( const class_writer & )
delete

References class_writer().

◆ class_writer() [3/3]

welder::rods::luacats::class_writer::class_writer ( class_writer && o)
inlinenoexcept

Definition at line 361 of file document.hpp.

References class_writer().

◆ ~class_writer()

welder::rods::luacats::class_writer::~class_writer ( )
inline

Member Function Documentation

◆ operator=() [1/2]

class_writer & welder::rods::luacats::class_writer::operator= ( class_writer && o)
inlinenoexcept

Definition at line 362 of file document.hpp.

References bases, class_writer(), cls_doc, ctors, doc, fields, methods, qualified, sink, and trailing.

◆ operator=() [2/2]

class_writer & welder::rods::luacats::class_writer::operator= ( const class_writer & )
delete

References class_writer().

Member Data Documentation

◆ bases

std::string welder::rods::luacats::class_writer::bases {}

Comma-joined base names, or empty.

Definition at line 352 of file document.hpp.

Referenced by welder::rods::luacats::rod::make_class(), welder::rods::luacats::rod::make_nested_class(), operator=(), and ~class_writer().

◆ cls_doc

std::string welder::rods::luacats::class_writer::cls_doc {}

◆ ctors

std::vector<func_overload> welder::rods::luacats::class_writer::ctors {}

The .new overloads, grouped on flush.

Definition at line 356 of file document.hpp.

Referenced by welder::rods::luacats::rod::add_constructors(), operator=(), and ~class_writer().

◆ doc

document* welder::rods::luacats::class_writer::doc {nullptr}

◆ fields

std::string welder::rods::luacats::class_writer::fields {}

Accumulated ---@field / ---@operator lines.

Definition at line 353 of file document.hpp.

Referenced by welder::rods::luacats::rod::add_field(), welder::rods::luacats::rod::add_operator(), operator=(), and ~class_writer().

◆ methods

std::string welder::rods::luacats::class_writer::methods {}

Accumulated function statements.

Definition at line 354 of file document.hpp.

Referenced by welder::rods::luacats::rod::add_method(), welder::rods::luacats::rod::add_static_method(), operator=(), and ~class_writer().

◆ qualified

◆ sink

std::string* welder::rods::luacats::class_writer::sink {nullptr}

Flush target override; null = doc->body.

A NESTED type's writer flushes into its outer's trailing, so its block lands after the outer's declaration (the stub assigns mod.Outer.Inner = {} only once mod.Outer = {} exists).

Definition at line 344 of file document.hpp.

Referenced by welder::rods::luacats::rod::make_nested_class(), operator=(), and ~class_writer().

◆ trailing

std::string welder::rods::luacats::class_writer::trailing {}

Nested types' flushed blocks (after methods).

Definition at line 355 of file document.hpp.

Referenced by welder::rods::luacats::rod::make_nested_class(), welder::rods::luacats::rod::make_nested_enum(), operator=(), and ~class_writer().


The documentation for this struct was generated from the following file: