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 | Static Private Member Functions | Private Attributes | Static Private Attributes | Friends
InformationScripting::QueryResultVisualizer Class Reference
Inheritance diagram for InformationScripting::QueryResultVisualizer:
InformationScripting::LinearQuery InformationScripting::Query

Public Member Functions

Optional< TupleSetexecuteLinear (TupleSet input) override
 
Optional< int > visualize (const TupleSet &ts)
 
- 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 cleanScene ()
 
static void registerDefaultQueries ()
 

Private Types

using TaggedValue = std::pair< QString, QString >
 

Private Member Functions

 QueryResultVisualizer (Model::Node *target, QStringList args, QueryExecutor *executor=nullptr)
 
Optional< QHash< Model::Node *, QString > > convertTuplesToString (const QHash< Model::Node *, QList< Tuple >> &infos)
 
Optional< QHash< Model::Node *, QString > > extractInfo (const TupleSet &ts)
 
Optional< std::vector< TaggedValue > > infoArgumentValues ()
 
void visualizeMessages (const TupleSet &ts)
 

Static Private Member Functions

static QHash< Model::Node *, QStringList > extractColors (const TupleSet &ts)
 
static void setColor (Visualization::HighlightOverlay *overlay, QColor color)
 
static void showASTRelation (const TupleSet &ts, const QString &relationName)
 

Private Attributes

ArgumentParser arguments_
 
QueryExecutorexecutor_
 

Static Private Attributes

static const QString ARROW_OVERLAY_GROUP = {"default arrow"}
 
static constexpr int DEFAULT_ALPHA_ {60}
 
static const QString HIGHLIGHT_OVERLAY_GROUP = {"default graph highlight"}
 
static const QStringList INFO_ARGUMENT_NAMES {"i", "info"}
 
static const QString MESSAGE_OVERLAY_GROUP = {"default message overlay"}
 
static const QStringList SORT_ARGUMENT_NAMES {"s", "sort"}
 

Friends

class QueryRegistry
 

Member Typedef Documentation

◆ TaggedValue

using InformationScripting::QueryResultVisualizer::TaggedValue = std::pair<QString, QString>
private

Constructor & Destructor Documentation

◆ QueryResultVisualizer()

InformationScripting::QueryResultVisualizer::QueryResultVisualizer ( Model::Node target,
QStringList  args,
QueryExecutor executor = nullptr 
)
private

Member Function Documentation

◆ cleanScene()

void InformationScripting::QueryResultVisualizer::cleanScene ( )
static

◆ convertTuplesToString()

Optional< QHash< Model::Node *, QString > > InformationScripting::QueryResultVisualizer::convertTuplesToString ( const QHash< Model::Node *, QList< Tuple >> &  infos)
private

◆ executeLinear()

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

◆ extractColors()

QHash< Model::Node *, QStringList > InformationScripting::QueryResultVisualizer::extractColors ( const TupleSet ts)
staticprivate

◆ extractInfo()

Optional< QHash< Model::Node *, QString > > InformationScripting::QueryResultVisualizer::extractInfo ( const TupleSet ts)
private

◆ infoArgumentValues()

Optional< std::vector< QueryResultVisualizer::TaggedValue > > InformationScripting::QueryResultVisualizer::infoArgumentValues ( )
private

◆ registerDefaultQueries()

void InformationScripting::QueryResultVisualizer::registerDefaultQueries ( )
static

◆ setColor()

void InformationScripting::QueryResultVisualizer::setColor ( Visualization::HighlightOverlay overlay,
QColor  color 
)
staticprivate

◆ showASTRelation()

void InformationScripting::QueryResultVisualizer::showASTRelation ( const TupleSet ts,
const QString &  relationName 
)
staticprivate

◆ visualize()

Optional< int > InformationScripting::QueryResultVisualizer::visualize ( const TupleSet ts)

◆ visualizeMessages()

void InformationScripting::QueryResultVisualizer::visualizeMessages ( const TupleSet ts)
private

Ignore this tuple

Friends And Related Function Documentation

◆ QueryRegistry

friend class QueryRegistry
friend

Member Data Documentation

◆ arguments_

ArgumentParser InformationScripting::QueryResultVisualizer::arguments_
private

◆ ARROW_OVERLAY_GROUP

const QString InformationScripting::QueryResultVisualizer::ARROW_OVERLAY_GROUP = {"default arrow"}
staticprivate

◆ DEFAULT_ALPHA_

constexpr int InformationScripting::QueryResultVisualizer::DEFAULT_ALPHA_ {60}
staticconstexprprivate

◆ executor_

QueryExecutor* InformationScripting::QueryResultVisualizer::executor_
private

◆ HIGHLIGHT_OVERLAY_GROUP

const QString InformationScripting::QueryResultVisualizer::HIGHLIGHT_OVERLAY_GROUP = {"default graph highlight"}
staticprivate

◆ INFO_ARGUMENT_NAMES

const QStringList InformationScripting::QueryResultVisualizer::INFO_ARGUMENT_NAMES {"i", "info"}
staticprivate

◆ MESSAGE_OVERLAY_GROUP

const QString InformationScripting::QueryResultVisualizer::MESSAGE_OVERLAY_GROUP = {"default message overlay"}
staticprivate

◆ SORT_ARGUMENT_NAMES

const QStringList InformationScripting::QueryResultVisualizer::SORT_ARGUMENT_NAMES {"s", "sort"}
staticprivate