Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Feel::Visitor< T, R > Class Template Referenceabstract

#include <visitor.hpp>

Detailed Description

template<class T, typename R = void>
class Feel::Visitor< T, R >

This class is the base class to implement the Visitor Pattern. Let's A be a visitor class to a class B:

class A: public Visitor<B>
{
public:
...
void visit(B * b)
{
..implement the functionnality to be added to a B class..
}
};
class B:
{
public:
void accept(Visitor<B>* b){ b->visit(this); }
};
Author
Christophe Prud'homme Chris.nosp@m.toph.nosp@m.e.Pru.nosp@m.dhom.nosp@m.me@an.nosp@m.n.ju.nosp@m.ssieu.nosp@m..fr
See Also
Gamma, Helm, Johnson, Vlissides, Design Patterns Pub: Addison Wesley

Public Types

Typedefs
typedef R return_type
 

Public Member Functions

Constructors, Destructors and methods
virtual ~Visitor ()
 virtual base destructor
 
virtual return_type visit (T *)=0
 visit a data structure
 
return_type visit (T &__t)
 visit a data structure
 

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

Generated on Sun Oct 20 2013 08:25:09 for Feel++ by doxygen 1.8.4