SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Public Member Functions | Protected Member Functions | Friends | List of all members
smtk::attribute::VoidItem Class Reference
Inheritance diagram for smtk::attribute::VoidItem:
[legend]
Collaboration diagram for smtk::attribute::VoidItem:
[legend]

Public Member Functions

 smtkTypeMacro (smtk::attribute::VoidItem)
 
Item::Type type () const override
 
- Public Member Functions inherited from smtk::attribute::Item
 smtkTypeMacroBase (smtk::attribute::Item)
 
std::string name () const
 
std::string label () const
 
bool isRelevant (bool includeCatagories=true, bool includeReadAccess=false, unsigned int readAccessLevel=0) const
 Returns true if the item is relevant. More...
 
virtual bool defaultIsRelevant (bool includeCatagories, bool includeReadAccess, unsigned int readAccessLevel) const
 Default isRelevant method that returns true if the item is relevant. More...
 
virtual void visitChildren (std::function< void(smtk::attribute::ItemPtr, bool)> visitor, bool activeChildren=true)
 visitChildren Invoke a function on each (or, if findInActiveChildren is true, each active) child item. More...
 
const smtk::attribute::ConstItemDefinitionPtrdefinition () const
 
template<typename DefType >
std::shared_ptr< const DefType > definitionAs () const
 
smtk::attribute::AttributePtr attribute () const
 Return the attribute that owns this item.
 
smtk::attribute::ItemPtr owningItem () const
 
int position () const
 Position is the item's location w/r to the owning item if not null or the owning attribute. More...
 
int subGroupPosition () const
 Return the position of the item with respects to the GroupItem that owns it. More...
 
bool isOptional () const
 Returns true if the item is optional.
 
bool isEnabled () const
 An item is enabled under the following conditions: More...
 
bool localEnabledState () const
 Return the state of the instance's isEnabled state.
 
void setIsEnabled (bool isEnabledValue)
 Set the instance's local enabled state.
 
const smtk::common::Categoriescategories () const
 return the categories associated with the item (via its Definition)
 
unsigned int advanceLevel (int mode=0) const
 Get the item 's advance level. More...
 
void setLocalAdvanceLevel (int mode, unsigned int level)
 
unsigned int localAdvanceLevel (int mode=0) const
 
void unsetLocalAdvanceLevel (int mode=0)
 
bool hasLocalAdvanceLevelInfo (int mode=0) const
 
void setUserData (const std::string &key, smtk::simulation::UserDataPtr value)
 
smtk::simulation::UserDataPtr userData (const std::string &key) const
 
void clearUserData (const std::string &key)
 
void clearAllUserData ()
 
virtual void reset ()
 
virtual bool rotate (std::size_t fromPosition, std::size_t toPosition)
 Rotate internal data. More...
 
virtual void detachOwningResource ()
 Release the item's dependency on its parent attribute's Resource.
 
void detachOwningAttribute ()
 This should be used only by attributes.
 
void detachOwningItem ()
 This should only be called by the item that owns this one.
 
bool isValid (bool useActiveCategories=true) const
 tests the validity of an item More...
 
bool isValid (const std::set< std::string > &categories) const
 tests the validity of an item More...
 
bool defaultIsValid (bool useActiveCategories) const
 The default implementation of isValid it ignores custom validity functions.
 
bool defaultIsValid (const std::set< std::string > &categories) const
 The default implementation of isValid it ignores custom validity functions.
 
void setCustomIsValid (const ValidityFunc &func)
 Set and Get Methods for specifying a custom isValid function.
 
ValidityFunc customIsValid () const
 Set and Get Methods for specifying a custom isValid function.
 
void setCustomIsRelevant (RelevanceFunc func)
 Set and Get Methods for specifying a custom isRelevant function.
 
RelevanceFunc customIsRelevant () const
 Set and Get Methods for specifying a custom isRelevant function.
 
smtk::attribute::ItemPtr find (const std::string &name, SearchStyle style=RECURSIVE_ACTIVE)
 return a child item that matches name and satisfies the SearchStyle
 
