/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
ToolFactory Class Reference

#include <ToolFactory.h>

List of all members.

Public Member Functions

 ToolFactory (const std::string &name, ToolBase *(*creator)(const std::string &))

Detailed Description

Definition at line 8 of file ToolFactory.h.


Constructor & Destructor Documentation

ToolFactory::ToolFactory ( const std::string &  name,
ToolBase *(*)(const std::string &)  creator 
)

Definition at line 6 of file ToolFactory.cc.

{
    typedef ToolBase* (*ToolCreator)(const std::string&);

    std::map<std::string, ToolCreator>::iterator it = ToolMgr::elementCreatorMap.find(name);
    if ( it != ToolMgr::elementCreatorMap.end() ) {
        std::string msg = std::string("Duplicated tool definition: ") + name;
        throw LafException(msg);
    }
    ToolMgr::elementCreatorMap.insert(std::make_pair<std::string, ToolCreator>(name, creator));
}

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