Add config plugin class.

This commit is contained in:
Alexey Rybalchenko
2019-05-29 17:08:20 +02:00
committed by Dennis Klein
parent bf8ec968e7
commit cba6d19781
109 changed files with 1393 additions and 1433 deletions

51
fairmq/JSONParser.h Normal file
View File

@@ -0,0 +1,51 @@
/********************************************************************************
* Copyright (C) 2014-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
* copied verbatim in the file "LICENSE" *
********************************************************************************/
/*
* File: FairMQParser.h
* Author: winckler
*
* Created on May 14, 2015, 5:01 PM
*/
#ifndef FAIR_MQ_JSONPARSER_H
#define FAIR_MQ_JSONPARSER_H
#include <string>
#include <vector>
#include <unordered_map>
#include <exception>
#include <boost/property_tree/ptree_fwd.hpp>
#include "FairMQChannel.h"
#include <fairmq/Properties.h>
namespace fair
{
namespace mq
{
struct ParserError : std::runtime_error { using std::runtime_error::runtime_error; };
fair::mq::Properties PtreeParser(const boost::property_tree::ptree& pt, const std::string& deviceId);
fair::mq::Properties JSONParser(const std::string& filename, const std::string& deviceId);
namespace helper
{
fair::mq::Properties DeviceParser(const boost::property_tree::ptree& tree, const std::string& deviceId);
void ChannelParser(const boost::property_tree::ptree& tree, fair::mq::Properties& properties);
void SubChannelParser(const boost::property_tree::ptree& tree, fair::mq::Properties& properties, const std::string& channelName, const fair::mq::Properties& commonProperties);
} // helper namespace
} // namespace mq
} // namespace fair
#endif /* FAIR_MQ_JSONPARSER_H */