Version: 8.3.0
YACS::HMI::SubjectReference Class Reference

#include <guiObservers.hxx>

Inheritance diagram for YACS::HMI::SubjectReference:
Collaboration diagram for YACS::HMI::SubjectReference:

Public Member Functions

 SubjectReference (Subject *ref, Subject *parent)
 
virtual ~SubjectReference ()
 
virtual std::string getName ()
 
virtual SubjectgetReference () const
 
virtual void reparent (Subject *parent)
 
virtual void clean (Command *command=0)
 
void localclean (Command *command=0)
 
virtual TypeOfElem getType ()
 
- Public Member Functions inherited from YACS::HMI::Subject
 Subject (Subject *parent=0)
 
virtual ~Subject ()
 
virtual void attach (GuiObserver *obs)
 
virtual void detach (GuiObserver *obs)
 
virtual void select (bool isSelected)
 
virtual void update (GuiEvent event, int type, Subject *son)
 
virtual bool setName (std::string name)
 
virtual bool setProperties (std::map< std::string, std::string > properties)
 
virtual std::map< std::string,
std::string > 
getProperties ()
 
virtual std::vector< std::string > knownProperties ()
 
virtual SubjectgetParent ()
 
virtual void setParent (Subject *son)
 
virtual bool destroy (Subject *son)
 From user action in Ihm, destroy an object. More...
 
virtual void loadChildren ()
 
virtual void loadLinks ()
 
virtual void addSubjectReference (Subject *ref)
 
void localclean (Command *command=0)
 
void registerUndoDestroy ()
 
void askRegisterUndoDestroy ()
 
bool isDestructible ()
 
virtual void setProgress (std::string newProgress)
 
virtual std::string getProgress ()
 
- Public Member Functions inherited from YACS::ENGINE::Observer
virtual void notifyObserver (Node *object, const std::string &event)
 
virtual void notifyObserver2 (Node *object, const std::string &event, void *something)
 
virtual ~Observer ()
 

Protected Attributes

Subject_reference
 
SubjectObserver_sobs
 
- Protected Attributes inherited from YACS::HMI::Subject
std::set< GuiObserver * > _setObs
 
Subject_parent
 
bool _destructible
 
bool _askRegisterUndo
 
std::string _progress
 

Additional Inherited Members

- Static Public Member Functions inherited from YACS::HMI::Subject
static void erase (Subject *sub, Command *command=0, bool post=false)
 

Detailed Description

Definition at line 184 of file guiObservers.hxx.

Constructor & Destructor Documentation

SubjectReference::SubjectReference ( Subject ref,
Subject parent 
)

Definition at line 456 of file guiObservers.cxx.

References _sobs, and YACS::HMI::Subject::attach().

457  : Subject(parent), _reference(ref)
458 {
459  _sobs=new SubjectObserver(this);
460  ref->attach(_sobs);
461 }
SubjectReference::~SubjectReference ( )
virtual

Definition at line 463 of file guiObservers.cxx.

References _sobs.

464 {
465  delete _sobs;
466 }

Member Function Documentation

void SubjectReference::clean ( Command command = 0)
virtual

Clean process prior to delete is redefined in derived classes: a local clean treatment relative to the derived class, then a call to the parent class clean method.

Reimplemented from YACS::HMI::Subject.

Definition at line 468 of file guiObservers.cxx.

References YACS::HMI::Subject::_askRegisterUndo, YACS::HMI::Subject::clean(), localclean(), and YACS::HMI::Subject::registerUndoDestroy().

469 {
470  if (_askRegisterUndo)
471  {
472  _askRegisterUndo = false;
474  }
475  localclean(command);
476  Subject::clean(command);
477 }
std::string SubjectReference::getName ( )
virtual

Reimplemented from YACS::HMI::Subject.

Definition at line 484 of file guiObservers.cxx.

References _reference, and YACS::HMI::Subject::getName().

Referenced by YACS::HMI::EditionSalomeNode::update().

485 {
486  std::stringstream name;
487  name << "ref-->" << _reference->getName();
488  return name.str();
489 }
virtual TypeOfElem YACS::HMI::SubjectReference::getType ( )
inlinevirtual

Reimplemented from YACS::HMI::Subject.

Definition at line 194 of file guiObservers.hxx.

References YACS::HMI::REFERENCE.

194 {return REFERENCE;}
void SubjectReference::localclean ( Command command = 0)

Definition at line 479 of file guiObservers.cxx.

References DEBTRACE.

Referenced by clean().

480 {
481  DEBTRACE("SubjectReference::localClean ");
482 }
void SubjectReference::reparent ( Subject parent)
virtual

Definition at line 496 of file guiObservers.cxx.

References YACS::HMI::Subject::_parent.

Referenced by YACS::HMI::SubjectContainerBase::moveComponent(), and YACS::HMI::SubjectComponent::moveService().

497 {
498  _parent = parent;
499 }

Member Data Documentation

Subject* YACS::HMI::SubjectReference::_reference
protected

Definition at line 196 of file guiObservers.hxx.

Referenced by getName(), and getReference().

SubjectObserver* YACS::HMI::SubjectReference::_sobs
protected

Definition at line 197 of file guiObservers.hxx.

Referenced by SubjectReference(), and ~SubjectReference().


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