|
123456789101112131415161718192021222324252627282930 |
- #include "PublisherData.h"
-
- PublisherData::PublisherData(const int _publisherID, PublisherType pubType, float _value) :
- publisherID(_publisherID), publisherType(pubType), values(std::vector<float>())
- {
- values.push_back(_value);
- }
-
- PublisherData::PublisherData(const int _publisherID, PublisherType pubType, std::vector<float> _values) :
- publisherID(_publisherID), publisherType(pubType), values(_values)
- {
-
- }
-
- PublisherData::PublisherData() :
- publisherID(0), publisherType(PublisherType::NA), values({ 0.0 })
- {
-
- }
-
-
-
-
- std::ostream& operator<<(std::ostream& os, const PublisherData& data){
- for (u_int i = 0; i < data.values.size()-1; i++) {
- os << data.values[i] << ",";
- }
- os << data.values[data.values.size()-1] << ";";
- return os;
- }
|