VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes
makVrv::DtVrvApplication Class Reference

The Root IG Application object. More...

Inheritance diagram for makVrv::DtVrvApplication:
Inheritance graph
[legend]

Public Member Functions

 DtVrvApplication ()
 Constructor.
 DtVrvApplication (const DtVrvApplicationConfiguration &appConfig)
virtual ~DtVrvApplication ()
 Destructor.
DtVrvApplicationConfigurationconfiguration ()
 DtVrvApplicationConfiguration accessor.
DtPageConfigurationmasterModePageConfiguration ()
 Get the page configuration which may be altered by plugins.
DtPageConfigurationslaveModePageConfiguration ()
DtMenuConfigurationmasterModeMenuConfiguration ()
 Get the menu configuration which may be altered by plugins.
DtMenuConfigurationslaveModeMenuConfiguration ()
DtToolbarConfigurationmasterModeToolbarConfiguration ()
 Get the toolbar configuration which may be altered by plugins.
DtToolbarConfigurationslaveModeToolbarConfiguration ()
DtDede ()
 DtDe accessor.
virtual void initialize (int argc, char **argv)
 Create the GUI, initialize the DtDe.
virtual void run ()
 Kick off the IG event loop.
virtual void writeGuiConfiguration ()
 Writes the toolbars and panels layout in the UI so they can be restored next time the app is loaded.
virtual bool updateCurrentGuiConfiguration ()
 Updates the current GUI configuration with the current UI layout status.
virtual DtPluginManagerpluginManager ()
 Provide access to the plugin manager.
virtual void slot_sceneTerrainLoaded (const DtUnicode &terrain)
 slots for the DtScene signals so the scenes/terrains can get added to the recent terrains list
virtual void slot_sceneTerrainSaved (const std::string &terrain)
virtual void slot_sceneToBeLoaded (const std::string &terrain)
virtual void slot_sceneLoaded (const std::string &terrain)
virtual void slot_sceneSaved (const std::string &terrain)
virtual std::list< std::string > & getRecentTerrains ()
virtual bool getShowStartupScreen () const
virtual void setShowStartupScreen (bool show)

Static Public Member Functions

static DtVrvApplicationget_last_instance ()
 Returns the last DtVrvApplication created, regardless of DtDe.
static void ShowSplashScreen (const std::string &imageName)
 Show a brief splash screen.
static void ShowErrorMessage (const std::string &message, DtException *ex=0)
 Show a brief splash screen.
static DtVrvApplicationfindFromDe (DtDe &)
 If an IG is created by an application you can find the IG application which created/owns it.
static bool parseDisplayEngineParameter (const std::string &argument, int &port, std::string &address, std::string &displayConfig)
 Parse a display engine command line argument.
static std::string displayEngineParameterFormatting ()
 Get the format of the display engine parameter.
static void handleFileError (const std::string &filename, const std::string &fileType)
 Handle when a file specified on the command line can't be read.
static void bindViews (const std::vector< std::string > &filenames, makVrv::DtDeInitializer::ObserverStateMap &aMap)
 Places all views into the supplied observer view map and binds to the supplied observer view.
static bool loadObserverStateRecords (const std::string &file, makArchives::DtObserverStateRecordsList &list)
 Loads up observer state records from filename into specified list.
static void loadViews (const std::vector< std::string > &filenames, makVrv::DtDeInitializer::ObserverStateMap &aMap)
 Places all views into the supplied observer view map.

Static Public Attributes

static const int MAX_RECENT_TERRAIN_COUNT = 20

Protected Types

typedef std::map< std::string,
ApplicationTransform
InitializerTransformMap

Protected Member Functions

virtual void loadPluginModules ()
 Loads plugins if the config says to as well as creating the DtDe instance.
virtual void assemble ()
 Use the assembler to build the user interface components.
virtual void createDefaultDisplayEngineConfiguration ()
 Create default engine configurations if none exist.
