SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
ComponentLinks.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_resource_ComponentLinks_h
12 #define smtk_resource_ComponentLinks_h
13 
14 #include "smtk/CoreExports.h"
15 #include "smtk/PublicPointerDefs.h"
16 
17 #include "smtk/common/Links.h"
18 #include "smtk/common/UUID.h"
19 
20 #include "smtk/resource/Links.h"
21 
22 namespace smtk
23 {
24 namespace resource
25 {
26 class Component;
27 class Resource;
28 
29 namespace detail
30 {
31 struct SMTKCORE_EXPORT ComponentLinkBase
32 {
33  virtual ~ComponentLinkBase() = default;
34 };
35 
40 class SMTKCORE_EXPORT ComponentLinks : public Links
41 {
42 public:
43  typedef smtk::common::
44  Links<smtk::common::UUID, smtk::common::UUID, smtk::common::UUID, int, ComponentLinkBase>
45  Data;
46 
47  friend class smtk::resource::Component;
48 
49 private:
50  ComponentLinks(const Component*);
51 
52  Resource* leftHandSideResource() override;
53  const Resource* leftHandSideResource() const override;
54 
55  const smtk::common::UUID& leftHandSideComponentId() const override;
56 
57  const Component* m_component;
58 };
59 } // namespace detail
60 } // namespace resource
61 } // namespace smtk
62 
63 #endif // smtk_resource_ComponentLinks_h
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
PublicPointerDefs.h
smtk::resource::detail::ComponentLinkBase
Definition: ComponentLinks.h:31
smtk::common::UUID
Definition: UUID.h:38
smtk::resource::Resource
An abstract base class for SMTK resources.
Definition: Resource.h:60
smtk::resource::Component
Component is the base class for records stored in an smtk::resource::Resource.
Definition: Component.h:43