---
title: Async Use Case Object Hierarchy
---
classDiagram
  direction LR
  namespace codemelted {
    class CProtocolHandler {
      +id() String
      +is_running() bool
      +get_message(request: String) Result
      +post_message(T) Result
      +terminate()
    }
    class CTaskCB {
      +fn(T) Result
    }
    class CTaskResult {
      +has_completed() bool
      +value() Result
    }
    class CTimerCB {
      +fn()
    }
    class CTimerResult {
      +has_completed() bool
      +stop()
    }
    class CWorkerCB {
      +fn(T) T
    }
    class CWorkerProtocol
    class async_task
    class async_timer
    class async_worker
  }
  namespace std {
    class thread
  }
  CTaskResult --> CTaskCB: calls
  CTaskResult --> thread: uses
  CTimerResult --> CTimerCB: calls
  CTimerResult --> thread: uses
  CWorkerProtocol --> CWorkerCB: calls
  CWorkerProtocol --> CProtocolHandler: implements
  CWorkerProtocol --> thread: uses
  async_task --> CTaskResult: creates
  async_timer --> CTimerResult: creates
  async_worker --> CWorkerProtocol: creates
