Class provides routine for storing of various objects. More...
#include <managers/object_manager.h>
Inherits nitro::ObjectManagerBasic< managing_class >.
Public Member Functions | |
void | AddObject (const std::string &ObjectName, managing_class *Ptr) |
void | AddObject (const char *ObjectName, managing_class *Ptr) |
virtual | ~ObjectManager () |
Class provides routine for storing of various objects.
Definition at line 650 of file object_manager.h.
nitro::ObjectManager< managing_class >::~ObjectManager | ( | ) | [virtual] |
Destructor.
Definition at line 751 of file object_manager.h.
References nitro::ObjectManagerBasic< managing_class >::Release().
{ try { ObjectManagerBasic< managing_class >::Release(); } catch( ... ) { } }
void nitro::ObjectManager< managing_class >::AddObject | ( | const std::string & | ObjectName, | |
managing_class * | Ptr | |||
) |
Function adds new object to manager.
ObjectName | - Name of the object. | |
Ptr | - Object. |
nitro::exception | An exception of that type is thrown. |
Definition at line 715 of file object_manager.h.
References nitro::exception::code(), and nitro::exception::what().
Referenced by nitro::MVC::AddController(), nitro::MVC::AddModel(), nitro::MVC::AddView(), nitro::MVC::Create(), and nitro::DynamicLibManager::LoadLibrary().
{ try { ObjectManagerBasic< managing_class >::Objects.push_back( std::pair< std::string , managing_class * >( ObjectName , Ptr ) ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "ObjectManager< managing_class >::AddObject( const std::string & ObjectName , managing_class * Ptr )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "ObjectManager< managing_class >::AddObject( const std::string & ObjectName )::An error occured" ) , 1 ) ); } }
void nitro::ObjectManager< managing_class >::AddObject | ( | const char * | ObjectName, | |
managing_class * | Ptr | |||
) |
Function adds new object to manager.
ObjectName | - Name of the object. | |
Ptr | - Object. |
nitro::exception | An exception of that type is thrown. |
Definition at line 733 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 , Ptr ) ); } catch( nitro::exception e ) { throw( nitro::exception( std::string( "ObjectManager< managing_class >::AddObject( const char * ObjectName , managing_class * Ptr )::" ) + e.what() , e.code() ) ); } catch( ... ) { throw( nitro::exception( std::string( "ObjectManager< managing_class >::AddObject( const char * ObjectName )::An error occured" ) , 1 ) ); } }