8 #define BOOST_BIND_GLOBAL_PLACEHOLDERS // Needed to silence Boost pragma message
9 #include <boost/property_tree/json_parser.hpp>
31 if(! isInitialized() ||
empty() ) {
34 m_name = getAttribute(
"name",
true, m_name);
35 m_legacy = getAttribute<bool>(
"legacy",
true,
false);
37 std::string boardType(getAttribute(
"type"));
38 if( boardType ==
"MUCTPI" ) {
39 m_boardType = BoardType::MUCTPI;
40 }
else if( boardType ==
"CTPIN" ) {
41 m_boardType = BoardType::CTPIN;
42 }
else if( boardType ==
"TOPO" ) {
43 m_boardType = BoardType::TOPO;
44 }
else if( boardType ==
"MERGER" ) {
45 m_boardType = BoardType::MERGER;
47 throw std::runtime_error(
"Unknown board type " + boardType);
51 for(
auto &
conn : getList(
"connectors") ) {
52 m_connectorNames.push_back(
conn.getValue<std::string>());
60 return m_connectorNames.size();
72 switch( boardType() ) {
73 case BoardType::CTPIN:
75 case BoardType::MUCTPI:
79 case BoardType::MERGER:
91 const std::vector<std::string> &
94 return m_connectorNames;