    

 ## On this page

  

 

 # MacroManager Class Reference

 Last update: 16.07.2025 

stores a set of macro definitions [MacroManager](class_macro_manager.xhtml "stores a set of macro definitions MacroManager is a common::Sender. Listeners can register themselves...") is a common::Sender. Listeners can register themselves at Senders. [MacroManager](class_macro_manager.xhtml "stores a set of macro definitions MacroManager is a common::Sender. Listeners can register themselves...") calls its senders when Macros are changed/added/removed. [More...](class_macro_manager.xhtml#details)

## <a name="pub-types"></a>Public Types

<a id="a2754edf9f8c68b54ab1d0ac5d4dc27b8"></a>typedef std::set&lt; [MacroFunction](class_macro_function.xhtml) &gt; [TMacroSet](class_macro_manager.xhtml#a2754edf9f8c68b54ab1d0ac5d4dc27b8) a type for storing macros in a sorted set   
 ## <a name="pub-methods"></a>Public Member Functions

 [add](class_macro_manager.xhtml#af041e23d748102508adc50e03e7bda1e) ([MacroFunction](class_macro_function.xhtml) macro) adds a new function to the container [More...](#af041e23d748102508adc50e03e7bda1e)  
  [add](class_macro_manager.xhtml#a22b30d30fe29ad3ae825bfad0ce53db4) ([MacroManager](class_macro_manager.xhtml) other, bool overwrite\_existing) adds the contents of other to this object [More...](#a22b30d30fe29ad3ae825bfad0ce53db4)  
  [assign](class_macro_manager.xhtml#aa38fdf58269a29519ce3184f3ffd34c6) ([MacroManager](class_macro_manager.xhtml) other) is the equivalent to the = operator, assigns the contents of other to this [More...](#aa38fdf58269a29519ce3184f3ffd34c6)  
 TMacroSet::const\_iterator [begin](class_macro_manager.xhtml#a1c775b1fd28d66bae42c106b95b4675f) () <a id="aa821bec12eaa7e0f649397c9675ff505"></a> [clear](class_macro_manager.xhtml#aa821bec12eaa7e0f649397c9675ff505) () clears the data   
 bool [empty](class_macro_manager.xhtml#a644718bb2fb240de962dc3c9a1fdf0dc) () const TMacroSet::const\_iterator [end](class_macro_manager.xhtml#af5af8620c25d4ea19471050477c4e3a7) ()  [erase](class_macro_manager.xhtml#a85e467501638e35b47f5c62bd0269e63) (string identifier) deletes the macro with given identifier [More...](#a85e467501638e35b47f5c62bd0269e63)  
 bool [exists](class_macro_manager.xhtml#a544a57d56da3c8e5148ab81842ac207b) (string identifier) [MacroFunction](class_macro_function.xhtml) [get](class_macro_manager.xhtml#a976a92de6a50d5e163bf3dc4ce895423) (string identifier) <a id="a8824df8057f38102b62ff835f2fa3f1c"></a> [MacroManager](class_macro_manager.xhtml#a8824df8057f38102b62ff835f2fa3f1c) () default constructor   
 bool [operator==](class_macro_manager.xhtml#a8dd6a30df2574c542f68e83a888be7de) ([MacroManager](class_macro_manager.xhtml) arg) comparison operator [More...](#a8dd6a30df2574c542f68e83a888be7de)  
 string [scriptChangeToFunction](class_macro_manager.xhtml#a94b738f30f6d3e1331d68df2c5dda0e6) (string var\_manager\_ident, string var\_chunk\_ident, string old\_func\_ident, [MacroFunction](class_macro_function.xhtml) other) identifies a script code that changes a single function [More...](#a94b738f30f6d3e1331d68df2c5dda0e6)  
  [set](class_macro_manager.xhtml#a0b3688a1cc2055df2c8d896a0efd7808) ([MacroFunction](class_macro_function.xhtml) macro) replaces an existing function by the specified one [More...](#a0b3688a1cc2055df2c8d896a0efd7808)  
 size\_t [size](class_macro_manager.xhtml#a259cb5a711406a8c3e5d937eb9350cca) () const <a id="details" name="details"></a>## Detailed Description

stores a set of macro definitions [MacroManager](class_macro_manager.xhtml "stores a set of macro definitions MacroManager is a common::Sender. Listeners can register themselves...") is a common::Sender. Listeners can register themselves at Senders. [MacroManager](class_macro_manager.xhtml "stores a set of macro definitions MacroManager is a common::Sender. Listeners can register themselves...") calls its senders when Macros are changed/added/removed.



## Member Function Documentation

<a id="af041e23d748102508adc50e03e7bda1e"></a>## [◆ ](#af041e23d748102508adc50e03e7bda1e)add() \[1/2\]

 add  ( [MacroFunction](class_macro_function.xhtml)  *macro*) 

adds a new function to the container

Parameters macromacro to be added. Exceptions ifa function with the identical ident already exists 



<a id="a22b30d30fe29ad3ae825bfad0ce53db4"></a>## [◆ ](#a22b30d30fe29ad3ae825bfad0ce53db4)add() \[2/2\]

 add  ( [MacroManager](class_macro_manager.xhtml)  *other*,    bool  *overwrite\_existing*   ) 

adds the contents of other to this object

Parameters otherthe source to be copied to this overwrite\_existingif true, then all objects are copied. If false, only those macro are copied for which no equally named macro exists. 



<a id="aa38fdf58269a29519ce3184f3ffd34c6"></a>## [◆ ](#aa38fdf58269a29519ce3184f3ffd34c6)assign()

 assign  ( [MacroManager](class_macro_manager.xhtml)  *other*) 

is the equivalent to the = operator, assigns the contents of other to this

Parameters otherthe source to be copied to this 



<a id="a1c775b1fd28d66bae42c106b95b4675f"></a>## [◆ ](#a1c775b1fd28d66bae42c106b95b4675f)begin()

 TMacroSet::const\_iterator begin  ( ) 

Returnsthe begin iterator to the underlying data container 



<a id="a644718bb2fb240de962dc3c9a1fdf0dc"></a>## [◆ ](#a644718bb2fb240de962dc3c9a1fdf0dc)empty()

 bool empty  ( )  const

Returnstrue if empty 



<a id="af5af8620c25d4ea19471050477c4e3a7"></a>## [◆ ](#af5af8620c25d4ea19471050477c4e3a7)end()

 TMacroSet::const\_iterator end  ( ) 

Returnsthe end iterator to the underlying data container 



<a id="a85e467501638e35b47f5c62bd0269e63"></a>## [◆ ](#a85e467501638e35b47f5c62bd0269e63)erase()

 erase  ( string  *identifier*) 

deletes the macro with given identifier

Parameters identifierthe identifier of the macro to be erased 



<a id="a544a57d56da3c8e5148ab81842ac207b"></a>## [◆ ](#a544a57d56da3c8e5148ab81842ac207b)exists()

 bool exists  ( string  *identifier*) 

Returnstrue if the given macro identifier exists Parameters identifierthe identifier of the macro to be tested 



<a id="a976a92de6a50d5e163bf3dc4ce895423"></a>## [◆ ](#a976a92de6a50d5e163bf3dc4ce895423)get()

 [MacroFunction](class_macro_function.xhtml) get  ( string  *identifier*) 

Returnsa reference to the macro with specified identifier Parameters identifierthe script ident of the function 



<a id="a8dd6a30df2574c542f68e83a888be7de"></a>## [◆ ](#a8dd6a30df2574c542f68e83a888be7de)operator==()

 bool operator==  ( [MacroManager](class_macro_manager.xhtml)  *arg*) 

comparison operator

Parameters argthe variable to be tested Returnstrue if both are equal 



<a id="a94b738f30f6d3e1331d68df2c5dda0e6"></a>## [◆ ](#a94b738f30f6d3e1331d68df2c5dda0e6)scriptChangeToFunction()

 string scriptChangeToFunction  ( string  *var\_manager\_ident*,    string  *var\_chunk\_ident*,    string  *old\_func\_ident*,    [MacroFunction](class_macro_function.xhtml)  *other*   ) 

identifies a script code that changes a single function

Parameters otherthe other function which is be added or changed var\_manager\_identthe variable identifier of this macro manager in script var\_chunk\_identthe variable ident of a temporary macro object old\_func\_identThe old function ident to be changed. Empty if a new function is created. Returnsthe script code to change this function to match the other on 



<a id="a0b3688a1cc2055df2c8d896a0efd7808"></a>## [◆ ](#a0b3688a1cc2055df2c8d896a0efd7808)set()

 set  ( [MacroFunction](class_macro_function.xhtml)  *macro*) 

replaces an existing function by the specified one

Parameters macrothe macro to replace the existing one with. 



<a id="a259cb5a711406a8c3e5d937eb9350cca"></a>## [◆ ](#a259cb5a711406a8c3e5d937eb9350cca)size()

 size\_t size  ( )  const

Returnsthe number of defined macros