// file : cutl/container/graph.hxx // author : Boris Kolpackov // copyright : Copyright (c) 2009 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file #ifndef CUTL_CONTAINER_GRAPH_HXX #define CUTL_CONTAINER_GRAPH_HXX #include #include namespace cutl { namespace container { template class graph { public: typedef N node_base; typedef E edge_base; struct no_edge {}; public: template T& new_node (); template T& new_node (A0 const&); template T& new_node (A0 const&, A1 const&); template T& new_node (A0 const&, A1 const&, A2 const&); template T& new_node (A0 const&, A1 const&, A2 const&, A3 const&); template T& new_node (A0 const&, A1 const&, A2 const&, A3 const&, A4 const&); template T& new_node (A0 const&, A1 const&, A2 const&, A3 const&, A4 const&, A5 const&); template T& new_node (A0 const&, A1 const&, A2 const&, A3 const&, A4 const&, A5 const&, A6 const&); template T& new_node (A0 const&, A1 const&, A2 const&, A3 const&, A4 const&, A5 const&, A6 const&, A7 const&); template T& new_node (A0 const&, A1 const&, A2 const&, A3 const&, A4 const&, A5 const&, A6 const&, A7 const&, A8 const&); template T& new_node (A0 const&, A1 const&, A2 const&, A3 const&, A4 const&, A5 const&, A6 const&, A7 const&, A8 const&, A9 const&); // template // void // delete_node (T& node); public: template T& new_edge (L&, R&); template T& new_edge (L&, R&, A0 const&); template T& new_edge (L&, R&, A0 const&, A1 const&); template T& new_edge (L&, R&, A0 const&, A1 const&, A2 const&); template T& new_edge (L&, R&, A0 const&, A1 const&, A2 const&, A3 const&); template T& new_edge (L&, R&, A0 const&, A1 const&, A2 const&, A3 const&, A4 const&); template T& new_edge (L&, R&, A0 const&, A1 const&, A2 const&, A3 const&, A4 const&, A5 const&); public: template void delete_edge (L&, R&, T& edge); public: graph () {} private: graph (graph const&); graph& operator= (graph const&); protected: typedef shared_ptr node_ptr; typedef shared_ptr edge_ptr; typedef std::map nodes; typedef std::map edges; nodes nodes_; edges edges_; }; } } #include #endif // CUTL_CONTAINER_GRAPH_HXX