25 #ifndef INCLUDED_GeneralizedTransform_h_GUID_BEA0F0A8_AC82_4093_60F5_34597B06F3A9 26 #define INCLUDED_GeneralizedTransform_h_GUID_BEA0F0A8_AC82_4093_60F5_34597B06F3A9 29 #include <osvr/Common/Export.h> 33 #include <json/value.h> 47 util::container_policies::iterators,
48 util::container_policies::size> {
51 typedef Json::Value value_type;
54 typedef value_type &reference;
55 typedef value_type
const &const_reference;
56 typedef std::vector<value_type> container;
57 typedef container::size_type size_type;
58 typedef container::iterator iterator;
59 typedef container::const_iterator const_iterator;
61 util::container_policies::iterators,
78 OSVR_COMMON_EXPORT
void nest(Json::Value
const &transform);
82 OSVR_COMMON_EXPORT
void wrap(Json::Value
const &transform);
85 OSVR_COMMON_EXPORT
bool empty()
const;
88 OSVR_COMMON_EXPORT Json::Value
get()
const;
94 OSVR_COMMON_EXPORT Json::Value
get(std::string
const &leaf)
const;
98 container().resize(newEnd - begin());
102 void pushLevelBack(Json::Value level);
103 Json::Value recompose(Json::Value leaf = Json::nullValue)
const;
110 template <
typename UnaryPredicate>
112 UnaryPredicate pred) {
113 auto newEnd =
std::remove_if(transform.begin(), transform.end(), pred);
119 #endif // INCLUDED_GeneralizedTransform_h_GUID_BEA0F0A8_AC82_4093_60F5_34597B06F3A9 Definition: gtest_unittest.cc:5031
Handles spatial transformations.
Definition: SerializationTraitExample_Complicated.h:40
Header providing a class template suitable for inheritance that wraps an arbitrary STL-like container...
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
detail::size< coerce_list< Ts... >> size
Get the size of a list (number of elements.)
Definition: Size.h:56
t_< detail::transform_< List, Fun >> transform
Given a list and an alias class, apply the alias class to each element in the list and return the res...
Definition: Transform.h:54
detail::ContainerWrapper_t< Container, Args... > ContainerWrapper
Parent class to inherit from to get a container with some functionality exposed.
Definition: ContainerWrapper.h:232
void remove_if(GeneralizedTransform &transform, UnaryPredicate pred)
Remove levels from a generalized transform as dictated by an arbitrary predicate. ...
Definition: GeneralizedTransform.h:111