Envision
A visual programming IDE for object-oriented languages
|
Public Member Functions | |
Reference (::Model::Node *parent, ::Model::PersistentStore &store, bool loadPartially) | |
Reference (::Model::Node *parent=nullptr) | |
Reference (const Reference &other) | |
virtual | ~Reference () override |
Reference * | clone () const override |
virtual Node * | computeTarget () const |
bool | isResolved () const |
virtual void | load (PersistentStore &store) override |
const QString & | name () const |
bool | resolve () |
virtual void | save (PersistentStore &store) const override |
void | setName (const QString &name) |
void | setResolutionNeeded () |
Invalidates the target of this reference and enters a state where resolution is needed. More... | |
Node * | target () |
Static Public Member Functions | |
static void | addUnresolutionSteps (std::function< void(Node *subTree)> step) |
Adds the step function to be called when references are being unresolved after a sub tree is added. More... | |
static Reference * | createDefaultInstance (Node *parent=nullptr) |
static bool | isReferenceResolutionEnabled () |
static void | resolvePending () |
static void | setReferenceResolutionEnabled (bool enable) |
static void | unresolveAfterNewSubTree (Node *subTree) |
Performs all necessary operations to unresolve refrences after a new tree has been introduced. More... | |
static void | unresolveAll (Node *subTree) |
Marks all the references in the provided subTree as unresolved. More... | |
static void | unresolveIfNameIntroduced (Node *subTreeToUnresolve, Node *subTreeToLookForNewNames) |
Marks as unresolved references in subTreeToUnresolve, whose name is identical to any NameText node in subTreeToLookForNewNames. More... | |
static void | unresolveNames (Node *subTree, const QSet< QString > &names) |
Marks references whose name is in names in the provided subTree as unresolved. More... | |
Private Types | |
enum | State { ReferenceEstablished , ReferenceNeedsToBeResolved , ReferenceIsBeingResolved } |
Private Member Functions | |
bool | resolveHelper (bool indirect) |
virtual void | targetChanged (Node *oldTarget) |
Static Private Member Functions | |
template<typename NodeType > | |
static void | forAll (Node *subTree, std::function< void(NodeType *node)> function) |
static void | unresolveReferencesHelper (Node *subTree, bool all, const QSet< QString > &names) |
Private Attributes | |
QString | name_ |
State | state_ {ReferenceNeedsToBeResolved} |
Node * | target_ {} |
Static Private Attributes | |
static QList< Reference * > | allReferences_ |
A set of all existing reference objects. More... | |
static bool | enableGlobalReferenceResolution_ {true} |
static QSet< Reference * > | pendingResolution_ |
A set of all unresolved references which are pending resolution. More... | |
static QList< std::function< void(Node *subTree)> > | unresolutionSteps_ |
Friends | |
class | PersistentStore |
Additional Inherited Members | |
Protected Types inherited from Core::Reflect< Base > | |
using | Super = Reflect< Base > |
|
private |
Model::Reference::Reference | ( | ::Model::Node * | parent = nullptr | ) |
Model::Reference::Reference | ( | ::Model::Node * | parent, |
::Model::PersistentStore & | store, | ||
bool | loadPartially | ||
) |
Model::Reference::Reference | ( | const Reference & | other | ) |
|
overridevirtual |
|
static |
Adds the step function to be called when references are being unresolved after a sub tree is added.
|
override |
|
virtual |
|
staticprivate |
|
inlinestatic |
|
inline |
|
overridevirtual |
|
inline |
|
inline |
|
private |
|
static |
|
overridevirtual |
void Model::Reference::setName | ( | const QString & | name | ) |
|
static |
void Model::Reference::setResolutionNeeded | ( | ) |
Invalidates the target of this reference and enters a state where resolution is needed.
Node * Model::Reference::target | ( | ) |
|
privatevirtual |
|
static |
Performs all necessary operations to unresolve refrences after a new tree has been introduced.
|
static |
Marks all the references in the provided subTree as unresolved.
|
static |
Marks as unresolved references in subTreeToUnresolve, whose name is identical to any NameText node in subTreeToLookForNewNames.
|
static |
Marks references whose name is in names in the provided subTree as unresolved.
|
staticprivate |
|
friend |
|
staticprivate |
A set of all existing reference objects.
|
staticprivate |
|
private |
|
staticprivate |
A set of all unresolved references which are pending resolution.
Note that there can be unresolved references which are not pending resolution, e.g. references in deleted branches of a tree, which are now owned by the undo stack.
|
private |
|
private |
|
staticprivate |