Public Member Functions

nitro::Application Class Reference

List of all members.

Public Member Functions

virtual bool OnInit (void)
virtual int OnExit (void)

Detailed Description

Класс приложения.

Definition at line 670 of file mvc_core.cpp.


Member Function Documentation

int nitro::Application::OnExit ( void   )  [virtual]

Leaving application.

Returns:
Exit code.
Exceptions:
nitro::exception - An exception of this type is thrown if the error occured.
Author:
Dodonov A.A.

Definition at line 732 of file mvc_core.cpp.

References nitro::exception::code(), and nitro::exception::what().

        {
                try
                {
                        return( wxApp::OnExit() );
                }
                catch( nitro::exception e )
                {
                        throw( nitro::exception( std::string( "Application::OnExit( void )::" ) + e.what() , e.code() ) );
                }
                catch( ... )
                {
                        throw( nitro::exception( "Application::OnExit( void )::An error occured" , 1 ) );
                }
        }

Here is the call graph for this function:

bool nitro::Application::OnInit ( void   )  [virtual]

Creating app

Returns:
true - if app creation was done.
Exceptions:
nitro::exception - An exception of this type is thrown if the error occured.
Author:
Dodonov A.A.

Definition at line 706 of file mvc_core.cpp.

References nitro::MVC::AddView(), nitro::exception::code(), nitro::ExecuteCommandInterface::ExecuteCommand(), nitro::MVC::GetController(), nitro::ViewInterface::GetGUI(), nitro::GetMainMVCObject(), nitro::MVC::GetView(), and nitro::exception::what().

        {
                try
                {
                        // \~russian создаем самое верхнее окно
                        // \~english creating top level window
                        GetMainMVCObject()->AddView( "mvc_main_window" , ( ViewInterface * )new TopWindow() );

                        // \~russian запускаем приложение
                        // \~english starting application
                        GetMainMVCObject()->GetView( GetMainMVCObject()->GetStartupViewName() )->GetGUI( NULL , GetMainMVCObject()->GetView( "mvc_main_window" )->GetGUI() );

                        GetMainMVCObject()->GetController( GetMainMVCObject()->GetStartupControllerName() )->ExecuteCommand( GetMainMVCObject()->GetStartupControllerCommand() );

                        return( TRUE );
                }
                catch( nitro::exception e )
                {
                        throw( nitro::exception( std::string( "Application::OnInit( void )::" ) + e.what() , e.code() ) );
                }
                catch( ... )
                {
                        throw( nitro::exception( "Application::OnInit( void )::An error occured" , 1 ) );
                }
        }

Here is the call graph for this function:


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

Generated by  doxygen 1.6.1