Envision
A visual programming IDE for object-oriented languages
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
Interaction::CommandWithFlags Class Referenceabstract
Inheritance diagram for Interaction::CommandWithFlags:
Interaction::Command Interaction::CMerge Interaction::CSceneHandlerLoad Interaction::CreateNamedObjectWithAttributes JavaExport::CJavaExport OODebug::CJavaCompile OODebug::CJavaDebug OODebug::CJavaRun OOInteraction::CDumpMethodRenderings VersionControlUI::CHistory

Public Member Functions

 CommandWithFlags (const QString &name, const QList< QStringList > &attributes, bool usePossibleNames, bool limitToMatchingNames=true)
 
virtual bool canInterpret (Visualization::Item *source, Visualization::Item *target, const QStringList &commandTokens, const std::unique_ptr< Visualization::Cursor > &cursor) override
 
virtual CommandResultexecute (Visualization::Item *source, Visualization::Item *target, const QStringList &commandTokens, const std::unique_ptr< Visualization::Cursor > &cursor) override
 
virtual QList< CommandSuggestion * > suggest (Visualization::Item *source, Visualization::Item *target, const QString &textSoFar, const std::unique_ptr< Visualization::Cursor > &cursor) override
 
- Public Member Functions inherited from Interaction::Command
 Command (QString name, bool appearsInMenus=false)
 
virtual ~Command ()
 
bool appearsInMenus () const
 
const QString name () const
 

Protected Member Functions

virtual CommandResultexecuteNamed (Visualization::Item *source, Visualization::Item *target, const std::unique_ptr< Visualization::Cursor > &cursor, const QString &name, const QStringList &attributes)=0
 
virtual QStringList possibleNames (Visualization::Item *source, Visualization::Item *target, const std::unique_ptr< Visualization::Cursor > &cursor)
 
virtual QList< CommandSuggestion * > suggestNamed (Visualization::Item *source, Visualization::Item *target, const QString &textSoFar, const std::unique_ptr< Visualization::Cursor > &cursor, const QString &name, const QStringList &attributes, bool commandFound)
 

Private Member Functions

void findParts (const QStringList &tokens, QString &name, QStringList &attributes, bool &commandFound, bool &unknownFormat, bool useFirstValueAsDefaultAttribute=false)
 
QStringList matchingNames (Visualization::Item *source, Visualization::Item *target, const std::unique_ptr< Visualization::Cursor > &cursor, const QString &nameToLookFor)
 

Private Attributes

const QList< QStringList > attributes_
 
const bool limitToMatchingNames_ {}
 
const bool usePossibleNames_ {}
 

Constructor & Destructor Documentation

◆ CommandWithFlags()

Interaction::CommandWithFlags::CommandWithFlags ( const QString &  name,
const QList< QStringList > &  attributes,
bool  usePossibleNames,
bool  limitToMatchingNames = true 
)

Member Function Documentation

◆ canInterpret()

bool Interaction::CommandWithFlags::canInterpret ( Visualization::Item source,
Visualization::Item target,
const QStringList &  commandTokens,
const std::unique_ptr< Visualization::Cursor > &  cursor 
)
overridevirtual

Reimplemented from Interaction::Command.

◆ execute()

CommandResult * Interaction::CommandWithFlags::execute ( Visualization::Item source,
Visualization::Item target,
const QStringList &  commandTokens,
const std::unique_ptr< Visualization::Cursor > &  cursor 
)
overridevirtual

Implements Interaction::Command.

◆ executeNamed()

virtual CommandResult* Interaction::CommandWithFlags::executeNamed ( Visualization::Item source,
Visualization::Item target,
const std::unique_ptr< Visualization::Cursor > &  cursor,
const QString &  name,
const QStringList &  attributes 
)
protectedpure virtual

◆ findParts()

void Interaction::CommandWithFlags::findParts ( const QStringList &  tokens,
QString &  name,
QStringList &  attributes,
bool &  commandFound,
bool &  unknownFormat,
bool  useFirstValueAsDefaultAttribute = false 
)
private

◆ matchingNames()

QStringList Interaction::CommandWithFlags::matchingNames ( Visualization::Item source,
Visualization::Item target,
const std::unique_ptr< Visualization::Cursor > &  cursor,
const QString &  nameToLookFor 
)
private

◆ possibleNames()

QStringList Interaction::CommandWithFlags::possibleNames ( Visualization::Item source,
Visualization::Item target,
const std::unique_ptr< Visualization::Cursor > &  cursor 
)
protectedvirtual

◆ suggest()

QList< CommandSuggestion * > Interaction::CommandWithFlags::suggest ( Visualization::Item source,
Visualization::Item target,
const QString &  textSoFar,
const std::unique_ptr< Visualization::Cursor > &  cursor 
)
overridevirtual

Reimplemented from Interaction::Command.

◆ suggestNamed()

QList< CommandSuggestion * > Interaction::CommandWithFlags::suggestNamed ( Visualization::Item source,
Visualization::Item target,
const QString &  textSoFar,
const std::unique_ptr< Visualization::Cursor > &  cursor,
const QString &  name,
const QStringList &  attributes,
bool  commandFound 
)
protectedvirtual

Member Data Documentation

◆ attributes_

const QList<QStringList> Interaction::CommandWithFlags::attributes_
private

◆ limitToMatchingNames_

const bool Interaction::CommandWithFlags::limitToMatchingNames_ {}
private

◆ usePossibleNames_

const bool Interaction::CommandWithFlags::usePossibleNames_ {}
private