jmespath.cpp
C++ implementation of JMESPath, a query language for JSON http://jmespath.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Private Attributes | List of all members
jmespath::ast::VariantVisitorAdaptor Class Reference

The VariantVisitorAdaptor class adapts an AbstractVisitor implementation to the boost::static_visitor interface, so it can be used to visit boost::variant objects. More...

#include <variantvisitoradaptor.h>

Inheritance diagram for jmespath::ast::VariantVisitorAdaptor:

Public Member Functions

 VariantVisitorAdaptor (interpreter::AbstractVisitor *visitor)
 Constructs a VariantVisitorAdaptor object with the given visitor. More...
 
template<typename T >
void operator() (const T &variant) const
 Calls the appropriate visit method of the visitor object with the address of the variant object. More...
 
void operator() (const boost::blank &) const
 Does nothing, defined to ignore empty variants and to avoid calling the visitor object with a blank value. More...
 

Private Attributes

interpreter::AbstractVisitorm_visitor
 The visitor object to which the visit calls will be forwarded. More...
 

Detailed Description

The VariantVisitorAdaptor class adapts an AbstractVisitor implementation to the boost::static_visitor interface, so it can be used to visit boost::variant objects.

Constructor & Destructor Documentation

jmespath::ast::VariantVisitorAdaptor::VariantVisitorAdaptor ( interpreter::AbstractVisitor visitor)

Constructs a VariantVisitorAdaptor object with the given visitor.

Parameters
[in]visitorThe visitor object to which the visit calls will be forwarded.

Member Function Documentation

template<typename T >
void jmespath::ast::VariantVisitorAdaptor::operator() ( const T &  variant) const
inline

Calls the appropriate visit method of the visitor object with the address of the variant object.

Parameters
[in]variantThe object that the visitor should visit.
void jmespath::ast::VariantVisitorAdaptor::operator() ( const boost::blank &  ) const
inline

Does nothing, defined to ignore empty variants and to avoid calling the visitor object with a blank value.

Member Data Documentation

interpreter::AbstractVisitor* jmespath::ast::VariantVisitorAdaptor::m_visitor
private

The visitor object to which the visit calls will be forwarded.


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