SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Group.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 #ifndef smtk_markup_Group_h
11 #define smtk_markup_Group_h
12 
13 #include "smtk/markup/Component.h"
14 
15 #include "smtk/markup/AssignedIds.h"
16 
17 namespace smtk
18 {
19 namespace markup
20 {
21 
23 class SMTKMARKUP_EXPORT Group : public smtk::markup::Component
24 {
25 public:
28 
29  template<typename... Args>
30  Group(Args&&... args)
31  : smtk::markup::Component(std::forward<Args>(args)...)
32  {
33  }
34 
35  ~Group() override;
36 
38  void initialize(const nlohmann::json& data, smtk::resource::json::Helper& helper) override;
39 
40  bool setKeys(const std::weak_ptr<smtk::markup::AssignedIds>& keys);
41  const std::weak_ptr<smtk::markup::AssignedIds>& keys() const;
42  std::weak_ptr<smtk::markup::AssignedIds>& keys();
43 
50 
51 protected:
52  std::weak_ptr<smtk::markup::AssignedIds> m_keys;
53  bool m_ownsMembers;
54 };
55 
56 } // namespace markup
57 } // namespace smtk
58 
59 #endif // smtk_markup_Group_h
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::markup::Component
Definition: Component.h:51
smtk::markup::Group
A set of components owned by this collection (i.e., held by shared pointer).
Definition: Group.h:23
smtk::graph::ArcEndpointInterface
An object that a node instance can present to access/edit its outgoing/incoming arcs.
Definition: ArcImplementation.h:45
smtkTypeMacro
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:51
smtkSuperclassMacro
#define smtkSuperclassMacro(...)
Add a typedef to the superclass of this class.
Definition: SharedFromThis.h:87