Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
geo::vect::details::CoordManager< Vector, SetterType > Class Template Reference

Helper class for read/write of a single vector coordinate. More...

#include <geo_vectors_utils.h>

Inheritance diagram for geo::vect::details::CoordManager< Vector, SetterType >:
geo::vect::details::CoordGetter< Vector > geo::vect::details::CoordGetter< Vector >

Public Types

using Vector_t = typename Traits_t::Vector_t
 
using Scalar_t = typename Traits_t::Scalar_t
 
using Getter_t = typename Traits_t::Getter_t
 
using Setter_t = typename Traits_t::Setter_t
 
using Vector_t = typename Traits_t::Vector_t
 
using Scalar_t = typename Traits_t::Scalar_t
 
using Getter_t = typename Traits_t::Getter_t
 
using Setter_t = typename Traits_t::Setter_t
 
- Public Types inherited from geo::vect::details::CoordGetter< Vector >
using Vector_t = typename Traits_t::Vector_t
 
using Scalar_t = typename Traits_t::Scalar_t
 
using Getter_t = typename Traits_t::Getter_t
 
using Vector_t = typename Traits_t::Vector_t
 
using Scalar_t = typename Traits_t::Scalar_t
 
using Getter_t = typename Traits_t::Getter_t
 

Public Member Functions

constexpr CoordManager (Getter_t getter, Setter_t setter)
 Constructor: sets getter and setter functions. More...
 
void operator() (Vector_t &v, Scalar_t c) const
 Setter: assigns a value to the bound coordinate of specified vector. More...
 
void set (Vector_t &v, Scalar_t c) const
 Setter: assigns a value to the bound coordinate of specified vector. More...
 
void incr (Vector_t &v, Scalar_t c) const
 Increments the coordinate by the specified amount. More...
 
void decr (Vector_t &v, Scalar_t c) const
 Decrements the coordinate by the specified amount. More...
 
void mult (Vector_t &v, Scalar_t f) const
 Multiplies the coordinate by the specified amount. More...
 
void div (Vector_t &v, Scalar_t f) const
 Divides the coordinate by the specified amount. More...
 
constexpr CoordManager (Getter_t getter, Setter_t setter)
 Constructor: sets getter and setter functions. More...
 
void operator() (Vector_t &v, Scalar_t c) const
 Setter: assigns a value to the bound coordinate of specified vector. More...
 
void set (Vector_t &v, Scalar_t c) const
 Setter: assigns a value to the bound coordinate of specified vector. More...
 
void incr (Vector_t &v, Scalar_t c) const
 Increments the coordinate by the specified amount. More...
 
void decr (Vector_t &v, Scalar_t c) const
 Decrements the coordinate by the specified amount. More...
 
void mult (Vector_t &v, Scalar_t f) const
 Multiplies the coordinate by the specified amount. More...
 
void div (Vector_t &v, Scalar_t f) const
 Divides the coordinate by the specified amount. More...
 
- Public Member Functions inherited from geo::vect::details::CoordGetter< Vector >
constexpr CoordGetter (Getter_t getter)
 Constructor: sets getter and setter functions. More...
 
Scalar_t operator() (Vector_t const &v) const
 Returns the value of the bound coordinate. More...
 
Scalar_t get (Vector_t const &v) const
 Returns the value of the bound coordinate. More...
 
constexpr CoordGetter (Getter_t getter)
 Constructor: sets getter and setter functions. More...
 
Scalar_t operator() (Vector_t const &v) const
 Returns the value of the bound coordinate. More...
 
Scalar_t get (Vector_t const &v) const
 Returns the value of the bound coordinate. More...
 

Private Types

using Base_t = CoordGetter< Vector >
 
using Traits_t = CoordManagerTraits< Vector, SetterType >
 
using Base_t = CoordGetter< Vector >
 
using Traits_t = CoordManagerTraits< Vector, SetterType >
 

Private Attributes

Setter_t fSetter
 Member function setting the coordinate value. More...
 

Detailed Description

template<typename Vector, typename SetterType>
class geo::vect::details::CoordManager< Vector, SetterType >

Helper class for read/write of a single vector coordinate.

Definition at line 260 of file geo_vectors_utils.h.

Member Typedef Documentation

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Base_t = CoordGetter<Vector>
private

Definition at line 261 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Base_t = CoordGetter<Vector>
private

Definition at line 268 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Getter_t = typename Traits_t::Getter_t

Definition at line 267 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Getter_t = typename Traits_t::Getter_t

Definition at line 274 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Scalar_t = typename Traits_t::Scalar_t

Definition at line 266 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Scalar_t = typename Traits_t::Scalar_t

Definition at line 273 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Setter_t = typename Traits_t::Setter_t

Definition at line 268 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Setter_t = typename Traits_t::Setter_t

Definition at line 275 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Traits_t = CoordManagerTraits<Vector, SetterType>
private

Definition at line 262 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Traits_t = CoordManagerTraits<Vector, SetterType>
private

Definition at line 269 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Vector_t = typename Traits_t::Vector_t