virtual DtDisplayConfiguration embeddedMasterDisplayConfig ()
 Helper method that returns an embedded display config.
virtual void createDefaultObserverConfiguration ()
 Create default observer configurations if none exist.
virtual void loadSavedGuiState ()
 Load saved gui state from the default UI layout file.
virtual void addRecentTerrain (const std::string &terrain)
 add a terrain/scene to the list of recent terrains.

Protected Attributes

DtVrvApplicationConfiguration myConfiguration
DtDeInitializer myInitializer
DtVrvCommandLineProcessormyCommandLineProcessor
DtDemyDe
DtPluginManagermyPluginManager
DtEventLoopmyEventLoop
InitializerTransformMap myPrePluginTransforms
InitializerTransformMap myPostPluginTransforms
InitializerTransformMap myPostAssembleTransforms
DtSignalConnectionManagermyConnections
bool myIsSceneLoading

Static Protected Attributes

static DtVrvApplicationsLastAppInstance
typedef boost::function< void(DtVrvApplicationConfiguration
&, int argc, char **argv)> 
ConfigurationTransform
 Type for a function object that transforms an app config in some way.
typedef boost::function< void(DtDeInitializer
&, DtDe
&, DtVrvApplicationConfiguration &)> 
ApplicationTransform
 Type for a function object that transforms an DtDeInitializer, DtDe or DtVrvApplicationConfiguration in some way.
virtual void installCommandLineProcessor (DtVrvCommandLineProcessor *commandLineProcessor)
 Add a configuration transformer that runs at command line processor level priority.
virtual void installPrePluginTransform (const ApplicationTransform &transform, const std::string &id)
 Add a transformer that runs before plug-ins are loaded.
virtual void installPostPluginTransform (const ApplicationTransform &transform, const std::string &id)
 Add a transformer that runs after plug-ins are loaded.
virtual void installPostAssembleTransform (const ApplicationTransform &transform, const std::string &id)
 Add a transformer that runs after the application is assembled and before the DtDe is initialized.

Detailed Description

The Root IG Application object.

  To run the IG simply create one, initialize it and call run. 
  @code 

#include <vrvCore/DtVrvApplication.h>

using namespace makVrv;

int main(int argc,char** argv) { DtVrvApplication igApp; igApp.initialize(argc, argv); igApp.run(); }

Examples

Member Typedef Documentation

Type for a function object that transforms an app config in some way.

Type for a function object that transforms an DtDeInitializer, DtDe or DtVrvApplicationConfiguration in some way.

Constructor & Destructor Documentation

makVrv::DtVrvApplication::DtVrvApplication ( )

Constructor.

Calls loadPluginsAndCreateIgInstance().

makVrv::DtVrvApplication::DtVrvApplication ( const DtVrvApplicationConfiguration appConfig)
virtual makVrv::DtVrvApplication::~DtVrvApplication ( )
virtual

Destructor.

Member Function Documentation

static DtVrvApplication* makVrv::DtVrvApplication::get_last_instance ( )
static

Returns the last DtVrvApplication created, regardless of DtDe.

static void makVrv::DtVrvApplication::ShowSplashScreen ( const std::string &  imageName)
static

Show a brief splash screen.

This functionality relies on launching an external splash screen process.

static void makVrv::DtVrvApplication::ShowErrorMessage ( const std::string &  message,
DtException ex = 0 
)
static

Show a brief splash screen.

This functionality relies on application specific ability to show an error message. This function may block if user input is required. If an exception is provided the error messages are displayed.

DtVrvApplicationConfiguration& makVrv::DtVrvApplication::configuration ( )
DtPageConfiguration& makVrv::DtVrvApplication::masterModePageConfiguration ( )

Get the page configuration which may be altered by plugins.

DtPageConfiguration& makVrv::DtVrvApplication::slaveModePageConfiguration ( )
DtMenuConfiguration& makVrv::DtVrvApplication::masterModeMenuConfiguration ( )

