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

Public Member Functions

virtual Optional< TupleSetexecuteLinear (TupleSet input) override
 
- Public Member Functions inherited from InformationScripting::LinearQuery
 LinearQuery (Model::Node *target=nullptr)
 
virtual QList< Optional< TupleSet > > execute (QList< TupleSet > input) override
 
- Public Member Functions inherited from InformationScripting::Query
 Query (Model::Node *target=nullptr)
 
virtual ~Query ()=default
 
bool hasInput () const
 
virtual void setHasInput ()
 
Model::Nodetarget () const
 

Static Public Member Functions

static void registerDefaultQueries ()
 

Private Types

using ExecuteFunction = std::function< Optional< TupleSet >(TagQuery *, TupleSet)>
 

Private Member Functions

 TagQuery (Model::Node *target, QStringList args, ExecuteFunction exec, std::vector< ArgumentRule > argumentRules={})
 
Optional< TupleSetaddTags (TupleSet input)
 
void insertFoundTags (TupleSet &tuples, const Model::SymbolMatcher &matcher, Model::Node *from=nullptr)
 
Optional< TupleSetqueryTags (TupleSet input)
 
Optional< TupleSetremoveTags (TupleSet input)
 
Optional< TupleSettags (TupleSet input)
 

Private Attributes

ArgumentParser arguments_
 
ExecuteFunction exec_ {}
 
bool persistent_ {true}
 

Static Private Attributes

static const QStringList ADD_ARGUMENT_NAMES {"a", "add"}
 
static const QStringList NAME_ARGUMENT_NAMES {"n", "name"}
 
static const QStringList PERSISTENT_ARGUMENT_NAMES {"p", "persistent"}
 
static const QStringList REMOVE_ARGUMENT_NAMES {"r", "remove"}
 

Friends

class QueryRegistry
 

Member Typedef Documentation

◆ ExecuteFunction

Constructor & Destructor Documentation

◆ TagQuery()

InformationScripting::TagQuery::TagQuery ( Model::Node target,
QStringList  args,
ExecuteFunction  exec,
std::vector< ArgumentRule argumentRules = {} 
)
private

Member Function Documentation

◆ addTags()

Optional< TupleSet > InformationScripting::TagQuery::addTags ( TupleSet  input)
private

◆ executeLinear()

Optional< TupleSet > InformationScripting::TagQuery::executeLinear ( TupleSet  input)
overridevirtual

◆ insertFoundTags()

void InformationScripting::TagQuery::insertFoundTags ( TupleSet tuples,
const Model::SymbolMatcher matcher,
Model::Node from = nullptr 
)
private

◆ queryTags()

Optional< TupleSet > InformationScripting::TagQuery::queryTags ( TupleSet  input)
private

◆ registerDefaultQueries()

void InformationScripting::TagQuery::registerDefaultQueries ( )
static

◆ removeTags()

Optional< TupleSet > InformationScripting::TagQuery::removeTags ( TupleSet  input)
private

◆ tags()

Optional< TupleSet > InformationScripting::TagQuery::tags ( TupleSet  input)
private

Friends And Related Function Documentation

◆ QueryRegistry

friend class QueryRegistry
friend

Member Data Documentation

◆ ADD_ARGUMENT_NAMES

const QStringList InformationScripting::TagQuery::ADD_ARGUMENT_NAMES {"a", "add"}
staticprivate

◆ arguments_

ArgumentParser InformationScripting::TagQuery::arguments_
private

◆ exec_

ExecuteFunction InformationScripting::TagQuery::exec_ {}
private

◆ NAME_ARGUMENT_NAMES

const QStringList InformationScripting::TagQuery::NAME_ARGUMENT_NAMES {"n", "name"}
staticprivate

◆ persistent_

bool InformationScripting::TagQuery::persistent_ {true}
private

◆ PERSISTENT_ARGUMENT_NAMES

const QStringList InformationScripting::TagQuery::PERSISTENT_ARGUMENT_NAMES {"p", "persistent"}
staticprivate

◆ REMOVE_ARGUMENT_NAMES

const QStringList InformationScripting::TagQuery::REMOVE_ARGUMENT_NAMES {"r", "remove"}
staticprivate