Class provides routine for storing of various objects. More...
#include <managers/object_manager.h>
Inherits nitro::ObjectManagerBasic< managing_class >.
Public Member Functions | |
void | CreateObject (const std::string &ObjectName) |
void | CreateObject (const char *ObjectName) |
virtual void | Release (void) |
virtual | ~LocalObjectManager () |
Class provides routine for storing of various objects.
Definition at line 778 of file object_manager.h.
nitro::LocalObjectManager< managing_class >::~LocalObjectManager | ( | ) | [virtual] |
Destructor.
Definition at line 908 of file object_manager.h.
References nitro::LocalObjectManager< managing_class >::Release().
{ try { ObjectManagerBasic< managing_class >::Release(); } catch( ... ) { } }
void nitro::LocalObjectManager< managing_class >::CreateObject | ( | const std::string & | ObjectName | ) |
Function creates new object to manager.
ObjectName | - Name of the object. |
nitro::exception | An exception of that type is thrown. |
Definition at line 851 of file object_manager.h.
References nitro::exception::code(), and nitro::exception::what().
{ try { ObjectManagerBasic< managing_class >::Objects.push_back( std::pair< std::string , managing_class * >( ObjectName , new managing_class() ) ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "LocalObjectManager< managing_class >::CreateObject( const std::string & ObjectName )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "LocalObjectManager< managing_class >::CreateObject( const std::string & ObjectName )::An error occured" ) , 1 ) ); } }
void nitro::LocalObjectManager< managing_class >::CreateObject | ( | const char * | ObjectName | ) |
Function creates new object to manager.
ObjectName | - Name of the object. |
nitro::exception | An exception of that type is thrown. |
Definition at line 869 of file object_manager.h.
References nitro::exception::code(), and nitro::exception::what().
{ try { ObjectManagerBasic< managing_class >::Objects.push_back( std::pair< std::string , managing_class * >( ObjectName , new managing_class() ) ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "LocalObjectManager< managing_class >::CreateObject( const char * ObjectName )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "LocalObjectManager< managing_class >::CreateObject( const char * ObjectName )::An error occured" ) , 1 ) ); } }
void nitro::LocalObjectManager< managing_class >::Release | ( | void | ) | [virtual] |
Function deletes all created objects.
nitro::exception | An exception of that type is thrown. |
Reimplemented from nitro::ObjectManagerBasic< managing_class >.
Definition at line 887 of file object_manager.h.
References nitro::exception::code(), and nitro::exception::what().
Referenced by nitro::LocalObjectManager< managing_class >::~LocalObjectManager().
{ try { for( std::size_t i( 0 ) ; i < ObjectManagerBasic< managing_class >::Objects.size() ; i++ ) { delete ObjectManagerBasic< managing_class >::Objects[ i ]; } ObjectManagerBasic< managing_class >::Objects.erase( ObjectManagerBasic< managing_class >::Objects.begin(), ObjectManagerBasic< managing_class >::Objects.end() ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "ObjectManagerBasic< managing_class >::Release( void )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "ObjectManagerBasic< managing_class >::Release( void )::An error occured" ) , 1 ) ); } }