28#ifdef INDI_PROPERTY_RAW_CAST
37 PropertyPrivate(&property)
41 this->typedProperty.setWidgets(widgets.data(), widgets.size());
44#ifdef INDI_PROPERTY_RAW_CAST
59#ifdef INDI_PROPERTY_RAW_CAST
67 delete &this->typedProperty;
90 d->typedProperty.setDeviceName(name);
97 d->typedProperty.setDeviceName(name);
104 d->typedProperty.setName(name);
111 d->typedProperty.setName(name);
118 d->typedProperty.setLabel(label);
125 d->typedProperty.setLabel(label);
132 d->typedProperty.setGroupName(name);
139 d->typedProperty.setGroupName(name);
146 d->typedProperty.setPermission(permission);
153 d->typedProperty.setTimeout(timeout);
160 d->typedProperty.setState(state);
167 d->typedProperty.setTimestamp(timestamp);
174 d->typedProperty.setTimestamp(timestamp);
181 return d->typedProperty.getDeviceName();
188 return d->typedProperty.getName();
195 return d->typedProperty.getLabel();
202 return d->typedProperty.getGroupName();
209 return d->typedProperty.getPermission();
216 return d->typedProperty.getPermissionAsString();
223 return d->typedProperty.getTimeout();
230 return d->typedProperty.getState();
237 return d->typedProperty.getStateAsString();
244 return d->typedProperty.getTimestamp();
251 return d->typedProperty.isEmpty();
258 return d->typedProperty.isNameMatch(otherName);
265 return d->typedProperty.isNameMatch(otherName);
272 return d->typedProperty.isLabelMatch(otherLabel);
279 return d->typedProperty.isLabelMatch(otherLabel);
286 return d->typedProperty.load();
293 d->typedProperty.save(f);
300 return d->typedProperty.snoop(root);
307 d->typedProperty.vapply(format, args);
314 d->typedProperty.vdefine(format, args);
322 va_start(ap, format);
323 d->typedProperty.vapply(format, ap);
332 va_start(ap, format);
333 d->typedProperty.vdefine(format, ap);
341 d->typedProperty.apply();
348 d->typedProperty.define();
355 return d->typedProperty.findWidgetByName(name);
361 auto it = findWidgetByName(name);
362 return int(it ==
nullptr ? -1 : it - begin());
369 return d->typedProperty.count();
376#ifdef INDI_PROPERTY_RAW_CAST
377 assert(d->raw ==
false);
379 d->widgets.resize(size);
380 d->typedProperty.setWidgets(d->widgets.data(), d->widgets.size());
387#ifdef INDI_PROPERTY_RAW_CAST
388 assert(d->raw ==
false);
390 d->widgets.reserve(size);
391 d->typedProperty.setWidgets(d->widgets.data(), d->widgets.size());
398#ifdef INDI_PROPERTY_RAW_CAST
399 assert(d->raw ==
false);
401 d->widgets.shrink_to_fit();
402 d->typedProperty.setWidgets(d->widgets.data(), d->widgets.size());
409#ifdef INDI_PROPERTY_RAW_CAST
410 assert(d->raw ==
false);
412 item.setParent(&d->typedProperty);
413 d->widgets.push_back(std::move(item));
414 d->typedProperty.setWidgets(d->widgets.data(), d->widgets.size());
427 return d->typedProperty.at(index);
435 return *d->typedProperty.at(index);
442 return d->typedProperty.begin();
449 return d->typedProperty.end();
456 return d->typedProperty.begin();
463 return d->typedProperty.end();
470 return &d->typedProperty;
473#ifdef INDI_PROPERTY_BACKWARD_COMPATIBILE
typename WidgetTraits< T >::PropertyType RawPropertyType
PropertyBasicPrivateTemplate(size_t count)
virtual ~PropertyBasicPrivateTemplate()
void setDeviceName(const char *name)
void push(WidgetView< T > &&item)
void vapply(const char *format, va_list args) const
void setState(IPState state)
bool isLabelMatch(const char *otherLabel) const
const char * getPermissionAsString() const
WidgetView< T > * findWidgetByName(const char *name) const
const char * getDeviceName() const
void setName(const char *name)
bool load()
load Attempt to load property values from configuration file.
WidgetView< T > * begin()
void save(FILE *f) const
save Save property to configuration file.
void vdefine(const char *format, va_list args) const
double getTimeout() const
PropertyView< T > * operator&()
void setLabel(const char *label)
const char * getName() const
bool isNameMatch(const char *otherName) const
bool snoop(XMLEle *root)
Inspect the root XML and snoop the property if it exists in the root element.
INDI::PropertyView< T > * operator->()
const char * getGroupName() const
const char * getStateAsString() const
const char * getLabel() const
void setPermission(IPerm permission)
void void void apply() const
WidgetView< T > & operator[](int index) const
int findWidgetIndexByName(const char *name) const
PropertyBasic(PropertyBasicPrivate &dd)
const WidgetView< T > * at(size_t index) const
const char * getTimestamp() const
void setTimestamp(const char *timestamp)
void setGroupName(const char *name)
void reserve(size_t size)
void setTimeout(double timeout)
IPerm getPermission() const
INDI::PropertyView< T > operator*()
Provides generic container for INDI properties.
IPerm
Permission hint, with respect to client.
Namespace to encapsulate INDI client, drivers, and mediator classes.
Provides decorator for Low-Level IXXXVectorProperty/IXXX.