> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# MacroArg Class Reference

Part of [Script](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__script)

a function argument of a macro

## Public Types

| Type | Name |
| - | - |
| enum | [eDataType](#acc461328b82c34604e8b428326a52183) \{  **STRING** = 0, [INT](#acc461328b82c34604e8b428326a52183afd5a5f51ce25953f3db2c7e93eb7864a), [FLOAT](#acc461328b82c34604e8b428326a52183a9cf4a0866224b0bb4a7a895da27c9c4c), [BOOL](#acc461328b82c34604e8b428326a52183ae663dbb8f8244e122acb5bd6b2c216e1),  [MATRIX](#acc461328b82c34604e8b428326a52183a1d20a1221a789adf82ff0e890a403210), [I\_SCALAR\_IDENT](#acc461328b82c34604e8b428326a52183a7c2420d7c7137cc06efe15a56b1fc881), **I\_SCALAR\_IDENT\_VECTOR**, [I\_NODE\_IDENT](#acc461328b82c34604e8b428326a52183aa72282b0466f246c40b808d4dbc3e6c0),  **I\_NODE\_IDENT\_VECTOR**, **I\_ELEMENT\_IDENT**, **I\_ELEMENT\_IDENT\_VECTOR**, [O\_SCALAR\_IDENT](#acc461328b82c34604e8b428326a52183af09fda39fab3ac5d951ec84a6ab0353f),  **O\_SCALAR\_IDENT\_VECTOR**, **O\_NODE\_IDENT**, **O\_NODE\_IDENT\_VECTOR**, **O\_ELEMENT\_IDENT**,  **O\_ELEMENT\_IDENT\_VECTOR**, **REMOVE\_SCALAR\_IDENT**, **REMOVE\_NODE\_IDENT**, **REMOVE\_ELEMENT\_IDENT**,  **DATABASE**, **DESIGN\_IDENT**, **FIELDMOP\_NODE\_IDENT**, **FIELDMOP\_ELEMENT\_IDENT**,  **MOP\_SCALAR\_IDENT**, **RF\_NODE\_IDENT**, **RF\_ELEMENT\_IDENT**, **NAMED\_SELECTION\_NODE**,  **NAMED\_SELECTION\_ELEMENT**, **UNKNOWN**  } the enum data type for defining teh data type of the argument in script context |

## Public Member Functions

| Type | Name |
| - | - |
| string | [help](#a43d1a663cb090d6ed2d92e6c8b1e3006) () |
| string | [ident](#ad788420ef7464c550bfffb4e280eb417) () |
| | [MacroArg](#ae9e47fd6f7791974ed0375f66d0133be) ([eDataType](#acc461328b82c34604e8b428326a52183) p\_type, string p\_ident, string p\_help, string [start](#a39e6ecc475b63fbcb6444caf0586d177)="", string [min](#a263903e463638a5792d1a2340c72dbc5)="", string [max](#abf6330e35664e2ea7e368533df19500e)="") constructor |
| | [MacroArg](#a88d12ab39b2bdc8e9befc2dfe8b81e9a) () default constructor |
| string | [max](#abf6330e35664e2ea7e368533df19500e) () Get the maximum value as a string. |
| string | [min](#a263903e463638a5792d1a2340c72dbc5) () Get the minimum value as a string. |
| bool | [operator==](#acaf3cf4ffccd2f30ac43781d3369cdea) ([MacroArg](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_macro_arg.md) arg) comparison operator |
| string | [start](#a39e6ecc475b63fbcb6444caf0586d177) () Get the start value as a string. |
| [eDataType](#acc461328b82c34604e8b428326a52183) | [type](#a1ac0f4dc9ae2493c2f505317116307f9) () |
| string | [type\_string](#ae5083b4b6dcb0966f2e262e03b42d79f) () |

## Static Public Member Functions

| Type | Name |
| - | - |
| static [eDataType](#acc461328b82c34604e8b428326a52183) | [type\_from\_string](#ad02f6c682c9debeb162943c742f3141e) (string s) |

## Detailed Description

a function argument of a macro

## Member Enumeration Documentation

### eDataType

```cpp theme={null}
enum eDataType
```

the enum data type for defining teh data type of the argument in script context

| Enumerator | |
| - | - |
| INT | \< integer number, e.g. x = 1 |
| FLOAT | \< floating point number, e.g. x = 1.1 |
| BOOL | \< boolean, e.g. x = true |
| MATRIX | \< tmath.Matrix, e.g. x = tmath.Matrix(\{\{1,1}\{2,3}} |
| I\_SCALAR\_IDENT | \< a string |
| I\_NODE\_IDENT | \< a string |
| O\_SCALAR\_IDENT | \< |

## Constructor & Destructor Documentation

### MacroArg()

```cpp theme={null}
MacroArg(
    eDataType p_type,
    string p_ident,
    string p_help,
    string start = "",
    string min = "",
    string max = ""
)
```

constructor

**Parameters**

| Name | Description |
| - | - |
| p\_type | the data type of the argument |
| p\_ident | the ident of ther argument/variable. This ident must be a single word, starting with a letter. It may contain numbers and underscores, and is case sensitive. |
| p\_help | the help string describing this parameter |

## Member Function Documentation

### help()

```cpp theme={null}
string help()
```

**Returns**

returns the help string

### ident()

```cpp theme={null}
string ident()
```

**Returns**

returns the ident

### max()

```cpp theme={null}
string max()
```

Get the maximum value as a string.

**Returns**

A string, empty, "inf", "-inf" or convertible to number

### min()

```cpp theme={null}
string min()
```

Get the minimum value as a string.

**Returns**

A string, empty, "inf", "-inf" or convertible to number

### operator==()

```cpp theme={null}
bool operator==(MacroArg arg)
```

comparison operator

**Parameters**

| Name | Description |
| - | - |
| arg | the variable to be tested |

**Returns**

true if both are equal

### start()

```cpp theme={null}
string start()
```

Get the start value as a string.

**Returns**

A string, empty, "inf", "-inf" or convertible to number

### type()

```cpp theme={null}
eDataType type()
```

**Returns**

returns the type

### type\_from\_string()

```cpp theme={null}
static eDataType type_from_string(string s)
```

`static`

**Returns**

returns the enum from the given string

**Parameters**

| Name | Description |
| - | - |
| s | the string to be converted. It is equal to s = type\_string(type\_from\_string(s)), else exception. |

### type\_string()

```cpp theme={null}
string type_string()
```

**Returns**

returns the type as human readable string
