PIValueTree::standardAttributes
This commit is contained in:
@@ -165,6 +165,38 @@ PIValueTree & PIValueTree::remove(const PIString & name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const PIStringList & PIValueTree::standardAttributes() {
|
||||||
|
static PIStringList ret = {
|
||||||
|
// clang-format off
|
||||||
|
Attribute::hidden ,
|
||||||
|
Attribute::readOnly ,
|
||||||
|
Attribute::isLabel ,
|
||||||
|
Attribute::grouping ,
|
||||||
|
|
||||||
|
Attribute::arrayType ,
|
||||||
|
Attribute::arrayMinCount,
|
||||||
|
Attribute::arrayMaxCount,
|
||||||
|
Attribute::arrayReorder ,
|
||||||
|
Attribute::arrayResize ,
|
||||||
|
|
||||||
|
Attribute::minimum ,
|
||||||
|
Attribute::maximum ,
|
||||||
|
Attribute::singleStep ,
|
||||||
|
Attribute::decimals ,
|
||||||
|
Attribute::prefix ,
|
||||||
|
Attribute::suffix ,
|
||||||
|
Attribute::style ,
|
||||||
|
Attribute::filter ,
|
||||||
|
Attribute::absolutePath ,
|
||||||
|
Attribute::onlyExisting ,
|
||||||
|
Attribute::widgetType ,
|
||||||
|
Attribute::expression
|
||||||
|
// clang-format on
|
||||||
|
};
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PIValueTree & PIValueTree::operator[](const PIString & name) {
|
PIValueTree & PIValueTree::operator[](const PIString & name) {
|
||||||
if (_is_null) return *this;
|
if (_is_null) return *this;
|
||||||
for (auto & c: _children)
|
for (auto & c: _children)
|
||||||
|
|||||||
@@ -103,6 +103,8 @@ public:
|
|||||||
PIValueTree & operator[](const PIStringList & path);
|
PIValueTree & operator[](const PIStringList & path);
|
||||||
const PIValueTree & operator[](const PIString & name) const { return child(name); }
|
const PIValueTree & operator[](const PIString & name) const { return child(name); }
|
||||||
|
|
||||||
|
static const PIStringList & standardAttributes();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void print(PIString & s, const PIValueTree & v, PIString tab);
|
static void print(PIString & s, const PIValueTree & v, PIString tab);
|
||||||
static PIValueTree & nullValue();
|
static PIValueTree & nullValue();
|
||||||
|
|||||||
Reference in New Issue
Block a user