LibreCAD
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
visitor.h File Reference
#include <cad/const.h>
#include <memory>
#include <array>
Include dependency graph for visitor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  index_sequence<>
 
struct  make_index_sequence< N, Is >
 
struct  make_index_sequence< 0, Is...>
 
singleton  IVisitorTs< Ts >
 
class  IVisitorTs< T, Ts...>
 
class  IVisitorTs< T >
 
struct  detail::get_index< T, Ts >
 
struct  detail::get_index< T, T, Ts...>
 
struct  detail::get_index< T, Tail, Ts...>
 
struct  detail::get_index_in_tuple< T, Tuple >
 
struct  detail::get_index_in_tuple< T, C< Ts...> >
 
struct  detail::multi_array_getter< I >
 
struct  detail::multi_array_getter< 0 >
 
struct  detail::IVisitorImpl< IVisitor, C, Ts >
 
struct  detail::IVisitorImpl< IVisitor, C, T, Ts...>
 
struct  detail::IVisitorImpl< IVisitor, C, T >
 
struct  detail::IVisitorImplType< IVisitor, C >
 
struct  detail::IVisitorImplType< IVisitorTs< Ts...>, C >
 
class  detail::GetAllOverload< Ret, F, Arg >
 
struct  detail::GetAllOverload< Ret, F, Arg >::Functor< Ts >
 
struct  detail::GetAllOverload< Ret, F, Arg >::Builder< N, Tuple, Ts >
 
struct  detail::GetAllOverload< Ret, F, Arg >::Builder< 1, std::tuple< Ts...>, Ts2...>
 
struct  detail::GetAllOverload< Ret, F, Arg >::Builder< N, std::tuple< Ts...>, Ts2...>
 
class  detail::dispatcher< Ret, IVisitor, F, N >
 
struct  detail::dispatcher< Ret, IVisitor, F, N >::visitorCallImpl
 
class  lc::Visitable
 

Namespaces

 lc
 
 lc::geo
 
 lc::entity
 
 detail
 

Typedefs

using lc::GeoEntityVisitor = IVisitorTs< lc::Visitable, geo::Vector, geo::Circle, geo::Arc, geo::Area, geo::Ellipse, entity::CADEntity, entity::Point, entity::Line, entity::Arc, entity::Circle, entity::Ellipse, entity::LWPolyline, entity::Image >
 

Functions

template<typename Ret , typename Visitor , typename F , typename... Ts>
Ret visitorDispatcher (F &&f, Ts &...args)
 

Function Documentation

template<typename Ret , typename Visitor , typename F , typename... Ts>
Ret visitorDispatcher ( F &&  f,
Ts &...  args 
)

Definition at line 290 of file visitor.h.

291 {
292  constexpr std::size_t size = sizeof...(Ts);
294  return d(std::forward<F>(f), std::tie(args...), make_index_sequence<size>());
295 }