# component_testing::LocalComponentImplBase

<br />

**This is an abstract class.**   

## Summary

### Inheritance

Direct Known Subclasses:[component_testing::LocalCppComponent](https://fuchsia.dev/reference/cpp/class/component-testing/local-cpp-component), [component_testing::LocalHlcppComponent](https://fuchsia.dev/reference/cpp/class/component-testing/local-hlcpp-component)

| ### Constructors and Destructors ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1a9d617ca34d4120fc5d6654ad6451b7a8()` ||

| ### Protected attributes ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1aa78c26e6914517878fd11a63143eeef4 = false` | `bool` |
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1a3babfd1c0b45623003b4721b1fb2428a = nullptr` | `fdio_ns_t *` |

| ### Public functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1ac3519216eb446e62e90b9d800bb0e74c(zx_status_t return_code)` | `void` |
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1a6def79bef647d04e41e432dbb18b600d()=0` | `virtual void` |
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1af2154eba461569a4e31b44036f008400()` | `virtual void` |
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1a930f0f01622d1736c16339aace8c9b90()` | `fdio_ns_t *` |

| ### Protected functions ||
|---|---|
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1a2f6a1a8a06ee1f7c2488c9946a65fb45(fdio_ns_t *ns, https://fuchsia.dev/reference/cpp/class/zx/channel#classzx_1_1channel outgoing_dir, async_dispatcher_t *dispatcher, https://fuchsia.dev/reference/cpp/class/fit/function-impl#classfit_1_1function__impl< void(zx_status_t)> on_exit)` | `zx_status_t` |
| `https://fuchsia.dev/reference/cpp/class/component-testing/local-component-impl-base#classcomponent__testing_1_1_local_component_impl_base_1a1f9291eab3c5278bb92bad75218a6c58(https://fuchsia.dev/reference/cpp/class/zx/channel#classzx_1_1channel outgoing_dir, async_dispatcher_t *dispatcher)=0` | `virtual zx_status_t` |

## Protected attributes

### initialized_

```c++
bool initialized_ = false
```

### namespace_

```c++
fdio_ns_t * namespace_ = nullptr
```

## Public functions

### Exit

```c++
void Exit(
  zx_status_t return_code
)
```

### OnStart

```c++
virtual void OnStart()=0
```

### OnStop

```c++
virtual void OnStop()
```

### ns

```c++
fdio_ns_t * ns()
```

### \~LocalComponentImplBase

```c++
virtual  ~LocalComponentImplBase()
```

## Protected functions

### Initialize

```c++
zx_status_t Initialize(
  fdio_ns_t *ns,
  zx::channel outgoing_dir,
  async_dispatcher_t *dispatcher,
  fit::function< void(zx_status_t)> on_exit
)
```

### SetOutgoingDirectory

```c++
virtual zx_status_t SetOutgoingDirectory(
  zx::channel outgoing_dir,
  async_dispatcher_t *dispatcher
)=0
```