SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
ModelEntityItemDefinition.h
1 //=========================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //=========================================================================
10 // .NAME ModelEntityItemDefinition.h - A definition for attribute items that store UUIDs as values.
11 // .SECTION Description
12 // .SECTION See Also
13 
14 #ifndef smtk_attribute_ModelEntityItemDefinition_h
15 #define smtk_attribute_ModelEntityItemDefinition_h
16 
17 #include "smtk/attribute/ComponentItemDefinition.h"
18 #include "smtk/common/UUID.h"
19 #include "smtk/model/EntityTypeBits.h" // for smtk::model::BitFlags
20 
21 namespace smtk
22 {
23 namespace attribute
24 {
25 
26 class SMTKCORE_EXPORT ModelEntityItemDefinition : public ComponentItemDefinition
27 {
28 public:
31 
32  static smtk::attribute::ModelEntityItemDefinitionPtr New(const std::string& sname)
33  {
35  }
36 
37  ~ModelEntityItemDefinition() override;
38 
39  Item::Type type() const override;
40 
41  smtk::model::BitFlags membershipMask() const;
42  void setMembershipMask(smtk::model::BitFlags entMask);
43 
44  smtk::attribute::ItemPtr buildItem(Attribute* owningAttribute, int itemPosition) const override;
45  smtk::attribute::ItemPtr buildItem(Item* owningItem, int position, int subGroupPosition)
46  const override;
47 
48 protected:
49  ModelEntityItemDefinition(const std::string& myName);
50 
51 private:
52  bool setAcceptsEntries(const std::string& typeName, const std::string& queryString, bool accept)
53  override;
54 };
55 
56 } // namespace attribute
57 } // namespace smtk
58 
59 #endif /* smtk_attribute_ModelEntityItemDefinition_h */
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::attribute::Item::Type
Type
Definition: Item.h:56
smtk::attribute::ModelEntityItemDefinition
Definition: ModelEntityItemDefinition.h:26
smtk::model::BitFlags
unsigned int BitFlags
The integer type used to hold bit values describing an entity's type.
Definition: EntityTypeBits.h:25
smtk::attribute::Item
The base class for items that hold information inside an attribute.
Definition: Item.h:47
smtkTypeMacro
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:127
smtk::attribute::ModelEntityItemDefinitionPtr
smtk::shared_ptr< smtk::attribute::ModelEntityItemDefinition > ModelEntityItemDefinitionPtr
Definition: PublicPointerDefs.h:525
smtkSuperclassMacro
#define smtkSuperclassMacro(...)
Add a typedef to the superclass of this class.
Definition: SharedFromThis.h:146
smtk::common::typeName
std::string typeName()
Return the name of a class.
Definition: TypeName.h:289
smtk::attribute::Attribute
Represent a (possibly composite) value according to a definition.
Definition: Attribute.h:49
smtk::attribute::ComponentItemDefinition
A definition for attribute items that store component UUIDs as values.
Definition: ComponentItemDefinition.h:26
smtk::attribute::ItemPtr
smtk::shared_ptr< smtk::attribute::Item > ItemPtr
Definition: PublicPointerDefs.h:467