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

Replaces the input node with a different node. More...

#include <xml/macros/UserDefinedMacro.h>

Inheritance diagram for XMLValueMacro:
Inheritance graph
[legend]

Public Member Functions

 XMLValueMacro (ScopePtr scope, CopyableXMLDom value, SourceInfo source=SourceInfo())
 
XMLNode expand (XMLMacroProcessor &processor, XMLNode node) final
 Expands the macro. More...
 
const XMLDomgetValue () const
 
bool canCoerceToString () const final
 
void coerceToString (XMLMacroProcessor &, std::ostream &ss) final
 
CopyableXMLDom evaluate (XMLMacroProcessor &) const
 
template<typename Reflector >
void reflect (Reflector &r)
 
virtual std::optional< SourceInfogetSource () const
 

Protected Attributes

ScopePtr mScope
 
CopyableXMLDom mValue
 
SourceInfo mSource
 

Detailed Description

Replaces the input node with a different node.

Constructor & Destructor Documentation

◆ XMLValueMacro()

XMLValueMacro ( ScopePtr  scope,
CopyableXMLDom  value,
SourceInfo  source = SourceInfo() 
)
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.

◆ getValue()

const XMLDom& getValue ( ) const
inline

◆ canCoerceToString()

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

Reimplemented from IMacro.

◆ coerceToString()

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

Reimplemented from IMacro.

◆ evaluate()

CopyableXMLDom evaluate ( XMLMacroProcessor ) const

◆ reflect()

void reflect ( Reflector &  r)
inlineinherited

◆ getSource()

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

Reimplemented in UserDefinedMacro.

Member Data Documentation

◆ mScope

ScopePtr mScope
protected

◆ mValue

CopyableXMLDom mValue
protected

◆ mSource

SourceInfo mSource
protected

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