00001 #ifndef __MVC_CORE_CPP__
00002 #define __MVC_CORE_CPP__
00003
00004 #include <managers/dynamic_lib_manager.h>
00005 #include <utilities/cpp_utilities.h>
00006 #include <utilities/exception.h>
00007 #include <utilities/file_utilities.h>
00008 #include <utilities/mvc/mvc_core.h>
00009 #include <utilities/mvc/mvc_defines.h>
00010 #include <utilities/string_utilities.h>
00011
00012 #include <wx/wx.h>
00013 #include <wx/image.h>
00014 #include <wx/treectrl.h>
00015 #include <wx/wfstream.h>
00016
00017 namespace nitro
00018 {
00019
00020 MVC::MVC( void )
00021 {
00022 try
00023 {
00024 RootMVC = NULL;
00025 StartupViewName = "";
00026 StartupControllerName = "";
00027 StartupControllerCommand = "startup";
00028 }
00029 catch( nitro::exception e )
00030 {
00031 throw( nitro::exception( std::string( "MVC::MVC( void )::" ) + e.what() , e.code() ) );
00032 }
00033 catch( ... )
00034 {
00035 throw( nitro::exception( "MVC::MVC( void )::An error occured" , 1 ) );
00036 }
00037 }
00038
00039 MVC::MVC( nitro::XMLTag & ManifestPart , MVC * theRootMVC )
00040 {
00041 try
00042 {
00043 RootMVC = theRootMVC;
00044
00045 StartupViewName = "";
00046 StartupControllerName = "";
00047 StartupControllerCommand = "startup";
00048
00049 Create( ManifestPart );
00050 }
00051 catch( nitro::exception e )
00052 {
00053 throw( nitro::exception( std::string( "MVC::MVC( nitro::XMLTag & ManifestPart )::" ) + e.what() , e.code() ) );
00054 }
00055 catch( ... )
00056 {
00057 throw( nitro::exception( "MVC::MVC( nitro::XMLTag & ManifestPart )::An error occured" , 1 ) );
00058 }
00059 }
00060
00061 void MVC::AddModel( const char * ModelName , nitro::ModelInterface * Model )
00062 {
00063 try
00064 {
00065 Models.AddObject( ModelName , Model );
00066 }
00067 catch( nitro::exception e )
00068 {
00069 throw( nitro::exception( std::string( "MVC::AddModel( const char * ModelName , nitro::ModelInterface * Model )::" ) + e.what() , e.code() ) );
00070 }
00071 catch( ... )
00072 {
00073 throw( nitro::exception( "MVC::AddModel( const char * ModelName , nitro::ModelInterface * Model )::An error occured" , 1 ) );
00074 }
00075 }
00076
00077 void MVC::AddView( const char * ViewName , nitro::ViewInterface * View )
00078 {
00079 try
00080 {
00081 Views.AddObject( ViewName , View );
00082 }
00083 catch( nitro::exception e )
00084 {
00085 throw( nitro::exception( std::string( "MVC::AddView( const char * ViewName , nitro::ViewInterface * View )::" ) + e.what() , e.code() ) );
00086 }
00087 catch( ... )
00088 {
00089 throw( nitro::exception( "MVC::AddView( const char * ViewName , nitro::ViewInterface * View )::An error occured" , 1 ) );
00090 }
00091 }
00092
00093 void MVC::AddController( const char * ControllerName , nitro::ControllerInterface * Controller )
00094 {
00095 try
00096 {
00097 Controllers.AddObject( ControllerName , Controller );
00098 }
00099 catch( nitro::exception e )
00100 {
00101 throw( nitro::exception( std::string( "MVC::AddController( const char * ControllerName , nitro::ControllerInterface * Controller )::" ) + e.what() , e.code() ) );
00102 }
00103 catch( ... )
00104 {
00105 throw( nitro::exception( "MVC::AddController( const char * ControllerName , nitro::ControllerInterface * Controller )::An error occured" , 1 ) );
00106 }
00107 }
00108
00109 nitro::ModelInterface * MVC::GetModel( const char * ModelName )
00110 {
00111 try
00112 {
00113 return( Models[ ModelName ] );
00114 }
00115 catch( nitro::exception e )
00116 {
00117 throw( nitro::exception( std::string( "MVC::GetModel( const char * ModelName )::" ) + e.what() , e.code() ) );
00118 }
00119 catch( ... )
00120 {
00121 throw( nitro::exception( "MVC::GetModel( const char * ModelName )::An error occured" , 1 ) );
00122 }
00123 }
00124
00125 nitro::ViewInterface * MVC::GetView( const char * ViewName )
00126 {
00127 try
00128 {
00129 return( Views[ ViewName ] );
00130 }
00131 catch( nitro::exception e )
00132 {
00133 throw( nitro::exception( std::string( "MVC::GetView( const char * ViewName )::" ) + e.what() , e.code() ) );
00134 }
00135 catch( ... )
00136 {
00137 throw( nitro::exception( "MVC::GetView( const char * ViewName )::An error occured" , 1 ) );
00138 }
00139 }
00140
00141 nitro::ControllerInterface *MVC::GetController( const char * ControllerName )
00142 {
00143 try
00144 {
00145 return( Controllers[ ControllerName ] );
00146 }
00147 catch( nitro::exception e )
00148 {
00149 throw( nitro::exception( std::string( "MVC::GetController( const char * ControllerName )::" ) + e.what() , e.code() ) );
00150 }
00151 catch( ... )
00152 {
00153 throw( nitro::exception( "MVC::GetController( const char * ControllerName )::An error occured" , 1 ) );
00154 }
00155 }
00156
00157 nitro::ModelInterface * MVC::GetModel( const std::string & ModelName )
00158 {
00159 try
00160 {
00161 return( Models[ ModelName ] );
00162 }
00163 catch( nitro::exception e )
00164 {
00165 throw( nitro::exception( std::string( "MVC::GetModel( const char * ModelName )::" ) + e.what() , e.code() ) );
00166 }
00167 catch( ... )
00168 {
00169 throw( nitro::exception( "MVC::GetModel( const std::string & ModelName )::An error occured" , 1 ) );
00170 }
00171 }
00172
00173 nitro::ViewInterface * MVC::GetView( const std::string & ViewName )
00174 {
00175 try
00176 {
00177 return( Views[ ViewName ] );
00178 }
00179 catch( nitro::exception e )
00180 {
00181 throw( nitro::exception( std::string( "MVC::GetView( const std::string & ViewName )::" ) + e.what() , e.code() ) );
00182 }
00183 catch( ... )
00184 {
00185 throw( nitro::exception( "MVC::GetView( const std::string & ViewName )::An error occured" , 1 ) );
00186 }
00187 }
00188
00189 nitro::ControllerInterface *MVC::GetController( const std::string & ControllerName )
00190 {
00191 try
00192 {
00193 return( Controllers[ ControllerName ] );
00194 }
00195 catch( nitro::exception e )
00196 {
00197 throw( nitro::exception( std::string( "MVC::GetController( const std::string & ControllerName )::" ) + e.what() , e.code() ) );
00198 }
00199 catch( ... )
00200 {
00201 throw( nitro::exception( "MVC::GetController( const std::string & ControllerName )::An error occured" , 1 ) );
00202 }
00203 }
00204
00205 bool MVC::ExecuteCommand( const char * Command , const void * Param1 , const void * Param2 )
00206 {
00207 try
00208 {
00209 for( std::size_t i( 0 ) ; i < Controllers.Count() ; i++ )
00210 {
00211 if( Controllers[ i ]->ExecuteCommand( Command , Param1 , Param2 ) == false )
00212 {
00213 return( false );
00214 }
00215 }
00216
00217 for( std::size_t i( 0 ) ; i < Views.Count() ; i++ )
00218 {
00219 if( Views[ i ]->ExecuteCommand( Command , Param1 , Param2 ) == false )
00220 {
00221 return( false );
00222 }
00223 }
00224
00225 return( true );
00226 }
00227 catch( nitro::exception e )
00228 {
00229 throw( nitro::exception( std::string( "MVC::ExecuteCommand( const char * Command , const void * Param1 , const void * Param2 )::" ) + e.what() , e.code() ) );
00230 }
00231 catch( ... )
00232 {
00233 throw( nitro::exception( "MVC::ExecuteCommand( const char * Command , const void * Param1 , const void * Param2 )::An error occured" , 1 ) );
00234 }
00235 }
00236
00237 void MVC::LoadModules( const char * Path , const nitro::XMLTag & ManifestPart )
00238 {
00239 try
00240 {
00241 std::vector< std::string > ModulePaths;
00242
00243 std::string PluginPath( "./bin/mvc/" );
00244 if( Path != NULL && strlen( Path ) != 0 )
00245 {
00246 PluginPath = Path;
00247 }
00248
00249
00250 nitro::CollectFilesFromDirectory( PluginPath , ModulePaths );
00251
00252 LoadModules( ModulePaths , ManifestPart );
00253 }
00254 catch( nitro::exception e )
00255 {
00256 throw( nitro::exception( std::string( "MVC::LoadModules( const char * Path , const nitro::XMLTag & ManifestPart )::" ) + e.what() , e.code() ) );
00257 }
00258 catch( ... )
00259 {
00260 throw( nitro::exception( "MVC::LoadModules( const char * Path , const nitro::XMLTag & ManifestPart )::An error occured" , 1 ) );
00261 }
00262 }
00263
00264 void MVC::LoadModule( const char * Path , const nitro::XMLTag & ManifestPart )
00265 {
00266 try
00267 {
00268 if( nitro::File::FileExists( Path ) == false )
00269 {
00270 throw( nitro::exception( std::string( "Module " ) + Path + " does not exists" , 1 ) );
00271 }
00272
00273 std::vector< std::string > ModulePaths;
00274
00275 ModulePaths.push_back( std::string( Path ) );
00276
00277 LoadModules( ModulePaths , ManifestPart );
00278 }
00279 catch( nitro::exception e )
00280 {
00281 throw( nitro::exception( std::string( "MVC::LoadModule( const char * Path , const nitro::XMLTag & ManifestPart )::" ) + e.what() , e.code() ) );
00282 }
00283 catch( ... )
00284 {
00285 throw( nitro::exception( "MVC::LoadModule( const char * Path , const nitro::XMLTag & ManifestPart )::An error occured" , 1 ) );
00286 }
00287 }
00288
00289 void MVC::LoadModules( const std::string & Path , const nitro::XMLTag & ManifestPart )
00290 {
00291 try
00292 {
00293 LoadModules( Path.c_str() , ManifestPart );
00294 }
00295 catch( nitro::exception e )
00296 {
00297 throw( nitro::exception( std::string( "MVC::LoadModules( const std::string & Path , const nitro::XMLTag & ManifestPart )::" ) + e.what() , e.code() ) );
00298 }
00299 catch( ... )
00300 {
00301 throw( nitro::exception( "MVC::LoadModules( const std::string & Path , const nitro::XMLTag & ManifestPart )::An error occured" , 1 ) );
00302 }
00303 }
00304
00305 void MVC::Create( const char * Path , MVC * theRootMVC )
00306 {
00307 try
00308 {
00309 std::string ManifestPath( "./conf/mvc_config.xml" );
00310 if( Path != NULL && strlen( Path ) != 0 )
00311 {
00312 ManifestPath = Path;
00313 }
00314
00315 nitro::XMLFile Manifest;
00316
00317 if( nitro::File::FileExists( ManifestPath ) )
00318 {
00319 Manifest.LoadXML( ManifestPath );
00320 Create( Manifest.GetRoot() , theRootMVC );
00321 }
00322 else
00323 {
00324 this->LoadModules( std::string( "./bin" ) , Manifest );
00325 }
00326 }
00327 catch( nitro::exception e )
00328 {
00329 throw( nitro::exception( std::string( "MVC::Create( const char * Path /* = NULL */ , MVC * theRootMVC /* = NULL */ )::" ) + e.what() , e.code() ) );
00330 }
00331 catch( ... )
00332 {
00333 throw( nitro::exception( "MVC::Create( const char * Path /* = NULL */ , MVC * theRootMVC /* = NULL */ )::An error occured" , 1 ) );
00334 }
00335 }
00336
00337 void MVC::Create( const std::string & Path , MVC * theRootMVC )
00338 {
00339 try
00340 {
00341 Create( Path.c_str() , theRootMVC );
00342 }
00343 catch( nitro::exception e )
00344 {
00345 throw( nitro::exception( std::string( "MVC::Create( const std::string & Path , MVC * theRootMVC /* = NULL */ )::" ) + e.what() , e.code() ) );
00346 }
00347 catch( ... )
00348 {
00349 throw( nitro::exception( "MVC::Create( const std::string & Path , MVC * theRootMVC /* = NULL */ )::An error occured" , 1 ) );
00350 }
00351 }
00352
00353 void MVC::Create( nitro::XMLTag & ManifestPart , MVC * theRootMVC )
00354 {
00355 try
00356 {
00357 RootMVC = theRootMVC;
00358 for( std::size_t i( 0 ) ; i < ManifestPart.CountOfChildTags() ; i++ )
00359 {
00360 if( ManifestPart[ i ].Name == "setlocale" )
00361 {
00362 setlocale( LC_ALL , ManifestPart[ i ].GetAttribute_string( "locale" ) );
00363 continue;
00364 }
00365
00366 if( ManifestPart[ i ].Name == "dll" )
00367 {
00368 LoadModule( ManifestPart[ i ].GetAttribute_string( "value" ) , ManifestPart[ i ] );
00369 continue;
00370 }
00371
00372 if( ManifestPart[ i ].Name == "dlls" )
00373 {
00374 LoadModules( ManifestPart[ i ].GetAttribute_string( "value" ) , ManifestPart[ i ] );
00375 continue;
00376 }
00377
00378 if( ManifestPart[ i ].Name == "mvc" )
00379 {
00380 if( ManifestPart[ i ].AttributeExists( "path" ) )
00381 {
00382 nitro::XMLFile MVCManifest( ManifestPart[ i ].GetAttribute_string( "path" ) );
00383 MVCObjects.AddObject( ManifestPart[ i ].GetAttribute_string( "name" ) , new MVC( MVCManifest[ 0 ] , this ) );
00384 }
00385
00386 MVCObjects.AddObject( ManifestPart[ i ].GetAttribute_string( "name" ) , new MVC( ManifestPart[ i ] , this ) );
00387 continue;
00388 }
00389
00390 if( ManifestPart[ i ].Name == "main" )
00391 {
00392 if( ManifestPart[ i ].AttributeExists( "startup_view" ) )
00393 {
00394 StartupViewName = ManifestPart[ i ].GetAttribute_string( "startup_view" );
00395 }
00396
00397 if( ManifestPart[ i ].AttributeExists( "startup_controller" ) )
00398 {
00399 StartupControllerName = ManifestPart[ i ].GetAttribute_string( "startup_controller" );
00400 }
00401
00402 if( ManifestPart[ i ].AttributeExists( "startup_controller_command" ) )
00403 {
00404 StartupControllerCommand = ManifestPart[ i ].GetAttribute_string( "startup_controller_command" );
00405 }
00406
00407 continue;
00408 }
00409 }
00410 }
00411 catch( nitro::exception e )
00412 {
00413 throw( nitro::exception( std::string( "MVC::Create( nitro::XMLTag & ManifestPart , MVC * theRootMVC /* = NULL */ )::" ) + e.what() , e.code() ) );
00414 }
00415 catch( ... )
00416 {
00417 throw( nitro::exception( "MVC::Create( nitro::XMLTag & ManifestPart , MVC * theRootMVC /* = NULL */ )::An error occured" , 1 ) );
00418 }
00419 }
00420
00421 int MVC::Entry( MAIN_FUNC_PARAMS_LIST )
00422 {
00423 try
00424 {
00425 return( wxEntry( MAIN_FUNC_VALUES_LIST ) );
00426 }
00427 catch( nitro::exception e )
00428 {
00429 throw( nitro::exception( std::string( "MVC::Entry( MAIN_FUNC_PARAMS_LIST )::" ) + e.what() , e.code() ) );
00430 }
00431 catch( ... )
00432 {
00433 throw( nitro::exception( "MVC::Entry( MAIN_FUNC_PARAMS_LIST )::An error occured" , 1 ) );
00434 }
00435 }
00436
00437 const char * MVC::GetStartupViewName( void ) const
00438 {
00439 try
00440 {
00441 return( StartupViewName.c_str() );
00442 }
00443 catch( nitro::exception e )
00444 {
00445 throw( nitro::exception( std::string( "MVC::GetStartupViewName( void )::" ) + e.what() , e.code() ) );
00446 }
00447 catch( ... )
00448 {
00449 throw( nitro::exception( "MVC::GetStartupViewName( void )::An error occured" , 1 ) );
00450 }
00451 }
00452
00453 const char * MVC::GetStartupControllerName( void ) const
00454 {
00455 try
00456 {
00457 return( StartupControllerName.c_str() );
00458 }
00459 catch( nitro::exception e )
00460 {
00461 throw( nitro::exception( std::string( "MVC::GetStartupControllerName( void )::" ) + e.what() , e.code() ) );
00462 }
00463 catch( ... )
00464 {
00465 throw( nitro::exception( "MVC::GetStartupControllerName( void )::An error occured" , 1 ) );
00466 }
00467 }
00468
00469 const char * MVC::GetStartupControllerCommand( void ) const
00470 {
00471 try
00472 {
00473 return( StartupControllerCommand.c_str() );
00474 }
00475 catch( nitro::exception e )
00476 {
00477 throw( nitro::exception( std::string( "MVC::GetStartupControllerCommand( void )::" ) + e.what() , e.code() ) );
00478 }
00479 catch( ... )
00480 {
00481 throw( nitro::exception( "MVC::GetStartupControllerCommand( void )::An error occured" , 1 ) );
00482 }
00483 }
00484
00485 MVC::~MVC()
00486 {
00487 try
00488 {
00489 }
00490 catch( ... )
00491 {
00492 }
00493 }
00494
00495 void MVC::LoadModules( const std::vector< std::string > & ModulePaths , const nitro::XMLTag & ManifestPart )
00496 {
00497 try
00498 {
00499 for( std::size_t i( 0 ) ; i < ModulePaths.size() ; i++ )
00500 {
00501 if( nitro::Parsers::EndsWith( ModulePaths[ i ] , std::string( ".dll" ) ) )
00502 {
00503 Modules.LoadLibrary( ModulePaths[ i ] );
00504
00505 if( Modules[ ModulePaths[ i ].c_str() ]->ResourceExists( "GetModel" ) )
00506 {
00507 DEFINE_DYNAMIC_ARRAY( char , Name , 128 );
00508 nitro::ModelInterface * Interface;
00509
00510 void ( * GetModel )( char * , nitro::ModelInterface * & , const nitro::XMLTag & );
00511 GetModel = ( void ( * )( char * , nitro::ModelInterface * & , const nitro::XMLTag & ) )Modules[ ModulePaths[ i ].c_str() ]->GetResource( "GetModel" );
00512
00513 GetModel( Name , Interface , ManifestPart );
00514
00515 AddModel( Name , Interface );
00516 }
00517
00518 if( Modules[ ModulePaths[ i ].c_str() ]->ResourceExists( "GetView" ) )
00519 {
00520 DEFINE_DYNAMIC_ARRAY( char , Name , 128 );
00521 nitro::ViewInterface * Interface;
00522
00523 void ( * GetView )( char * , nitro::ViewInterface * & , const nitro::XMLTag & );
00524 GetView = ( void ( * )( char * , nitro::ViewInterface * & , const nitro::XMLTag & ) )Modules[ ModulePaths[ i ].c_str() ]->GetResource( "GetView" );
00525
00526 GetView( Name , Interface , ManifestPart );
00527
00528 AddView( Name , Interface );
00529 }
00530
00531 if( Modules[ ModulePaths[ i ].c_str() ]->ResourceExists( "GetController" ) )
00532 {
00533 DEFINE_DYNAMIC_ARRAY( char , Name , 128 );
00534 nitro::ControllerInterface * Interface;
00535
00536 void ( * GetController )( char * , nitro::ControllerInterface * & , const nitro::XMLTag & );
00537 GetController = ( void ( * )( char * , nitro::ControllerInterface * & , const nitro::XMLTag & ) )Modules[ ModulePaths[ i ].c_str() ]->GetResource( "GetController" );
00538
00539 GetController( Name , Interface , ManifestPart );
00540
00541 AddController( Name , Interface );
00542 }
00543 }
00544 }
00545 }
00546 catch( nitro::exception e )
00547 {
00548 throw( nitro::exception( std::string( "MVC::LoadModules( const std::vector< std::string > & ModulePaths , const nitro::XMLTag & ManifestPart )::" ) + e.what() , e.code() ) );
00549 }
00550 catch( ... )
00551 {
00552 throw( nitro::exception( "MVC::LoadModules( const std::vector< std::string > & ModulePaths , const nitro::XMLTag & ManifestPart )::An error occured" , 1 ) );
00553 }
00554 }
00555
00556 MVC MainMVCObject;
00557
00558 MVC * GetMainMVCObject( void )
00559 {
00560 return( & MainMVCObject );
00561 }
00562
00566 class TopWindow: public wxFrame , public ViewInterface
00567 {
00568 public:
00569
00570 TopWindow( void );
00571
00594 virtual bool ExecuteCommand( const char * Command , const void * Param1 = NULL , const void * Param2 = NULL );
00595
00615 virtual void * GetGUI( const char * ViewName = NULL , void * Parent = NULL );
00616
00617 };
00618
00619 TopWindow::TopWindow( void ) : wxFrame( ( wxFrame * )NULL , -1 , "" , wxPoint( 0 , 0 ) , wxSize( 0 , 0 ) )
00620 {
00621 Centre();
00622
00623 Show( FALSE );
00624 }
00625
00626 bool TopWindow::ExecuteCommand( const char * Command , const void * Param1 , const void * Param2 )
00627 {
00628 try
00629 {
00630 if( std::string( "close_app" ) == Command )
00631 {
00632 this->Close( TRUE );
00633
00634 return( false );
00635 }
00636
00637 return( true );
00638 }
00639 catch( nitro::exception e )
00640 {
00641 throw( nitro::exception( std::string( "TopWindow::ExecuteCommand( const char * Command , const void * Param1 /* = NULL */ , const void * Param2 /* = NULL */ )::" ) + e.what() , e.code() ) );
00642 }
00643 catch( ... )
00644 {
00645 throw( nitro::exception( "TopWindow::ExecuteCommand( const char * Command , const void * Param1 /* = NULL */ , const void * Param2 /* = NULL */ )::An error occured" , 1 ) );
00646 }
00647
00648 return( FALSE );
00649 }
00650
00651 void * TopWindow::GetGUI( const char * ViewName , void * Parent )
00652 {
00653 try
00654 {
00655 return( ( void * )( wxWindow * )this );
00656 }
00657 catch( nitro::exception e )
00658 {
00659 throw( nitro::exception( std::string( "TopWindow::GetGUI( const char * ViewName /* = NULL */ , void * Parent /* = NULL */ )::" ) + e.what() , e.code() ) );
00660 }
00661 catch( ... )
00662 {
00663 throw( nitro::exception( "TopWindow::GetGUI( const char * ViewName /* = NULL */ , void * Parent /* = NULL */ )::An error occured" , 1 ) );
00664 }
00665 }
00666
00670 class Application: public wxApp{
00671 public:
00672
00686 virtual bool OnInit( void );
00687
00701 virtual int OnExit( void );
00702 };
00703
00704 IMPLEMENT_APP_NO_MAIN( Application )
00705
00706 bool Application::OnInit( void )
00707 {
00708 try
00709 {
00710
00711
00712 GetMainMVCObject()->AddView( "mvc_main_window" , ( ViewInterface * )new TopWindow() );
00713
00714
00715
00716 GetMainMVCObject()->GetView( GetMainMVCObject()->GetStartupViewName() )->GetGUI( NULL , GetMainMVCObject()->GetView( "mvc_main_window" )->GetGUI() );
00717
00718 GetMainMVCObject()->GetController( GetMainMVCObject()->GetStartupControllerName() )->ExecuteCommand( GetMainMVCObject()->GetStartupControllerCommand() );
00719
00720 return( TRUE );
00721 }
00722 catch( nitro::exception e )
00723 {
00724 throw( nitro::exception( std::string( "Application::OnInit( void )::" ) + e.what() , e.code() ) );
00725 }
00726 catch( ... )
00727 {
00728 throw( nitro::exception( "Application::OnInit( void )::An error occured" , 1 ) );
00729 }
00730 }
00731
00732 int Application::OnExit( void )
00733 {
00734 try
00735 {
00736 return( wxApp::OnExit() );
00737 }
00738 catch( nitro::exception e )
00739 {
00740 throw( nitro::exception( std::string( "Application::OnExit( void )::" ) + e.what() , e.code() ) );
00741 }
00742 catch( ... )
00743 {
00744 throw( nitro::exception( "Application::OnExit( void )::An error occured" , 1 ) );
00745 }
00746 }
00747
00748 };
00749
00750 #endif