SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Attribute.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 smtkAttribute.h - Represents a standalone piece of simulation information
11 // .SECTION Description
12 // .SECTION See Also
13 
14 #ifndef smtk_attribute_Attribute_h
15 #define smtk_attribute_Attribute_h
16 
17 #include "smtk/CoreExports.h"
18 #include "smtk/PublicPointerDefs.h"
19 #include "smtk/resource/Component.h"
20 
21 #include "smtk/attribute/ReferenceItem.h"
22 #include "smtk/attribute/SearchStyle.h"
23 #include "smtk/attribute/ValueItem.h"
24 
25 #include "smtk/common/UUID.h" // for template associatedModelEntities()
26 
27 #include <map>
28 #include <set>
29 #include <string>
30 #include <vector>
31 
32 namespace smtk
33 {
34 namespace attribute
35 {
36 class Evaluator;
37 class Item;
38 class Resource;
39 
43 class SMTKCORE_EXPORT Attribute : public resource::Component
44 {
45  friend class smtk::attribute::Definition;
46  friend class smtk::attribute::Resource;
47 
48 public:
50  struct SMTKCORE_EXPORT CompareByName
51  {
52  bool operator()(
54  const smtk::attribute::AttributePtr& rhs) const
55  {
56  return lhs->name() < rhs->name();
57  }
58 
59  bool operator()(
61  const smtk::attribute::WeakAttributePtr& rhs) const
62  {
63  auto left = lhs.lock();
64  if (left == nullptr)
65  {
66  return true;
67  }
68  auto right = rhs.lock();
69  if (right == nullptr)
70  {
71  return false;
72  }
73  return left->name() < right->name();
74  }
75  };
76 
78  const std::string& myName,
79  const smtk::attribute::DefinitionPtr& myDefinition)
80  {
81  return smtk::attribute::AttributePtr(new Attribute(myName, myDefinition));
82  }
83 
85  const std::string& myName,
86  const smtk::attribute::DefinitionPtr& myDefinition,
87  const smtk::common::UUID& myId)
88  {
89  return smtk::attribute::AttributePtr(new Attribute(myName, myDefinition, myId));
90  }
91 
92  ~Attribute() override;
93 
94  AttributePtr shared_from_this()
95  {
96  return static_pointer_cast<Attribute>(Component::shared_from_this());
97  }
98 
99  std::shared_ptr<const Attribute> shared_from_this() const
100  {
101  return static_pointer_cast<const Attribute>(Component::shared_from_this());
102  }
103 
104  // NOTE: To rename an attribute use the resource!
105  std::string name() const override { return m_name; }
106 
107  const std::string& type() const;
108  std::vector<std::string> types() const;
109  bool isA(const smtk::attribute::DefinitionPtr& def) const;
110  const smtk::attribute::DefinitionPtr& definition() const { return m_definition; }
111 
112  const double* color() const;
113  void setColor(double r, double g, double b, double alpha);
114  void setColor(const double* l_color)
115  {
116  this->setColor(l_color[0], l_color[1], l_color[2], l_color[3]);
117  }
118  bool isColorSet() const { return m_isColorSet; }
119  void unsetColor() { m_isColorSet = false; }
120 
128  unsigned int advanceLevel(int mode = 0) const;
129  void setLocalAdvanceLevel(int mode, unsigned int level);
130  unsigned int localAdvanceLevel(int mode = 0) const
131  {
132  return (mode == 1 ? m_localAdvanceLevel[1] : m_localAdvanceLevel[0]);
133  }
134  // unsetLocalAdvanceLevel causes the attribute to return its
135  // definition advance level information for the specified mode when calling
136  // the advanceLevel(mode) method
137  void unsetLocalAdvanceLevel(int mode = 0);
138  // Returns true if the attribute is returning its local
139  // advance level information
140  bool hasLocalAdvanceLevelInfo(int mode = 0) const
141  {
142  return (mode == 1 ? m_hasLocalAdvanceLevelInfo[1] : m_hasLocalAdvanceLevelInfo[0]);
143  }
144 
145  const std::vector<smtk::attribute::ItemPtr>& items() const { return m_items; }
146  smtk::attribute::ItemPtr item(int ith) const
147  {
148  return (ith < 0)
150  : (static_cast<unsigned int>(ith) >= m_items.size() ? smtk::attribute::ItemPtr()
151  : m_items[static_cast<std::size_t>(ith)]);
152  }
153 
161  itemAtPath(const std::string& path, const std::string& seps = "/", bool activeOnly = false) const;
163  itemAtPath(const std::string& path, const std::string& seps = "/", bool activeOnly = false);
164 
165  template<typename T>
166  typename T::ConstPtr itemAtPathAs(
167  const std::string& path,
168  const std::string& seps = "/",
169  bool activeOnly = false) const;
170  template<typename T>
171  typename T::Ptr
172  itemAtPathAs(const std::string& path, const std::string& seps = "/", bool activeOnly = false);
174 
177  std::string itemPath(const ItemPtr& item, const std::string& seps = "/") const;
179 
180  smtk::attribute::ItemPtr find(const std::string& name, SearchStyle style = RECURSIVE_ACTIVE);
181  smtk::attribute::ConstItemPtr find(const std::string& name, SearchStyle style = RECURSIVE_ACTIVE)
182  const;
183  std::size_t numberOfItems() const { return m_items.size(); }
184 
185  template<typename T>
186  typename T::Ptr findAs(const std::string& name, SearchStyle style = RECURSIVE_ACTIVE);
187 
188  template<typename T>
189  typename T::ConstPtr findAs(const std::string& name, SearchStyle style = RECURSIVE_ACTIVE) const;
190 
201  template<typename T>
202  void filterItems(
203  T& values,
204  std::function<bool(typename T::value_type)> test,
205  bool activeChildren = true);
206 
207  IntItemPtr findInt(const std::string& name);
208  ConstIntItemPtr findInt(const std::string& name) const;
209 
210  DoubleItemPtr findDouble(const std::string& name);
211  ConstDoubleItemPtr findDouble(const std::string& name) const;
212 
213  StringItemPtr findString(const std::string& name);
214  ConstStringItemPtr findString(const std::string& name) const;
215 
216  FileItemPtr findFile(const std::string& name);
217  ConstFileItemPtr findFile(const std::string& name) const;
218 
219  DirectoryItemPtr findDirectory(const std::string& name);
220  ConstDirectoryItemPtr findDirectory(const std::string& name) const;
221 
222  GroupItemPtr findGroup(const std::string& name);
223  ConstGroupItemPtr findGroup(const std::string& name) const;
224 
225  ModelEntityItemPtr findModelEntity(const std::string& name);
226  ConstModelEntityItemPtr findModelEntity(const std::string& name) const;
227 
228  VoidItemPtr findVoid(const std::string& name);
229  ConstVoidItemPtr findVoid(const std::string& name) const;
230 
231  DateTimeItemPtr findDateTime(const std::string& name);
232  ConstDateTimeItemPtr findDateTime(const std::string& name) const;
233 
234  ReferenceItemPtr findReference(const std::string& name);
235  ConstReferenceItemPtr findReference(const std::string& name) const;
236  template<typename T>
237  T entityRefsAs(const std::string& name) const;
238 
239  ResourceItemPtr findResource(const std::string& name);
240  ConstResourceItemPtr findResource(const std::string& name) const;
241 
242  ComponentItemPtr findComponent(const std::string& name);
243  ConstComponentItemPtr findComponent(const std::string& name) const;
244 
245  ConstReferenceItemPtr associatedObjects() const { return m_associatedObjects; }
246  ReferenceItemPtr associatedObjects() { return m_associatedObjects; }
247 
248  bool isObjectAssociated(const smtk::common::UUID& uid) const;
249  bool isObjectAssociated(const smtk::resource::PersistentObjectPtr& componentPtr) const;
250 
251  bool canBeAssociated(const smtk::resource::PersistentObjectPtr& obj) const;
252  bool canBeDisassociated(const smtk::resource::PersistentObjectPtr& obj, AttributePtr& probAtt)
253  const;
254  ConstReferenceItemPtr associations() const { return m_associatedObjects; }
255  ReferenceItemPtr associations() { return m_associatedObjects; }
256 
257  bool isEntityAssociated(const smtk::common::UUID& entity) const;
258  bool isEntityAssociated(const smtk::model::EntityRef& entityref) const;
259 
260  smtk::common::UUIDs associatedModelEntityIds() const;
261  template<typename T>
262  T associatedModelEntities() const;
263 
264  template<typename T>
265  T associatedObjects() const;
266 
267  bool associate(smtk::resource::PersistentObjectPtr obj);
268  bool associateEntity(const smtk::common::UUID& entity);
269  bool associateEntity(const smtk::model::EntityRef& entity);
270 
271  void disassociateEntity(const smtk::common::UUID& entity, bool reverse = true);
272  void disassociateEntity(const smtk::model::EntityRef& entity, bool reverse = true);
275  bool
276  disassociate(smtk::resource::PersistentObjectPtr obj, AttributePtr& probAtt, bool reverse = true);
278  bool disassociate(smtk::resource::PersistentObjectPtr obj, bool reverse = true);
279 
292  void detachItemsFromOwningResource();
293 
305  bool removeAllAssociations(bool partialRemovalOk = false);
306 
313  bool removeExpungedEntities(const smtk::model::EntityRefs& expungedEnts);
314 
315  // These methods only applies to Attributes whose
316  // definition returns true for isNodal()
317  bool appliesToBoundaryNodes() const { return m_appliesToBoundaryNodes; }
318  void setAppliesToBoundaryNodes(bool appliesValue) { m_appliesToBoundaryNodes = appliesValue; }
319  bool appliesToInteriorNodes() const { return m_appliesToInteriorNodes; }
320  void setAppliesToInteriorNodes(bool appliesValue) { m_appliesToInteriorNodes = appliesValue; }
321 
324  const smtk::attribute::Categories& categories() const;
325 
326  bool isValid(bool useActiveCategories = true) const;
327  bool isValid(const std::set<std::string>& categories) const;
328 
336  bool isRelevant(
337  bool includeCategories = true,
338  bool includeReadAccess = false,
339  unsigned int readAccessLevel = 0) const;
340 
341  smtk::attribute::ResourcePtr attributeResource() const;
342  const smtk::resource::ResourcePtr resource() const override;
343 
344  void setUserData(const std::string& key, smtk::simulation::UserDataPtr value)
345  {
346  m_userData[key] = value;
347  }
348  smtk::simulation::UserDataPtr userData(const std::string& key) const;
349  void clearUserData(const std::string& key) { m_userData.erase(key); }
350  void clearAllUserData() { m_userData.clear(); }
351 
352  bool isAboutToBeDeleted() const { return m_aboutToBeDeleted; }
353 
354  const common::UUID& id() const override { return m_id; }
355  bool setId(const common::UUID& uid) override
356  {
357  m_id = uid;
358  return true;
359  }
360 
361  // These methods are use primarily by I/O operations. The include ID corresponds to
362  // the include directory information store in the attribute resource and is used
363  // when writing out the resource to use include files
364  void setIncludeIndex(std::size_t index) { m_includeIndex = index; }
365 
366  std::size_t includeIndex() const { return m_includeIndex; }
367 
368  // Returns true if an Evaluator can be created for this Attribute. Does not
369  // indicate that evaluation would be successful if attempted. Use
370  // doesEvaluate() for that information.
371  bool canEvaluate() const;
372 
373  // If an Evaluator can be created for this Attribute, returns the result of
374  // Evaluator::doesEvaluate(). Returns false if no Evaluator can be created.
375  bool doesEvalaute() const;
376 
377  // Returns an Evaluator for this Attribute if this Attribute's Definition is
378  // registered with an Evaluator, else returns nullptr.
379  std::unique_ptr<smtk::attribute::Evaluator> createEvaluator() const;
380 
382  {
383  public:
384  GuardedLinks(std::mutex& mutex, const smtk::resource::Component::Links& links)
385  : m_guard(mutex)
386  , m_links(links)
387  {
388  }
389 
390  const smtk::resource::Component::Links* operator->() const { return &m_links; }
391 
393  {
394  return const_cast<smtk::resource::Component::Links*>(&m_links);
395  }
396 
397  private:
398  std::unique_lock<std::mutex> m_guard;
399  const smtk::resource::Component::Links& m_links;
400  };
401 
402  // Attributes are uniquely used outside of an operation context, where they
403  // are not guarded from concurrency issues. Specifically, ReferenceItems use
404  // ResourceLinks to store references to other resources, and the
405  // Resource::Links and Component::Links API is not thread-safe. This API
406  // ensures thread safety when manipulating smtk::attribute::(Resource,Attribute
407  // Links.
408  const GuardedLinks guardedLinks() const;
409  GuardedLinks guardedLinks();
410 
411 protected:
412  Attribute(
413  const std::string& myName,
414  const smtk::attribute::DefinitionPtr& myDefinition,
415  const smtk::common::UUID& myId);
416  Attribute(const std::string& myName, const smtk::attribute::DefinitionPtr& myDefinition);
417 
419  void build();
420 
421  void removeAllItems();
425  void forceDisassociate(smtk::resource::PersistentObjectPtr);
426  void addItem(smtk::attribute::ItemPtr& iPtr) { m_items.push_back(iPtr); }
427  void setName(const std::string& newname) { m_name = newname; }
428 
429  std::string m_name;
430  std::vector<smtk::attribute::ItemPtr> m_items;
431  ReferenceItemPtr m_associatedObjects;
432  smtk::attribute::DefinitionPtr m_definition;
433  bool m_appliesToBoundaryNodes;
434  bool m_appliesToInteriorNodes;
435  bool m_isColorSet;
436  std::map<std::string, smtk::simulation::UserDataPtr> m_userData;
437  // We need something to indicate that the attribute is in process of
438  // being deleted - this is used skip certain clean up steps that
439  // would need to be done otherwise
440  bool m_aboutToBeDeleted;
441  double m_color[4];
442  smtk::common::UUID m_id;
443  std::size_t m_includeIndex;
444  bool m_hasLocalAdvanceLevelInfo[2];
445  unsigned int m_localAdvanceLevel[2];
446 };
447 
448 inline smtk::simulation::UserDataPtr Attribute::userData(const std::string& key) const
449 {
450  std::map<std::string, smtk::simulation::UserDataPtr>::const_iterator it = m_userData.find(key);
451  return ((it == m_userData.end()) ? smtk::simulation::UserDataPtr() : it->second);
452 }
453 
454 inline void Attribute::setColor(double r, double g, double b, double a)
455 {
456  m_isColorSet = true;
457  m_color[0] = r;
458  m_color[1] = g;
459  m_color[2] = b;
460  m_color[3] = a;
461 }
462 
463 template<typename T>
464 T Attribute::entityRefsAs(const std::string& iname) const
465 {
466  T result;
467  ConstReferenceItemPtr itm = this->findReference(iname);
468  if (!itm)
469  {
470  return result;
471  }
472 
473  for (auto it = itm->begin(); it != itm->end(); ++it)
474  {
475  if (!it.isSet())
476  {
477  continue;
478  }
479 
480  typename T::value_type entry = std::dynamic_pointer_cast<smtk::model::Entity>(*it);
481  if (entry.isValid())
482  {
483  result.insert(result.end(), entry);
484  }
485  }
486  return result;
487 }
488 
489 template<typename T>
490 T Attribute::associatedObjects() const
491 {
492  T result;
493  if (!m_associatedObjects)
494  {
495  return result;
496  }
497 
498  for (auto it = m_associatedObjects->begin(); it != m_associatedObjects->end(); ++it)
499  {
500  if (!it.isSet())
501  {
502  continue;
503  }
504 
505  auto entry = std::dynamic_pointer_cast<typename T::value_type::element_type>(*it);
506  if (entry)
507  {
508  result.insert(result.end(), entry);
509  }
510  }
511  return result;
512 }
513 
514 template<typename T>
516 {
517  T result;
518  if (!m_associatedObjects)
519  {
520  return result;
521  }
522 
523  for (auto it = m_associatedObjects->begin(); it != m_associatedObjects->end(); ++it)
524  {
525  if (!it.isSet())
526  {
527  continue;
528  }
529 
530  typename T::value_type entry = std::dynamic_pointer_cast<smtk::model::Entity>(*it);
531  if (entry.isValid())
532  {
533  result.insert(result.end(), entry);
534  }
535  }
536  return result;
537 }
538 
541 template<typename T>
542 typename T::Ptr
543 Attribute::itemAtPathAs(const std::string& path, const std::string& seps, bool activeOnly)
544 {
545  return smtk::dynamic_pointer_cast<T>(this->itemAtPath(path, seps, activeOnly));
546 }
547 
548 template<typename T>
549 typename T::ConstPtr
550 Attribute::itemAtPathAs(const std::string& path, const std::string& seps, bool activeOnly) const
551 {
552  return smtk::dynamic_pointer_cast<const T>(this->itemAtPath(path, seps, activeOnly));
553 }
554 
555 template<typename T>
556 typename T::Ptr Attribute::findAs(const std::string& iname, SearchStyle style)
557 {
558  return smtk::dynamic_pointer_cast<T>(this->find(iname, style));
559 }
560 
561 template<typename T>
562 typename T::ConstPtr Attribute::findAs(const std::string& iname, SearchStyle style) const
563 {
564  return smtk::dynamic_pointer_cast<const T>(this->find(iname, style));
565 }
566 
567 template<typename T>
569  T& filtered,
570  std::function<bool(typename T::value_type)> test,
571  bool activeChildren)
572 {
573  // Given an item, this lambda function which would recursively visit all children and apply test function
574  std::function<void(ItemPtr, bool)> visitor =
575  [&filtered, test, &visitor](smtk::attribute::ItemPtr item, bool activeChildrenLocal) {
576  typename T::value_type testItem =
577  smtk::dynamic_pointer_cast<typename T::value_type::element_type>(item);
578  // base condition
579  if (testItem && test(testItem))
580  {
581  filtered.insert(filtered.end(), testItem);
582  }
583  // Only items which have children would have a non-empty visitChildren method
584  item->visitChildren(visitor, activeChildrenLocal);
585  };
586 
587  for (std::size_t index = 0; index < this->numberOfItems(); ++index)
588  {
589  visitor(this->item(static_cast<int>(index)), activeChildren);
590  }
591 }
592 
593 } // namespace attribute
594 } // namespace smtk
595 
596 #endif /* smtk_attribute_Attribute_h */
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::attribute::Attribute::itemAtPath
smtk::attribute::ConstItemPtr itemAtPath(const std::string &path, const std::string &seps="/", bool activeOnly=false) const
Find an item via its path with respects to the attribute.
Definition: Attribute.cxx:192
PublicPointerDefs.h
smtk::attribute::Definition
Definition: Definition.h:45
smtk::attribute::DefinitionPtr
smtk::shared_ptr< smtk::attribute::Definition > DefinitionPtr
Definition: PublicPointerDefs.h:450
smtk::attribute::SearchStyle
SearchStyle
How should searches for items be conducted?
Definition: SearchStyle.h:24
smtk::attribute::FileItemPtr
smtk::shared_ptr< smtk::attribute::FileItem > FileItemPtr
Definition: PublicPointerDefs.h:499
smtk::attribute::ConstComponentItemPtr
smtk::shared_ptr< const smtk::attribute::ComponentItem > ConstComponentItemPtr
Definition: PublicPointerDefs.h:594
smtk::simulation::UserDataPtr
smtk::shared_ptr< smtk::simulation::UserData > UserDataPtr
Definition: PublicPointerDefs.h:671
smtk::common::UUIDs
std::set< smtk::common::UUID > UUIDs
Definition: PublicPointerDefs.h:31
smtk::attribute::ConstModelEntityItemPtr
smtk::shared_ptr< const smtk::attribute::ModelEntityItem > ConstModelEntityItemPtr
Definition: PublicPointerDefs.h:579
smtk::attribute::ComponentItemPtr
smtk::shared_ptr< smtk::attribute::ComponentItem > ComponentItemPtr
Definition: PublicPointerDefs.h:539
smtk::attribute::ConstGroupItemPtr
smtk::shared_ptr< const smtk::attribute::GroupItem > ConstGroupItemPtr
Definition: PublicPointerDefs.h:567
smtk::common::UUID
Definition: UUID.h:38
smtk::attribute::GroupItemPtr
smtk::shared_ptr< smtk::attribute::GroupItem > GroupItemPtr
Definition: PublicPointerDefs.h:507
smtk::attribute::Attribute::find
smtk::attribute::ItemPtr find(const std::string &name, SearchStyle style=RECURSIVE_ACTIVE)
Return the item with the given inName, searching in the given style.
Definition: Attribute.cxx:909
smtk::attribute::StringItemPtr
smtk::shared_ptr< smtk::attribute::StringItem > StringItemPtr
Definition: PublicPointerDefs.h:516
smtk::attribute::ConstResourceItemPtr
smtk::shared_ptr< const smtk::attribute::ResourceItem > ConstResourceItemPtr
Definition: PublicPointerDefs.h:589
smtk::attribute::ResourceItemPtr
smtk::shared_ptr< smtk::attribute::ResourceItem > ResourceItemPtr
Definition: PublicPointerDefs.h:535
smtk::attribute::ConstStringItemPtr
smtk::shared_ptr< const smtk::attribute::StringItem > ConstStringItemPtr
Definition: PublicPointerDefs.h:575
smtk::attribute::Attribute::filterItems
void filterItems(T &values, std::function< bool(typename T::value_type)> test, bool activeChildren=true)
Given a container, filter items in the attribute by a lambda function.
Definition: Attribute.h:568
smtk::attribute::Attribute::id
const common::UUID & id() const override
Return a unique identifier for the object which will be persistent across sessions.
Definition: Attribute.h:354
smtk::attribute::ConstReferenceItemPtr
smtk::shared_ptr< const smtk::attribute::ReferenceItem > ConstReferenceItemPtr
Definition: PublicPointerDefs.h:584
smtkTypeMacro
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:51
smtk::attribute::IntItemPtr
smtk::shared_ptr< smtk::attribute::IntItem > IntItemPtr
Definition: PublicPointerDefs.h:512
smtk::attribute::DirectoryItemPtr
smtk::shared_ptr< smtk::attribute::DirectoryItem > DirectoryItemPtr
Definition: PublicPointerDefs.h:491
smtk::attribute::AttributePtr
smtk::shared_ptr< smtk::attribute::Attribute > AttributePtr
Definition: PublicPointerDefs.h:456
smtk::attribute::ConstDateTimeItemPtr
smtk::shared_ptr< const smtk::attribute::DateTimeItem > ConstDateTimeItemPtr
Definition: PublicPointerDefs.h:544
smtk::attribute::Attribute::setId
bool setId(const common::UUID &uid) override
Assign an ID to this object (used by readers; not for arbitrary reuse).
Definition: Attribute.h:355
smtk::attribute::RECURSIVE_ACTIVE
@ RECURSIVE_ACTIVE
Recursively search for an active item.
Definition: SearchStyle.h:32
smtk::attribute::ReferenceItemPtr
smtk::shared_ptr< smtk::attribute::ReferenceItem > ReferenceItemPtr
Definition: PublicPointerDefs.h:531
smtk::attribute::ModelEntityItemPtr
smtk::shared_ptr< smtk::attribute::ModelEntityItem > ModelEntityItemPtr
Definition: PublicPointerDefs.h:520
smtk::attribute::ConstItemPtr
smtk::shared_ptr< const smtk::attribute::Item > ConstItemPtr
Definition: PublicPointerDefs.h:469
smtk::attribute::VoidItemPtr
smtk::shared_ptr< smtk::attribute::VoidItem > VoidItemPtr
Definition: PublicPointerDefs.h:527
smtk::attribute::Resource
Store information about attribute definitions and instances.
Definition: Resource.h:67
smtk::attribute::DateTimeItemPtr
smtk::shared_ptr< smtk::attribute::DateTimeItem > DateTimeItemPtr
Definition: PublicPointerDefs.h:487
smtk::attribute::Attribute
Represent a (possibly composite) value according to a definition.
Definition: Attribute.h:43
smtk::attribute::Attribute::itemAtPathAs
T::ConstPtr itemAtPathAs(const std::string &path, const std::string &seps="/", bool activeOnly=false) const
Find an item via its path with respects to the attribute.
Definition: Attribute.h:550
smtk::attribute::Categories
Represents the category constraints associated with an Attribute, Attribute Definition,...
Definition: Categories.h:34
smtk::attribute::Attribute::associatedModelEntities
T associatedModelEntities() const
Return a container of associated entityref-subclass instances.
Definition: Attribute.h:515
smtk::attribute::ConstDoubleItemPtr
smtk::shared_ptr< const smtk::attribute::DoubleItem > ConstDoubleItemPtr
Definition: PublicPointerDefs.h:554
smtk::attribute::DoubleItemPtr
smtk::shared_ptr< smtk::attribute::DoubleItem > DoubleItemPtr
Definition: PublicPointerDefs.h:495
smtk::resource::Component
Component is the base class for records stored in an smtk::resource::Resource.
Definition: Component.h:43
smtk::resource::PersistentObjectPtr
smtk::shared_ptr< smtk::resource::PersistentObject > PersistentObjectPtr
Definition: PublicPointerDefs.h:285
smtk::attribute::Attribute::name
std::string name() const override
Return the name of the object - by default it will return the UUID but that can be overridden.
Definition: Attribute.h:105
smtk::attribute::ConstFileItemPtr
smtk::shared_ptr< const smtk::attribute::FileItem > ConstFileItemPtr
Definition: PublicPointerDefs.h:558
smtk::attribute::ItemPtr
smtk::shared_ptr< smtk::attribute::Item > ItemPtr
Definition: PublicPointerDefs.h:467
smtk::attribute::ConstIntItemPtr
smtk::shared_ptr< const smtk::attribute::IntItem > ConstIntItemPtr
Definition: PublicPointerDefs.h:571
smtk::attribute::ConstVoidItemPtr
smtk::shared_ptr< const smtk::attribute::VoidItem > ConstVoidItemPtr
Definition: PublicPointerDefs.h:599
smtk::attribute::Attribute::CompareByName
Definition: Attribute.h:50
smtk::attribute::WeakAttributePtr
smtk::weak_ptr< smtk::attribute::Attribute > WeakAttributePtr
Definition: PublicPointerDefs.h:460
smtk::model::EntityRefs
std::set< smtk::model::EntityRef > EntityRefs
Definition: PublicPointerDefs.h:162
smtk::model::EntityRef
A lightweight entityref pointing to a model entity's resource.
Definition: EntityRef.h:112
smtk::attribute::ConstDirectoryItemPtr
smtk::shared_ptr< const smtk::attribute::DirectoryItem > ConstDirectoryItemPtr
Definition: PublicPointerDefs.h:549
smtk::attribute::ResourcePtr
smtk::shared_ptr< smtk::attribute::Resource > ResourcePtr
Definition: PublicPointerDefs.h:604
smtk::resource::ResourcePtr
smtk::shared_ptr< smtk::resource::Resource > ResourcePtr
Definition: PublicPointerDefs.h:295