Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
Loading...
Searching...
No Matches
aria::binding::ViewAdapterBase Class Reference

Base class defaulting every IViewAdapter operation to the compliant "unsupported" behaviour required by contract L-39: report through the diagnostics boundary, then return a safe default (no-op setter, zeroed getter, empty Subscription). More...

#include <view_adapter_base.hpp>

Inheritance diagram for aria::binding::ViewAdapterBase:
[legend]

Public Member Functions

 ~ViewAdapterBase () override
void set_text (IView &v, std::string_view text) override
std::string get_text (IView &v) override
Subscription on_text_changed (IView &v, std::function< void(std::string_view)> cb) override
void set_bool (IView &v, bool value) override
bool get_bool (IView &v) override
Subscription on_bool_changed (IView &v, std::function< void(bool)> cb) override
void set_int (IView &v, int value) override
int get_int (IView &v) override
Subscription on_int_changed (IView &v, std::function< void(int)> cb) override
void set_int64 (IView &v, std::int64_t value) override
std::int64_t get_int64 (IView &v) override
Subscription on_int64_changed (IView &v, std::function< void(std::int64_t)> cb) override
void set_uint64 (IView &v, std::uint64_t value) override
std::uint64_t get_uint64 (IView &v) override
Subscription on_uint64_changed (IView &v, std::function< void(std::uint64_t)> cb) override
void set_float (IView &v, float value) override
float get_float (IView &v) override
Subscription on_float_changed (IView &v, std::function< void(float)> cb) override
void set_double (IView &v, double value) override
double get_double (IView &v) override
Subscription on_double_changed (IView &v, std::function< void(double)> cb) override
void set_visible (IView &v, bool visible) override
void set_enabled (IView &v, bool enabled) override
Subscription on_click (IView &v, std::function< void()> cb) override
Public Member Functions inherited from aria::binding::IViewAdapter
virtual ~IViewAdapter ()
virtual std::string_view platform_name () const noexcept=0

Protected Member Functions

virtual void report_unsupported (std::string_view op, const IView &v) const
 Report that op has no implementation in this adapter.

Detailed Description

Base class defaulting every IViewAdapter operation to the compliant "unsupported" behaviour required by contract L-39: report through the diagnostics boundary, then return a safe default (no-op setter, zeroed getter, empty Subscription).

platform_name() stays pure — there is no meaningful default for it, and L-39 requires it to match IView::kind() exactly.

Constructor & Destructor Documentation

◆ ~ViewAdapterBase()

aria::binding::ViewAdapterBase::~ViewAdapterBase ( )
override

Member Function Documentation

◆ set_text()

void aria::binding::ViewAdapterBase::set_text ( IView & v,
std::string_view text )
overridevirtual

◆ get_text()

std::string aria::binding::ViewAdapterBase::get_text ( IView & v)
nodiscardoverridevirtual

◆ on_text_changed()

Subscription aria::binding::ViewAdapterBase::on_text_changed ( IView & v,
std::function< void(std::string_view)> cb )
overridevirtual

◆ set_bool()

void aria::binding::ViewAdapterBase::set_bool ( IView & v,
bool value )
overridevirtual

◆ get_bool()

bool aria::binding::ViewAdapterBase::get_bool ( IView & v)
nodiscardoverridevirtual

◆ on_bool_changed()

Subscription aria::binding::ViewAdapterBase::on_bool_changed ( IView & v,
std::function< void(bool)> cb )
overridevirtual

◆ set_int()

void aria::binding::ViewAdapterBase::set_int ( IView & v,
int value )
overridevirtual

◆ get_int()

int aria::binding::ViewAdapterBase::get_int ( IView & v)
nodiscardoverridevirtual

◆ on_int_changed()

Subscription aria::binding::ViewAdapterBase::on_int_changed ( IView & v,
std::function< void(int)> cb )
overridevirtual

◆ set_int64()

void aria::binding::ViewAdapterBase::set_int64 ( IView & v,
std::int64_t value )
overridevirtual

◆ get_int64()

std::int64_t aria::binding::ViewAdapterBase::get_int64 ( IView & v)
nodiscardoverridevirtual

◆ on_int64_changed()

Subscription aria::binding::ViewAdapterBase::on_int64_changed ( IView & v,
std::function< void(std::int64_t)> cb )
overridevirtual

◆ set_uint64()

void aria::binding::ViewAdapterBase::set_uint64 ( IView & v,
std::uint64_t value )
overridevirtual

◆ get_uint64()

std::uint64_t aria::binding::ViewAdapterBase::get_uint64 ( IView & v)
nodiscardoverridevirtual

◆ on_uint64_changed()

Subscription aria::binding::ViewAdapterBase::on_uint64_changed ( IView & v,
std::function< void(std::uint64_t)> cb )
overridevirtual

◆ set_float()

void aria::binding::ViewAdapterBase::set_float ( IView & v,
float value )
overridevirtual

◆ get_float()

float aria::binding::ViewAdapterBase::get_float ( IView & v)
nodiscardoverridevirtual

◆ on_float_changed()

Subscription aria::binding::ViewAdapterBase::on_float_changed ( IView & v,
std::function< void(float)> cb )
overridevirtual

◆ set_double()

void aria::binding::ViewAdapterBase::set_double ( IView & v,
double value )
overridevirtual

◆ get_double()

double aria::binding::ViewAdapterBase::get_double ( IView & v)
nodiscardoverridevirtual

◆ on_double_changed()

Subscription aria::binding::ViewAdapterBase::on_double_changed ( IView & v,
std::function< void(double)> cb )
overridevirtual

◆ set_visible()

void aria::binding::ViewAdapterBase::set_visible ( IView & v,
bool visible )
overridevirtual

◆ set_enabled()

void aria::binding::ViewAdapterBase::set_enabled ( IView & v,
bool enabled )
overridevirtual

◆ on_click()

Subscription aria::binding::ViewAdapterBase::on_click ( IView & v,
std::function< void()> cb )
overridevirtual

◆ report_unsupported()

virtual void aria::binding::ViewAdapterBase::report_unsupported ( std::string_view op,
const IView & v ) const
protectedvirtual

Report that op has no implementation in this adapter.

Routes through runtime::Logger::warn under the stable <platform_name>_adapter category and includes the view's kind(), matching contract L-39 rather than silently doing nothing.

Override to change reporting (e.g. to throw during development, or to route into a platform log). Must not throw when called from an on_*_changed / on_click path, which is conceptually noexcept.


The documentation for this class was generated from the following file: