SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Resource.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 
11 #ifndef smtk_attribute_Resource_h
12 #define smtk_attribute_Resource_h
13 
14 #include "smtk/common/Factory.h"
15 #include "smtk/common/UUID.h"
16 
17 #include "smtk/geometry/Resource.h"
18 
19 #include "smtk/resource/Component.h"
20 #include "smtk/resource/DerivedFrom.h"
21 #include "smtk/resource/Links.h"
22 
23 #include "smtk/CoreExports.h"
24 #include "smtk/PublicPointerDefs.h"
25 #include "smtk/attribute/Analyses.h"
26 #include "smtk/attribute/AssociationRules.h"
27 #include "smtk/attribute/Attribute.h"
28 #include "smtk/attribute/CopyAssignmentOptions.h"
29 #include "smtk/attribute/Definition.h"
30 #include "smtk/attribute/DirectoryInfo.h"
31 #include "smtk/attribute/Evaluator.h"
32 #include "smtk/attribute/EvaluatorFactory.h"
33 #include "smtk/attribute/Item.h"
34 #include "smtk/attribute/ItemDefinition.h"
35 #include "smtk/attribute/SymbolDependencyStorage.h"
36 
37 #include "smtk/attribute/filter/GrammarInfo.h"
38 
39 #include "smtk/string/Token.h"
40 
41 #include "smtk/view/Configuration.h"
42 
43 #include <map>
44 #include <mutex>
45 #include <set>
46 #include <string>
47 #include <vector>
48 
49 namespace smtk
50 {
51 
52 namespace io
53 {
54 class Logger;
55 };
56 
57 namespace attribute
58 {
59 class Attribute;
60 class Definition;
61 
62 typedef smtk::common::Factory<ItemDefinition, std::string> CustomItemDefinitionFactory;
63 
78 class SMTKCORE_EXPORT Resource
79  : public smtk::resource::DerivedFrom<Resource, smtk::geometry::Resource>
80 {
81 public:
85 
86  // typedef referring to the parent resource.
88 
91  static constexpr smtk::resource::Links::RoleType AssociationRole = -1;
92  static constexpr smtk::resource::Links::RoleType associationRole()
93  {
95  }
96 
99  static constexpr smtk::resource::Links::RoleType ReferenceRole = -2;
100  static constexpr smtk::resource::Links::RoleType referenceRole()
101  {
103  }
104 
105  ~Resource() override;
106 
107  bool setUnitsSystem(const shared_ptr<units::System>& unitsSystem) override;
108 
109  smtk::attribute::DefinitionPtr createDefinition(
110  const std::string& typeName,
111  const std::string& baseTypeName = "",
113 
114  smtk::attribute::DefinitionPtr createDefinition(
115  const std::string& name,
116  attribute::DefinitionPtr baseDefiniiton,
118 
119  // Description:
120  // For simplicity, only Definitions without any children can be currently
121  // removed (external nodes).
122  bool removeDefinition(smtk::attribute::DefinitionPtr def);
123 
124  // Description:
125  // Provide a way to mark a resource enabled/disabled
126  // so that we can hide it in certain contexts
127  void setIsPrivate(bool isPrivateValue) { m_isPrivate = isPrivateValue; }
128  bool isPrivate() const { return m_isPrivate; };
129 
132  const std::string& defaultNameSeparator() const;
135  void resetDefaultNameSeparator();
138  bool setDefaultNameSeparator(const std::string& separator);
139 
141  smtk::attribute::AttributePtr createAttribute(const std::string& type);
142  smtk::attribute::AttributePtr createAttribute(
143  const std::string& name,
144  const std::string& type,
146  smtk::attribute::AttributePtr createAttribute(
147  const std::string& name,
150 
151  bool removeAttribute(smtk::attribute::AttributePtr att);
152  smtk::attribute::AttributePtr findAttribute(const std::string& name) const;
153  smtk::attribute::AttributePtr findAttribute(const smtk::common::UUID& id) const;
154  smtk::attribute::AttributePtr findAttribute(
155  const smtk::resource::ComponentPtr& comp,
156  const smtk::resource::Links::RoleType& role) const;
157 
158  void addUniqueRoles(const std::set<smtk::resource::Links::RoleType>& roles);
159  void addUniqueRole(const smtk::resource::Links::RoleType& role);
160  const std::set<smtk::resource::Links::RoleType>& uniqueRoles() const;
161  bool isRoleUnique(const smtk::resource::Links::RoleType& role) const;
162 
163  // given a resource component's UUID, return the resource component.
164  smtk::resource::ComponentPtr find(const smtk::common::UUID& id) const override;
165 
179  std::function<bool(const smtk::resource::Component&)> queryOperation(
180  const std::string&) const override;
181  static filter::GrammarInfo extractGrammarInfo(const std::string& s);
183  static std::string createAttributeQuery(const smtk::attribute::DefinitionPtr& def);
184  static std::string createAttributeQuery(const std::string& defType);
185  // visit all components in the resource.
186  void visit(smtk::resource::Component::Visitor&) const override;
187 
188  void findAttributes(const std::string& type, std::vector<smtk::attribute::AttributePtr>& result)
189  const;
190  std::vector<smtk::attribute::AttributePtr> findAttributes(const std::string& type) const;
191  void findAttributes(
193  std::vector<smtk::attribute::AttributePtr>& result) const;
194 
195  smtk::attribute::DefinitionPtr findDefinition(const std::string& type) const;
196  smtk::attribute::DefinitionPtr findDefinition(const smtk::common::UUID& id) const;
197 
199  bool hasDefinition(const std::string& type) const;
200 
201  // Return a list of definitions that are not derived from another definition
202  void findBaseDefinitions(std::vector<smtk::attribute::DefinitionPtr>& result) const;
203 
204  void derivedDefinitions(
206  std::vector<smtk::attribute::DefinitionPtr>& result) const;
207 
208  void findAllDerivedDefinitions(
210  bool concreteOnly,
211  std::vector<smtk::attribute::DefinitionPtr>& result) const;
212 
213  void findDefinitionAttributes(
214  const std::string& type,
215  std::vector<smtk::attribute::AttributePtr>& result) const;
216  void findDefinitions(unsigned long mask, std::vector<smtk::attribute::DefinitionPtr>& result)
217  const;
218 
219  smtk::attribute::ConstDefinitionPtr findIsUniqueBaseClass(
221 
222  bool rename(AttributePtr att, const std::string& newName);
223 
232  bool resetId(AttributePtr att, const smtk::common::UUID& newId);
233 
234  // Access Analysis Information
235  smtk::attribute::Analyses& analyses() { return m_analyses; }
236 
237  std::size_t numberOfAdvanceLevels() const { return m_advLevels.size(); }
238  void addAdvanceLevel(int level, std::string label, const double* l_color = nullptr);
239  const std::map<int, std::string>& advanceLevels() const { return m_advLevels; }
240  // the color is expected in the format of double[4] - rgba
241  const double* advanceLevelColor(int level) const;
242  void setAdvanceLevelColor(int level, const double* l_color);
243 
244  std::string createUniqueName(const std::string& type) const;
245 
246  void finalizeDefinitions();
247 
253  std::size_t numberOfCategories() const { return m_categories.size(); }
254  const std::set<std::string>& categories() const { return m_categories; }
256 
262  void setActiveCategoriesEnabled(bool mode);
263  bool activeCategoriesEnabled() const { return m_activeCategoriesEnabled; }
264  void setActiveCategories(const std::set<std::string>& cats);
265  const std::set<std::string>& activeCategories() const { return m_activeCategories; }
267 
268  bool passActiveCategoryCheck(const smtk::attribute::Categories::Expression& cats) const;
269  bool passActiveCategoryCheck(const smtk::attribute::Categories& cats) const;
270 
271  void addView(smtk::view::ConfigurationPtr);
272  smtk::view::ConfigurationPtr findView(const std::string& name) const;
273  smtk::view::ConfigurationPtr findViewByType(const std::string& vtype) const;
274  smtk::view::ConfigurationPtr findTopLevelView() const;
275  std::vector<smtk::view::ConfigurationPtr> findTopLevelViews() const;
276  const std::map<std::string, smtk::view::ConfigurationPtr>& views() const { return m_views; }
277 
283  void addStyle(const std::string& definitionType, smtk::view::Configuration::Component style);
284  const smtk::view::Configuration::Component& findStyle(
286  const std::string& styleName = "") const;
287  const std::map<std::string, smtk::view::Configuration::Component>& findStyles(
288  const smtk::attribute::DefinitionPtr& def) const;
289  const std::map<std::string, std::map<std::string, smtk::view::Configuration::Component>>& styles()
290  const
291  {
292  return m_styles;
293  }
295 
297  smtk::resource::ResourceSet associations() const;
298 
301  bool associate(const smtk::resource::ResourcePtr& resource);
302 
305  bool disassociate(const smtk::resource::ResourcePtr& resource);
306 
308  bool hasAssociations() const;
309 
310  // Return the attributes that are associated on a PersistentObject
311  std::set<AttributePtr> attributes(const smtk::resource::ConstPersistentObjectPtr& object) const;
312 
313  // true if the PersistentObject has attributes associated with it
314  bool hasAttributes(const smtk::resource::ConstPersistentObjectPtr& object) const;
315 
316  bool hasAttributes() const { return !m_attributes.empty(); }
317 
318  void disassociateAllAttributes(const smtk::resource::PersistentObjectPtr& object);
319 
320  // When a definition's items has changed use this method to update derived def
321  // item offsets which is used by the find item method
322  void updateDerivedDefinitionIndexOffsets(smtk::attribute::DefinitionPtr def);
323 
324  // Copies definition from another Resource
325  smtk::attribute::DefinitionPtr copyDefinition(
327  unsigned int options = 0);
328 
339  smtk::attribute::AttributePtr copyAttribute(
341  const CopyAssignmentOptions& options,
342  smtk::io::Logger& logger);
343 
344  smtk::attribute::AttributePtr copyAttribute(
346  const CopyAssignmentOptions& options = CopyAssignmentOptions());
348 
349  //Get a list of all definitions in the Resource
350  void definitions(std::vector<smtk::attribute::DefinitionPtr>& result, bool sortList = false)
351  const;
352  //Get a list of all attributes in the Resource
353  void attributes(std::vector<smtk::attribute::AttributePtr>& result) const;
354 
355  smtk::attribute::EvaluatorFactory& evaluatorFactory() { return m_evaluatorFactory; }
356 
357  const smtk::attribute::EvaluatorFactory& evaluatorFactory() const { return m_evaluatorFactory; }
358 
359  bool canEvaluate(smtk::attribute::ConstAttributePtr att)
360  {
361  return !!m_evaluatorFactory.createEvaluator(att);
362  }
363 
364  std::unique_ptr<smtk::attribute::Evaluator> createEvaluator(
366  {
367  return m_evaluatorFactory.createEvaluator(att);
368  }
369 
370  smtk::attribute::SymbolDependencyStorage& symbolDependencyStorage()
371  {
372  return queries().cache<smtk::attribute::SymbolDependencyStorage>();
373  }
374 
375  // Set/Get the directory structure of the resource on disk
376  void setDirectoryInfo(const DirectoryInfo& dinfo) { m_directoryInfo = dinfo; }
377  const DirectoryInfo& directoryInfo() const { return m_directoryInfo; }
378 
379  // Access the factory for generating custom item defnitions
380  CustomItemDefinitionFactory& customItemDefinitionFactory()
381  {
382  return m_customItemDefinitionFactory;
383  }
384  const CustomItemDefinitionFactory& customItemDefinitionFactory() const
385  {
386  return m_customItemDefinitionFactory;
387  }
388 
389  AssociationRules& associationRules() { return m_associationRules; }
390  const AssociationRules& associationRules() const { return m_associationRules; }
391 
393  {
394  public:
395  GuardedLinks(std::mutex& mutex, const smtk::resource::Resource::Links& links)
396  : m_guard(mutex)
397  , m_links(links)
398  {
399  }
400 
401  const smtk::resource::Resource::Links* operator->() const { return &m_links; }
402 
403  smtk::resource::Resource::Links* operator->()
404  {
405  return const_cast<smtk::resource::Resource::Links*>(&m_links);
406  }
407 
408  private:
409  std::unique_lock<std::mutex> m_guard;
410  const smtk::resource::Resource::Links& m_links;
411  };
412 
413  // Attributes are uniquely used outside of an operation context, where they
414  // are not guarded from concurrency issues. Specifically, ReferenceItems use
415  // ResourceLinks to store references to other resources, and the
416  // Resource::Links and Component::Links API is not thread-safe. This API
417  // ensures thread safety when manipulating smtk::attribute::(Resource,Attribute
418  // Links.
419  const GuardedLinks guardedLinks() const;
420  GuardedLinks guardedLinks();
421 
422  std::mutex& mutex() const { return m_mutex; }
423 
428  bool setTemplateType(const smtk::string::Token& templateType) override;
429  smtk::string::Token templateType() const override { return m_templateType; }
430 
437  bool setTemplateVersion(std::size_t templateVersion) override;
438  std::size_t templateVersion() const override { return m_templateVersion; }
439 
445  std::shared_ptr<smtk::resource::Resource> clone(
446  smtk::resource::CopyOptions& options) const override;
447 
458 
459  bool copyInitialize(
460  const std::shared_ptr<const smtk::resource::Resource>& other,
461  smtk::resource::CopyOptions& options) override;
462 
473  bool copyFinalize(
474  const std::shared_ptr<const smtk::resource::Resource>& source,
475  smtk::resource::CopyOptions& options) override;
476 
479  void copyViews(
480  const std::shared_ptr<const smtk::attribute::Resource>& source,
481  smtk::resource::CopyOptions& options);
486  void updateViewComponentIdAttributes(
488  smtk::resource::CopyOptions& options);
489 
490 protected:
492  Resource(smtk::resource::ManagerPtr manager = nullptr);
493  void internalFindAllDerivedDefinitions(
495  bool onlyConcrete,
496  std::vector<smtk::attribute::DefinitionPtr>& result) const;
497  void internalFindAttributes(
499  std::vector<smtk::attribute::AttributePtr>& result) const;
500  bool copyDefinitionImpl(
503 
504  std::map<std::string, smtk::attribute::DefinitionPtr> m_definitions;
505  std::map<std::string, std::set<smtk::attribute::AttributePtr, Attribute::CompareByName>>
506  m_attributeClusters;
507  std::map<std::string, smtk::attribute::AttributePtr> m_attributes;
508  std::map<smtk::common::UUID, smtk::attribute::AttributePtr> m_attributeIdMap;
509  std::map<smtk::common::UUID, smtk::attribute::DefinitionPtr> m_definitionIdMap;
510 
511  std::map<
513  std::set<smtk::attribute::WeakDefinitionPtr, Definition::WeakDefinitionPtrCompare>>
514  m_derivedDefInfo;
515  std::set<std::string> m_categories;
516  std::set<std::string> m_activeCategories;
517  bool m_activeCategoriesEnabled = false;
518  smtk::attribute::Analyses m_analyses;
519  std::map<std::string, smtk::view::ConfigurationPtr> m_views;
520  std::map<std::string, std::map<std::string, smtk::view::Configuration::Component>> m_styles;
521 
522  // Advance levels, <int-level, <string-label, color[4]>
523  // higher level means more advanced.
524  std::map<int, std::string> m_advLevels;
525  std::map<int, std::vector<double>> m_advLevelColors;
526  DirectoryInfo m_directoryInfo;
527  std::set<smtk::resource::Links::RoleType> m_roles;
528 
529  CustomItemDefinitionFactory m_customItemDefinitionFactory;
530 
531  AssociationRules m_associationRules;
532 
533  bool m_isPrivate = false;
534 
535  EvaluatorFactory m_evaluatorFactory;
536 
537  std::string m_defaultAttNameSeparator = "-";
538 
539  smtk::string::Token m_templateType;
540  std::size_t m_templateVersion = 0;
541 
542 private:
543  mutable std::mutex m_mutex;
544 };
545 
546 inline smtk::view::ConfigurationPtr Resource::findView(const std::string& name) const
547 {
548  std::map<std::string, smtk::view::ConfigurationPtr>::const_iterator it;
549  it = m_views.find(name);
550  return (it == m_views.end()) ? smtk::view::ConfigurationPtr() : it->second;
551 }
552 
553 inline smtk::attribute::AttributePtr Resource::findAttribute(const std::string& name) const
554 {
555  std::map<std::string, AttributePtr>::const_iterator it;
556  it = m_attributes.find(name);
557  return (it == m_attributes.end()) ? smtk::attribute::AttributePtr() : it->second;
558 }
559 
560 inline smtk::attribute::AttributePtr Resource::findAttribute(const smtk::common::UUID& attId) const
561 {
562  std::map<smtk::common::UUID, AttributePtr>::const_iterator it;
563  it = m_attributeIdMap.find(attId);
564  return (it == m_attributeIdMap.end()) ? smtk::attribute::AttributePtr() : it->second;
565 }
566 
567 inline smtk::attribute::DefinitionPtr Resource::findDefinition(const std::string& typeName) const
568 {
569  std::map<std::string, smtk::attribute::DefinitionPtr>::const_iterator it;
570  it = m_definitions.find(typeName);
571  return (it == m_definitions.end()) ? smtk::attribute::DefinitionPtr() : it->second;
572 }
573 
574 inline smtk::attribute::DefinitionPtr Resource::findDefinition(
575  const smtk::common::UUID& defId) const
576 {
577  std::map<smtk::common::UUID, DefinitionPtr>::const_iterator it;
578  it = m_definitionIdMap.find(defId);
579  return (it == m_definitionIdMap.end()) ? smtk::attribute::DefinitionPtr() : it->second;
580 }
581 
582 inline bool Resource::hasDefinition(const std::string& typeName) const
583 {
584  auto it = m_definitions.find(typeName);
585  return (it != m_definitions.end());
586 }
587 
588 inline void Resource::findDefinitionAttributes(
589  const std::string& typeName,
590  std::vector<smtk::attribute::AttributePtr>& result) const
591 {
592  result.clear();
593  auto it = m_attributeClusters.find(typeName);
594  if (it != m_attributeClusters.end())
595  {
596  result.insert(result.end(), it->second.begin(), it->second.end());
597  }
598 }
599 
600 inline void Resource::findAttributes(
601  const std::string& type,
602  std::vector<smtk::attribute::AttributePtr>& result) const
603 {
604  result.clear();
605  smtk::attribute::DefinitionPtr def = this->findDefinition(type);
606  if (def)
607  {
608  this->internalFindAttributes(def, result);
609  }
610 }
611 
612 inline std::vector<smtk::attribute::AttributePtr> Resource::findAttributes(
613  const std::string& type) const
614 {
615  std::vector<smtk::attribute::AttributePtr> result;
616  this->findAttributes(type, result);
617  return result;
618 }
619 
620 } // namespace attribute
621 } // namespace smtk
622 
623 #endif /* smtk_attribute_Resource_h */
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
PublicPointerDefs.h
smtk::attribute::DefinitionPtr
smtk::shared_ptr< smtk::attribute::Definition > DefinitionPtr
Definition: PublicPointerDefs.h:457
smtk::resource::DerivedFrom
Derived resources are subclassed from smtk::resource::Resource.
Definition: DerivedFrom.h:32
smtk::attribute::Resource::templateVersion
std::size_t templateVersion() const override
Set/get the "type" of a resource's template.
Definition: Resource.h:438
smtk::resource::Resource::name
std::string name() const override
Set/get the user-assigned name of the resource.
Definition: Resource.cxx:204
smtk::attribute::Resource::styles
const std::map< std::string, std::map< std::string, smtk::view::Configuration::Component > > & styles() const
API for setting and accessing style information.
Definition: Resource.h:289
smtk::attribute::Analyses
Represents a set of Analyses defined within an Attribute Resource.
Definition: Analyses.h:26
smtk::attribute::Resource::activeCategoriesEnabled
bool activeCategoriesEnabled() const
API for setting and accessing Active Category information.
Definition: Resource.h:263
smtk::attribute::EvaluatorFactory
Definition: EvaluatorFactory.h:35
smtk::common::UUID
Definition: UUID.h:38
smtk::attribute::Resource::activeCategories
const std::set< std::string > & activeCategories() const
API for setting and accessing Active Category information.
Definition: Resource.h:265
smtk::resource::ConstPersistentObjectPtr
smtk::shared_ptr< const smtk::resource::PersistentObject > ConstPersistentObjectPtr
Definition: PublicPointerDefs.h:294
smtk::io::Logger
Log messages for later presentation to a user or a file.
Definition: Logger.h:94
smtk::common::UUID::null
static UUID null()
Generate a nil UUID.
Definition: UUID.cxx:78
smtk::resource::ResourceSet
std::set< smtk::resource::ResourcePtr > ResourceSet
Definition: PublicPointerDefs.h:324
smtkCreateMacro
#define smtkCreateMacro(...)
Add static create() methods to a class.
Definition: SharedFromThis.h:173
smtk::attribute::Categories::Expression
Definition: Categories.h:166
smtkSharedFromThisMacro
#define smtkSharedFromThisMacro(...)
A macro to help with derived classes whose bases enable shared_from_this().
Definition: SharedFromThis.h:250
smtk::attribute::ItemDefinition::CopyInfo
Definition: ItemDefinition.h:52
smtkTypeMacro
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:128
smtk::resource::CopyOptions
Definition: CopyOptions.h:31
smtk::attribute::AttributePtr
smtk::shared_ptr< smtk::attribute::Attribute > AttributePtr
Definition: PublicPointerDefs.h:463
smtk::common::Factory< ItemDefinition, std::string >
smtk::attribute::Resource::templateType
smtk::string::Token templateType() const override
Set/get the "type" of a resource's template.
Definition: Resource.h:429
smtk::attribute::SymbolDependencyStorage
Definition: SymbolDependencyStorage.h:30
smtk::view::ConfigurationPtr
smtk::shared_ptr< smtk::view::Configuration > ConfigurationPtr
Definition: PublicPointerDefs.h:649
smtk::attribute::Resource
Store information about attribute definitions and instances.
Definition: Resource.h:78
smtk::view::Configuration::Component
Configure one item in a view, which may contain children.
Definition: Configuration.h:32
smtk::common::typeName
std::string typeName()
Return the name of a class.
Definition: TypeName.h:289
smtk::attribute::Categories
Represents the category constraints associated with an Attribute, Attribute Definition,...
Definition: Categories.h:33
smtk::attribute::Resource::categories
const std::set< std::string > & categories() const
API for accessing Category information.
Definition: Resource.h:254
smtk::attribute::Resource::AssociationRole
static constexpr smtk::resource::Links::RoleType AssociationRole
Link from an attribute to persistent objects which manifest, exhibit, or possess the attribute.
Definition: Resource.h:91
smtk::attribute::ConstAttributePtr
smtk::shared_ptr< const smtk::attribute::Attribute > ConstAttributePtr
Definition: PublicPointerDefs.h:465
smtk::attribute::AssociationRules
A class for holding the state and encapsulating the logic behind custom association rules for an attr...
Definition: AssociationRules.h:26
smtk::string::Token
A string token identified by an integer.
Definition: Token.h:29
smtk::attribute::Resource::hasDefinition
bool hasDefinition(const std::string &type) const
Return true if the Resource has a Definition with the requested type.
Definition: Resource.h:582
smtk::attribute::Analyses::size
std::size_t size() const
Return the number of Analysis Instances.
Definition: Analyses.h:137
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:292
smtk::attribute::Resource::numberOfCategories
std::size_t numberOfCategories() const
API for accessing Category information.
Definition: Resource.h:253
smtk::resource::PersistentObject
An abstract base class for SMTK resources and their components.
Definition: PersistentObject.h:39
smtk::resource::ManagerPtr
smtk::shared_ptr< smtk::resource::Manager > ManagerPtr
Definition: PublicPointerDefs.h:288
smtk::resource::ComponentPtr
smtk::shared_ptr< smtk::resource::Component > ComponentPtr
Definition: PublicPointerDefs.h:304
smtk::attribute::Resource::ReferenceRole
static constexpr smtk::resource::Links::RoleType ReferenceRole
Link from an attribute item to persistent objects which the item contains or references.
Definition: Resource.h:99
smtk::geometry::Resource
An abstract base class for SMTK resources that provide geometry for themselves and/or their component...
Definition: Resource.h:33
smtk::resource::ResourcePtr
smtk::shared_ptr< smtk::resource::Resource > ResourcePtr
Definition: PublicPointerDefs.h:302
smtk::attribute::ConstDefinitionPtr
smtk::shared_ptr< const smtk::attribute::Definition > ConstDefinitionPtr
Definition: PublicPointerDefs.h:459