Skip to main content

Module decode_cpp

Module decode_cpp 

Source
Expand description

The C++ column’s decoder: crate::emit::decode bound to the C++ backend.

The counterpart of crate::decode_c, and the same shape: the walk is shared and what is left here is the binding plus the one step the generic walk cannot take — prepending the Table 9 defaulters.

§Why the defaulters are here and not in the walk

Which types need one is read off the decoders that were generated, and a target that wrote its defaults as literals would need no such pass at all. So the pass belongs to the column. C++ needs it for the same reason C does, and crate::default_cpp says why it is not T{}.

Re-exports§

pub use crate::emit::encode::CodecOptions as CppCodecOptions;

Functions§

cpp_decoder
Build the C++ decoder for every type in the model, under one plan.
cpp_decoder_from
The C++ decoder for the types one root reaches, and no others.
cpp_decoder_from_many
The C++ decoder for the types several roots reach, each function once.
cpp_decoder_from_many_excluding
cpp_decoder_from_many without the types in excluded.
decoder_name
The name of the C++ decoder function for a type.