scram::mef::Initializer::Extractor
Public Functions
| Name | |
|---|---|
| std::unique_ptr< T > | operator()(const xml::Element::Range & args, const std::string & base_path, Initializer * init)<br>Extracts expressions to be passed to the constructor of expression T. |
| template <class... Ts> <br>std::unique_ptr< T > | operator()(xml::Element::Range::iterator it, xml::Element::Range::iterator it_end, const std::string & base_path, Initializer * init, Ts &&... expressions)<br>Extracts and accumulates expressions to be passed to the constructor of expression T. |
Detailed Description
cpp
template <class T ,
int N>
struct scram::mef::Initializer::Extractor;Template Parameters:
- T Type of an expression.
- N The number of arguments for the expression.
Extracts argument expressions from XML elements and constructs the requested expression T.
Public Functions Documentation
function operator()
cpp
inline std::unique_ptr< T > operator()(
const xml::Element::Range & args,
const std::string & base_path,
Initializer * init
)Extracts expressions to be passed to the constructor of expression T.
Parameters:
- args XML elements containing the arguments.
- base_path Series of ancestor containers in the path with dots.
- init The host Initializer.
Return: The extracted expression.
Precondition: The XML args container size equals N.
function operator()
cpp
template <class... Ts>
inline std::unique_ptr< T > operator()(
xml::Element::Range::iterator it,
xml::Element::Range::iterator it_end,
const std::string & base_path,
Initializer * init,
Ts &&... expressions
)Extracts and accumulates expressions to be passed to the constructor of expression T.
Parameters:
- it The iterator in the argument container.
- it_end The end sentinel iterator of the argument container.
- base_path Series of ancestor containers in the path with dots.
- init The host Initializer.
- expressions Accumulated argument expressions.
Template Parameters:
- Ts Expression types.
Return: The extracted expression.
Precondition: The XML container has enough arguments.
Updated on 2025-11-11 at 16:51:08 +0000
