FairMQ  1.3.7
C++ Message Passing Framework
FairMQParser.h
1 /*
2  * File: FairMQParser.h
3  * Author: winckler
4  *
5  * Created on May 14, 2015, 5:01 PM
6  */
7 
8 #ifndef FAIRMQPARSER_H
9 #define FAIRMQPARSER_H
10 
11 #include <string>
12 #include <vector>
13 #include <unordered_map>
14 #include <exception>
15 
16 #include <boost/property_tree/ptree_fwd.hpp>
17 
18 #include "FairMQChannel.h"
19 
20 namespace fair
21 {
22 namespace mq
23 {
24 namespace parser
25 {
26 
27 using FairMQChannelMap = std::unordered_map<std::string, std::vector<FairMQChannel>>;
28 
29 struct ParserError : std::runtime_error { using std::runtime_error::runtime_error; };
30 
31 FairMQChannelMap ptreeToMQMap(const boost::property_tree::ptree& pt, const std::string& deviceId, const std::string& rootNode);
32 
33 struct JSON
34 {
35  FairMQChannelMap UserParser(const std::string& filename, const std::string& deviceId, const std::string& rootNode = "fairMQOptions");
36 };
37 
38 namespace Helper
39 {
40 
41 void PrintDeviceList(const boost::property_tree::ptree& tree);
42 void DeviceParser(const boost::property_tree::ptree& tree, FairMQChannelMap& channelMap, const std::string& deviceId);
43 void ChannelParser(const boost::property_tree::ptree& tree, FairMQChannelMap& channelMap);
44 void SocketParser(const boost::property_tree::ptree& tree, std::vector<FairMQChannel>& channelList, const std::string& channelName, const FairMQChannel& commonChannel);
45 
46 } // Helper namespace
47 
48 } // namespace parser
49 } // namespace mq
50 } // namespace fair
51 
52 #endif /* FAIRMQPARSER_H */
Definition: FairMQChannel.h:27
Definition: FairMQParser.h:29
Definition: FairMQParser.h:33
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23

privacy