Revision efed924d custompackages/graph-parser/src/utility.cpp

View differences:

custompackages/graph-parser/src/utility.cpp
60 60
        return os;
61 61
    }
62 62

  
63
    std::ostream& operator<<(std::ostream& os, const std::set<std::string>& s) {
64
        /* can't make it work with a generic function
65
        ** std::ostream& opeartor<<(std::ostream& os, const Container<std::string>& s)
66
        */
67
        using namespace boost::spirit::karma;
68
        os << format("( " << (auto_ % "\n  ") << ")", s);
69
    }
70

  
71
}
72

  
73
namespace outopserror {
74
    template <typename T>
75
    std::ostream& operator<<(std::ostream& os, const std::set<T>& s) {
76
        /* can't make it work with a generic function
77
        ** std::ostream& opeartor<<(std::ostream& os, const Container<std::string>& s)
78
        */
79
        using namespace boost::spirit::karma;
80
        os << format("( " << (auto_ % "\n  ") << ")", s);
81
    }
63
    // std::ostream& operator<<(std::ostream& os, const std::set<std::string>& s) {
64
    //      can't make it work with a generic function
65
    //     ** std::ostream& opeartor<<(std::ostream& os, const Container<std::string>& s)
66

  
67
    //     using namespace boost::spirit::karma;
68
    //     os << format("(" << (auto_ % "\n  ") << ")", s);
69
    //     os << endl;
70
    // }
82 71
}
83 72

  
84 73
namespace graphext {
......
87 76
            r.insert(g[v].id);
88 77
        }
89 78
    }
90

  
91
    // template <typename Container>
92
    // void id_of_vertices(const Graph& g, const Container& container, std::set<std::string>& r) {
93
    void id_of_vertices(const Graph& g, const VertexVec& container, std::set<std::string>& r) {
94
        /*
95
        ** Find id for a vec
96
        */
97
        for (VertexVec::const_iterator ci = container.begin(); ci != container.end(); ++ci) {
98
            r.insert(g[*ci].id);
99
        }
100
    }
101 79
}

Also available in: Unified diff