Get the menu configuration which may be altered by plugins.

DtMenuConfiguration& makVrv::DtVrvApplication::slaveModeMenuConfiguration ( )
DtToolbarConfiguration& makVrv::DtVrvApplication::masterModeToolbarConfiguration ( )

Get the toolbar configuration which may be altered by plugins.

DtToolbarConfiguration& makVrv::DtVrvApplication::slaveModeToolbarConfiguration ( )
DtDe& makVrv::DtVrvApplication::de ( )

DtDe accessor.

virtual void makVrv::DtVrvApplication::initialize ( int  argc,
char **  argv 
)
virtual

Create the GUI, initialize the DtDe.

Call before calling run().

  1. Sets the DtVrvConfiguration.
  2. Assembles the user interface.
  3. Calls DtDe::initialize().

Reimplemented in DtSimulationObjectEditorApplication, DtParameterAlteringApplication, makVrf::DtVrfGuiApplication, and DtVrfOpdEditorApplication.

virtual void makVrv::DtVrvApplication::run ( )
virtual

Kick off the IG event loop.

This function will block until the application is done running. Once run has completed there is no further operations that the object can perform other than destruction.

Reimplemented in DtParameterAlteringApplication, and makVrf::DtVrfGuiApplication.

static DtVrvApplication* makVrv::DtVrvApplication::findFromDe ( DtDe )
static

If an IG is created by an application you can find the IG application which created/owns it.

Returns
0 if the de was not created by a DtDe.
static bool makVrv::DtVrvApplication::parseDisplayEngineParameter ( const std::string &  argument,
int port,
std::string &  address,
std::string &  displayConfig 
)
static

Parse a display engine command line argument.

Parameters
Outputport will be set to -1 if no port is specified.
Returns
true or false if the argument was properly parsed.
static std::string makVrv::DtVrvApplication::displayEngineParameterFormatting ( )
static

Get the format of the display engine parameter.

virtual void makVrv::DtVrvApplication::installCommandLineProcessor ( DtVrvCommandLineProcessor commandLineProcessor)
virtual

Add a configuration transformer that runs at command line processor level priority.

virtual void makVrv::DtVrvApplication::installPrePluginTransform ( const ApplicationTransform transform,
const std::string &  id 
)
virtual

Add a transformer that runs before plug-ins are loaded.

virtual void makVrv::DtVrvApplication::installPostPluginTransform ( const ApplicationTransform transform,
const std::string &  id 
)
virtual

Add a transformer that runs after plug-ins are loaded.

virtual void makVrv::DtVrvApplication::installPostAssembleTransform ( const ApplicationTransform transform,
const std::string &  id 
)
virtual

Add a transformer that runs after the application is assembled and before the DtDe is initialized.

static void makVrv::DtVrvApplication::handleFileError ( const std::string &  filename,
const std::string &  fileType 
)
static

Handle when a file specified on the command line can't be read.

static void makVrv::DtVrvApplication::bindViews ( const std::vector< std::string > &  filenames,
makVrv::DtDeInitializer::ObserverStateMap aMap 
)
static

Places all views into the supplied observer view map and binds to the supplied observer view.

static bool makVrv::DtVrvApplication::loadObserverStateRecords ( const std::string &  file,
makArchives::DtObserverStateRecordsList list 
)
static

Loads up observer state records from filename into specified list.

static void makVrv::DtVrvApplication::loadViews ( const std::vector< std::string > &  filenames,
makVrv::DtDeInitializer::ObserverStateMap aMap 
)
static

Places all views into the supplied observer view map.

virtual void makVrv::DtVrvApplication::writeGuiConfiguration ( )
virtual

Writes the toolbars and panels layout in the UI so they can be restored next time the app is loaded.

Reimplemented in makVrf::DtVrfGuiApplication.

