> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::ArgType

> Struct for the type information of an argument.

Struct for the type information of an argument.

```cpp showLineNumbers={false}
#include <holoscan/arg.hpp>
```

---

## Constructors

### ArgType \[#argtype]

#### Default

```cpp showLineNumbers={false}
holoscan::ArgType::ArgType() = default
```

#### Construct a new \`ArgType\` object

inline

```cpp showLineNumbers={false}
holoscan::ArgType::ArgType(
    ArgElementType element_type,
    ArgContainerType container_type,
    int32_t dimension = 0
)
```

Construct a new `ArgType` object.

**Parameters**

**`element_type`** `ArgElementType`

The element type of the argument.

---

**`container_type`** `ArgContainerType`

The container type of the argument.

---

**`dimension`** `int32_t` — default: 0

The dimension of the argument.

---

---

## Methods

### element\_type \[#elementtype]

```cpp showLineNumbers={false}
ArgElementType holoscan::ArgType::element_type() const
```

Get the element type of the argument.

**Returns:** The element type of the argument.

### container\_type \[#containertype]

```cpp showLineNumbers={false}
ArgContainerType holoscan::ArgType::container_type() const
```

Get the container type of the argument.

**Returns:** The container type of the argument.

### dimension \[#dimension]

```cpp showLineNumbers={false}
int32_t holoscan::ArgType::dimension() const
```

Get the dimension of the argument.

**Returns:** The dimension of the argument.

### to\_string \[#tostring]

```cpp showLineNumbers={false}
std::string holoscan::ArgType::to_string() const
```

Get a string representation of the argument type.

**Returns:** String representation of the argument type.

### to\_element\_type\_pair \[#toelementtypepair]

```cpp showLineNumbers={false}
template <class typeT>
static std::pair<const std::type_index, ArgElementType> holoscan::ArgType::to_element_type_pair(
    ArgElementType element_type
)
```

---

## Static methods

### get\_element\_type \[#getelementtype]

```cpp showLineNumbers={false}
static ArgElementType holoscan::ArgType::get_element_type(
    std::type_index index
)
```

Get the element type of the argument.

**Returns:** The element type of the argument.

**Parameters**

**`index`** `std::type_index`

The type index of the argument.

---

### create \[#create]

```cpp showLineNumbers={false}
template <typename typeT>
static ArgType holoscan::ArgType::create()
```

Create the argument type from the given type.

**Returns:** The argument type.

**Template parameters**

**`typeT`** `typename`

The type of the argument.

---

---

## Member variables

| Name                            | Type                                                       | Description |
| ------------------------------- | ---------------------------------------------------------- | ----------- |
| `element_type_map_` static      | `std::unordered_map< std::type_index, ArgElementType >`    |             |
| `element_type_name_map_` static | `const std::unordered_map< ArgElementType, const char * >` |             |
| `element_type_`                 | `ArgElementType`                                           |             |
| `container_type_`               | `ArgContainerType`                                         |             |
| `dimension_`                    | `int32_t`                                                  |             |