mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 01:51:45 +00:00
FairMQProgOptions fixes and cleanup
- Remove singular key names from JSON schema. - Align the property tree created by `FairMQSuboptParser` with the format required by the main parser (plural names). - Fix `--print-options` to print all options (not only those that have their value set). - remove XML parser (outdated and unused). - various code cleanup.
This commit is contained in:
committed by
Mohammad Al-Turany
parent
4e2a195289
commit
f8d4fe01d0
@@ -17,12 +17,16 @@
|
||||
|
||||
#include "FairMQChannel.h"
|
||||
|
||||
namespace FairMQParser
|
||||
namespace fair
|
||||
{
|
||||
namespace mq
|
||||
{
|
||||
namespace parser
|
||||
{
|
||||
|
||||
using FairMQMap = std::unordered_map<std::string, std::vector<FairMQChannel>>;
|
||||
|
||||
FairMQMap ptreeToMQMap(const boost::property_tree::ptree& pt, const std::string& deviceId, const std::string& rootNode, const std::string& formatFlag = "json");
|
||||
FairMQMap ptreeToMQMap(const boost::property_tree::ptree& pt, const std::string& deviceId, const std::string& rootNode);
|
||||
|
||||
struct JSON
|
||||
{
|
||||
@@ -30,23 +34,19 @@ struct JSON
|
||||
FairMQMap UserParser(std::stringstream& input, const std::string& deviceId, const std::string& rootNode = "fairMQOptions");
|
||||
};
|
||||
|
||||
struct XML
|
||||
{
|
||||
FairMQMap UserParser(const std::string& filename, const std::string& deviceId, const std::string& rootNode = "fairMQOptions");
|
||||
FairMQMap UserParser(std::stringstream& input, const std::string& deviceId, const std::string& rootNode = "fairMQOptions");
|
||||
};
|
||||
|
||||
namespace Helper
|
||||
{
|
||||
|
||||
void PrintDeviceList(const boost::property_tree::ptree& tree, const std::string& formatFlag = "json");
|
||||
void DeviceParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap, const std::string& deviceId, const std::string& formatFlag);
|
||||
void ChannelParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap, const std::string& formatFlag);
|
||||
void PrintDeviceList(const boost::property_tree::ptree& tree);
|
||||
void DeviceParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap, const std::string& deviceId);
|
||||
void ChannelParser(const boost::property_tree::ptree& tree, FairMQMap& channelMap);
|
||||
void SocketParser(const boost::property_tree::ptree& tree, std::vector<FairMQChannel>& channelList, const std::string& channelName, const FairMQChannel& commonChannel);
|
||||
void PrintPropertyTree(const boost::property_tree::ptree& tree, int level = 0);
|
||||
|
||||
} // Helper namespace
|
||||
|
||||
} // FairMQParser namespace
|
||||
} // namespace parser
|
||||
} // namespace mq
|
||||
} // namespace fair
|
||||
|
||||
#endif /* FAIRMQPARSER_H */
|
||||
|
Reference in New Issue
Block a user