virtual bool makVrv::DtVrvApplication::updateCurrentGuiConfiguration ( )
virtual

Updates the current GUI configuration with the current UI layout status.

Reimplemented in makVrf::DtVrfGuiApplication, and DtParameterAlteringApplication.

virtual DtPluginManager& makVrv::DtVrvApplication::pluginManager ( )
virtual

Provide access to the plugin manager.

virtual void makVrv::DtVrvApplication::slot_sceneTerrainLoaded ( const DtUnicode terrain)
virtual

slots for the DtScene signals so the scenes/terrains can get added to the recent terrains list

virtual void makVrv::DtVrvApplication::slot_sceneTerrainSaved ( const std::string &  terrain)
virtual
virtual void makVrv::DtVrvApplication::slot_sceneToBeLoaded ( const std::string &  terrain)
virtual
virtual void makVrv::DtVrvApplication::slot_sceneLoaded ( const std::string &  terrain)
virtual
virtual void makVrv::DtVrvApplication::slot_sceneSaved ( const std::string &  terrain)
virtual
virtual std::list<std::string>& makVrv::DtVrvApplication::getRecentTerrains ( )
virtual
virtual bool makVrv::DtVrvApplication::getShowStartupScreen ( ) const
virtual

Reimplemented in makVrf::DtVrfGuiApplication.

virtual void makVrv::DtVrvApplication::setShowStartupScreen ( bool  show)
virtual
virtual void makVrv::DtVrvApplication::loadPluginModules ( )
protectedvirtual

Loads plugins if the config says to as well as creating the DtDe instance.

Called by the constructors.

Reimplemented in makVrf::DtVrfGuiApplication.

virtual void makVrv::DtVrvApplication::assemble ( )
protectedvirtual

Use the assembler to build the user interface components.

Reimplemented in DtParameterAlteringApplication, and makVrf::DtVrfGuiApplication.

virtual void makVrv::DtVrvApplication::createDefaultDisplayEngineConfiguration ( )
protectedvirtual

Create default engine configurations if none exist.

virtual DtDisplayConfiguration makVrv::DtVrvApplication::embeddedMasterDisplayConfig ( )
protectedvirtual

Helper method that returns an embedded display config.

virtual void makVrv::DtVrvApplication::createDefaultObserverConfiguration ( )
protectedvirtual

Create default observer configurations if none exist.

virtual void makVrv::DtVrvApplication::loadSavedGuiState ( )
protectedvirtual

Load saved gui state from the default UI layout file.

Reimplemented in makVrf::DtVrfGuiApplication.

virtual void makVrv::DtVrvApplication::addRecentTerrain ( const std::string &  terrain)
protectedvirtual

add a terrain/scene to the list of recent terrains.

Member Data Documentation

const int makVrv::DtVrvApplication::MAX_RECENT_TERRAIN_COUNT = 20
static
DtVrvApplicationConfiguration makVrv::DtVrvApplication::myConfiguration
protected
DtDeInitializer makVrv::DtVrvApplication::myInitializer
protected
DtVrvCommandLineProcessor* makVrv::DtVrvApplication::myCommandLineProcessor
protected
DtDe* makVrv::DtVrvApplication::myDe
protected
DtPluginManager* makVrv::DtVrvApplication::myPluginManager
protected
DtEventLoop* makVrv::DtVrvApplication::myEventLoop
protected
InitializerTransformMap makVrv::DtVrvApplication::myPrePluginTransforms
protected
InitializerTransformMap makVrv::DtVrvApplication::myPostPluginTransforms
protected
InitializerTransformMap makVrv::DtVrvApplication::myPostAssembleTransforms
protected
DtSignalConnectionManager* makVrv::DtVrvApplication::myConnections
protected
bool makVrv::DtVrvApplication::myIsSceneLoading
protected
DtVrvApplication* makVrv::DtVrvApplication::sLastAppInstance
staticprotected

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

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)