VPTissue Reference Manual
SimShell::Viewer::SubjectNode< SubjectType > Class Template Reference

A viewer node that does not represent a viewer at all. More...

#include <SubjectNode.h>

Inheritance diagram for SimShell::Viewer::SubjectNode< SubjectType >:
Inheritance graph
Collaboration diagram for SimShell::Viewer::SubjectNode< SubjectType >:
Collaboration graph

Public Member Functions

 SubjectNode (std::shared_ptr< Ws::MergedPreferences > p, std::shared_ptr< SubjectType > s, IViewerNode::ChildrenMap &&c)
 SubjectNode (std::shared_ptr< Ws::MergedPreferences > p, std::shared_ptr< SubjectType > s)
virtual IViewerNode::ChildrenMap::const_iterator begin () const
 Get iterator pointing to first child.
virtual void Disable ()
 Disable node.
virtual void Enable ()
 Enable node.
virtual IViewerNode::ChildrenMap::const_iterator end () const
 Get iterator pointing to one position after last child.
virtual bool IsEnabled () const
 Test whether node is enabled. More...
virtual bool IsParentEnabled () const
 Test whether parent node is enabled.
- 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 ()

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 SubjectType>
class SimShell::Viewer::SubjectNode< SubjectType >

A viewer node that does not represent a viewer at all.

It doesn't create and delete a viewer when being enabled/disabled. It owns a subject (in the observer pattern) with which its children are registered. Usually it serves as a base type for the root of the tree of viewers.

Template parameters:

  • SubjectType: The type of the subject this node owns and registers its children nodes with.

Definition at line 41 of file SubjectNode.h.

Member Function Documentation

template<class SubjectType >
bool SimShell::Viewer::SubjectNode< SubjectType >::IsEnabled ( ) const

Test whether node is enabled.

Note that an enabled node still won't do anything if its parent is disabled.

See also

Implements SimShell::Viewer::IViewerNode.

Definition at line 152 of file SubjectNode.h.

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