Alida-C++ 0.1

operator/ALDOperatorManager.cc

Go to the documentation of this file.
00001 /*
00002  * This file is part of Alida-C++ library for
00003  *
00004  * Advanced Library for Integrated Development of Data Analysis Applications.
00005  *
00006  * Copyright (C) 2012 - @YEAR@
00007  *
00008  * This program is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation, either version 3 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020  *
00021  * Fore more information on Alida, visit
00022  *
00023  *    http://www.informatik.uni-halle.de/alida/
00024  *
00025  */
00026 
00027 /*
00028  * Most recent change(s):
00029  *
00030  * $Rev: 34 $
00031  * $Date: 2012/03/06 20:50:22 $
00032  * $Author: posch $
00033  *
00034  */
00035 
00036 #include <dlfcn.h>
00037 #include <math.h>
00038 #include <stdio.h>
00039 
00040 #include <fstream>
00041 #include <iostream>
00042 #include <string>
00043 
00044 #include "operator/ALDOperatorManager.h"
00045 
00046 using namespace std;
00047 
00048 using namespace Alida;
00049 
00054 Alida::_ALDOperatorManager::_ALDOperatorManager()
00055 {
00056     this->operatorHash = new map<string, ALDOperator*>();
00057 }
00058 
00072 ALDOperator*
00073 Alida::_ALDOperatorManager::registerOperator(string name, ALDOperator *op)
00074 {
00075     cout << "[OperatorManager] Registering operator " << name << endl;
00076     (*operatorHash)[name] = op;
00077     return op;
00078 }
00079 
00083 void Alida::_ALDOperatorManager::printOperatorHash()
00084 {
00085     cout << "Registered operators:" << endl;
00086     map<string, ALDOperator*>::iterator it;
00087     for (it = this->operatorHash->begin(); it != this->operatorHash->end(); ++it)
00088         cout << "Index: " << it->first << endl;
00089 }
00090 
00098 ALDOperator* Alida::_ALDOperatorManager::getOperator(string name)
00099 {
00100     return (*(this->operatorHash))[name];
00101 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines