VPTissue Reference Manual
SimShell::Viewer::ViewerNode< ViewerType, SubjectType > Class Template Reference

Template implementing a node in a hierarchical tree of viewers.Parameters: More...

#include <ViewerNode.h>

Inheritance diagram for SimShell::Viewer::ViewerNode< ViewerType, SubjectType >:
Inheritance graph
Collaboration diagram for SimShell::Viewer::ViewerNode< ViewerType, SubjectType >:
Collaboration graph

Public Member Functions

 ViewerNode (std::shared_ptr< Ws::MergedPreferences > p, IViewerNode::ChildrenMap &&c, Gui::Controller::AppController *app=nullptr)
 
 ViewerNode (std::shared_ptr< Ws::MergedPreferences > p, Gui::Controller::AppController *app=nullptr)
 
virtual ~ViewerNode ()
 Virtual destructor.
 
virtual IViewerNode::ChildrenMap::const_iterator begin () const
 
template<class T >
std::enable_if<!viewer_is_widget< T >::value, std::shared_ptr< T > >::type CreateViewer ()
 
template<class T >
std::enable_if< viewer_is_widget< T >::value, std::shared_ptr< T > >::type CreateViewer ()
 
virtual void Disable ()
 
virtual void Enable ()
 
virtual IViewerNode::ChildrenMap::const_iterator end () const
 
virtual bool IsEnabled () const
 
virtual bool IsParentEnabled () const
 
- Public Member Functions inherited from SimShell::Viewer::IViewerNodeWithParent< SubjectType >
virtual ~IViewerNodeWithParent ()
 Virtual destructor.
 
- Public Member Functions inherited from SimShell::Viewer::IViewerNode
virtual ~IViewerNode ()
 Virtual destructor.
 
- Public Member Functions inherited from SimPT_Sim::Util::Subject< Event::ViewerEvent, std::weak_ptr< const void > >
void Notify (const EventType &)
 
void Register (const U *, CallbackType)
 
void Unregister (const U *)
 
void UnregisterAll ()
 

Protected Member Functions

virtual void ParentDisabled ()
 
virtual void ParentEnabled (std::shared_ptr< SubjectType >)
 

Additional Inherited Members

- Public Types inherited from SimShell::Viewer::IViewerNode
typedef std::map< std::string, std::shared_ptr< IViewerNode > > ChildrenMap
 
- Public Types inherited from SimPT_Sim::Util::Subject< Event::ViewerEvent, std::weak_ptr< const void > >
typedef std::function< void(const EventType &)> CallbackType
 
typedef Event::ViewerEvent EventType
 
typedef const std::weak_ptr< const void > * KeyType
 

Detailed Description

template<class ViewerType, class SubjectType>
class SimShell::Viewer::ViewerNode< ViewerType, SubjectType >

Template implementing a node in a hierarchical tree of viewers.Parameters:

  • ViewerType : Type of viewer to be dynamically created/destroyed upon being enabled/disabled.
  • SubjectType: Type of subject the (dynamically created/destroyed) viewer is observing.

Definition at line 50 of file ViewerNode.h.

Member Function Documentation

template<class ViewerType , class SubjectType >
IViewerNode::ChildrenMap::const_iterator SimShell::Viewer::ViewerNode< ViewerType, SubjectType >::begin ( ) const
virtual
See also
IViewerNode

Implements SimShell::Viewer::IViewerNode.

Definition at line 263 of file ViewerNode.h.

template<class ViewerType , class SubjectType >
void SimShell::Viewer::ViewerNode< ViewerType, SubjectType >::Disable ( )
virtual
See also
IViewerNode

Implements SimShell::Viewer::IViewerNode.

Definition at line 233 of file ViewerNode.h.

template<class ViewerType , class SubjectType >
void SimShell::Viewer::ViewerNode< ViewerType, SubjectType >::Enable ( )
virtual
See also
IViewerNode

Implements SimShell::Viewer::IViewerNode.

Definition at line 242 of file ViewerNode.h.

template<class ViewerType , class SubjectType >
IViewerNode::ChildrenMap::const_iterator SimShell::Viewer::ViewerNode< ViewerType, SubjectType >::end ( ) const
virtual
See also
IViewerNode

Implements SimShell::Viewer::IViewerNode.

Definition at line 269 of file ViewerNode.h.

template<class ViewerType , class SubjectType >
bool SimShell::Viewer::ViewerNode< ViewerType, SubjectType >::IsEnabled ( ) const
virtual
See also
IViewerNode

Implements SimShell::Viewer::IViewerNode.

Definition at line 251 of file ViewerNode.h.

template<class ViewerType , class SubjectType >
bool SimShell::Viewer::ViewerNode< ViewerType, SubjectType >::IsParentEnabled ( ) const
virtual
See also
IViewerNodeWithParent

Implements SimShell::Viewer::IViewerNode.

Definition at line 257 of file ViewerNode.h.

template<class ViewerType , class SubjectType >
void SimShell::Viewer::ViewerNode< ViewerType, SubjectType >::ParentDisabled ( )
protectedvirtual
template<class ViewerType , class SubjectType >
void SimShell::Viewer::ViewerNode< ViewerType, SubjectType >::ParentEnabled ( std::shared_ptr< SubjectType >  s)
protectedvirtual

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