4 #ifndef YARP_THRIFT_GENERATOR_STRUCT_RGBA 5 #define YARP_THRIFT_GENERATOR_STRUCT_RGBA 7 #include <yarp/os/Wire.h> 8 #include <yarp/os/idl/WireTypes.h> 17 class iCub::data3D::RGBA :
public yarp::os::idl::WirePortable {
27 RGBA(
const int32_t rgba) : rgba(rgba) {
31 RGBA(
const RGBA& __alt) : WirePortable(__alt) {
32 this->rgba = __alt.rgba;
36 const RGBA& operator = (
const RGBA& __alt) {
37 this->rgba = __alt.rgba;
42 bool read(yarp::os::idl::WireReader& reader);
43 bool read(yarp::os::ConnectionReader& connection);
44 bool write(yarp::os::idl::WireWriter& writer);
45 bool write(yarp::os::ConnectionWriter& connection);
48 bool write_rgba(yarp::os::idl::WireWriter& writer);
49 bool nested_write_rgba(yarp::os::idl::WireWriter& writer);
50 bool read_rgba(yarp::os::idl::WireReader& reader);
51 bool nested_read_rgba(yarp::os::idl::WireReader& reader);
55 yarp::os::ConstString toString();
58 typedef yarp::os::idl::Unwrapped<iCub::data3D::RGBA > unwrapped;
60 class Editor :
public yarp::os::Wire,
public yarp::os::PortWriter {
68 yarp().setOwner(*
this);
75 yarp().setOwner(*
this);
78 bool edit(RGBA& obj,
bool dirty =
true) {
79 if (obj_owned)
delete this->obj;
87 if (obj_owned)
delete obj;
90 bool isValid()
const {
94 RGBA& state() {
return *obj; }
96 void begin() { group++; }
100 if (group==0&&is_dirty) communicate();
102 void set_rgba(
const int32_t rgba) {
112 virtual bool will_set_rgba() {
return true; }
113 virtual bool did_set_rgba() {
return true; }
117 bool read(yarp::os::ConnectionReader& connection);
118 bool write(yarp::os::ConnectionWriter& connection);
127 if (group!=0)
return;
128 if (yarp().canWrite()) {
136 void mark_dirty_rgba() {
137 if (is_dirty_rgba)
return;
139 is_dirty_rgba =
true;
142 void dirty_flags(
bool flag) {
144 is_dirty_rgba = flag;
145 dirty_count = flag ? 1 : 0;