SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
Traits.h
Go to the documentation of this file.
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_Traits_h
11 #define smtk_markup_Traits_h
12 
14 #include "smtk/markup/Exports.h"
15 
16 #include "smtk/graph/OwnershipSemantics.h"
17 #include "smtk/markup/detail/NodeContainer.h"
18 
20 
21 #include <tuple>
22 
23 namespace smtk
24 {
25 namespace markup
26 {
27 
28 // Forward declare node types
29 class AnalyticShape;
30 class AssignedIds;
31 class Box;
32 class Collection;
33 class Comment;
34 class Component;
35 class CompositeSubset;
36 class Cone;
37 class DiscreteGeometry;
38 class ExplicitSubset;
39 class Feature;
40 class Field;
41 class Frame;
42 class Grid;
43 class Group;
44 class ImageData;
45 class ImplicitShape;
46 class Label;
47 class LabelMap;
48 class Landmark;
49 class Ontology;
50 class OntologyIdentifier;
51 class Plane;
52 class RangedSubset;
53 class References;
54 class Segmentation;
55 class SideSet;
56 class SpatialData;
57 class Sphere;
58 class Subset;
59 class SurfaceGrid;
60 class URL;
61 class UnstructuredData;
62 class VolumeGrid;
63 
64 namespace arcs
65 {
67 struct SMTKMARKUP_EXPORT GroupsToMembers
68 {
69  using FromType = Group;
70  using ToType = Component;
71  using Directed = std::true_type;
72  static constexpr graph::OwnershipSemantics semantics =
74 };
75 
77 struct SMTKMARKUP_EXPORT LabelsToSubjects
78 {
79  using FromType = Label;
80  using ToType = Component;
81  using Directed = std::true_type;
82 };
83 
85 struct SMTKMARKUP_EXPORT URLsToData
86 {
87  using FromType = URL;
88  using ToType = Component;
89  using Directed = std::true_type;
90  static constexpr std::size_t maxInDegree = 1; // Data has a single source.
91 };
92 
93 struct SMTKMARKUP_EXPORT URLsToImportedData
94 {
95  using FromType = URL;
96  using ToType = Component;
97  using Directed = std::true_type;
98 };
99 
101 struct SMTKMARKUP_EXPORT OntologyIdentifiersToIndividuals
102 {
104  using ToType = Component;
105  using Directed = std::true_type;
107  static constexpr graph::OwnershipSemantics semantics =
109 };
110 
112 struct SMTKMARKUP_EXPORT OntologyIdentifiersToSubtypes
113 {
115  using ToType = OntologyIdentifier;
116  using Directed = std::true_type;
117 };
118 
120 struct SMTKMARKUP_EXPORT OntologyToIdentifiers
121 {
122  using FromType = Ontology;
123  using ToType = OntologyIdentifier;
124  using Directed = std::true_type;
125  static constexpr std::size_t maxInDegree = 1; // Identifiers have a single parent ontology.
126 };
127 
129 struct SMTKMARKUP_EXPORT FieldsToShapes
130 {
131  using FromType = Field;
132  using ToType = SpatialData;
133  using Directed = std::true_type;
134  static constexpr std::size_t minInDegree = 1; // Fields must have a domain.
135  static constexpr std::size_t maxInDegree = 1; // Fields have a single domain (for now).
136 };
137 
140 struct SMTKMARKUP_EXPORT BoundariesToShapes
141 {
142  using FromType = SpatialData;
143  using ToType = SpatialData;
144  using Directed = std::true_type;
145  // You cannot delete a boundary without also deleting the things it bounds:
146  static constexpr graph::OwnershipSemantics semantics =
148 };
149 } // namespace arcs
150 
151 // Forward-declare domain types
152 class BoundaryOperator;
153 class IdSpace;
154 class Index;
155 class ParameterSpace;
156 
160 struct SMTKMARKUP_EXPORT Traits
161 {
162  using NodeTypes = std::tuple<
164  // AssignedIds,
165  Box,
166  // Collection,
167  Comment,
168  Component,
169  // CompositeSubset,
170  Cone,
172  // ExplicitSubset,
173  Feature,
174  Field,
175  // Frame,
176  // Grid,
177  Group,
178  ImageData,
179  // ImplicitShape,
180  Label,
181  // LabelMap,
182  // Landmark,
183  Ontology,
185  Plane,
186  // RangedSubset,
187  // References,
188  // Segmentation,
189  SideSet,
190  SpatialData,
191  Sphere,
192  Subset,
193  // SurfaceGrid,
194  URL,
196  // VolumeGrid
197  >;
198  using ArcTypes = std::tuple<
209  using NodeContainer = detail::NodeContainer;
210  using DomainTypes = std::tuple<BoundaryOperator, IdSpace, Index, ParameterSpace>;
211 };
212 } // namespace markup
213 } // namespace smtk
214 
215 // Include node types
216 
217 #include "smtk/markup/AnalyticShape.h"
218 #include "smtk/markup/AssignedIds.h"
219 #include "smtk/markup/Box.h"
220 // #include "smtk/markup/Collection.h"
221 #include "smtk/markup/Comment.h"
222 // #include "smtk/markup/Component.h"
223 // #include "smtk/markup/CompositeSubset.h"
224 #include "smtk/markup/Cone.h"
225 #include "smtk/markup/DiscreteGeometry.h"
226 // #include "smtk/markup/ExplicitSubset.h"
227 #include "smtk/markup/Feature.h"
228 #include "smtk/markup/Field.h"
229 // #include "smtk/markup/Frame.h"
230 // #include "smtk/markup/Grid.h"
231 #include "smtk/markup/Group.h"
232 #include "smtk/markup/ImageData.h"
233 // #include "smtk/markup/ImplicitShape.h"
234 #include "smtk/markup/Label.h"
235 // #include "smtk/markup/LabelMap.h"
236 // #include "smtk/markup/Landmark.h"
237 #include "smtk/markup/Ontology.h"
238 #include "smtk/markup/OntologyIdentifier.h"
239 #include "smtk/markup/Plane.h"
240 // #include "smtk/markup/RangedSubset.h"
241 // #include "smtk/markup/References.h"
242 // #include "smtk/markup/Segmentation.h"
243 #include "smtk/markup/SideSet.h"
244 #include "smtk/markup/SpatialData.h"
245 #include "smtk/markup/Sphere.h"
246 #include "smtk/markup/Subset.h"
247 // #include "smtk/markup/SurfaceGrid.h"
248 #include "smtk/markup/URL.h"
249 #include "smtk/markup/UnstructuredData.h"
250 // #include "smtk/markup/VolumeGrid.h"
251 
252 // Include domain types
253 #include "smtk/markup/BoundaryOperator.h"
254 #include "smtk/markup/Domain.h"
255 #include "smtk/markup/IdSpace.h"
256 #include "smtk/markup/Index.h"
257 #include "smtk/markup/ParameterSpace.h"
258 
259 #endif
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::markup::OntologyIdentifier
An entry in an ontology used to label components.
Definition: OntologyIdentifier.h:45
smtk::graph::OwnershipSemantics
OwnershipSemantics
Indicate whether one arc endpoint "owns" the other.
Definition: OwnershipSemantics.h:19
smtk::markup::AnalyticShape
Simple shapes that have analytic representations, generally as implicit, trivariate functions whose z...
Definition: AnalyticShape.h:23
smtk::markup::arcs::OntologyToIdentifiers
Arcs connecting an ontology to all of its identifiers.
Definition: Traits.h:120
smtk::markup::ImageData
Definition: ImageData.h:24
smtk::markup::arcs::URLsToData
Arcs connecting URLs to data held at its location.
Definition: Traits.h:85
smtk::markup::arcs::GroupsToMembers
Arcs connecting groups to their members and vice-versa.
Definition: Traits.h:67
smtk::markup::Comment
Definition: Comment.h:22
smtk::markup::DiscreteGeometry
Represent a discrete geometric shape as a modeling entity.
Definition: DiscreteGeometry.h:33
smtk::markup::Component
Definition: Component.h:51
smtk::markup::Cone
A ruled 3-dimensional surface identified by 2 points and 2 radii.
Definition: Cone.h:21
smtk::markup::Field
A function defined over some shape's space.
Definition: Field.h:35
smtk::markup::arcs::OntologyIdentifiersToIndividuals
Arcs connecting ontology identifiers to their subjects.
Definition: Traits.h:101
smtk::markup::Group
A set of components owned by this collection (i.e., held by shared pointer).
Definition: Group.h:23
ReferencesToPrimaries.h
smtk::markup::SpatialData
Markup nodes that have spatial extents.
Definition: SpatialData.h:33
smtk::markup::arcs::OntologyIdentifiersToSubtypes
Arcs connecting an ontology identifier to other identifiers derivde from it.
Definition: Traits.h:112
smtk::markup::arcs::ReferencesToPrimaries
Arcs connecting spatial data to the domains over which they are defined.
Definition: ReferencesToPrimaries.h:39
smtk::markup::ParameterSpace
A dataset whose spatial extents serve as the domain of a map into a different coordinate system.
Definition: ParameterSpace.h:29
smtk::markup::Label
Definition: Label.h:20
smtk::markup::arcs::URLsToImportedData
Definition: Traits.h:93
smtk::markup::IdSpace
A numbering used in a context.
Definition: IdSpace.h:36
smtk::markup::BoundaryOperator
A discrete mapping from one IdSpace into another that enumerates boundaries of the domain.
Definition: BoundaryOperator.h:27
smtk::io::mesh::Subset
Subset
Mesh subset types.
Definition: MeshIO.h:30
smtk::markup::Subset
Definition: Subset.h:27
smtk::markup::SideSet
An adaptation of subsets for representing subsets of boundaries of spatial data.
Definition: SideSet.h:26
smtk::markup::UnstructuredData
Definition: UnstructuredData.h:26
smtk::markup::URL
Definition: URL.h:27
smtk::markup::Box
A 3-dimensional, 6-sided shape with axis-aligned planar surfaces.
Definition: Box.h:21
smtk::markup::Feature
Definition: Feature.h:20
smtk::markup::arcs::LabelsToSubjects
Arcs connecting labels to their subjects and vice-versa.
Definition: Traits.h:77
smtk::markup::Sphere
A 3-dimensional surface of constant non-zero curvature identified by a point and radius.
Definition: Sphere.h:21
smtk::markup::Traits
Traits that describe markup node and arc types.
Definition: Traits.h:160
smtk::markup::Plane
A flat 3-dimensional surface identified by a point and normal.
Definition: Plane.h:21
smtk::markup::Index
A catalog that orders numbers in an IdSpace according to some field.
Definition: Index.h:27
smtk::markup::arcs::FieldsToShapes
Arcs connecting spatial data (defining a shape) to functions defined over those spaces.
Definition: Traits.h:129
smtk::graph::OwnershipSemantics::ToNodeOwnsFromNode
@ ToNodeOwnsFromNode
The "to" node owns the "from" node.
smtk::markup::Ontology
A collection of labels related to one another by relationships, typically imported from an OWL.
Definition: Ontology.h:23
smtk::markup::arcs::BoundariesToShapes
Arcs connecting boundary shapes to the higher-dimensional shapes they bound.
Definition: Traits.h:140