Public Member Functions

nitro::LocalObjectManager< managing_class > Class Template Reference

Class provides routine for storing of various objects. More...

#include <managers/object_manager.h>

Inherits nitro::ObjectManagerBasic< managing_class >.

Collaboration diagram for nitro::LocalObjectManager< managing_class >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void CreateObject (const std::string &ObjectName)
void CreateObject (const char *ObjectName)
virtual void Release (void)
virtual ~LocalObjectManager ()

Detailed Description

template<class managing_class>
class nitro::LocalObjectManager< managing_class >

Class provides routine for storing of various objects.

Note:
Class itself creates objects and delete them.
Author:
Dodonov A.A.

Definition at line 778 of file object_manager.h.


Constructor & Destructor Documentation

template<class managing_class >
nitro::LocalObjectManager< managing_class >::~LocalObjectManager (  )  [virtual]

Destructor.

Author:
Dodonov A.A.

Definition at line 908 of file object_manager.h.

References nitro::LocalObjectManager< managing_class >::Release().

        {
                try
                {
                        ObjectManagerBasic< managing_class >::Release();
                }
                catch( ... )
                {
                }
        }

Here is the call graph for this function:


Member Function Documentation

template<class managing_class >
void nitro::LocalObjectManager< managing_class >::CreateObject ( const std::string &  ObjectName  ) 

Function creates new object to manager.

Parameters:
ObjectName - Name of the object.
Exceptions:
nitro::exception An exception of that type is thrown.
Author:
Dodonov A.A.

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 ) );
                }
        }

Here is the call graph for this function:

template<class managing_class >
void nitro::LocalObjectManager< managing_class >::CreateObject ( const char *  ObjectName  ) 

Function creates new object to manager.

Parameters:
ObjectName - Name of the object.
Exceptions:
nitro::exception An exception of that type is thrown.
Author:
Dodonov A.A.

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 ) );
                }
        }

Here is the call graph for this function:

template<class managing_class >
void nitro::LocalObjectManager< managing_class >::Release ( void   )  [virtual]

Function deletes all created objects.

Exceptions:
nitro::exception An exception of that type is thrown.
Author:
Dodonov A.A.

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 ) );
                }
        }

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