6#include "webcface/common/webcface-config.h"
13template <
typename Component>
25 std::shared_ptr<internal::Canvas2DDataBuf> sb;
40 using Field::lastName;
106 template <
typename F,
typename std::enable_if_t<std::is_invocable_v<F>,
107 std::
nullptr_t> =
nullptr>
110 [callback = std::move(callback)](
const auto &) { callback(); });
119 template <
typename T>
121 onChange(std::forward<T>(callback));
134 std::optional<std::vector<Canvas2DComponent>> tryGet()
const;
139 std::vector<Canvas2DComponent>
get()
const {
140 return tryGet().value_or(std::vector<Canvas2DComponent>{});
156 [[deprecated]] std::chrono::system_clock::time_point time()
const;
172 const Canvas2D &init(
double width,
double height)
const;
191 template <
typename T>
193 *this << std::forward<T>(cc);
201 template <
bool V,
bool C3>
219 template <
typename T,
typename std::enable_if_t<std::is_same_v<T, Canvas2D>,
220 std::
nullptr_t> =
nullptr>
222 return static_cast<Field>(*this) ==
static_cast<Field>(other);
224 template <
typename T,
typename std::enable_if_t<std::is_same_v<T, Canvas2D>,
225 std::
nullptr_t> =
nullptr>
227 return static_cast<Field>(*this) !=
static_cast<Field>(other);
Canvas2Dの送受信データを表すクラス
Definition canvas2d.h:24
const Canvas2D & operator<<(TemporalComponent< V, true, C3 > cc) const
Geometryを追加
Definition canvas2d.h:202
Canvas2D operator[](const char *field) const
Definition canvas2d.h:76
Canvas2D child(std::wstring_view field) const
「(thisの名前).(追加の名前)」を新しい名前とするField (wstring)
Definition canvas2d.h:55
bool operator==(const T &other) const
Canvas2Dの参照先を比較
Definition canvas2d.h:221
const Canvas2D & onChange(F callback) const
値が変化したときに呼び出されるコールバックを設定
Definition canvas2d.h:108
const Canvas2D & add(T &&cc) const
コンポーネントなどを追加
Definition canvas2d.h:192
bool operator!=(const T &other) const
Definition canvas2d.h:226
Canvas2D operator[](const wchar_t *field) const
Definition canvas2d.h:80
Canvas2D operator[](int index) const
Definition canvas2d.h:85
Canvas2D operator[](std::string_view field) const
Definition canvas2d.h:66
void appendListener(T &&callback) const
Definition canvas2d.h:120
Canvas2D child(std::string_view field) const
「(thisの名前).(追加の名前)」を新しい名前とするField
Definition canvas2d.h:48
Canvas2D(const Field &base, const SharedString &field, double width, double height)
Definition canvas2d.h:32
std::vector< Canvas2DComponent > get() const
Canvasの内容を取得する
Definition canvas2d.h:139
Canvas2D operator[](std::wstring_view field) const
Definition canvas2d.h:71
Canvas2D(const Field &base, const SharedString &field)
Definition canvas2d.h:30
Canvas2D child(int index) const
Definition canvas2d.h:61
Canvas2D parent() const
nameの最後のピリオドの前までを新しい名前とするField
Definition canvas2d.h:90
u8stringとstringとwstringをshared_ptrで持ち共有する
Definition encoding.h:69
Definition component_canvas2d.h:137
View,Canvasなどで送信用にaddされたデータを管理する
Definition data_buffer.h:17
std::ostream & operator<<(std::ostream &os, const Arg &arg)
Definition func_info.cc:96
ClientDataの参照とメンバ名とデータ名を持つクラス
Definition field.h:70
Field parent() const
nameの最後のピリオドの前までを新しい名前とするField
Definition field.cc:33
Field child(const SharedString &field) const
Definition field.cc:42
Canvas2D, Canvas3D (, View) に要素をaddするときに使うインタフェース
Definition components.h:22
TemporalCanvas2DComponent component_2d
Definition components.h:24
#define WEBCFACE_DLL
Definition webcface-config.h:60
#define WEBCFACE_NS_END
Definition webcface-config.h:104
#define WEBCFACE_NS_BEGIN
Definition webcface-config.h:103
#define WEBCFACE_CALL_FP
Definition webcface-config.h:98