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

WIP: Progress on generator script.

parent 9b2dd7b2
This diff is collapsed.
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/AnalyticShape.h"
namespace smtk
{
namespace markup
{
AnalyticShape::~AnalyticShape() = default;
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_AnalyticShape_h
#define smtk_markup_AnalyticShape_h
#include "smtk/markup/Component.h"
namespace smtk
{
namespace markup
{
/// Simple shapes that have analytic representations, generally as implicit, trivariate functions whose zero level-set defines the shape.
class SMTKMARKUP_EXPORT AnalyticShape : public smtk::markup::Component
{
public:
smtkTypeMacro(smtk::markup::AnalyticShape);
smtkSuperclassMacro(smtk::markup::Component);
template<typename... Args>
AnalyticShape(Args&&... args)
: smtk::markup::Component(std::forward<Args>(args)...)
{
}
~AnalyticShape() override;
protected:
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_AnalyticShape_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/Box.h"
namespace smtk
{
namespace markup
{
Box::~Box() = default;
bool Box::setRange(const std::array<std::array<double, 3>, 2>& range)
{
if (m_range == range)
{
return false;
}
m_range = range;
return true;
}
const std::array<std::array<double, 3>, 2>& range() const
{
return m_range;
}
std::array<std::array<double, 3>, 2>& range()
{
return m_range;
}
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_Box_h
#define smtk_markup_Box_h
#include "smtk/markup/AnalyticShape.h"
namespace smtk
{
namespace markup
{
/// A 3-dimensional, 6-sided shape with axis-aligned planar surfaces.
class SMTKMARKUP_EXPORT Box : public smtk::markup::AnalyticShape
{
public:
smtkTypeMacro(smtk::markup::Box);
smtkSuperclassMacro(smtk::markup::AnalyticShape);
template<typename... Args>
Box(Args&&... args)
: smtk::markup::AnalyticShape(std::forward<Args>(args)...)
{
}
~Box() override;
bool setRange(range std::array<std::array<double, 3>, 2>);
const std::array<std::array<double, 3>, 2>& range() const;
std::array<std::array<double, 3>, 2>& range();
protected:
std::array<std::array<double, 3>, 2> m_range;
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_Box_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/Collection.h"
namespace smtk
{
namespace markup
{
Collection::~Collection() = default;
bool Collection::setKeys(const std::weak_ptr<smtk::markup::IdAllotment>& keys)
{
if (m_keys == keys)
{
return false;
}
m_keys = keys;
return true;
}
const std::weak_ptr<smtk::markup::IdAllotment>& keys() const
{
return m_keys;
}
std::weak_ptr<smtk::markup::IdAllotment>& keys()
{
return m_keys;
}
bool Collection::setMembers(const std::unordered_map<smtk::markup::IdSpace::IdType, std::weak_ptr<smtk::markup::Component>>& members)
{
if (m_members == members)
{
return false;
}
m_members = members;
return true;
}
const std::unordered_map<smtk::markup::IdSpace::IdType, std::weak_ptr<smtk::markup::Component>>& members() const
{
return m_members;
}
std::unordered_map<smtk::markup::IdSpace::IdType, std::weak_ptr<smtk::markup::Component>>& members()
{
return m_members;
}
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_Collection_h
#define smtk_markup_Collection_h
#include "smtk/markup/Component.h"
namespace smtk
{
namespace markup
{
/// A set of components owned by this collection (i.e., held by shared pointer).
class SMTKMARKUP_EXPORT Collection : public smtk::markup::Component
{
public:
smtkTypeMacro(smtk::markup::Collection);
smtkSuperclassMacro(smtk::markup::Component);
template<typename... Args>
Collection(Args&&... args)
: smtk::markup::Component(std::forward<Args>(args)...)
{
}
~Collection() override;
bool setKeys(keys std::weak_ptr<smtk::markup::IdAllotment>);
const std::weak_ptr<smtk::markup::IdAllotment>& keys() const;
std::weak_ptr<smtk::markup::IdAllotment>& keys();
bool setMembers(members std::unordered_map<smtk::markup::IdSpace::IdType, std::weak_ptr<smtk::markup::Component>>);
const std::unordered_map<smtk::markup::IdSpace::IdType, std::weak_ptr<smtk::markup::Component>>& members() const;
std::unordered_map<smtk::markup::IdSpace::IdType, std::weak_ptr<smtk::markup::Component>>& members();
protected:
std::weak_ptr<smtk::markup::IdAllotment> m_keys;
std::unordered_map<smtk::markup::IdSpace::IdType, std::weak_ptr<smtk::markup::Component>> m_members;
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_Collection_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/Comment.h"
namespace smtk
{
namespace markup
{
Comment::~Comment() = default;
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_Comment_h
#define smtk_markup_Comment_h
#include "smtk/markup/Label.h"
namespace smtk
{
namespace markup
{
class SMTKMARKUP_EXPORT Comment : public smtk::markup::Label
{
public:
smtkTypeMacro(smtk::markup::Comment);
smtkSuperclassMacro(smtk::markup::Label);
template<typename... Args>
Comment(Args&&... args)
: smtk::markup::Label(std::forward<Args>(args)...)
{
}
~Comment() override;
protected:
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_Comment_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/CompositeSubset.h"
namespace smtk
{
namespace markup
{
CompositeSubset::~CompositeSubset() = default;
bool CompositeSubset::setMembers(const std::set<std::weak_ptr<smtk::markup::Subset>>& members)
{
if (m_members == members)
{
return false;
}
m_members = members;
return true;
}
const std::set<std::weak_ptr<smtk::markup::Subset>>& members() const
{
return m_members;
}
std::set<std::weak_ptr<smtk::markup::Subset>>& members()
{
return m_members;
}
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_CompositeSubset_h
#define smtk_markup_CompositeSubset_h
#include "smtk/markup/Subset.h"
namespace smtk
{
namespace markup
{
/// A subset whose members are stored as other subsets.
class SMTKMARKUP_EXPORT CompositeSubset : public smtk::markup::Subset
{
public:
smtkTypeMacro(smtk::markup::CompositeSubset);
smtkSuperclassMacro(smtk::markup::Subset);
template<typename... Args>
CompositeSubset(Args&&... args)
: smtk::markup::Subset(std::forward<Args>(args)...)
{
}
~CompositeSubset() override;
bool setMembers(members std::set<std::weak_ptr<smtk::markup::Subset>>);
const std::set<std::weak_ptr<smtk::markup::Subset>>& members() const;
std::set<std::weak_ptr<smtk::markup::Subset>>& members();
protected:
std::set<std::weak_ptr<smtk::markup::Subset>> m_members;
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_CompositeSubset_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/Cone.h"
namespace smtk
{
namespace markup
{
Cone::~Cone() = default;
bool Cone::setEndpoints(const std::array<std::array<double, 3>, 2>& endpoints)
{
if (m_endpoints == endpoints)
{
return false;
}
m_endpoints = endpoints;
return true;
}
const std::array<std::array<double, 3>, 2>& endpoints() const
{
return m_endpoints;
}
std::array<std::array<double, 3>, 2>& endpoints()
{
return m_endpoints;
}
bool Cone::setRadii(const std::array<double, 2>& radii)
{
if (m_radii == radii)
{
return false;
}
m_radii = radii;
return true;
}
const std::array<double, 2>& radii() const
{
return m_radii;
}
std::array<double, 2>& radii()
{
return m_radii;
}
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_Cone_h
#define smtk_markup_Cone_h
#include "smtk/markup/AnalyticShape.h"
namespace smtk
{
namespace markup
{
/// A ruled 3-dimensional surface identified by 2 points and 2 radii.
class SMTKMARKUP_EXPORT Cone : public smtk::markup::AnalyticShape
{
public:
smtkTypeMacro(smtk::markup::Cone);
smtkSuperclassMacro(smtk::markup::AnalyticShape);
template<typename... Args>
Cone(Args&&... args)
: smtk::markup::AnalyticShape(std::forward<Args>(args)...)
{
}
~Cone() override;
bool setEndpoints(endpoints std::array<std::array<double, 3>, 2>);
const std::array<std::array<double, 3>, 2>& endpoints() const;
std::array<std::array<double, 3>, 2>& endpoints();
bool setRadii(radii std::array<double, 2>);
const std::array<double, 2>& radii() const;
std::array<double, 2>& radii();
protected:
std::array<std::array<double, 3>, 2> m_endpoints;
std::array<double, 2> m_radii;
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_Cone_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/DiscreteGeometry.h"
namespace smtk
{
namespace markup
{
DiscreteGeometry::~DiscreteGeometry() = default;
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_DiscreteGeometry_h
#define smtk_markup_DiscreteGeometry_h
#include "smtk/markup/Component.h"
namespace smtk
{
namespace markup
{
class SMTKMARKUP_EXPORT DiscreteGeometry : public smtk::markup::Component
{
public:
smtkTypeMacro(smtk::markup::DiscreteGeometry);
smtkSuperclassMacro(smtk::markup::Component);
template<typename... Args>
DiscreteGeometry(Args&&... args)
: smtk::markup::Component(std::forward<Args>(args)...)
{
}
~DiscreteGeometry() override;
protected:
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_DiscreteGeometry_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/ExplicitSubset.h"
namespace smtk
{
namespace markup
{
ExplicitSubset::~ExplicitSubset() = default;
bool ExplicitSubset::setMembers(const std::set<smtk::markup::IdSpace::IdType>& members)
{
if (m_members == members)
{
return false;
}
m_members = members;
return true;
}
const std::set<smtk::markup::IdSpace::IdType>& members() const
{
return m_members;
}
std::set<smtk::markup::IdSpace::IdType>& members()
{
return m_members;
}
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_ExplicitSubset_h
#define smtk_markup_ExplicitSubset_h
#include "smtk/markup/Subset.h"
namespace smtk
{
namespace markup
{
/// A subset whose members are explicitly listed.
class SMTKMARKUP_EXPORT ExplicitSubset : public smtk::markup::Subset
{
public:
smtkTypeMacro(smtk::markup::ExplicitSubset);
smtkSuperclassMacro(smtk::markup::Subset);
template<typename... Args>
ExplicitSubset(Args&&... args)
: smtk::markup::Subset(std::forward<Args>(args)...)
{
}
~ExplicitSubset() override;
bool setMembers(members std::set<smtk::markup::IdSpace::IdType>);
const std::set<smtk::markup::IdSpace::IdType>& members() const;
std::set<smtk::markup::IdSpace::IdType>& members();
protected:
std::set<smtk::markup::IdSpace::IdType> m_members;
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_ExplicitSubset_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/Feature.h"
namespace smtk
{
namespace markup
{
Feature::~Feature() = default;
} // namespace markup
} // namespace smtk
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#ifndef smtk_markup_Feature_h
#define smtk_markup_Feature_h
#include "smtk/markup/Component.h"
namespace smtk
{
namespace markup
{
class SMTKMARKUP_EXPORT Feature : public smtk::markup::Component
{
public:
smtkTypeMacro(smtk::markup::Feature);
smtkSuperclassMacro(smtk::markup::Component);
template<typename... Args>
Feature(Args&&... args)
: smtk::markup::Component(std::forward<Args>(args)...)
{
}
~Feature() override;
protected:
};
} // namespace markup
} // namespace smtk
#endif // smtk_markup_Feature_h
\ No newline at end of file
// Copyright © Kitware Inc under the [BSD-3-clause license](https://kitware.com/licenses/bsd.md).
#include "smtk/markup/Field.h"
namespace smtk
{