Definition at line 265 of file geo_vectors_utils.h.

template<typename Vector , typename SetterType >
using geo::vect::details::CoordManager< Vector, SetterType >::Vector_t = typename Traits_t::Vector_t

Definition at line 272 of file geo_vectors_utils.h.

Constructor & Destructor Documentation

template<typename Vector , typename SetterType >
constexpr geo::vect::details::CoordManager< Vector, SetterType >::CoordManager ( Getter_t  getter,
Setter_t  setter 
)
inline

Constructor: sets getter and setter functions.

Definition at line 271 of file geo_vectors_utils.h.

272  : Base_t(getter), fSetter(setter) {}
Setter_t fSetter
Member function setting the coordinate value.
template<typename Vector , typename SetterType >
constexpr geo::vect::details::CoordManager< Vector, SetterType >::CoordManager ( Getter_t  getter,
Setter_t  setter 
)
inline

Constructor: sets getter and setter functions.

Definition at line 278 of file geo_vectors_utils.h.

279  : Base_t(getter), fSetter(setter) {}
Setter_t fSetter
Member function setting the coordinate value.

Member Function Documentation

template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::decr ( Vector_t v,
Scalar_t  c 
) const
inline

Decrements the coordinate by the specified amount.

Definition at line 284 of file geo_vectors_utils.h.

284 { set(v, Base_t::get(v) - c); }
Scalar_t get(Vector_t const &v) const
Returns the value of the bound coordinate.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::decr ( Vector_t v,
Scalar_t  c 
) const
inline

Decrements the coordinate by the specified amount.

Definition at line 291 of file geo_vectors_utils.h.

291 { set(v, Base_t::get(v) - c); }
Scalar_t get(Vector_t const &v) const
Returns the value of the bound coordinate.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::div ( Vector_t v,
Scalar_t  f 
) const
inline

Divides the coordinate by the specified amount.

Definition at line 290 of file geo_vectors_utils.h.

290 { set(v, Base_t::get(v) / f); }
Scalar_t get(Vector_t const &v) const
Returns the value of the bound coordinate.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::div ( Vector_t v,
Scalar_t  f 
) const
inline

Divides the coordinate by the specified amount.

Definition at line 297 of file geo_vectors_utils.h.

297 { set(v, Base_t::get(v) / f); }
Scalar_t get(Vector_t const &v) const
Returns the value of the bound coordinate.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::incr ( Vector_t v,
Scalar_t  c 
) const
inline

Increments the coordinate by the specified amount.

Definition at line 281 of file geo_vectors_utils.h.

281 { set(v, Base_t::get(v) + c); }
Scalar_t get(Vector_t const &v) const
Returns the value of the bound coordinate.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::incr ( Vector_t v,
Scalar_t  c 
) const
inline

Increments the coordinate by the specified amount.

Definition at line 288 of file geo_vectors_utils.h.

288 { set(v, Base_t::get(v) + c); }
Scalar_t get(Vector_t const &v) const
Returns the value of the bound coordinate.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::mult ( Vector_t v,
Scalar_t  f 
) const
inline

Multiplies the coordinate by the specified amount.

Definition at line 287 of file geo_vectors_utils.h.

287 { set(v, Base_t::get(v) * f); }
Scalar_t get(Vector_t const &v) const
Returns the value of the bound coordinate.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::mult ( Vector_t v,
Scalar_t  f 
) const
inline

Multiplies the coordinate by the specified amount.

Definition at line 294 of file geo_vectors_utils.h.

294 { set(v, Base_t::get(v) * f); }
Scalar_t get(Vector_t const &v) const
Returns the value of the bound coordinate.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::operator() ( Vector_t v,
Scalar_t  c 
) const
inline

Setter: assigns a value to the bound coordinate of specified vector.

Definition at line 275 of file geo_vectors_utils.h.

275 { set(v, c); }
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::operator() ( Vector_t v,
Scalar_t  c 
) const
inline

Setter: assigns a value to the bound coordinate of specified vector.

Definition at line 282 of file geo_vectors_utils.h.

282 { set(v, c); }
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::set ( Vector_t v,
Scalar_t  c 
) const
inline

Setter: assigns a value to the bound coordinate of specified vector.

Definition at line 278 of file geo_vectors_utils.h.

278 { (v.*fSetter)(c); }
Setter_t fSetter
Member function setting the coordinate value.
template<typename Vector , typename SetterType >
void geo::vect::details::CoordManager< Vector, SetterType >::set ( Vector_t v,
Scalar_t  c 
) const
inline

Setter: assigns a value to the bound coordinate of specified vector.

Definition at line 285 of file geo_vectors_utils.h.

285 { (v.*fSetter)(c); }
Setter_t fSetter
Member function setting the coordinate value.

Member Data Documentation

template<typename Vector , typename SetterType >
Setter_t geo::vect::details::CoordManager< Vector, SetterType >::fSetter
private

Member function setting the coordinate value.

Definition at line 293 of file geo_vectors_utils.h.


The documentation for this class was generated from the following file: