Loading...
Searching...
No Matches
LocalTree::ReferenceIndex Class Referencefinal
Inheritance diagram for LocalTree::ReferenceIndex:

Detailed Description

Two-way index between addresses held by states, ports, conditions and triggers and the objects they resolve to. A reference outliving its target keeps the last address.

Classes

struct  Broken
 

Public Types

using Mapping = std::function< std::optional<::State::AddressAccessor >(const ::State::AddressAccessor &)>
 

Public Member Functions

 ReferenceIndex (DocumentPlugin &tree)
 
void add (QObject &referrer)
 Tracked until destroyed.
 
std::vector< QObject * > referrers (const QObject &target) const
 
std::vector< QObject * > targets (const QObject &referrer) const
 
std::vector< Broken > broken () const
 Referrers holding an address that resolves to nothing.
 
void watchExplorer ()
 Call once the document has a device explorer.
 
void refresh (const QObject &target)
 
void recover (const ::State::Address &published)
 Re-anchors the dangling references to a newly published address.
 
void unpublished (const QObject *target)
 
void changed ()
 
void rewrite (QObject &referrer, const Mapping &map)
 Not undoable.
 

The documentation for this class was generated from the following files: