# zx::object

## Summary

### Inheritance

Inherits from: [zx::object_base](https://fuchsia.dev/reference/cpp/class/zx/object-base)  
Direct Known Subclasses:[zx::task\< T \>](https://fuchsia.dev/reference/cpp/class/zx/task)

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a41525949313703ac3b7078d50676723a()` ||
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a772b49b544179373ab3dea760495f8f1(zx_handle_t value)` ||
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a56abbbd07eb2895604832bdb581ecd06(https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< U > && other)` ||

| ### Public static attributes ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a90ba05169c79486f7545b72d3f33281b = ZX_OBJ_TYPE_NONE` | `constexpr zx_obj_type_t` |

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1aeb5c892b59d03ded53624696b2e06e6b() const ` | `https://fuchsia.dev/reference/cpp/other/singletonzx/unowned#singletonzx_1_1unowned< T >` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1aba24fff1aae7ca48f6630bc947328b6f(zx_rights_t rights, https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< T > *result)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1ae6e399a7de6b630b1bf7374e28c78200(uint64_t koid, zx_rights_t rights, https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< void > *result)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1aa0d19694ec34195922a202b06c6b9747(https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< U > && other)` | `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< T > &` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a38e6d4545e0d23625d6df2a8a2c3032a(zx_rights_t rights, https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< T > *result)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a2f96252738427b5554506e7db4572de9(const https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< https://fuchsia.dev/reference/cpp/class/zx/profile#classzx_1_1profile > & profile, uint32_t options)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1ab081e6810c8770e6e3126c2df63767a0(uint32_t clear_mask, uint32_t set_mask)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a6ceadb7298b3447fd230523f0f033966(uint32_t clear_mask, uint32_t set_mask)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a1900deeb122d9f348e95ea15f945f190(https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< T > & other)` | `void` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1ad93d74bc104118519a80e60182584353(const https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object< https://fuchsia.dev/reference/cpp/class/zx/port#classzx_1_1port > & port, uint64_t key, zx_signals_t signals, uint32_t options)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1a18302efda4e244d14ef44c374e0d043e(zx_signals_t signals, https://fuchsia.dev/reference/cpp/class/zx/basic-time#classzx_1_1basic__time deadline, zx_signals_t *pending)` | `zx_status_t` |

| ### Public static functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/zx/object#classzx_1_1object_1aa5ea3f1b70620b2fcccbc81427096307(https://fuchsia.dev/reference/cpp/struct/zx-wait-item#structzx__wait__item *wait_items, uint32_t count, https://fuchsia.dev/reference/cpp/class/zx/basic-time#classzx_1_1basic__time deadline)` | `zx_status_t` |

## Public static attributes

### TYPE

```c++
constexpr zx_obj_type_t TYPE = ZX_OBJ_TYPE_NONE
```

## Public functions

### borrow

```c++
unowned< T > borrow() const 
```

### duplicate

```c++
zx_status_t duplicate(
  zx_rights_t rights,
  object< T > *result
)
```

### get_child

```c++
zx_status_t get_child(
  uint64_t koid,
  zx_rights_t rights,
  object< void > *result
)
```

### object

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

### object

```c++
 object(
  zx_handle_t value
)
```

### object

```c++
 object(
  object< U > && other
)
```

### operator=

```c++
object< T > & operator=(
  object< U > && other
)
```

### replace

```c++
zx_status_t replace(
  zx_rights_t rights,
  object< T > *result
)
```

### set_profile

```c++
zx_status_t set_profile(
  const object< profile > & profile,
  uint32_t options
)
```

### signal

```c++
zx_status_t signal(
  uint32_t clear_mask,
  uint32_t set_mask
)
```

### signal_peer

```c++
zx_status_t signal_peer(
  uint32_t clear_mask,
  uint32_t set_mask
)
```

### swap

```c++
void swap(
  object< T > & other
)
```

### wait_async

```c++
zx_status_t wait_async(
  const object< port > & port,
  uint64_t key,
  zx_signals_t signals,
  uint32_t options
)
```

### wait_one

```c++
zx_status_t wait_one(
  zx_signals_t signals,
  zx::time deadline,
  zx_signals_t *pending
)
```

## Public static functions

### wait_many

```c++
zx_status_t wait_many(
  zx_wait_item_t *wait_items,
  uint32_t count,
  zx::time deadline
)
```