Version: 8.3.0
YACS::HMI::SubjectObserver Class Reference

#include <guiObservers.hxx>

Inheritance diagram for YACS::HMI::SubjectObserver:
Collaboration diagram for YACS::HMI::SubjectObserver:

Public Member Functions

 SubjectObserver (Subject *ref)
 
virtual ~SubjectObserver ()
 
virtual void select (bool isSelected)
 
virtual void update (GuiEvent event, int type, Subject *son)
 
- Public Member Functions inherited from YACS::HMI::GuiObserver
 GuiObserver ()
 
virtual ~GuiObserver ()
 
virtual void incrementSubjects (Subject *subject)
 
virtual void decrementSubjects (Subject *subject)
 
int getNbSubjects ()
 
bool isDestructible ()
 

Protected Attributes

Subject_reference
 
- Protected Attributes inherited from YACS::HMI::GuiObserver
std::set< Subject * > _subjectSet
 
bool _destructible
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::HMI::GuiObserver
static std::string eventName (GuiEvent event)
 
static void setEventMap ()
 
- Static Protected Attributes inherited from YACS::HMI::GuiObserver
static std::map< int, std::string > _eventNameMap
 

Detailed Description

Definition at line 173 of file guiObservers.hxx.

Constructor & Destructor Documentation

SubjectObserver::SubjectObserver ( Subject ref)

Definition at line 437 of file guiObservers.cxx.

437  :_reference(ref)
438 {
439 }
SubjectObserver::~SubjectObserver ( )
virtual

Definition at line 440 of file guiObservers.cxx.

441 {
442 }

Member Function Documentation

void SubjectObserver::select ( bool  isSelected)
virtual

Reimplemented from YACS::HMI::GuiObserver.

Definition at line 443 of file guiObservers.cxx.

References DEBTRACE.

444 {
445  DEBTRACE("SubjectObserver::select " << isSelected);
446  //propagate nothing
447 }
void SubjectObserver::update ( GuiEvent  event,
int  type,
Subject son 
)
virtual

Reimplemented from YACS::HMI::GuiObserver.

Definition at line 448 of file guiObservers.cxx.

References _reference, DEBTRACE, YACS::HMI::GuiObserver::eventName(), YACS::HMI::RENAME, and YACS::HMI::Subject::update().

Referenced by gui.graph.MyCanvas::customEvent().

449 {
450  DEBTRACE("SubjectObserver::update " << type << "," << eventName(event) << "," << son);
451  //propagate only RENAME events
452  if(event == RENAME)
453  _reference->update(event,type,son);
454 }

Member Data Documentation

Subject* YACS::HMI::SubjectObserver::_reference
protected

Definition at line 181 of file guiObservers.hxx.

Referenced by update().


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