13#ifndef ML_PROPERTY_VALUE_H
14#define ML_PROPERTY_VALUE_H
26#include <boost/ref.hpp>
27#include <boost/tuple/tuple.hpp>
28#include <boost/variant.hpp>
29#include <boost/mpl/contains.hpp>
30#include <boost/mpl/for_each.hpp>
31#include <boost/mpl/less_equal.hpp>
32#include <boost/mpl/integral_c.hpp>
33#include <boost/mpl/vector.hpp>
34#include <boost/mpl/sizeof.hpp>
42 typedef boost::mpl::vector<
MLint8,
MLuint8,
MLint16,
MLuint16,
MLint32,
MLuint32,
MLuint64,
MLint64,
double, Vector3,
53 return _variant ==
other._variant;
56 template <
typename T>
T&
get()
59 return boost::get<StoredType>(_variant);
62 template <
typename T>
const T&
get()
const
65 return boost::get<StoredType>(_variant);
90 return static_cast<size_t>(_variant.which());
94 typedef boost::mpl::transform<SupportedPropertyTypes, lightweight::make_lightweight>::type LightweightPropertyTypes;
95 typedef boost::make_variant_over<LightweightPropertyTypes>::type LightweightVariantType;
96 LightweightVariantType _variant;
Class PropertyValue, which is used to hold properties of a given set of allowed types in typesafe way...
PropertyValue(const T &initialValue)
VisitorType::result_type apply(VisitorType &visitor)
VisitorType::result_type apply(VisitorType &visitor) const
VisitorType::result_type apply(const VisitorType &visitor) const
bool operator==(const PropertyValue &other) const
boost::mpl::vector< MLint8, MLuint8, MLint16, MLuint16, MLint32, MLuint32, MLuint64, MLint64, double, Vector3, Vector6 > SupportedPropertyTypes
VisitorType::result_type apply(const VisitorType &visitor)
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
UINT64 MLuint64
Introduce platform-independent 64-bit unsigned integer type.
INT64 MLint64
Include 64-bit integer support for Windows or Unix.
#define VESSELGRAPH_END_NAMESPACE
#define VESSELGRAPH_BEGIN_NAMESPACE
VisitorType::result_type apply_visitor(VisitorType &visitor, VariantType &value)
boost::mpl::if_< typenameboost::mpl::less_equal< boost::mpl::sizeof_< T >, boost::mpl::int_< 8 > >::type, T, heap_storage< T > >::type type