Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Static Public Member Functions | Static Private Member Functions | Private Attributes
InformationScripting::QueryBuilder Class Reference
Inheritance diagram for InformationScripting::QueryBuilder:
Model::Visitor< QueryBuilder, std::vector< std::unique_ptr< Query > > >

Public Member Functions

 QueryBuilder (Model::Node *target, QueryExecutor *executor)
 
- Public Member Functions inherited from Model::Visitor< QueryBuilder, std::vector< std::unique_ptr< Query > > >
virtual ~Visitor ()
 
std::vector< std::unique_ptr< Query > > visit (Node *n)
 
virtual std::vector< std::unique_ptr< Query > > visitChildren (Node *n)
 

Static Public Member Functions

static void init ()
 
- Static Public Member Functions inherited from Model::Visitor< QueryBuilder, std::vector< std::unique_ptr< Query > > >
static void addType (std::function< std::vector< std::unique_ptr< Query > >(QueryBuilder *, NodeType *)> f)
 

Static Private Member Functions

static void connectAsSplit (CompositeQuery *composite, Query *left, CompositeQuery *right)
 Connects left with right queries in the composite, building a split operation. More...
 
static void connectAsUnion (CompositeQuery *composite, CompositeQuery *left, Query *right, OperatorQueryNode *op)
 Connects left with right queries in the composite, using a union operator specified in op. More...
 
static void connectQueriesWith (CompositeQuery *composite, CompositeQuery *queries, Query *connectionQuery, Query *outputQuery=nullptr)
 
static std::vector< std::unique_ptr< Query > > visitCommand (QueryBuilder *self, CommandNode *command)
 
static std::vector< std::unique_ptr< Query > > visitList (QueryBuilder *self, CompositeQueryNode *list)
 
static std::vector< std::unique_ptr< Query > > visitOperator (QueryBuilder *self, OperatorQueryNode *op)
 

Private Attributes

QueryExecutorexecutor_ {}
 
Model::Nodetarget_ {}
 

Additional Inherited Members

- Public Types inherited from Model::Visitor< QueryBuilder, std::vector< std::unique_ptr< Query > > >
using BaseVisitorType = QueryBuilder
 
using VisitFunctionInstance = std::function< std::vector< std::unique_ptr< Query > >(QueryBuilder *, Node *)>
 
using VisitorResultType = std::vector< std::unique_ptr< Query > >
 
- Protected Member Functions inherited from Model::Visitor< QueryBuilder, std::vector< std::unique_ptr< Query > > >
virtual VisitFunctionInstance findFunctionForId (int id)
 

Constructor & Destructor Documentation

◆ QueryBuilder()

InformationScripting::QueryBuilder::QueryBuilder ( Model::Node target,
QueryExecutor executor 
)

Member Function Documentation

◆ connectAsSplit()

void InformationScripting::QueryBuilder::connectAsSplit ( CompositeQuery composite,
Query left,
CompositeQuery right 
)
staticprivate

Connects left with right queries in the composite, building a split operation.

Note that left and right have to be previously added to composite.

◆ connectAsUnion()

void InformationScripting::QueryBuilder::connectAsUnion ( CompositeQuery composite,
CompositeQuery left,
Query right,
OperatorQueryNode op 
)
staticprivate

Connects left with right queries in the composite, using a union operator specified in op.

Note that left and right have to be previously added to composite.

◆ connectQueriesWith()

void InformationScripting::QueryBuilder::connectQueriesWith ( CompositeQuery composite,
CompositeQuery queries,
Query connectionQuery,
Query outputQuery = nullptr 
)
staticprivate

◆ init()

void InformationScripting::QueryBuilder::init ( )
static

◆ visitCommand()

std::vector< std::unique_ptr< Query > > InformationScripting::QueryBuilder::visitCommand ( QueryBuilder self,
CommandNode command 
)
staticprivate

◆ visitList()

std::vector< std::unique_ptr< Query > > InformationScripting::QueryBuilder::visitList ( QueryBuilder self,
CompositeQueryNode list 
)
staticprivate

◆ visitOperator()

std::vector< std::unique_ptr< Query > > InformationScripting::QueryBuilder::visitOperator ( QueryBuilder self,
OperatorQueryNode op 
)
staticprivate

Member Data Documentation

◆ executor_

QueryExecutor* InformationScripting::QueryBuilder::executor_ {}
private

◆ target_

Model::Node* InformationScripting::QueryBuilder::target_ {}
private