Commit a1b3e753 authored by David Thompson's avatar David Thompson
Browse files

WIP: Broken arc implementation.

parent ddcc8344
set(sources)
set(headers
arcs/Labels.h
queries/SelectionFootprint.h
)
set(operations
......
......@@ -47,6 +47,7 @@
#include "smtk/markup/Subset.h"
#include "smtk/markup/SurfaceGrid.h"
#include "smtk/markup/VolumeGrid.h"
#include "smtk/markup/arcs/Labels.h"
#include "smtk/markup/detail/NodeContainer.h"
#include <tuple>
......@@ -98,6 +99,8 @@ struct SMTKMARKUP_EXPORT Traits
VolumeGrid
>;
using ArcTypes = std::tuple<
Labels,
LabelSubject
>;
/*
typedef std::tuple<ChildrenAs<CompSolid>, ChildrenAs<Solid>, ChildrenAs<Shell>, ChildrenAs<Face>,
......
// Copyright © Kitware Inc under the [BSD-3-clause license](https://opensource.org/licenses/BSD-3-Clause).
#ifndef smtk_markup_arcs_Labels_h
#define smtk_markup_arcs_Labels_h
#include "smtk/markup/Exports.h"
#include "smtk/graph/arcs/Arc.h"
#include "smtk/graph/arcs/Arcs.h"
namespace smtk
{
namespace markup
{
// Node types
class Component;
class Label;
// Forward declare arc types
class Labels;
class LabelSubject;
class SMTKMARKUP_EXPORT Labels : public smtk::graph::Arcs<Component, Label, Labels>
{
public:
using InverseArcType = LabelSubject;
using smtk::graph::Arcs<Component, Label, Labels>::Arcs;
};
class SMTKMARKUP_EXPORT LabelSubject : public smtk::graph::Arc<Label, Component, LabelSubject>
{
public:
using InverseArcType = Labels;
using smtk::graph::Arc<Label, Component, LabelSubject>::Arc;
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_arcs_Labels_h
......@@ -38,6 +38,9 @@ int TestResource(int argc, char** argv)
nn = components.size();
std::cout << "Found " << nn << " labels\n";
// resource->connect<LabelSubject>(*label, *group);
label->get<LabelSubject>().insert(*group);
auto write = smtk::markup::Write::create();
write->parameters()->associations()->appendValue(resource);
write->operate();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment