diff --git a/src/property/Property.cpp b/src/property/Property.cpp index 243c2ab47..833d9c68d 100644 --- a/src/property/Property.cpp +++ b/src/property/Property.cpp @@ -55,6 +55,14 @@ Property::Property() } +/****************************************************************************** + CONST + ******************************************************************************/ +namespace PropertyActions +{ + const String CLEAR = "\x1b"; +} + /****************************************************************************** PUBLIC MEMBER FUNCTIONS ******************************************************************************/ diff --git a/src/property/Property.h b/src/property/Property.h index bc7aa665a..6571bf625 100644 --- a/src/property/Property.h +++ b/src/property/Property.h @@ -51,6 +51,14 @@ #define appendAttribute(x) appendAttributeReal(x, getAttributeName(#x, '.'), encoder) #define setAttribute(x) setAttributeReal(x, getAttributeName(#x, '.')) +/****************************************************************************** + CONST + ******************************************************************************/ +namespace PropertyActions +{ + extern const String CLEAR; +} + /****************************************************************************** ENUM ******************************************************************************/ diff --git a/src/property/types/CloudString.h b/src/property/types/CloudString.h index 027179411..f07f59ccf 100644 --- a/src/property/types/CloudString.h +++ b/src/property/types/CloudString.h @@ -46,6 +46,9 @@ class CloudString : public Property { operator String() const { return _value; } + void clear() { + _value = PropertyActions::CLEAR; + } virtual bool isDifferentFromCloud() { return _value != _cloud_value; }