smtk::attribute::ConstItemPtr find (const std::string &name, SearchStyle style=RECURSIVE_ACTIVE) const
 return a child item that matches name and satisfies the SearchStyle
 
template<typename T >
T::Ptr findAs (const std::string &name, SearchStyle style=RECURSIVE_ACTIVE)
 return a child item that matches name and satisfies the SearchStyle
 
template<typename T >
T::ConstPtr findAs (const std::string &name, SearchStyle style=RECURSIVE_ACTIVE) const
 return a child item that matches name and satisfies the SearchStyle
 
std::string path (const std::string &sep="/") const
 Formats the full path to the item with respect to its owning attribute using sep as the path separator.
 
void setForceRequired (bool val)
 Controls if an item should be forced to be required regardless of its local enable property. More...
 
bool forceRequired () const
 Controls if an item should be forced to be required regardless of its local enable property. More...
 
virtual Status assign (const smtk::attribute::ConstItemPtr &sourceItem, const CopyAssignmentOptions &options=CopyAssignmentOptions())
 
virtual Status assign (const smtk::attribute::ConstItemPtr &sourceItem, const CopyAssignmentOptions &options, smtk::io::Logger &logger)
 
void setIsIgnored (bool val)
 Controls if an item should be ignored. More...
 
bool isIgnored () const
 Controls if an item should be ignored. More...
 

Protected Member Functions

 VoidItem (Attribute *owningAttribute, int itemPosition)
 
 VoidItem (Item *owningItem, int myPosition, int mySubGroupPosition)
 
bool setDefinition (smtk::attribute::ConstItemDefinitionPtr def) override
 
bool isValidInternal (bool useCategories, const std::set< std::string > &categories) const override
 Internal implementation of calculating the validity of the item. More...
 
- Protected Member Functions inherited from smtk::attribute::Item
 Item (Attribute *owningAttribute, int itemPosition)
 
 Item (Item *owningItem, int myPosition, int mySubGroupPosition)
 
virtual smtk::attribute::ItemPtr findInternal (const std::string &name, SearchStyle style)
 Internal implementation of the find method.
 
virtual smtk::attribute::ConstItemPtr findInternal (const std::string &name, SearchStyle style) const
 
template<typename T >
bool rotateVector (std::vector< T > &v, std::size_t fromPosition, std::size_t toPosition)
 

Friends

class VoidItemDefinition
 

Additional Inherited Members

- Public Types inherited from smtk::attribute::Item
enum  Type {
  AttributeRefType, DoubleType, GroupType, IntType,
  StringType, VoidType, FileType, DirectoryType,
  ColorType, ModelEntityType, MeshEntityType, DateTimeType,
  ReferenceType, ResourceType, ComponentType, NUMBER_OF_TYPES
}
 
typedef std::function< bool(const Item *, bool includeCatagories, bool includeReadAccess, unsigned int readAccessLevel)> RelevanceFunc
 Typedef for custom relevance functions.
 
typedef std::function< bool(const Item *, const std::set< std::string > &categories)> ValidityFunc
 Typedef for custom validity functions.
 
using Status = smtk::common::Status
 
- Static Public Member Functions inherited from smtk::attribute::Item
static std::string type2String (Item::Type t)
 
static Item::Type string2Type (const std::string &s)
 
- Protected Attributes inherited from smtk::attribute::Item
Attributem_attribute
 
Itemm_owningItem
 
int m_position
 
int m_subGroupPosition
 
bool m_isEnabled
 
bool m_isIgnored
 
smtk::attribute::ConstItemDefinitionPtr m_definition
 
std::map< std::string, smtk::simulation::UserDataPtrm_userData
 
RelevanceFunc m_customIsRelevant = nullptr
 
ValidityFunc m_customIsValid = nullptr
 

Member Function Documentation

◆ isValidInternal()

bool VoidItem::isValidInternal ( bool  useCategories,
const std::set< std::string > &  categories 
) const
overrideprotectedvirtual

Internal implementation of calculating the validity of the item.

If useCategories is true then the set of categories will be taken into consideration.

Implements smtk::attribute::Item.


The documentation for this class was generated from the following files: