MIRA
Classes | Typedefs | Functions
mira::xmlmacros Namespace Reference

Classes

class  CopyableXMLDom
 
class  DefineMacro
 The "Define" macro. More...
 
struct  Definition
 Macro definition. More...
 
class  ForMacro
 
struct  Identifier
 
class  IMacro
 Interface for implementing macro definitions. More...
 
class  ImportInlineMacro
 Usage: <macro:MyImportedMacro From="file/that/defines/MyImportedMacro.xml"> ... More...
 
struct  Invocation
 Invocation of a user defined macro: More...
 
class  NothingMacro
 
struct  Parameter
 A single parameter inside <Parameters> of a macro definition. More...
 
struct  Parameters
 <Parameters> of a macro definition. More...
 
class  PrintXMLMacro
 Evaluates children and prints the result to stdout for debugging. More...
 
struct  Scope
 Variable scope of the macro processor. More...
 
struct  SourceInfo
 
class  SplitMacro
 Splits content into words and inserts them as word nodes. More...
 
class  UserDefinedMacro
 Dynamically added to the processor by the DefineMacro macro. More...
 
class  XMacro
 
class  XMaxDepth
 
class  XMissingParameter
 
class  XMLValueMacro
 Replaces the input node with a different node. More...
 
class  ZipMacro
 Zips lists. More...
 

Typedefs

using MacroPtr = std::shared_ptr< IMacro >
 
using Definitions = std::unordered_map< std::string, xmlmacros::MacroPtr >
 
using ScopePtr = Scope::Ptr
 

Functions

XMLNode spreadNode (XMLNode location, XMLDom::const_iterator node, bool deleteLocation=true)
 "Spreads" a node at the given location. More...
 

Typedef Documentation

◆ MacroPtr

using MacroPtr = std::shared_ptr<IMacro>

◆ Definitions

using Definitions = std::unordered_map<std::string, xmlmacros::MacroPtr>

◆ ScopePtr

Function Documentation

◆ spreadNode()

XMLNode mira::xmlmacros::spreadNode ( XMLNode  location,
XMLDom::const_iterator  node,
bool  deleteLocation = true 
)

"Spreads" a node at the given location.

Copies all attributes into the parent node. Copies all children into the parent node at the location. Optionally removes the location marker (if

Parameters
deleteLocationis true).
locationMarker for the location. Will be removed.
nodeNode to spread.
deleteLocationIf true, the location marker will be removed.
Returns
parent node