/* * DataSetInfo.cc * * Created on: Oct 8, 2014 * Author: m.mazel */ #include "DataSetInfo.hh" #define PUSHINFO(infoMap, key, value) if(!value.empty())infoMap.push_back(std::pair(key,value)) namespace AMDA { namespace Info { std::ostream& operator<<(std::ostream& out, const DataSetInfo& dsi){ out << "[DataSetInfo]" << std::endl; out << "{"<> DataSetInfo::getInfoMap() { std::vector> infoMap; //push all info PUSHINFO(infoMap, DATASET_ID, getId()); PUSHINFO(infoMap, DATASET_NAME, getName()); PUSHINFO(infoMap, DATASET_DESC, getDescription()); PUSHINFO(infoMap, DATASET_SOURCE, getSource()); PUSHINFO(infoMap, DATASET_START, getGlobalStart()); PUSHINFO(infoMap, DATASET_STOP, getGlobalStop()); std::stringstream minSampling; minSampling << getMinSampling(); PUSHINFO(infoMap, DATASET_MIN_SAMP, minSampling.str()); std::stringstream maxSampling; maxSampling << getMaxSampling(); PUSHINFO(infoMap, DATASET_MAX_SAMP, maxSampling.str()); PUSHINFO(infoMap, DATASET_CAVEATS, getCaveats()); PUSHINFO(infoMap, DATASET_ACKNOWLEDGEMENT, getAcknowledgement()); return infoMap; } } /* namespace Info */ } /* namespace AMDA */