2335 new _reader_bits::MapStorage<Node, Map, Converter>(map, converter); |
2335 new _reader_bits::MapStorage<Node, Map, Converter>(map, converter); |
2336 _blue_maps.push_back(std::make_pair(caption, blue_storage)); |
2336 _blue_maps.push_back(std::make_pair(caption, blue_storage)); |
2337 return *this; |
2337 return *this; |
2338 } |
2338 } |
2339 |
2339 |
2340 /// Add a red map reading rule to the reader. |
2340 /// Add a red node map reading rule to the reader. |
2341 template <typename Map> |
2341 template <typename Map> |
2342 BpGraphReader& redMap(const std::string& caption, Map& map) { |
2342 BpGraphReader& redNodeMap(const std::string& caption, Map& map) { |
2343 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>(); |
2343 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>(); |
2344 _reader_bits::MapStorageBase<Node>* storage = |
2344 _reader_bits::MapStorageBase<Node>* storage = |
2345 new _reader_bits::MapStorage<Node, Map>(map); |
2345 new _reader_bits::MapStorage<Node, Map>(map); |
2346 _red_maps.push_back(std::make_pair(caption, storage)); |
2346 _red_maps.push_back(std::make_pair(caption, storage)); |
2347 return *this; |
2347 return *this; |
2348 } |
2348 } |
2349 |
2349 |
2350 /// \brief Red map reading rule |
2350 /// \brief Red node map reading rule |
2351 /// |
2351 /// |
2352 /// Add a red map reading rule with specialized converter to the |
2352 /// Add a red node map node reading rule with specialized converter to |
2353 /// reader. |
2353 /// the reader. |
2354 template <typename Map, typename Converter> |
2354 template <typename Map, typename Converter> |
2355 BpGraphReader& redMap(const std::string& caption, Map& map, |
2355 BpGraphReader& redNodeMap(const std::string& caption, Map& map, |
2356 const Converter& converter = Converter()) { |
2356 const Converter& converter = Converter()) { |
2357 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>(); |
2357 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>(); |
2358 _reader_bits::MapStorageBase<Node>* storage = |
2358 _reader_bits::MapStorageBase<Node>* storage = |
2359 new _reader_bits::MapStorage<Node, Map, Converter>(map, converter); |
2359 new _reader_bits::MapStorage<Node, Map, Converter>(map, converter); |
2360 _red_maps.push_back(std::make_pair(caption, storage)); |
2360 _red_maps.push_back(std::make_pair(caption, storage)); |
2361 return *this; |
2361 return *this; |
2362 } |
2362 } |
2363 |
2363 |
2364 /// Add a blue map reading rule to the reader. |
2364 /// Add a blue node map reading rule to the reader. |
2365 template <typename Map> |
2365 template <typename Map> |
2366 BpGraphReader& blueMap(const std::string& caption, Map& map) { |
2366 BpGraphReader& blueNodeMap(const std::string& caption, Map& map) { |
2367 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>(); |
2367 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>(); |
2368 _reader_bits::MapStorageBase<Node>* storage = |
2368 _reader_bits::MapStorageBase<Node>* storage = |
2369 new _reader_bits::MapStorage<Node, Map>(map); |
2369 new _reader_bits::MapStorage<Node, Map>(map); |
2370 _blue_maps.push_back(std::make_pair(caption, storage)); |
2370 _blue_maps.push_back(std::make_pair(caption, storage)); |
2371 return *this; |
2371 return *this; |
2372 } |
2372 } |
2373 |
2373 |
2374 /// \brief Blue map reading rule |
2374 /// \brief Blue node map reading rule |
2375 /// |
2375 /// |
2376 /// Add a blue map reading rule with specialized converter to the |
2376 /// Add a blue node map reading rule with specialized converter to |
2377 /// reader. |
2377 /// the reader. |
2378 template <typename Map, typename Converter> |
2378 template <typename Map, typename Converter> |
2379 BpGraphReader& blueMap(const std::string& caption, Map& map, |
2379 BpGraphReader& blueNodeMap(const std::string& caption, Map& map, |
2380 const Converter& converter = Converter()) { |
2380 const Converter& converter = Converter()) { |
2381 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>(); |
2381 checkConcept<concepts::WriteMap<Node, typename Map::Value>, Map>(); |
2382 _reader_bits::MapStorageBase<Node>* storage = |
2382 _reader_bits::MapStorageBase<Node>* storage = |
2383 new _reader_bits::MapStorage<Node, Map, Converter>(map, converter); |
2383 new _reader_bits::MapStorage<Node, Map, Converter>(map, converter); |
2384 _blue_maps.push_back(std::make_pair(caption, storage)); |
2384 _blue_maps.push_back(std::make_pair(caption, storage)); |
2385 return *this; |
2385 return *this; |