Skip to content

Source · fairmq/

JSONParser.hpublic header

Defines struct fair::mq::ParserError.

Described in 1-n-1: sampler, processors and sink, Configure channels, Channel properties, JSON configuration.

fairmq/JSONParser.h44 lines · C++API: ParserErrorGitHub ↗
1/********************************************************************************2 * Copyright (C) 2014-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH  *3 *                                                                              *4 *              This software is distributed under the terms of the             *5 *              GNU Lesser General Public Licence (LGPL) version 3,             *6 *                  copied verbatim in the file "LICENSE"                       *7 ********************************************************************************/8/*9 * File:   FairMQParser.h10 * Author: winckler11 *12 * Created on May 14, 2015, 5:01 PM13 */14 15#ifndef FAIR_MQ_JSONPARSER_H16#define FAIR_MQ_JSONPARSER_H17 18#include <fairmq/Properties.h>19#include <boost/property_tree/ptree_fwd.hpp>20 21#include <stdexcept>22#include <string>23 24namespace fair::mq25{26 27struct ParserError : std::runtime_error { using std::runtime_error::runtime_error; };28 29fair::mq::Properties PtreeParser(const boost::property_tree::ptree& pt, const std::string& deviceId);30 31fair::mq::Properties JSONParser(const std::string& filename, const std::string& deviceId);32 33namespace helper34{35 36fair::mq::Properties DeviceParser(const boost::property_tree::ptree& tree, const std::string& deviceId);37void ChannelParser(const boost::property_tree::ptree& tree, fair::mq::Properties& properties);38void SubChannelParser(const boost::property_tree::ptree& tree, fair::mq::Properties& properties, const std::string& channelName, const fair::mq::Properties& commonProperties);39 40} // helper namespace41 42} // namespace fair::mq43 44#endif /* FAIR_MQ_JSONPARSER_H */