pelib
2.0.0
|
00001 /* 00002 Copyright 2015 Nicolas Melot 00003 00004 This file is part of Pelib. 00005 00006 Pelib is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 Pelib is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Pelib. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 00021 #include <pelib/DummyCore.hpp> 00022 00023 using namespace std; 00024 00025 namespace pelib 00026 { 00027 DummyCore::DummyCore(size_t id, const set<float> &f, float unit): Core(id) 00028 { 00029 this->frequencies = set<float>(f); 00030 this->frequencyUnit = unit; 00031 } 00032 DummyCore::DummyCore(const set<float> &f, float unit): Core() 00033 { 00034 this->frequencies = set<float>(f); 00035 this->frequencyUnit = unit; 00036 } 00037 00038 DummyCore::DummyCore(const DummyCore* src): Core(src->id) 00039 { 00040 this->frequencies = set<float>(src->getFrequencies()); 00041 this->frequencyUnit = src->getFrequencyUnit(); 00042 } 00043 00044 DummyCore::DummyCore(const DummyCore &src): Core(src.id) 00045 { 00046 this->frequencies = set<float>(src.getFrequencies()); 00047 this->frequencyUnit = src.getFrequencyUnit(); 00048 } 00049 00050 DummyCore::~DummyCore() 00051 { 00052 // Do nothing 00053 } 00054 00055 Core* 00056 DummyCore::clone() const 00057 { 00058 return new DummyCore(this); 00059 } 00060 00061 const set<float>& 00062 DummyCore::getFrequencies() const 00063 { 00064 return this->frequencies; 00065 } 00066 00067 float 00068 DummyCore::getFrequencyUnit() const 00069 { 00070 return this->frequencyUnit; 00071 } 00072 }