|
| ProcessorNetwork (InviwoApplication *application) |
|
| ProcessorNetwork (const ProcessorNetwork &)=delete |
|
| ProcessorNetwork (ProcessorNetwork &&)=delete |
|
ProcessorNetwork & | operator= (const ProcessorNetwork &)=delete |
|
ProcessorNetwork & | operator= (ProcessorNetwork &&)=delete |
|
Processor * | addProcessor (std::shared_ptr< Processor > processor) |
| Adds a Processor to the ProcessorNetwork.
|
|
template<typename T, class = typename std::enable_if_t<std::is_base_of_v<Processor, T>, void>> |
T * | addProcessor (std::shared_ptr< T > processor) |
| Adds a Processor to the ProcessorNetwork. s.
|
|
template<typename T, class = typename std::enable_if_t<std::is_base_of_v<Processor, T>, void>, typename... Args> |
std::shared_ptr< T > | emplaceProcessor (Args &&... args) |
| Emplace a Processor into the ProcessorNetwork.
|
|
Processor * | getProcessorByIdentifier (std::string_view identifier) const |
| Returns the Processor from the ProcessorNetwork, which has the given identifier.
|
|
template<class T> |
std::vector< T * > | getProcessorsByType () const |
| Returns a vector of Processors which are of type T.
|
|
std::vector< Processor * > | getProcessors () const |
| Get all processors in the network.
|
|
template<typename C> |
void | forEachProcessor (C callback) |
| Apply a function to each processor in the network.
|
|
auto | processorRange () const |
|
void | addConnection (Outport *sourcePort, Inport *destPort) |
| Add a PortConnection to the ProcessorNetwork.
|
|
void | addConnection (const PortConnection &connection) |
| Add a PortConnection to the ProcessorNetwork.
|
|
bool | canConnect (const Outport *sourcePort, const Inport *destPort) const |
|
void | removeConnection (Outport *sourcePort, Inport *destPort) |
| Removes a PortConnection from the ProcessorNetwork.
|
|
void | removeConnection (const PortConnection &connection) |
| Removes a PortConnection from the ProcessorNetwork.
|
|
bool | isConnected (Outport *sourcePort, Inport *destPort) const |
| Checks whether two port are connected.
|
|
bool | isConnected (const PortConnection &connection) const |
| Checks whether two port are connected.
|
|
const std::vector< PortConnection > & | getConnections () const |
| Get all connections in the network.
|
|
template<typename C> |
void | forEachConnection (C callback) |
| Apply a function to each connection in the network.
|
|
auto | connectionRange () const |
|
bool | isPortInNetwork (Port *port) const |
| Check if port is owned by a processor in this ProcessorNetwork.
|
|
void | addLink (Property *source, Property *destination) |
| Create and add Property Link to the network.
|
|
void | addLink (const PropertyLink &link) |
| Create and add Property Link to the network.
|
|
bool | canLink (const Property *source, const Property *destination) const |
| Check if source can be linked to destination.
|
|
void | removeLink (Property *source, Property *destination) |
|
void | removeLink (const PropertyLink &link) |
|
bool | isLinked (Property *source, Property *destination) const |
|
bool | isLinked (const PropertyLink &link) const |
|
std::vector< PropertyLink > | getLinks () const |
| Get all connections in the network.
|
|
template<typename C> |
void | forEachLink (C callback) |
| Apply a function to each property link in the network.
|
|
auto | linkRange () const |
|
bool | isLinkedBidirectional (Property *source, Property *destination) const |
|
std::vector< Property * > | getPropertiesLinkedTo (Property *property) |
|
std::vector< PropertyLink > | getLinksBetweenProcessors (Processor *p1, Processor *p2) |
|
Property * | getProperty (std::string_view path) const |
| Get Property by path.
|
|
Port * | getPort (std::string_view path) const |
| Get Port by path.
|
|
Inport * | getInport (std::string_view path) const |
| Get Inport by path.
|
|
Outport * | getOutport (std::string_view path) const |
| Get Outport by path.
|
|
bool | isPropertyInNetwork (Property *prop) const |
|
InviwoApplication * | getApplication () const |
|
void | evaluateLinksFromProperty (Property *) |
|
bool | isEmpty () const |
|
bool | isInvalidating () const |
|
bool | isLinking () const |
|
void | lock () |
|
void | unlock () |
|
bool | islocked () const |
|
virtual void | serialize (Serializer &s) const override |
|
virtual void | deserialize (Deserializer &d) override |
|
bool | isDeserializing () const |
|
void | clear () |
|
bool | empty () const |
|
size_t | size () const |
|
void | accept (NetworkVisitor &visor) |
| Accept a NetworkVisitor, the visitor will visit each Processor of the Network in an undefined order. The Visitor will then visit each processors Properties and so on.
|
|
int | runningBackgroundJobs () const |
|
void | notifyObserversProcessorNetworkChanged () |
|
void | notifyObserversProcessorNetworkEvaluateRequest () |
|
void | notifyObserversProcessorNetworkUnlocked () |
|
void | notifyObserversProcessorNetworkWillAddProcessor (Processor *processor) |
|
void | notifyObserversProcessorNetworkDidAddProcessor (Processor *processor) |
|
void | notifyObserversProcessorNetworkWillRemoveProcessor (Processor *processor) |
|
void | notifyObserversProcessorNetworkDidRemoveProcessor (Processor *processor) |
|
void | notifyObserversProcessorNetworkWillAddConnection (const PortConnection &connection) |
|
void | notifyObserversProcessorNetworkDidAddConnection (const PortConnection &connection) |
|
void | notifyObserversProcessorNetworkWillRemoveConnection (const PortConnection &connection) |
|
void | notifyObserversProcessorNetworkDidRemoveConnection (const PortConnection &connection) |
|
void | notifyObserversProcessorNetworkWillAddLink (const PropertyLink &propertyLink) |
|
void | notifyObserversProcessorNetworkDidAddLink (const PropertyLink &propertyLink) |
|
void | notifyObserversProcessorNetworkWillRemoveLink (const PropertyLink &propertyLink) |
|
void | notifyObserversProcessorNetworkDidRemoveLink (const PropertyLink &propertyLink) |
|
void | notifyObserversProcessorBackgroundJobsChanged (Processor *p, int diff, int total) |
|
| Observable (const Observable< ProcessorNetworkObserver > &other) |
|
| Observable (Observable< ProcessorNetworkObserver > &&other) noexcept |
|
Observable< ProcessorNetworkObserver > & | operator= (const Observable< ProcessorNetworkObserver > &other) |
|
Observable< ProcessorNetworkObserver > & | operator= (Observable< ProcessorNetworkObserver > &&other) noexcept |
|
void | addObserver (ProcessorNetworkObserver *observer) |
|
void | removeObserver (ProcessorNetworkObserver *observer) |
|
virtual void | startBlockingNotifications () override final |
|
virtual void | stopBlockingNotifications () override final |
|
virtual void | onProcessorPortAdded (Processor *, Port *) |
|
virtual void | onProcessorAboutToProcess (Processor *) |
|
virtual void | onProcessorFinishedProcess (Processor *) |
|
virtual void | onProcessorSourceChanged (Processor *) |
|
virtual void | onProcessorSinkChanged (Processor *) |
|
virtual void | onProcessorReadyChanged (Processor *) |
|
virtual void | onProcessorActiveConnectionsChanged (Processor *) |
|
| Observer (const Observer &other) |
|
| Observer (Observer &&other) |
|
Observer & | operator= (Observer &&other) |
|
Observer & | operator= (const Observer &other) |
|
virtual | ~Observer () |
|
void | removeObservation (ObservableInterface *observable) |
|
void | removeObservations () |
|
virtual void | onWillAddProperty (PropertyOwner *owner, Property *property, size_t index) |
|
virtual void | onDidAddProperty (Property *property, size_t index) |
|
virtual void | onDidRemoveProperty (PropertyOwner *owner, Property *property, size_t index) |
|
This class manages the current processor network. It can be thought of as a container of Processor instances, which Port instances are connected through PortConnection instances, and which Property instances are linked through ProcessorLink instances. To manage Processors, PortConnections and ProcessorLinks, add and remove methods are available for all these entities. The network should be only modified by using these methods. Typically, these methods are called by the NetworkEditor, which enables the user to edit ProcessorNetworks.
When the ProcessorNetwork has been changed, it is flagged as modified. This mechanism is used by the ProcessorNetworkEvaluator to identify if the ProcessorNetwork needs to be analyzed before processing.
In the model view controller design pattern, the ProcessorNetwork represents the model, which means that no graphical representations are generated for the added entities. Adding and removing of the graphical representations is done in the NetworkEditor.