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 #include <pelib/Task.hpp> 00021 00022 #ifndef PELIB_LINK 00023 #define PELIB_LINK 00024 00025 namespace pelib 00026 { 00028 class Link 00029 { 00030 public: 00032 Link(const Task &producer, const Task &consumer, const std::string &producerName, const std::string &consumerName, const std::string &type = "", size_t producer_rate = 0, size_t consumer_rate = 0); 00033 00035 virtual Task* getProducer() const; 00036 00038 virtual Task* getConsumer() const; 00039 00043 virtual bool 00044 operator<(const Link &other) const; 00045 00049 virtual bool 00050 operator==(const Link &other) const; 00051 00052 size_t 00053 getProducerRate() const; 00054 00055 size_t 00056 getConsumerRate() const; 00057 00058 std::string 00059 getDataType() const; 00060 00061 std::string 00062 getProducerName() const; 00063 00064 std::string 00065 getConsumerName() const; 00066 protected: 00068 Task *producer, *consumer; 00069 std::string producerName, consumerName, type; 00070 size_t producer_rate, consumer_rate; 00071 00072 private: 00073 }; 00074 } 00075 00076 #endif