Commit ebd7c796 authored by Bob Obara's avatar Bob Obara Committed by Kitware Robot

Merge topic 'categoryChecks'

e9d60d82 ENH: Extended category and validity checking for attributes and items
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Haocheng LIU's avatarHaocheng LIU <haocheng.liu@kitware.com>
Acked-by: John Tourtellott's avatarJohn Tourtellott <john.tourtellott@kitware.com>
Merge-request: !1748
parents c0c7a5b8 e9d60d82
## Attribute Resource Changes
### attribute::ItemDefinition::passCategoryCheck
attribute::ItemDefinition now has methods to compare its categories with a user provided set (or with respects to a single category). If the input set of categories is empty then the method will always return true. If the input set is not empty but the item's set of categories is then the method returns false. Else the result will depend on the Definition's categoryCheckMode.
### attribute::ItemDefinition::categoryCheckMode
This can be set calling setCategoryCheckMode and influences the behavior of the passCategoryCheck method. Its possible values are:
* CategoryCheckMode::Any (Default) - at least one of its categories is in the input then passCategoryCheck returns true
* CategoryCheckMode::All - if all of its categories is in the input then passCategoryCheck returns true
### Other Changes
* FileSystemItem::ValueAsString() now returns "" when the item is not set.
......@@ -228,10 +228,16 @@ smtk::attribute::ItemPtr Attribute::itemAtPath(
* before using it to perform some operation.
*/
bool Attribute::isValid() const
{
std::set<std::string> cats;
return this->isValid(cats);
}
bool Attribute::isValid(const std::set<std::string>& cats) const
{
for (auto it = m_items.begin(); it != m_items.end(); ++it)
{
if (!(*it)->isValid())
if (!(*it)->isValid(cats))
{
return false;
}
......
......@@ -265,6 +265,7 @@ public:
void setAppliesToInteriorNodes(bool appliesValue) { m_appliesToInteriorNodes = appliesValue; }
bool isValid() const;
bool isValid(const std::set<std::string>& categories) const;
smtk::attribute::ResourcePtr attributeResource() const;
const smtk::resource::ResourcePtr resource() const override;
......
......@@ -36,8 +36,16 @@ Item::Type DateTimeItem::type() const
return Item::DateTimeType;
}
bool DateTimeItem::isValid() const
bool DateTimeItem::isValid(const std::set<std::string>& cats) const
{
// If we have been given categories we need to see if the item passes its
// category checks - if it doesn't it means its not be taken into account
// for validity checking so just return true
if (cats.size() && !this->passCategoryCheck(cats))
{
return true;
}
// If the item is not enabled or if all of its values are set then it is valid
// else it is enabled and contains unset values making it invalid
if (!this->isEnabled())
......
......@@ -33,7 +33,9 @@ public:
smtkTypeMacro(smtk::attribute::DateTimeItem);
~DateTimeItem() override;
Item::Type type() const override;
bool isValid() const override;
using Item::isValid;
bool isValid(const std::set<std::string>& categories) const override;
std::size_t numberOfValues() const { return m_values.size(); }
bool setNumberOfValues(std::size_t newSize);
......
......@@ -62,8 +62,17 @@ FileSystemItem::~FileSystemItem()
{
}
bool FileSystemItem::isValid() const
bool FileSystemItem::isValid(const std::set<std::string>& cats) const
{
// If we have been given categories we need to see if the item passes its
// category checks - if it doesn't it means its not be taken into account
// for validity checking so just return true
if (cats.size() && !this->passCategoryCheck(cats))
{
return true;
}
// If the item is not enabled or if all of its values are set then it is valid
// else it is enabled and contains unset values making it invalid
if (!this->isEnabled())
......
......@@ -35,7 +35,10 @@ public:
smtkTypeMacro(smtk::attribute::FileSystemItem);
~FileSystemItem() override;
Item::Type type() const override = 0;
bool isValid() const override;
using Item::isValid;
bool isValid(const std::set<std::string>& categories) const override;
bool shouldBeRelative() const;
bool shouldExist() const;
std::size_t numberOfValues() const { return m_values.size(); }
......
......@@ -52,7 +52,7 @@ Item::Type GroupItem::type() const
return GroupType;
}
bool GroupItem::isValid() const
bool GroupItem::isValid(const std::set<std::string>& cats) const
{
// If the item is not enabled or if all of its values are set then it is valid
// else it is enabled and contains unset values making it invalid
......@@ -64,7 +64,7 @@ bool GroupItem::isValid() const
{
for (auto it1 = (*it).begin(); it1 != (*it).end(); ++it1)
{
if (!*it1 || !(*it1)->isValid())
if (!*it1 || !(*it1)->isValid(cats))
{
return false;
}
......
......@@ -55,7 +55,10 @@ public:
smtkTypeMacro(smtk::attribute::GroupItem);
~GroupItem() override;
Item::Type type() const override;
bool isValid() const override;
using Item::isValid;
bool isValid(const std::set<std::string>& categories) const override;
std::size_t numberOfRequiredGroups() const;
std::size_t maxNumberOfGroups() const;
/**
......
......@@ -62,7 +62,8 @@ AttributePtr Item::attribute() const
bool Item::isValid() const
{
return true;
std::set<std::string> cats;
return this->isValid(cats);
}
std::string Item::name() const
......@@ -223,6 +224,16 @@ bool Item::assign(ConstItemPtr& sourceItem, unsigned int)
return true;
}
bool Item::passCategoryCheck(const std::string& category) const
{
return m_definition->passCategoryCheck(category);
}
bool Item::Item::passCategoryCheck(const std::set<std::string>& categories) const
{
return m_definition->passCategoryCheck(categories);
}
std::string Item::type2String(Item::Type t)
{
switch (t)
......
......@@ -76,7 +76,18 @@ public:
std::string name() const;
std::string label() const;
virtual Item::Type type() const = 0;
virtual bool isValid() const = 0;
/// @{
/// \brief tests the validity of an item
///
/// Returns true if the item is considered valid. If a non-empty
/// set of categories is passed into the method then they are used to
/// "filter" the item. This means the item will check to see if it passes
/// its passCategoryCheck method and if it fails (indicating the item is to
/// be passed over) isValid will return true regardless of the item's contents.
bool isValid() const;
virtual bool isValid(const std::set<std::string>& categories) const = 0;
/// @}
/// @{
/// \brief return a child item that matches name and satisfies the SearchStyle
......@@ -102,12 +113,12 @@ public:
std::function<void(smtk::attribute::ItemPtr, bool)> /*visitor*/, bool /*activeChildren = true*/)
{
}
smtk::attribute::ConstItemDefinitionPtr definition() const { return m_definition; }
const smtk::attribute::ConstItemDefinitionPtr& definition() const { return m_definition; }
template <typename DefType>
std::shared_ptr<const DefType> definitionAs() const
{
return std::dynamic_pointer_cast<const DefType>(this->definition());
return std::dynamic_pointer_cast<const DefType>(m_definition);
}
// Return the attribute that owns this item
......@@ -137,6 +148,12 @@ public:
bool isMemberOf(const std::string& category) const;
bool isMemberOf(const std::vector<std::string>& categories) const;
/// @{
/// \brief Checks to see if the item passes it's definition's category checks.
bool passCategoryCheck(const std::string& category) const;
bool passCategoryCheck(const std::set<std::string>& categories) const;
/// @}
//Get the item 's advance level:
//if mode is 1 then the write access level is returned;
//else the read access level is returned
......
......@@ -21,6 +21,7 @@ ItemDefinition::ItemDefinition(const std::string& myName)
m_isOptional = false;
m_isEnabledByDefault = false;
m_isOkToInherit = true;
m_categoryCheckMode = ItemDefinition::CategoryCheckMode::Any;
}
ItemDefinition::~ItemDefinition()
......@@ -64,6 +65,60 @@ void ItemDefinition::removeLocalCategory(const std::string& category)
m_localCategories.erase(category);
}
bool ItemDefinition::passCategoryCheck(const std::string& category) const
{
if (m_categories.empty() ||
((m_categoryCheckMode == CategoryCheckMode::All) && (m_categories.size() != 1)))
{
return false;
}
if (m_categoryCheckMode == CategoryCheckMode::Any)
{
if (m_categories.find(category) != m_categories.end())
{
return true;
}
return false;
}
if (*(m_categories.begin()) == category)
{
return true;
}
return false;
}
bool ItemDefinition::passCategoryCheck(const std::set<std::string>& categories) const
{
if (categories.empty())
{
return true;
}
if (m_categories.empty())
{
return false;
}
if (m_categoryCheckMode == CategoryCheckMode::Any)
{
for (auto cat : m_categories)
{
if (categories.find(cat) != categories.end())
{
return true;
}
}
return false;
}
for (auto cat : m_categories)
{
if (categories.find(cat) == categories.end())
{
return false;
}
}
return true;
}
void ItemDefinition::setAdvanceLevel(int mode, int level)
{
if ((mode < 0) || (mode > 1))
......
......@@ -85,6 +85,26 @@ public:
m_isEnabledByDefault = isEnabledByDefaultValue;
}
enum class CategoryCheckMode
{
Any = 0, //!< Check passes if any of the definition's categories are found (Default)
All = 1 //!< Check passes if all of the definition's categories are found
};
void setCategoryCheckMode(CategoryCheckMode mode) { m_categoryCheckMode = mode; }
CategoryCheckMode categoryCheckMode() const { return m_categoryCheckMode; }
/// @{
/// \brief Based on it's categoryCheckMode, checks to see if the definition's categories passes with respects to the input category/categories.
///
/// If the mode is Any then if at least one of its categories is in the input then it passes, else if the mode is All then all of the
/// the definition's categories must be contained. If the input set is empty then the check will always pass, else if the definition
/// has no categories then the check will always fail.
bool passCategoryCheck(const std::string& category) const;
bool passCategoryCheck(const std::set<std::string>& categories) const;
/// @}
std::size_t numberOfCategories() const { return m_categories.size(); }
///\brief Returns the categories (both explicitly assigned and inherited) associated to the Definition
......@@ -150,6 +170,7 @@ protected:
std::set<std::string> m_localCategories;
std::string m_detailedDescription;
std::string m_briefDescription;
ItemDefinition::CategoryCheckMode m_categoryCheckMode;
private:
// constant value that should never be changed
......
......@@ -98,8 +98,17 @@ bool MeshItem::setNumberOfValues(std::size_t newSize)
return true;
}
bool MeshItem::isValid() const
bool MeshItem::isValid(const std::set<std::string>& cats) const
{
// If we have been given categories we need to see if the item passes its
// category checks - if it doesn't it means its not be taken into account
// for validity checking so just return true
if (cats.size() && !this->passCategoryCheck(cats))
{
return true;
}
// If the item is not enabled or if it contains atleast the number of
// required values
if (!this->isEnabled())
......
......@@ -36,7 +36,9 @@ public:
smtkTypeMacro(smtk::attribute::MeshItem);
~MeshItem() override;
Item::Type type() const override;
bool isValid() const override;
using Item::isValid;
bool isValid(const std::set<std::string>& cats) const override;
std::size_t numberOfRequiredValues() const;
bool isExtensible() const;
......
......@@ -62,7 +62,7 @@ Item::Type MeshSelectionItem::type() const
return Item::MeshEntityType;
}
bool MeshSelectionItem::isValid() const
bool MeshSelectionItem::isValid(const std::set<std::string>&) const
{
return true;
}
......
......@@ -46,7 +46,9 @@ public:
smtkTypeMacro(smtk::attribute::MeshSelectionItem);
~MeshSelectionItem() override;
Item::Type type() const override;
bool isValid() const override;
using Item::isValid;
bool isValid(const std::set<std::string>& cats) const override;
void setValues(const smtk::common::UUID&, const std::set<int>&);
void unionValues(const smtk::common::UUID&, const std::set<int>&);
......
......@@ -71,8 +71,17 @@ Item::Type RefItem::type() const
return AttributeRefType;
}
bool RefItem::isValid() const
bool RefItem::isValid(const std::set<std::string>& cats) const
{
// If we have been given categories we need to see if the item passes its
// category checks - if it doesn't it means its not be taken into account
// for validity checking so just return true
if (cats.size() && !this->passCategoryCheck(cats))
{
return true;
}
// If the item is not enabled or if all of its values are set then it is valid
// else it is enabled and contains unset values making it invalid
if (!this->isEnabled())
......
......@@ -38,12 +38,14 @@ public:
smtkTypeMacro(smtk::attribute::RefItem);
~RefItem() override;
Item::Type type() const override;
// A RefItem is valid if it is either no enabled or if all of
// its values are set and the attributes it references exist
// It does NOT check to see if the attribute(s) it refers to are
// valid - the reason for this is to avoid infinite loops if 2
// attributes contain items that reference each other.
bool isValid() const override;
using Item::isValid;
bool isValid(const std::set<std::string>& categories) const override;
std::size_t numberOfValues() const { return m_values.size(); }
bool setNumberOfValues(std::size_t newSize);
......
......@@ -227,8 +227,17 @@ ReferenceItem::~ReferenceItem()
m_cache->clear();
}
bool ReferenceItem::isValid() const
bool ReferenceItem::isValid(const std::set<std::string>& cats) const
{
// If we have been given categories we need to see if the item passes its
// category checks - if it doesn't it means its not be taken into account
// for validity checking so just return true
if (cats.size() && !this->passCategoryCheck(cats))
{
return true;
}
if (!this->isEnabled())
{
return true;
......
......@@ -124,7 +124,8 @@ public:
* If the item is not enabled or if all of its values are set then it is valid.
* If it is enabled and contains unset values then it is invalid.
*/
bool isValid() const override;
bool isValid(const std::set<std::string>& categories) const override;
using Item::isValid;
/// Return the size of the item (number of entities associated with the item).
std::size_t numberOfValues() const;
......
......@@ -87,8 +87,17 @@ ValueItem::~ValueItem()
}
}
bool ValueItem::isValid() const
bool ValueItem::isValid(const std::set<std::string>& cats) const
{
// If we have been given categories we need to see if the item passes its
// category checks - if it doesn't it means its not be taken into account
// for validity checking so just return true
if (cats.size() && !this->passCategoryCheck(cats))
{
return true;
}
// If the item is not enabled or if all of its values are set then it is valid
// else it is enabled and contains unset values making it invalid
if (!this->isEnabled())
......@@ -105,7 +114,7 @@ bool ValueItem::isValid() const
// Is this using an expression?
if (this->allowsExpressions() && (m_expressions[i]->value() != nullptr))
{
if (!m_expressions[i]->isValid())
if (!m_expressions[i]->isValid(cats))
{
return false;
}
......@@ -114,7 +123,7 @@ bool ValueItem::isValid() const
// Now we need to check the active items
for (auto it = m_activeChildrenItems.begin(); it != m_activeChildrenItems.end(); ++it)
{
if (!(*it)->isValid())
if (!(*it)->isValid(cats))
{
return false;
}
......
......@@ -36,7 +36,10 @@ public:
~ValueItem() override;
virtual std::size_t numberOfValues() const { return m_isSet.size(); }
bool isValid() const override;
using Item::isValid;
bool isValid(const std::set<std::string>& categories) const override;
std::size_t numberOfRequiredValues() const;
std::size_t maxNumberOfValues() const;
......
......@@ -49,7 +49,7 @@ Item::Type VoidItem::type() const
return VoidType;
}
bool VoidItem::isValid() const
bool VoidItem::isValid(const std::set<std::string>&) const
{
return true;
}
......@@ -32,7 +32,9 @@ public:
smtkTypeMacro(smtk::attribute::VoidItem);
~VoidItem() override;
Item::Type type() const override;
bool isValid() const override;
using Item::isValid;
bool isValid(const std::set<std::string>& categories) const override;
protected:
VoidItem(Attribute* owningAttribute, int itemPosition);
......
......@@ -29,7 +29,7 @@ SMTKCORE_EXPORT void to_json(
{ "Type", smtk::attribute::Item::type2String(itemDefPtr->type()) },
{ "Name", itemDefPtr->name() }, { "Version", itemDefPtr->version() },
};
if (!itemDefPtr->label().empty())
if (itemDefPtr->label() != itemDefPtr->name())
{
j["Label"] = itemDefPtr->label();
}
......@@ -38,6 +38,14 @@ SMTKCORE_EXPORT void to_json(
j["Optional"] = true;
j["isEnabledByDefault"] = itemDefPtr->isEnabledByDefault();
}
if (itemDefPtr->categoryCheckMode() == smtk::attribute::ItemDefinition::CategoryCheckMode::All)
{
j["categoryCheckMode"] = "All";
}
else
{
j["categoryCheckMode"] = "Any";
}
if (itemDefPtr->advanceLevel(0) || itemDefPtr->advanceLevel(1))
{
// OK - we have a non-zero advance level in either read or write
......@@ -81,12 +89,10 @@ SMTKCORE_EXPORT void from_json(
{
return;
}
try
{
itemDefPtr->setLabel(j.at("Label"));
}
catch (std::exception& /*e*/)
auto located = j.find("Label");
if (located != j.end())
{
itemDefPtr->setLabel(*located);
}
try
{
......@@ -103,6 +109,18 @@ SMTKCORE_EXPORT void from_json(
catch (std::exception& /*e*/)
{
}
located = j.find("categoryCheckMode");
if (located != j.end())
{
if (*located == "All")
{
itemDefPtr->setCategoryCheckMode(smtk::attribute::ItemDefinition::CategoryCheckMode::All);
}
else
{
itemDefPtr->setCategoryCheckMode(smtk::attribute::ItemDefinition::CategoryCheckMode::Any);
}
}
try
{
itemDefPtr->setAdvanceLevel(0, j.at("AdvanceLevel"));
......
......@@ -105,7 +105,8 @@ PySharedPtrClass< smtk::attribute::Attribute > pybind11_init_smtk_attribute_Attr
.def("isEntityAssociated", (bool (smtk::attribute::Attribute::*)(::smtk::model::EntityRef const &) const) &smtk::attribute::Attribute::isEntityAssociated, py::arg("entityref"))
.def("isMemberOf", (bool (smtk::attribute::Attribute::*)(::std::string const &) const) &smtk::attribute::Attribute::isMemberOf, py::arg("category"))
.def("isMemberOf", (bool (smtk::attribute::Attribute::*)(::std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > const &) const) &smtk::attribute::Attribute::isMemberOf, py::arg("categories"))
.def("isValid", &smtk::attribute::Attribute::isValid)
.def("isValid", (bool (smtk::attribute::Attribute::*)() const) &smtk::attribute::Attribute::isValid)
.def("isValid", (bool (smtk::attribute::Attribute::*)(std::set<std::string> const &) const) &smtk::attribute::Attribute::isValid, py::arg("categories"))
.def("_item", &smtk::attribute::Attribute::item, py::arg("ith"))
.def("_itemAtPath", (smtk::attribute::ItemPtr (smtk::attribute::Attribute::*)(::std::string const &, ::std::string const &, bool)) &smtk::attribute::Attribute::itemAtPath, py::arg("path"), py::arg("seps") = "/", py::arg("activeOnly") = false)
.def("name", &smtk::attribute::Attribute::name)
......
......@@ -39,7 +39,6 @@ PySharedPtrClass< smtk::attribute::ComponentItem, smtk::attribute::ReferenceItem
.def("has", (bool (smtk::attribute::ComponentItem::*)(const ::smtk::resource::PersistentObjectPtr&) const) &smtk::attribute::ComponentItem::has, py::arg("comp"))
.def("isExtensible", &smtk::attribute::ComponentItem::isExtensible)
.def("isSet", &smtk::attribute::ComponentItem::isSet, py::arg("i") = 0)
.def("isValid", &smtk::attribute::ComponentItem::isValid)
.def("numberOfRequiredValues", &smtk::attribute::ComponentItem::numberOfRequiredValues)
.def("numberOfValues", &smtk::attribute::ComponentItem::numberOfValues)
.def("removeValue", &smtk::attribute::ComponentItem::removeValue, py::arg("i"))
......
......@@ -30,7 +30,6 @@ PySharedPtrClass< smtk::attribute::DateTimeItem, smtk::attribute::Item > pybind1
.def("isSet", &smtk::attribute::DateTimeItem::isSet, py::arg("element") = 0)
.def("isUsingDefault", (bool (smtk::attribute::DateTimeItem::*)(::std::size_t) const) &smtk::attribute::DateTimeItem::isUsingDefault, py::arg("elementIndex"))
.def("isUsingDefault", (bool (smtk::attribute::DateTimeItem::*)() const) &smtk::attribute::DateTimeItem::isUsingDefault)
.def("isValid", &smtk::attribute::DateTimeItem::isValid)
.def("numberOfRequiredValues", &smtk::attribute::DateTimeItem::numberOfRequiredValues)
.def("numberOfValues", &smtk::attribute::DateTimeItem::numberOfValues)
.def("reset", &smtk::attribute::DateTimeItem::reset)
......
......@@ -34,7 +34,6 @@ PySharedPtrClass< smtk::attribute::FileSystemItem, smtk::attribute::Item > pybin
.def("isSet", &smtk::attribute::FileSystemItem::isSet, py::arg("element") = 0)
.def("isUsingDefault", (bool (smtk::attribute::FileSystemItem::*)(::size_t) const) &smtk::attribute::FileSystemItem::isUsingDefault, py::arg("elementIndex"))
.def("isUsingDefault", (bool (smtk::attribute::FileSystemItem::*)() const) &smtk::attribute::FileSystemItem::isUsingDefault)
.def("isValid", &smtk::attribute::FileSystemItem::isValid)
.def("maxNumberOfValues", &smtk::attribute::FileSystemItem::maxNumberOfValues)
.def("numberOfRequiredValues", &smtk::attribute::FileSystemItem::numberOfRequiredValues)
.def("numberOfValues", &smtk::attribute::FileSystemItem::numberOfValues)
......
......@@ -33,7 +33,6 @@ PySharedPtrClass< smtk::attribute::GroupItem, smtk::attribute::Item > pybind11_i
.def("_find", (smtk::attribute::ItemPtr (smtk::attribute::GroupItem::*)(::size_t, ::std::string const &, ::smtk::attribute::SearchStyle)) &smtk::attribute::GroupItem::find, py::arg("element"), py::arg("name"), py::arg("style") = ::smtk::attribute::SearchStyle::IMMEDIATE)
.def("_find", (smtk::attribute::ConstItemPtr (smtk::attribute::GroupItem::*)(::size_t, ::std::string const &, ::smtk::attribute::SearchStyle) const) &smtk::attribute::GroupItem::find, py::arg("element"), py::arg("name"), py::arg("style") = ::smtk::attribute::SearchStyle::IMMEDIATE)
.def("isExtensible", &smtk::attribute::GroupItem::isExtensible)
.def("isValid", &smtk::attribute::GroupItem::isValid)
.def("item", (smtk::attribute::ItemPtr (smtk::attribute::GroupItem::*)(::size_t) const) &smtk::attribute::GroupItem::item, py::arg("ith"))
.def("item", (smtk::attribute::ItemPtr (smtk::attribute::GroupItem::*)(::size_t, ::size_t) const) &smtk::attribute::GroupItem::item, py::arg("element"), py::arg("ith"))
.def("maxNumberOfGroups", &smtk::attribute::GroupItem::maxNumberOfGroups)
......
......@@ -30,7 +30,8 @@ PySharedPtrClass< smtk::attribute::Item > pybind11_init_smtk_attribute_Item(py::
.def("name", &smtk::attribute::Item::name)
.def("label", &smtk::attribute::Item::label)
.def("type", &smtk::attribute::Item::type)
.def("isValid", &smtk::attribute::Item::isValid)
.def("isValid", (bool (smtk::attribute::Item::*)() const) &smtk::attribute::Item::isValid)
.def("isValid", (bool (smtk::attribute::Item::*)(std::set<std::string> const &) const) &smtk::attribute::Item::isValid, py::arg("categories"))
.def("definition", &smtk::attribute::Item::definition)
.def("attribute", &smtk::attribute::Item::attribute)
.def("owningItem", &smtk::attribute::Item::owningItem)
......@@ -41,6 +42,8 @@ PySharedPtrClass< smtk::attribute::Item > pybind11_init_smtk_attribute_Item(py::
.def("setIsEnabled", &smtk::attribute::Item::setIsEnabled, py::arg("isEnabledValue"))
.def("isMemberOf", (bool (smtk::attribute::Item::*)(::std::string const &) const) &smtk::attribute::Item::isMemberOf, py::arg("category"))
.def("isMemberOf", (bool (smtk::attribute::Item::*)(::std::vector<std::basic_string<char>, std::allocator<std::basic_string<char> > > const &) const) &smtk::attribute::Item::isMemberOf, py::arg("categories"))
.def("passCategoryCheck", (bool (smtk::attribute::Item::*)(::std::string const &) const) &smtk::attribute::Item::passCategoryCheck, py::arg("category"))
.def("passCategoryCheck", (bool (smtk::attribute::Item::*)(std::set<std::string> const &) const) &smtk::attribute::Item::passCategoryCheck, py::arg("categories"))
.def("advanceLevel", &smtk::attribute::Item::advanceLevel, py::arg("mode") = 0)
.def("setAdvanceLevel", &smtk::attribute::Item::setAdvanceLevel, py::arg("mode"), py::arg("level"))
.def("unsetAdvanceLevel", &smtk::attribute::Item::unsetAdvanceLevel, py::arg("mode") = 0)
......
......@@ -36,7 +36,6 @@ PySharedPtrClass< smtk::attribute::MeshItem, smtk::attribute::Item > pybind11_in
.def("hasValue", &smtk::attribute::MeshItem::hasValue, py::arg("arg0"))
.def("isExtensible", &smtk::attribute::MeshItem::isExtensible)
.def("isSet", &smtk::attribute::MeshItem::isSet, py::arg("element") = 0)
.def("isValid", &smtk::attribute::MeshItem::isValid)
.def("numberOfRequiredValues", &smtk::attribute::MeshItem::numberOfRequiredValues)
.def("numberOfValues", &smtk::attribute::MeshItem::numberOfValues)
.def("removeValue", &smtk::attribute::MeshItem::removeValue, py::arg("element"))
......
......@@ -43,7 +43,6 @@ PySharedPtrClass< smtk::attribute::MeshSelectionItem, smtk::attribute::Item > py
.def("begin", &smtk::attribute::MeshSelectionItem::begin)
.def("end", &smtk::attribute::MeshSelectionItem::end)
.def("isCtrlKeyDown", &smtk::attribute::MeshSelectionItem::isCtrlKeyDown)
.def("isValid", &smtk::attribute::MeshSelectionItem::isValid)
.def("modifyMode", &smtk::attribute::MeshSelectionItem::modifyMode)
.def_static("modifyMode2String", &smtk::attribute::MeshSelectionItem::modifyMode2String, py::arg("m"))
.def("numberOfValues", &smtk::attribute::MeshSelectionItem::numberOfValues)
......
......@@ -38,7 +38,6 @@ PySharedPtrClass< smtk::attribute::ModelEntityItem, smtk::attribute::ComponentIt
.def("has", (bool (smtk::attribute::ModelEntityItem::*)(::smtk::model::EntityRef const &) const) &smtk::attribute::ModelEntityItem::has, py::arg("entity"))
.def("isExtensible", &smtk::attribute::ModelEntityItem::isExtensible)
.def("isSet", &smtk::attribute::ModelEntityItem::isSet, py::arg("element") = 0)
.def("isValid", &smtk::attribute::ModelEntityItem::isValid)
.def("numberOfRequiredValues", &smtk::attribute::ModelEntityItem::numberOfRequiredValues)
.def("numberOfValues", &smtk::attribute::ModelEntityItem::numberOfValues)
.def("removeValue", &smtk::attribute::ModelEntityItem::removeValue, py::arg("element"))
......
......@@ -31,7 +31,6 @@ PySharedPtrClass< smtk::attribute::RefItem, smtk::attribute::Item > pybind11_ini
.def("begin", &smtk::attribute::RefItem::begin)
.def("end", &smtk::attribute::RefItem::end)
.def("isSet", &smtk::attribute::RefItem::isSet, py::arg("element") = 0)
.def("isValid", &smtk::attribute::RefItem::isValid)
.def("numberOfRequiredValues", &smtk::attribute::RefItem::numberOfRequiredValues)
.def("numberOfValues", &smtk::attribute::RefItem::numberOfValues)
.def("removeValue", &smtk::attribute::RefItem::removeValue, py::arg("element"))
......
......@@ -34,7 +34,6 @@ PySharedPtrClass< smtk::attribute::ReferenceItem, smtk::attribute::Item > pybind
.def("has", (bool (smtk::attribute::ReferenceItem::*)(const ::smtk::resource::PersistentObjectPtr&) const) &smtk::attribute::ReferenceItem::has, py::arg("obj"))
.def("isExtensible", &smtk::attribute::ReferenceItem::isExtensible)
.def("isSet", &smtk::attribute::ReferenceItem::isSet, py::arg("i") = 0)
.def("isValid", &smtk::attribute::ReferenceItem::isValid)
.def("lockType", &smtk::attribute::ReferenceItem::lockType)
.def("maxNumberOfValues", &smtk::attribute::ReferenceItem::maxNumberOfValues)
.def("numberOfRequiredValues", &smtk::attribute::ReferenceItem::numberOfRequiredValues)
......
......@@ -39,7 +39,6 @@ PySharedPtrClass< smtk::attribute::ResourceItem, smtk::attribute::ReferenceItem
.def("has", (bool (smtk::attribute::ResourceItem::*)(const ::smtk::resource::PersistentObjectPtr&) const) &smtk::attribute::ResourceItem::has, py