solarpowerlog trunk
/home/tobi/workspace/solarpowerlog/src/Inverters/SputnikEngineering/CInverterFactorySputnik.cpp
Go to the documentation of this file.
00001 /* ----------------------------------------------------------------------------
00002  solarpowerlog
00003  Copyright (C) 2009  Tobias Frost
00004 
00005  This file is part of solarpowerlog.
00006 
00007  Solarpowerlog is free software; However, it is dual-licenced
00008  as described in the file "COPYING".
00009 
00010  For this file (CInverterFactorySputnik.cpp), the license terms are:
00011 
00012  You can redistribute it and/or modify it under the terms of the GNU
00013  General Public License as published by the Free Software Foundation; either
00014  version 3 of the License, or (at your option) any later version.
00015 
00016  This program is distributed in the hope that it will be useful, but
00017  WITHOUT ANY WARRANTY; without even the implied warranty of
00018  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  Lesser General Public License for more details.
00020 
00021  You should have received a copy of the GNU Library General Public
00022  License along with this proramm; if not, see
00023  <http://www.gnu.org/licenses/>.
00024  ----------------------------------------------------------------------------
00025  */
00026 
00033 #ifdef HAVE_CONFIG_H
00034 #include "config.h"
00035 #include "porting.h"
00036 #endif
00037 
00038 #include "Inverters/SputnikEngineering/CInverterFactorySputnik.h"
00039 #include "Inverters/SputnikEngineering/CInverterSputnikSSeries.h"
00040 
00041 using namespace std;
00042 
00043 #if defined HAVE_INV_SPUTNIK
00044 
00045 static const string supportedmodels =
00046           "S-Series: \tModels 2000S, 3000S, 4200S, 6000S \n ";
00047 
00048 CInverterFactorySputnik::CInverterFactorySputnik() {
00049      // TODO Auto-generated constructor stub
00050 }
00051 
00053 IInverterBase *CInverterFactorySputnik::Factory(const string & type,
00054           const string& name, const string & configurationpath) {
00055 
00056      if (type == "S-Series") {
00057           return new CInverterSputnikSSeries(name, configurationpath);
00058      }
00059 
00060      return NULL;
00061 }
00062 
00063 CInverterFactorySputnik::~CInverterFactorySputnik() {
00064      // TODO Auto-generated destructor stub
00065 }
00066 
00069 const string & CInverterFactorySputnik::GetSupportedModels() const {
00070      return supportedmodels;
00071 }
00072 
00073 #endif