OpenWalnut  1.4.0
Public Member Functions | Protected Attributes
WUI Class Reference

This class prescribes the interface to the UI. More...

#include <WUI.h>

+ Inheritance diagram for WUI:

List of all members.

Public Member Functions

 WUI (int argc, char **argv)
 Constructor.
virtual ~WUI ()
 Destructor.
virtual const WFlag< bool > & isInitialized () const
 Returns the init flag.
virtual int run ()=0
 Runs the UI.
virtual WCustomWidget::SPtr openCustomWidget (std::string title, WGECamera::ProjectionMode projectionMode, boost::shared_ptr< WCondition > shutdownCondition)=0
 Instruct to open a new custom widget.
virtual void closeCustomWidget (std::string title)=0
 Instruct to close a custom widget.
virtual void closeCustomWidget (WCustomWidget::SPtr widget)=0
 Instruct to close the custom widget.

Protected Attributes

WFlag< bool > m_isInitialized
 Flag determining whether the UI is properly initialized.
int m_argc
 Number of command line arguments given.
char ** m_argv
 Command line arguments given.

Detailed Description

This class prescribes the interface to the UI.

It basically is an abstract class defining the interface common to all possible UI implementations.

Definition at line 50 of file WUI.h.


Constructor & Destructor Documentation

WUI::WUI ( int  argc,
char **  argv 
)

Constructor.

Parameters:
argcnumber of arguments given on command line.
argvarguments given on command line.

Definition at line 29 of file WUI.cpp.

WUI::~WUI ( ) [virtual]

Destructor.

Definition at line 37 of file WUI.cpp.


Member Function Documentation

virtual void WUI::closeCustomWidget ( std::string  title) [pure virtual]

Instruct to close a custom widget.

Parameters:
titleThe title of the widget
virtual void WUI::closeCustomWidget ( WCustomWidget::SPtr  widget) [pure virtual]

Instruct to close the custom widget.

Parameters:
widgetthe widget to close again.
const WFlag< bool > & WUI::isInitialized ( ) const [virtual]

Returns the init flag.

Returns:
Reference to the flag.

Definition at line 41 of file WUI.cpp.

References m_isInitialized.

virtual WCustomWidget::SPtr WUI::openCustomWidget ( std::string  title,
WGECamera::ProjectionMode  projectionMode,
boost::shared_ptr< WCondition shutdownCondition 
) [pure virtual]

Instruct to open a new custom widget.

The specified condition should be the shutdown condition of the module, as the function returns only if the widget was created. To ensure that the creation is aborted properly if the module shuts down in the meantime, this condition is used.

Notes:
this function blocks until the widget was created. Check the resulting pointer for NULL.
Parameters:
titlethe title of the widget
projectionModethe kind of projection which should be used
shutdownConditiona condition enforcing abort of widget creation.
Returns:
the created widget
virtual int WUI::run ( ) [pure virtual]

Runs the UI.

All initialization should be done here.

Returns:
the return code.

Member Data Documentation

int WUI::m_argc [protected]

Number of command line arguments given.

Definition at line 121 of file WUI.h.

char** WUI::m_argv [protected]

Command line arguments given.

Definition at line 126 of file WUI.h.

WFlag< bool > WUI::m_isInitialized [protected]

Flag determining whether the UI is properly initialized.

Definition at line 116 of file WUI.h.

Referenced by isInitialized().


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