> ## 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.

# ansys::dpf::Location Struct Reference

User defined location quantity.

`#include <dpf_api_base.h>`

## Public Member Functions

| Type | Name |
| - | - |
| | [Location](#a2b3efab2807517d182bc9a486a0fb837) (std::string const \&name="") |
| | **Location** ([Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md) const &)=default |
|  bool | **operator==** ([Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md) const &) const |
|  bool | **operator\<** ([Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md) const &) const |
|  bool | **operator\<=** ([Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md) const &) const |
|  bool | **operator!=** ([Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md) const &) const |
| | [operator std::string](#a5a60f9364ad31a180f0fe06aedd3bfc9) () const |
|  bool | **empty** () const |
| const char \* | [c\_str](#ad9fab192124627740ffa623b1a0221ea) () const |

## Detailed Description

User defined location quantity.

The location is the type of topology associated with the data container. This allows for the definition of a new location quantity. Many location quantities are predefined.

**See also**

[locations](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1locations.md)

**Examples**

[DataApis.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/DataApis_8cpp-example.md).

## Constructor & Destructor Documentation

### Location()

```cpp theme={null}
ansys::dpf::Location::Location(std::string const & name = "")
```

`explicit`

Create new location.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | name | Optional name of location. |

## Member Function Documentation

### c\_str()

```cpp theme={null}
const char * ansys::dpf::Location::c_str() const
```

Gets name of location.

**Returns**

Name of location.

**Examples**

[AveragingTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/AveragingTest_8cpp-example.md), and [ModelTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/ModelTest_8cpp-example.md).

### operator std::string()

```cpp theme={null}
ansys::dpf::Location::operator std::string() const
```

Name of location.
