Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext > Class Template Reference

Public Member Functions

 Visitor ()
 
 Visitor (PrintContext printContext)
 
 Visitor (PrintContext printContext, std::shared_ptr< VisitorData< PrintContext >> data)
 
 Visitor (std::shared_ptr< VisitorData< PrintContext >> data)
 
 ~Visitor ()
 
QList< ExportErrorerrors () const
 
PrintContextprintContext ()
 

Protected Member Functions

std::shared_ptr< VisitorData< PrintContext > > data ()
 
template<typename NodeType >
SourceFragmentdeclaration (NodeType *node)
 
template<typename NodeType >
SourceFragmentelement (NodeType *node)
 
void error (const QString &errorMessage)
 
void error (Model::Node *node, const QString &errorMessage)
 
template<typename NodeType >
SourceFragmentexpression (NodeType *node)
 
template<typename ListElement , typename VisitorClass , typename Predicate = bool (*)(ListElement*)>
CompositeFragmentlist (Model::TypedList< ListElement > *list, VisitorClass &&v, const QString &fragmentType={}, Predicate filter=nullptr)
 
template<typename ListElement , typename VisitorClass , typename Predicate = bool (*)(ListElement*)>
CompositeFragmentlist (Model::TypedList< ListElement > *list, VisitorClass *v, const QString &fragmentType={}, Predicate filter=nullptr)
 
void notAllowed (Model::List *list)
 
void notAllowed (Model::Node *node)
 
void required (Model::Node *parent, Model::Node *node, const QString &childName)
 
template<typename NodeType >
SourceFragmentstatement (NodeType *node)
 

Private Attributes

std::shared_ptr< VisitorData< PrintContext > > data_
 

Constructor & Destructor Documentation

◆ Visitor() [1/4]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::Visitor

◆ Visitor() [2/4]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::Visitor ( std::shared_ptr< VisitorData< PrintContext >>  data)

◆ Visitor() [3/4]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::Visitor ( PrintContext  printContext)

◆ Visitor() [4/4]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::Visitor ( PrintContext  printContext,
std::shared_ptr< VisitorData< PrintContext >>  data 
)

◆ ~Visitor()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::~Visitor

Member Function Documentation

◆ data()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
std::shared_ptr< VisitorData< PrintContext > > Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::data
inlineprotected

◆ declaration()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
template<typename NodeType >
SourceFragment * Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::declaration ( NodeType *  node)
inlineprotected

◆ element()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
template<typename NodeType >
SourceFragment * Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::element ( NodeType *  node)
inlineprotected

◆ error() [1/2]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
void Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::error ( const QString &  errorMessage)
inlineprotected

◆ error() [2/2]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
void Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::error ( Model::Node node,
const QString &  errorMessage 
)
inlineprotected

◆ errors()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
QList< ExportError > Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::errors
inline

◆ expression()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
template<typename NodeType >
SourceFragment * Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::expression ( NodeType *  node)
inlineprotected

◆ list() [1/2]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
template<typename ListElement , typename VisitorClass , typename Predicate >
CompositeFragment * Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::list ( Model::TypedList< ListElement > *  list,
VisitorClass &&  v,
const QString &  fragmentType = {},
Predicate  filter = nullptr 
)
inlineprotected

◆ list() [2/2]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
template<typename ListElement , typename VisitorClass , typename Predicate >
CompositeFragment * Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::list ( Model::TypedList< ListElement > *  list,
VisitorClass *  v,
const QString &  fragmentType = {},
Predicate  filter = nullptr 
)
protected

◆ notAllowed() [1/2]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
void Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::notAllowed ( Model::List list)
protected

◆ notAllowed() [2/2]

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
void Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::notAllowed ( Model::Node node)
protected

◆ printContext()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
PrintContext & Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::printContext
inline

◆ required()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
void Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::required ( Model::Node parent,
Model::Node node,
const QString &  childName 
)
protected

◆ statement()

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
template<typename NodeType >
SourceFragment * Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::statement ( NodeType *  node)
inlineprotected

Member Data Documentation

◆ data_

template<typename DeclarationVisitor , typename ExpressionVisitor , typename StatementVisitor , typename ElementVisitor , typename PrintContext >
std::shared_ptr<VisitorData<PrintContext> > Export::Visitor< DeclarationVisitor, ExpressionVisitor, StatementVisitor, ElementVisitor, PrintContext >::data_
private