Bertini 2 d882924 (2026-10-06 19:56 UTC)
Numerical algebraic geometry library (C++ core)
Loading...
Searching...
No Matches
bertini::VisitableBase< RetT, CatchAll > Class Template Referenceabstract

The base class for visitable types. More...

#include <visitable.hpp>

Inheritance diagram for bertini::VisitableBase< RetT, CatchAll >:
[legend]

Public Types

typedef RetT VisitReturnType
 The type returned when a visitor accepts this object.

Public Member Functions

virtual ~VisitableBase ()=default
virtual VisitReturnType Accept (VisitorBase &)=0
 Accept a visitor (dispatch to the visitor's Visit for this concrete type).

Static Protected Member Functions

template<typename T>
static VisitReturnType AcceptBase (T &visited, VisitorBase &guest)
 Abstract method for how to accept a visitor.

Detailed Description

template<typename RetT = void, template< class, class > class CatchAll = policy::DefaultCatchAll>
class bertini::VisitableBase< RetT, CatchAll >

The base class for visitable types.

Implemented based on Alexandrescu, 2001, and Hythem Sidky's SAPHRON package, with his permission.

See also
BERTINI_DEFAULT_VISITABLE

Member Typedef Documentation

◆ VisitReturnType

template<typename RetT = void, template< class, class > class CatchAll = policy::DefaultCatchAll>
typedef RetT bertini::VisitableBase< RetT, CatchAll >::VisitReturnType

The type returned when a visitor accepts this object.

Constructor & Destructor Documentation

◆ ~VisitableBase()

template<typename RetT = void, template< class, class > class CatchAll = policy::DefaultCatchAll>
virtual bertini::VisitableBase< RetT, CatchAll >::~VisitableBase ( )
virtualdefault

Member Function Documentation

◆ Accept()

template<typename RetT = void, template< class, class > class CatchAll = policy::DefaultCatchAll>
virtual VisitReturnType bertini::VisitableBase< RetT, CatchAll >::Accept ( VisitorBase & )
pure virtual

Accept a visitor (dispatch to the visitor's Visit for this concrete type).

◆ AcceptBase()

template<typename RetT = void, template< class, class > class CatchAll = policy::DefaultCatchAll>
template<typename T>
VisitReturnType bertini::VisitableBase< RetT, CatchAll >::AcceptBase ( T & visited,
VisitorBase & guest )
inlinestaticprotected

Abstract method for how to accept a visitor.

This function simply Forwards to the Visit method of the visitor, if the visitor's type is known. If known, invokes the behaviour defined by the CatchAll template parameter.

Template Parameters
TThe type of the visited object. Should be inferred by the compiler.
Parameters
visitedThe visited visitable object.
guestThe visiting object.