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

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 auto SourceArgumentList ()
 返回仅供编译期类型匹配使用的源参数列表。 / Returns the source-argument list used only for compile-time type matching.
 
static constexpr const auto & Codes ()
 返回与 codes 相同的最终字节流。 / Returns the same final byte stream as codes.
 
static constexpr FormatProfile Profile ()
 返回当前编译格式携带的 writer 分支摘要。 / Returns the writer-branch summary carried by this compiled format.
 
template<typename... Args>
static consteval bool Matches ()
 判断 Args... 是否就是当前编译格式期望的那组 C++ 参数类型。 / Returns whether Args... are exactly the C++ argument types this compiled format expects.
 

Static Public Attributes

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

Private Types

using Frontend = typename Printf::template Compiler<Source>
 

Static Private Attributes

static constexpr auto source_analysis = Detail::PrintfCompile::Analyze<Source>()
 
static constexpr auto result = FormatCompiler<Frontend>::Compile()
 

Detailed Description

template<Text Source>
struct LibXR::Print::Printf::Compiled< Source >

Definition at line 148 of file printf.hpp.

Member Typedef Documentation

◆ Frontend

template<Text Source>
using LibXR::Print::Printf::Compiled< Source >::Frontend = typename Printf::template Compiler<Source>
private

Definition at line 151 of file printf.hpp.

Member Function Documentation

◆ ArgumentList()

template<Text Source>
static constexpr auto LibXR::Print::Printf::Compiled< Source >::ArgumentList ( )
inlinestaticnodiscardconstexpr

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

Definition at line 206 of file printf.hpp.

206{ return result.arg_info; }

◆ ArgumentOrder()

template<Text Source>
static constexpr auto LibXR::Print::Printf::Compiled< Source >::ArgumentOrder ( )
inlinestaticnodiscardconstexpr

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

Definition at line 212 of file printf.hpp.

212{ return source_analysis.order; }

◆ Codes()

template<Text Source>
static constexpr const auto & LibXR::Print::Printf::Compiled< Source >::Codes ( )
inlinestaticnodiscardconstexpr

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

Definition at line 227 of file printf.hpp.

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

◆ Matches()

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

判断 Args... 是否就是当前编译格式期望的那组 C++ 参数类型。 / Returns whether Args... are exactly the C++ argument types this compiled format expects.

Template Parameters
ArgsC++ argument types to compare. / 待比较的 C++ 实参类型列表。
Returns
Returns true when the type list matches exactly, otherwise false. / 完全匹配返回 true,否则返回 false

Definition at line 243 of file printf.hpp.

244 {
245 return Detail::FormatArgument::template Matches<Args...>(SourceArgumentList());
246 }
static consteval bool Matches()
判断 Args... 是否就是当前编译格式期望的那组 C++ 参数类型。 / Returns whether Args... are exactly the C++ argument types thi...
Definition printf.hpp:243
static constexpr auto SourceArgumentList()
返回仅供编译期类型匹配使用的源参数列表。 / Returns the source-argument list used only for compile-time type matching.
Definition printf.hpp:218

◆ Profile()

template<Text Source>
static constexpr FormatProfile LibXR::Print::Printf::Compiled< Source >::Profile ( )
inlinestaticnodiscardconstexpr

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

Definition at line 233 of file printf.hpp.

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

◆ SourceArgumentList()

template<Text Source>
static constexpr auto LibXR::Print::Printf::Compiled< Source >::SourceArgumentList ( )
inlinestaticnodiscardconstexpr

返回仅供编译期类型匹配使用的源参数列表。 / Returns the source-argument list used only for compile-time type matching.

Definition at line 218 of file printf.hpp.

219 {
220 return source_analysis.args;
221 }

Field Documentation

◆ codes

template<Text Source>
auto LibXR::Print::Printf::Compiled< Source >::codes = result.codes
inlinestaticconstexpr

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

Definition at line 195 of file printf.hpp.

◆ profile

template<Text Source>
FormatProfile LibXR::Print::Printf::Compiled< Source >::profile = result.profile
inlinestaticconstexpr

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

Definition at line 200 of file printf.hpp.

◆ result

template<Text Source>
auto LibXR::Print::Printf::Compiled< Source >::result = FormatCompiler<Frontend>::Compile()
inlinestaticconstexprprivate

Definition at line 153 of file printf.hpp.

◆ source_analysis

template<Text Source>
auto LibXR::Print::Printf::Compiled< Source >::source_analysis = Detail::PrintfCompile::Analyze<Source>()
inlinestaticconstexprprivate

Definition at line 152 of file printf.hpp.


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