libxr  1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::Format< Source >::Compiled< Args > Struct Template Reference

一条 brace 风格源串绑定到具体调用点参数后的编译结果 / One brace-style source bound to a concrete call-site argument list More...

#include <format_surface.hpp>

Static Public Member Functions

static constexpr auto ArgumentList ()
 返回运行期参数打包时要按字段顺序读取的参数列表。 / Returns the field-ordered argument list the runtime packer will follow.
 
static constexpr auto ArgumentOrder ()
 返回每个字段对应的是第几个源参数。 / Returns, for each field, which source argument index it refers to.
 
static constexpr const auto & Codes ()
 返回与 codes 相同的最终字节流。 / Returns the same final byte stream as codes.
 
static constexpr Print::FormatProfile Profile ()
 返回当前编译格式携带的 writer 分支摘要。 / Returns the writer-branch summary carried by this compiled format.
 
template<typename... Actual>
static consteval bool Matches ()
 判断另一组 C++ 参数类型是否与当前格式绑定时的参数列表完全一致。 / Returns whether another C++ argument list is exactly the one this format was built for.
 

Static Public Attributes

static constexpr auto codes = result.codes
 返回运行期 writer 最终会执行的字节流。 / Returns the final byte stream that the runtime writer will execute.
 
static constexpr Print::FormatProfile profile = result.profile
 返回当前格式需要哪些 writer 分支的编译期摘要。 / Returns the compile-time summary of which writer branches this format needs.
 

Private Types

using Frontend = Compiler<Args...>
 

Static Private Attributes

static constexpr auto result = Print::FormatCompiler<Frontend>::Compile()
 

Detailed Description

template<Print::Text Source>
template<typename... Args>
struct LibXR::Format< Source >::Compiled< Args >

一条 brace 风格源串绑定到具体调用点参数后的编译结果 / One brace-style source bound to a concrete call-site argument list

Template Parameters
Args这份编译结果对应的 C++ 实参类型列表 / Concrete C++ argument types bound into this compiled result

Definition at line 67 of file format_surface.hpp.

Member Typedef Documentation

◆ Frontend

template<Print::Text Source>
template<typename... Args>
using LibXR::Format< Source >::Compiled< Args >::Frontend = Compiler<Args...>
private

Definition at line 70 of file format_surface.hpp.

Member Function Documentation

◆ ArgumentList()

template<Print::Text Source>
template<typename... Args>
static constexpr auto LibXR::Format< Source >::Compiled< Args >::ArgumentList ( )
inlinestaticnodiscardconstexpr

返回运行期参数打包时要按字段顺序读取的参数列表。 / Returns the field-ordered argument list the runtime packer will follow.

Definition at line 130 of file format_surface.hpp.

130{ return result.arg_info; }

◆ ArgumentOrder()

template<Print::Text Source>
template<typename... Args>
static constexpr auto LibXR::Format< Source >::Compiled< Args >::ArgumentOrder ( )
inlinestaticnodiscardconstexpr

返回每个字段对应的是第几个源参数。 / Returns, for each field, which source argument index it refers to.

Definition at line 136 of file format_surface.hpp.

137 {
138 return source_analysis.argument_order;
139 }

◆ Codes()

template<Print::Text Source>
template<typename... Args>
static constexpr const auto & LibXR::Format< Source >::Compiled< Args >::Codes ( )
inlinestaticnodiscardconstexpr

返回与 codes 相同的最终字节流。 / Returns the same final byte stream as codes.

Definition at line 145 of file format_surface.hpp.

145{ return codes; }
static constexpr auto codes
返回运行期 writer 最终会执行的字节流。 / Returns the final byte stream that the runtime writer will execute.

◆ Matches()

template<Print::Text Source>
template<typename... Args>
template<typename... Actual>
static consteval bool LibXR::Format< Source >::Compiled< Args >::Matches ( )
inlinestaticnodiscardconsteval

判断另一组 C++ 参数类型是否与当前格式绑定时的参数列表完全一致。 / Returns whether another C++ argument list is exactly the one this format was built for.

Template Parameters
ActualAnother C++ argument-type list to compare against. / 待比较的另一组 C++ 实参类型。
Returns
Returns true when the type lists match exactly, otherwise false. / 完全一致返回 true,否则返回 false

Definition at line 162 of file format_surface.hpp.

163 {
164 return std::is_same_v<std::tuple<std::remove_cvref_t<Actual>...>,
165 std::tuple<Args...>>;
166 }

◆ Profile()

template<Print::Text Source>
template<typename... Args>
static constexpr Print::FormatProfile LibXR::Format< Source >::Compiled< Args >::Profile ( )
inlinestaticnodiscardconstexpr

返回当前编译格式携带的 writer 分支摘要。 / Returns the writer-branch summary carried by this compiled format.

Definition at line 151 of file format_surface.hpp.

151{ return profile; }
static constexpr Print::FormatProfile profile
返回当前格式需要哪些 writer 分支的编译期摘要。 / Returns the compile-time summary of which writer branches this format n...

Field Documentation

◆ codes

template<Print::Text Source>
template<typename... Args>
auto LibXR::Format< Source >::Compiled< Args >::codes = result.codes
inlinestaticconstexpr

返回运行期 writer 最终会执行的字节流。 / Returns the final byte stream that the runtime writer will execute.

Definition at line 119 of file format_surface.hpp.

◆ profile

template<Print::Text Source>
template<typename... Args>
Print::FormatProfile LibXR::Format< Source >::Compiled< Args >::profile = result.profile
inlinestaticconstexpr

返回当前格式需要哪些 writer 分支的编译期摘要。 / Returns the compile-time summary of which writer branches this format needs.

Definition at line 124 of file format_surface.hpp.

◆ result

template<Print::Text Source>
template<typename... Args>
auto LibXR::Format< Source >::Compiled< Args >::result = Print::FormatCompiler<Frontend>::Compile()
inlinestaticconstexprprivate

Definition at line 71 of file format_surface.hpp.


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