Package pyplusplus :: Package function_transformers :: Module controllers :: Class variables_manager_t |

# type variables_manager_t

source code

    object --+
             |
            variables_manager_t

function wrapper variables manager

Almost every time we define new transformer, we need to define variables. It is important to keep the variable names unique. This class will ensure this. Every time you declare new variable, it will return the unique variable name. The name will be built from the original variable name and some index, which will make the variable to be unique.

Instance Methods
__init__(self) | source code
declare_variable(self, type, name, initialize_expr=`'````'`) declare variable | source code
register_name(self, name) register predefined variable name | source code

Properties
| variables list of all declared variables

Method Details

### __init__(self) (Constructor) | source code
Overrides: object.__init__ (inherited documentation)

### declare_variable(self, type, name, initialize_expr=`'````'`) | source code
declare variable Parameters: `type` (instance of pygccxml.declarations.type_t) - type of the variable `name` - name( str ) of the variable `initialize_expr` - an expression that initialize the variable Returns: the unique variable name

### register_name(self, name) | source code
register predefined variable name There are use cases, where it is convenience to define variables within a template. In such cases, the only thing that should be done is registering a unique name of the variable.

Property Details

### variables list of all declared variables