MIRA
Public Member Functions | Protected Attributes | List of all members
UserDefinedMacro Class Reference

Dynamically added to the processor by the DefineMacro macro. More...

#include <xml/macros/UserDefinedMacro.h>

Inheritance diagram for UserDefinedMacro:
Inheritance graph
[legend]

Public Member Functions

 UserDefinedMacro (Definition definition, std::shared_ptr< Scope > scope)
 
XMLNode expand (XMLMacroProcessor &processor, XMLNode node) final
 Expands the macro. More...
 
const DefinitiongetDefinition () const
 
ScopePtr getScope ()
 
std::optional< SourceInfogetSource () const override
 
bool canCoerceToString () const final
 
void coerceToString (XMLMacroProcessor &processor, std::ostream &ss) final
 
template<typename Reflector >
void reflect (Reflector &r)
 

Protected Attributes

Definition mDefinition
 
ScopePtr mScope
 

Detailed Description

Dynamically added to the processor by the DefineMacro macro.

Constructor & Destructor Documentation

◆ UserDefinedMacro()

UserDefinedMacro ( Definition  definition,
std::shared_ptr< Scope scope 
)
inline

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.

◆ getDefinition()

const Definition& getDefinition ( ) const
inline

◆ getScope()

ScopePtr getScope ( )
inline

◆ getSource()

std::optional<SourceInfo> getSource ( ) const
inlineoverridevirtual

Reimplemented from IMacro.

◆ canCoerceToString()

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

Reimplemented from IMacro.

◆ coerceToString()

void coerceToString ( XMLMacroProcessor processor,
std::ostream &  ss 
)
finalvirtual

Reimplemented from IMacro.

◆ reflect()

void reflect ( Reflector &  r)
inlineinherited

Member Data Documentation

◆ mDefinition

Definition mDefinition
protected

◆ mScope

ScopePtr mScope
protected

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