FairMQ  1.2.3
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 <map>
14 #include <unordered_map>
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 FairMQMap = std::unordered_map<std::string, std::vector<FairMQChannel>>;
28 
29 FairMQMap ptreeToMQMap(const boost::property_tree::ptree& pt, const std::string& deviceId, const std::string& rootNode);
30 
31 struct JSON
32 {
33  FairMQMap UserParser(const std::string& filename, const std::string& deviceId, const std::string& rootNode = "fairMQOptions");
34  FairMQMap UserParser(std::stringstream& input, const std::string& deviceId, const std::string& rootNode = "fairMQOptions");
35 };
36 
37 namespace Helper
38 {
39 
40 void PrintDeviceList(const boost::property_tree::ptree& tree);
41 void DeviceParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap, const std::string& deviceId);
42 void ChannelParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap);
43 void SocketParser(const boost::property_tree::ptree& tree, std::vector<FairMQChannel>& channelList, const std::string& channelName, const FairMQChannel& commonChannel);
44 
45 } // Helper namespace
46 
47 } // namespace parser
48 } // namespace mq
49 } // namespace fair
50 
51 #endif /* FAIRMQPARSER_H */
Definition: FairMQChannel.h:24
Definition: FairMQParser.h:31
Definition: DeviceRunner.h:23