OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Attributes | List of all members
openstudio::WorkspaceObjectWatcher Class Reference

#include <WorkspaceObjectWatcher.hpp>

+ Inheritance diagram for openstudio::WorkspaceObjectWatcher:

Public Member Functions

virtual void clearState () override
 reset relationshipChanged and removedFromWorkspace as well as flags from IdfObjectWatcher More...
 
virtual void onRelationshipChange (int index, Handle newHandle, Handle oldHandle)
 called each time a pointer field changes if watcher enabled More...
 
virtual void onRemoveFromWorkspace (Handle handle)
 called when the object is removed from its workspace if watcher enabled More...
 
void relationshipChange (int index, Handle newHandle, Handle oldHandle)
 
bool relationshipChanged () const
 true if a pointer field changed More...
 
bool removedFromWorkspace () const
 true if the object was removed from its workspace More...
 
void removedFromWorkspace (const Handle &handle)
 
 WorkspaceObjectWatcher (const WorkspaceObject &workspaceObject)
 constructor with IdfObject to watch More...
 
virtual ~WorkspaceObjectWatcher ()=default
 virtual destructor More...
 
- Public Member Functions inherited from openstudio::IdfObjectWatcher
void change ()
 
void dataChange ()
 
bool dataChanged () const
 if dirty, then true if data field changed, false if some other change More...
 
bool dirty () const
 true if object has changed More...
 
bool disable ()
 
void enable ()
 enable the watcher More...
 
bool enabled () const
 is the watcher currently enabled More...
 
 IdfObjectWatcher (const IdfObject &idfObject)
 constructor with IdfObject to watch More...
 
void nameChange ()
 
bool nameChanged () const
 if dirty, then true if name field changed, false otherwise More...
 
virtual void onBecomeClean ()
 called after dirty transitions from true to false if watcher enabled More...
 
virtual void onBecomeDirty ()
 called after dirty transitions from false to true if watcher enabled More...
 
virtual void onChangeIdfObject ()
 called each time the IdfObject changes if watcher enabled More...
 
virtual void onDataFieldChange ()
 called each time one of the IdfObject's data fields changes if watcher enabled More...
 
virtual void onNameChange ()
 called each time the IdfObject's name changes if watcher enabled More...
 
virtual ~IdfObjectWatcher ()=default
 virtual destructor More...
 

Protected Attributes

bool m_relationshipChanged
 
bool m_removedFromWorkspace
 
- Protected Attributes inherited from openstudio::IdfObjectWatcher
bool m_dataChanged
 
bool m_dirty
 
bool m_enabled
 
bool m_nameChanged
 

Constructor & Destructor Documentation

openstudio::WorkspaceObjectWatcher::WorkspaceObjectWatcher ( const WorkspaceObject workspaceObject)

constructor with IdfObject to watch

virtual openstudio::WorkspaceObjectWatcher::~WorkspaceObjectWatcher ( )
virtualdefault

virtual destructor

Member Function Documentation

virtual void openstudio::WorkspaceObjectWatcher::clearState ( )
overridevirtual

reset relationshipChanged and removedFromWorkspace as well as flags from IdfObjectWatcher

Reimplemented from openstudio::IdfObjectWatcher.

virtual void openstudio::WorkspaceObjectWatcher::onRelationshipChange ( int  index,
Handle  newHandle,
Handle  oldHandle 
)
virtual

called each time a pointer field changes if watcher enabled

virtual void openstudio::WorkspaceObjectWatcher::onRemoveFromWorkspace ( Handle  handle)
virtual

called when the object is removed from its workspace if watcher enabled

void openstudio::WorkspaceObjectWatcher::relationshipChange ( int  index,
Handle  newHandle,
Handle  oldHandle 
)
bool openstudio::WorkspaceObjectWatcher::relationshipChanged ( ) const

true if a pointer field changed

bool openstudio::WorkspaceObjectWatcher::removedFromWorkspace ( ) const

true if the object was removed from its workspace

void openstudio::WorkspaceObjectWatcher::removedFromWorkspace ( const Handle handle)

Member Data Documentation

bool openstudio::WorkspaceObjectWatcher::m_relationshipChanged
protected
bool openstudio::WorkspaceObjectWatcher::m_removedFromWorkspace
protected