1 #ifndef GRAPH_PROPERTIES_H
2 #define GRAPH_PROPERTIES_H 1
3 
4 #include <istream>
5 #include <ostream>
6 #include <boost/graph/properties.hpp>
7 
8 /** The distance between two vertices. */
9 enum edge_distance_t { edge_distance };
10 
11 /** The complementary vertex of a skew-symmetric graph. */
12 enum vertex_complement_t { vertex_complement };
13 
14 /** The index of a contig. */
15 enum vertex_contig_index_t { vertex_contig_index };
16 
17 /** The name of a contig without an orientation. */
18 enum vertex_contig_name_t { vertex_contig_name };
19 
20 /** The coverage of a vertex. */
21 enum vertex_coverage_t { vertex_coverage };
22 
23 /** The length of a vertex. */
24 enum vertex_length_t { vertex_length };
25 
26 /** A property indicating that this vertex has been removed. */
27 enum vertex_removed_t { vertex_removed };
28 
29 /** The orientation of a vertex. */
30 enum vertex_sense_t { vertex_sense };
31 
32 using boost::edge_bundle;
33 using boost::edge_bundle_t;
34 using boost::edge_name;
35 using boost::edge_name_t;
36 using boost::edge_weight;
37 using boost::edge_weight_t;
38 using boost::no_property;
39 using boost::vertex_bundle;
40 using boost::vertex_bundle_t;
41 using boost::vertex_index;
42 using boost::vertex_index_t;
43 using boost::vertex_name;
44 using boost::vertex_name_t;
45 
46 using boost::edge_bundle_type;
47 using boost::edge_property;
48 using boost::vertex_bundle_type;
49 using boost::vertex_property;
50 
51 namespace boost {
52 	BOOST_INSTALL_PROPERTY(edge, distance);
53 	BOOST_INSTALL_PROPERTY(vertex, complement);
54 	BOOST_INSTALL_PROPERTY(vertex, contig_index);
55 	BOOST_INSTALL_PROPERTY(vertex, contig_name);
56 	BOOST_INSTALL_PROPERTY(vertex, coverage);
57 	BOOST_INSTALL_PROPERTY(vertex, length);
58 	BOOST_INSTALL_PROPERTY(vertex, removed);
59 	BOOST_INSTALL_PROPERTY(vertex, sense);
60 }
61 
62 /** No property. */
63 struct NoProperty
64 {
NoPropertyNoProperty65 	NoProperty(...) { }
66 	bool operator==(const NoProperty&) const { return true; }
67 	bool operator!=(const NoProperty&) const { return false; }
68 	friend std::ostream& operator<<(std::ostream& out,
69 			const NoProperty&)
70 	{
71 		return out;
72 	}
73 	friend std::istream& operator>>(std::istream& in, NoProperty&)
74 	{
75 		return in;
76 	}
77 };
78 
79 template <typename Tag>
put(Tag,NoProperty &,unsigned)80 void put(Tag, NoProperty&, unsigned)
81 {
82 }
83 
84 #endif
85