Tulip  4.7.0
Better Visualization Through Research
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Groups Pages
tlp::GraphNeedsSavingObserver Class Reference

#include <GraphNeedsSavingObserver.h>

+ Inheritance diagram for tlp::GraphNeedsSavingObserver:
+ Collaboration diagram for tlp::GraphNeedsSavingObserver:

Signals

void savingNeeded ()
 

Public Member Functions

 GraphNeedsSavingObserver (Graph *graph)
 
bool needsSaving () const
 
void saved ()
 

Protected Member Functions

virtual void treatEvents (const std::vector< Event > &)
 

Detailed Description

The GraphNeedsSavingObserver class will observe a graph and tells if it has been modified.

See Also
Observable
  • The constructor. Observe the graph given in parameter for modification
  • needsSaving. Returns true is the graph has been modified
  • saved. The graph has been saved, and the status of the class must be reset. needsSaving will return false if called after saved().
  • savingNeeded. Signal send when the status of the graph evolves.

Definition at line 42 of file GraphNeedsSavingObserver.h.

Constructor & Destructor Documentation

tlp::GraphNeedsSavingObserver::GraphNeedsSavingObserver ( Graph graph)

GraphNeedsSavingObserver Class constructor.

Parameters
graphthe graph which needs to be observed for modifications

Member Function Documentation

bool tlp::GraphNeedsSavingObserver::needsSaving ( ) const

needsSaving Indicates if the graph has been modified, and thus needs to be saved.

Returns
true if the graph needs to be saved, false otherwise.
void tlp::GraphNeedsSavingObserver::saved ( )

saved If the graph has been saved, one has to call this method to reset the status of the graph (it does not need to be saved). to indicate that the graph does not need to be saved until a new modification.

void tlp::GraphNeedsSavingObserver::savingNeeded ( )
signal

savingNeeded This signal is sent when the graph needs to be saved (it has been modified).

virtual void tlp::GraphNeedsSavingObserver::treatEvents ( const std::vector< Event > &  )
protectedvirtual

treatEvents This function is called when events are sent to Observers, and Observers only.

See Also
Listener
Observer
Observable
Observable::treatEvents(const std::vector<Event>&)
Parameters
eventsThe events that happened since the last unHoldObservers().

Reimplemented from tlp::Observable.