LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
stream_adapter_desc_t Struct Reference

Public descriptor used to register a concrete stream adapter. More...

#include <stream_install.h>

Collaboration diagram for stream_adapter_desc_t:

Data Fields

stream_key_t key
 Public key used to identify the adapter.
 
stream_ctor_fn_t ctor
 Adapter constructor used to create a stream_t.
 
const void * ud
 Optional opaque user data bound to the constructor.
 
ud_dtor_fn_t ud_dtor
 Optional destructor for ud.
 

Detailed Description

A stream_adapter_desc_t binds:

  • a public adapter key,
  • an adapter constructor,
  • optional constructor user data,
  • an optional destructor for that user data.

This descriptor is typically prepared by an adapter-facing CR helper and then registered into a stream_factory_t.

Definition at line 81 of file stream_install.h.

Field Documentation

◆ ctor

stream_ctor_fn_t stream_adapter_desc_t::ctor

This callback must implement the stream_ctor_fn_t contract.

Definition at line 97 of file stream_install.h.

◆ key

stream_key_t stream_adapter_desc_t::key

This key is later used by factory-based creation APIs to select the registered adapter.

Definition at line 89 of file stream_install.h.

◆ ud

const void* stream_adapter_desc_t::ud

This pointer is passed back to ctor when the adapter is selected.

Definition at line 105 of file stream_install.h.

◆ ud_dtor

ud_dtor_fn_t stream_adapter_desc_t::ud_dtor

When provided, this callback is used to release descriptor-owned user data during factory teardown.

Definition at line 114 of file stream_install.h.