GraphLibrary  0.0.1
A simple library that implements various graph algorithms.
 All Classes Namespaces Files Functions Variables Typedefs Macros
PrintContainer.hpp
Go to the documentation of this file.
1 #ifndef GL_PRINT_CONTAINER_HPP
2 #define GL_PRINT_CONTAINER_HPP
3 
4 #include "../structures/Graph.hpp"
5 #include "StreamOverload.hpp"
6 
7 namespace gl {
8 namespace io {
9 
19  template <class container> void printContainer(const container& rhs) {
20  throw "Invalid container type.";
21  }
22 
26  template <class idx_t> void printContainer(const std::list<idx_t>& rhs) {
27  std::cout << rhs;
28  }
29 
33  template <class idx_t> void printContainer(const std::vector<idx_t>& rhs) {
34  std::cout << rhs;
35  }
36 
40  template <class idx_t> void printContainer(const std::deque<idx_t>& rhs) {
41  std::cout << rhs;
42  }
43 
47  template <class idx_t> void printContainer(const std::stack<idx_t>& rhs) {
48  std::cout << rhs;
49  }
51 
52 } // namespace io
53 } // namespace gl
54 
55 #endif // GL_PRINT_CONTAINER_HPP
void printContainer(const container &rhs)
Unspecialized template to throw errors.
Definition: PrintContainer.hpp:19