template <size_t inline_target_size>

class generic_function_base

Defined at line 287 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

Function implementation details shared by all functions, regardless of

signature. This class is aligned based on inline_target_size and max_align_t

so that the target storage (bits_, the first class member) has correct

alignment.

See |fit::function| and |fit::callback| documentation for more information.

Public Methods

void generic_function_base<inline_target_size> (const generic_function_base<inline_target_size> & other)

Deleted copy constructor and assign. |generic_function_base|

implementations are move-only.

Defined at line 310 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

generic_function_base<inline_target_size> & operator= (const generic_function_base<inline_target_size> & other)

Defined at line 311 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

generic_function_base<inline_target_size> & operator= (generic_function_base<inline_target_size> && other)

Move assignment must be provided by subclasses.

Defined at line 314 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

Protected Methods

void generic_function_base<inline_target_size> ()

Defined at line 317 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void generic_function_base<inline_target_size> (generic_function_base<inline_target_size> && other)

Defined at line 319 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void ~generic_function_base<inline_target_size> ()

Defined at line 321 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

bool operator bool ()

Returns true if the function has a non-empty target.

Defined at line 324 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void assign_null ()

Used by derived "impl" classes to implement operator=().

Assigns an empty target.

Defined at line 328 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void assign_function (generic_function_base<inline_target_size> && other)

Used by derived "impl" classes to implement operator=().

Assigns the function with a target moved from another function,

leaving the other function with an empty target.

Defined at line 336 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void swap (generic_function_base<inline_target_size> & other)

Defined at line 341 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

const void * target_type_id ()

returns an opaque ID unique to the |Callable| type of the target.

Used by check_target_type.

Defined at line 359 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void destroy_target ()

leaves target uninitialized

Defined at line 362 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void initialize_null_target ()

assumes target is uninitialized

Defined at line 365 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void * get ()

Gets a pointer to the function context.

Defined at line 368 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void * bits ()

Allow function_base to directly access bits_ and ops_ when needed.

Defined at line 371 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

const base_target_ops * ops ()

Defined at line 372 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h

void set_ops (const base_target_ops * new_ops)

Defined at line 373 of file ../../sdk/lib/fit/include/lib/fit/internal/function.h