/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Protected Types | Static Protected Attributes | Private Member Functions | Static Private Attributes | Friends
AlgMgr Class Reference

#include <AlgMgr.h>

Inheritance diagram for AlgMgr:
Inheritance graph
[legend]
Collaboration diagram for AlgMgr:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool execute ()
const std::string & name ()
virtual bool initialize ()
virtual bool finalize ()

Static Public Member Functions

static AlgMgrinstance ()
static AlgBaseget (const std::string &objName, bool create=false)
static ConcreteType * get (const std::string &objName, bool create=false)

Protected Types

typedef AlgBase *(* ElementCreator )(const std::string &)
typedef std::map< std::string,
ElementCreator
Type2CreatorMap

Static Protected Attributes

static std::list< AlgBase * > m_elements
static std::map< std::string,
AlgBase * > 
name2obj
static std::map< std::string,
ElementCreator
elementCreatorMap

Private Member Functions

 AlgMgr (const std::string &name)

Static Private Attributes

static AlgMgr_instance = 0

Friends

class AlgFactory

Detailed Description

Definition at line 7 of file AlgMgr.h.


Member Typedef Documentation

typedef AlgBase *(* ElementMgr< AlgBase >::ElementCreator)(const std::string &) [protected, inherited]

Definition at line 41 of file ElementMgr.h.

typedef std::map<std::string, ElementCreator> ElementMgr< AlgBase >::Type2CreatorMap [protected, inherited]

Definition at line 42 of file ElementMgr.h.


Constructor & Destructor Documentation

AlgMgr::AlgMgr ( const std::string &  name) [private]

Definition at line 14 of file AlgMgr.cc.

    : ElementMgr<AlgBase>(objname)
{
    for ( std::list<AlgBase*>::iterator it = m_elements.begin(); it != m_elements.end(); ++it ) {
        LogInfo << "Add  algorithm  : " << (*it)->name() << std::endl;
    }
}

Member Function Documentation

AlgMgr * AlgMgr::instance ( ) [static]

Definition at line 6 of file AlgMgr.cc.

{
    if ( _instance == 0 ) {
        _instance = new AlgMgr("AlgMgr");
    }
    return _instance;
}
bool AlgMgr::execute ( )

Definition at line 22 of file AlgMgr.cc.

{
    for ( std::list<AlgBase*>::iterator it = m_elements.begin(); it != m_elements.end(); ++it ) {
        if ( ! (*it)->execute() ) {
            LogError << "failed to execute algorithm " << (*it)->name() << std::endl;
            return false;
        }
    }
    return true;
}
const std::string& ElementMgr< AlgBase >::name ( void  ) [inline, inherited]

Definition at line 16 of file ElementMgr.h.

{ return m_name; }
static AlgBase * ElementMgr< AlgBase >::get ( const std::string &  objName,
bool  create = false 
) [static, inherited]
static ConcreteType* ElementMgr< AlgBase >::get ( const std::string &  objName,
bool  create = false 
) [static, inherited]
virtual bool ElementMgr< AlgBase >::initialize ( ) [virtual, inherited]
virtual bool ElementMgr< AlgBase >::finalize ( ) [virtual, inherited]

Friends And Related Function Documentation

friend class AlgFactory [friend]

Definition at line 20 of file AlgMgr.h.


Member Data Documentation

AlgMgr * AlgMgr::_instance = 0 [static, private]

Definition at line 21 of file AlgMgr.h.

std::list<AlgBase *> ElementMgr< AlgBase >::m_elements [static, protected, inherited]

Definition at line 37 of file ElementMgr.h.

std::map<std::string, AlgBase *> ElementMgr< AlgBase >::name2obj [static, protected, inherited]

Definition at line 39 of file ElementMgr.h.

std::map<std::string, ElementCreator> ElementMgr< AlgBase >::elementCreatorMap [static, protected, inherited]

Definition at line 43 of file ElementMgr.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:50:18 for LafKernel by doxygen 1.7.4