Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
InformationScripting::CompositeQuery Class Reference
Inheritance diagram for InformationScripting::CompositeQuery:
InformationScripting::Query

Public Member Functions

virtual ~CompositeQuery () override
 
QueryaddQuery (std::unique_ptr< Query > &&query)
 Adds the query to this CompositeQuery. More...
 
void connectInput (int inputIndex, Query *to, int atInput=0)
 
void connectQuery (Query *from, int outIndex, Query *to, int inIndex)
 
void connectQuery (Query *from, Query *to)
 Connects output 0 from Query from to input 0 of Query to. More...
 
void connectToOutput (int queryOutIndex, Query *from, int compositeOutIndex)
 
virtual QList< Optional< TupleSet > > execute (QList< TupleSet > input) override
 
int inputCount () const
 
int outputCount () const
 
virtual void setHasInput () override
 
- Public Member Functions inherited from InformationScripting::Query
 Query (Model::Node *target=nullptr)
 
virtual ~Query ()=default
 
bool hasInput () const
 
Model::Nodetarget () const
 

Private Member Functions

void addInputMapping (QueryNodeInCompositeQuery *outNode, int outIndex, QueryNodeInCompositeQuery *inNode, int inIndex)
 
void addOutputMapping (QueryNodeInCompositeQuery *outNode, int outIndex, QueryNodeInCompositeQuery *inNode)
 
QueryNodeInCompositeQuerynodeForQuery (Query *q)
 

Private Attributes

QueryNodeInCompositeQueryinNode_ {new QueryNodeInCompositeQuery{nullptr}}
 
QList< QueryNodeInCompositeQuery * > nodes_
 
QueryNodeInCompositeQueryoutNode_ {new QueryNodeInCompositeQuery{nullptr}}
 

Constructor & Destructor Documentation

◆ ~CompositeQuery()

InformationScripting::CompositeQuery::~CompositeQuery ( )
overridevirtual

Member Function Documentation

◆ addInputMapping()

void InformationScripting::CompositeQuery::addInputMapping ( QueryNodeInCompositeQuery outNode,
int  outIndex,
QueryNodeInCompositeQuery inNode,
int  inIndex 
)
private

◆ addOutputMapping()

void InformationScripting::CompositeQuery::addOutputMapping ( QueryNodeInCompositeQuery outNode,
int  outIndex,
QueryNodeInCompositeQuery inNode 
)
private

◆ addQuery()

Query * InformationScripting::CompositeQuery::addQuery ( std::unique_ptr< Query > &&  query)

Adds the query to this CompositeQuery.

This CompositeQuery will take ownership of query. The returned value is the underlying raw pointer in query which can be used to wire query with other queries.

◆ connectInput()

void InformationScripting::CompositeQuery::connectInput ( int  inputIndex,
Query to,
int  atInput = 0 
)

◆ connectQuery() [1/2]

void InformationScripting::CompositeQuery::connectQuery ( Query from,
int  outIndex,
Query to,
int  inIndex 
)

◆ connectQuery() [2/2]

void InformationScripting::CompositeQuery::connectQuery ( Query from,
Query to 
)

Connects output 0 from Query from to input 0 of Query to.

If either from or to was not yet inserted they will be and this query will take ownership of it.

◆ connectToOutput()

void InformationScripting::CompositeQuery::connectToOutput ( int  queryOutIndex,
Query from,
int  compositeOutIndex 
)

◆ execute()

QList< Optional< TupleSet > > InformationScripting::CompositeQuery::execute ( QList< TupleSet input)
overridevirtual

◆ inputCount()

int InformationScripting::CompositeQuery::inputCount ( ) const
inline

◆ nodeForQuery()

QueryNodeInCompositeQuery * InformationScripting::CompositeQuery::nodeForQuery ( Query q)
private

◆ outputCount()

int InformationScripting::CompositeQuery::outputCount ( ) const
inline

◆ setHasInput()

void InformationScripting::CompositeQuery::setHasInput ( )
overridevirtual

Reimplemented from InformationScripting::Query.

Member Data Documentation

◆ inNode_

QueryNodeInCompositeQuery* InformationScripting::CompositeQuery::inNode_ {new QueryNodeInCompositeQuery{nullptr}}
private

◆ nodes_

QList<QueryNodeInCompositeQuery*> InformationScripting::CompositeQuery::nodes_
private

◆ outNode_

QueryNodeInCompositeQuery* InformationScripting::CompositeQuery::outNode_ {new QueryNodeInCompositeQuery{nullptr}}
private