# zx::counter

## Summary

### Inheritance

Inherits from: [zx::object\< counter \>](https://fuchsia.dev/reference/cpp/class/zx/object)

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1aab363a03b6a9f6a0d2abe34b78a35424()` ||
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1a8b19a902cc1bbf838ba692662097de1a(zx_handle_t value)` ||
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1aa70aa34887c97168271f82647db608a2(https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object && h)` ||
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1a34fb7548a742593e38252278f82d40ad(https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter && other)` ||

| ### Public static attributes ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1ad89c88390cddbc8bd7f0c0c59a169fe6 = ZX_OBJ_TYPE_COUNTER` | `constexpr zx_obj_type_t` |

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1a44319e7d9db71a2468eeac318edb11ba(int64_t value) const ` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1a9bf644bd741f958293adb0f4545bd6fa(https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter && other)` | `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter &` |
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1af44d52f1a99f70e0bc346670d3d4cf03(int64_t *value) const ` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1ae7cda23019a920f33416aa4bd8f9ad62(int64_t value) const ` | `zx_status_t` |

| ### Public static functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter_1ada378d564ba53e57610b1847a257b509(uint32_t options, https://fuchsia.dev/reference/cpp/class/zx/counter#classzx_1_1counter *result)` | `zx_status_t` |

## Public static attributes

### TYPE

```c++
constexpr zx_obj_type_t TYPE = ZX_OBJ_TYPE_COUNTER
```

## Public functions

### add

```c++
zx_status_t add(
  int64_t value
) const 
```

### counter

```c++
constexpr counter()=default
```

### counter

```c++
 counter(
  zx_handle_t value
)
```

### counter

```c++
 counter(
  handle && h
)
```

### counter

```c++
 counter(
  counter && other
)
```

### operator=

```c++
counter & operator=(
  counter && other
)
```

### read

```c++
zx_status_t read(
  int64_t *value
) const 
```

### write

```c++
zx_status_t write(
  int64_t value
) const 
```

## Public static functions

### create

```c++
zx_status_t create(
  uint32_t options,
  counter *result
)
```