MIRA
Classes | Public Member Functions | Static Public Attributes | List of all members
ZipMacro Class Reference

Zips lists. More...

#include <xml/macros/Builtins.h>

Inheritance diagram for ZipMacro:
Inheritance graph
[legend]

Classes

struct  ZipBody
 

Public Member Functions

XMLNode expand (XMLMacroProcessor &processor, XMLNode node) final
 Expands the macro. More...
 
template<typename Reflector >
void reflect (Reflector &r)
 
virtual bool canCoerceToString () const
 
virtual void coerceToString (XMLMacroProcessor &, std::ostream &)
 
virtual std::optional< SourceInfogetSource () const
 

Static Public Attributes

static constexpr const char * NAME = "Zip"
 

Detailed Description

Zips lists.

Example: <macro:Zip> <Foo> 1 2 3 </Foo> <Bar> A B C </Bar> </macro:Zip>

will result in:

<Foo>1</Foo> <Bar>A</Bar> <Foo>2</Foo> <Bar>B</Bar> <Foo>3</Foo> <Bar>C</Bar>

Member Function Documentation

◆ expand()

XMLNode expand ( XMLMacroProcessor ,
XMLNode  ioNode 
)
finalvirtual

Expands the macro.

Parameters
ioNodeNode to expand in-place.
Returns
an iterator to the next node to process.

Implements IMacro.

◆ reflect()

void reflect ( Reflector &  r)
inlineinherited

◆ canCoerceToString()

virtual bool canCoerceToString ( ) const
inlinevirtualinherited
Returns
true of toString is implemented.

Reimplemented in NothingMacro, XMLValueMacro, and UserDefinedMacro.

◆ coerceToString()

virtual void coerceToString ( XMLMacroProcessor ,
std::ostream &   
)
inlinevirtualinherited

Reimplemented in NothingMacro, XMLValueMacro, and UserDefinedMacro.

◆ getSource()

virtual std::optional<SourceInfo> getSource ( ) const
inlinevirtualinherited

Reimplemented in UserDefinedMacro.

Member Data Documentation

◆ NAME

constexpr const char* NAME = "Zip"
static

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