Changeset 2355
- Timestamp:
- Nov 30, 2010, 11:59:49 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/SegmentSet.h
r2296 r2355 37 37 \brief a set of Segments 38 38 39 A container that holds a set of Segment. The Segments can 39 A container that holds a set of Segment. The Segments cannot overlap. 40 40 41 41 \since new in yat 0.7 … … 45 45 { 46 46 public: 47 /// value_type 48 typedef Segment<T, Compare> value_type; 47 /// element type 48 typedef T element_type; 49 /// key_type 50 typedef Segment<element_type, Compare> key_type; 51 /// value_type same as key_type 52 typedef key_type value_type; 53 /// key_compare 54 struct key_compare 55 { 56 /// return true if lhs.begin() < rhs.begin() 57 bool operator()(const key_type& lhs, const key_type& rhs) const 58 { return Compare()(lhs.begin(),rhs.begin()); } 59 }; 60 /// value_compare is same as key_compare 61 typedef key_compare value_compare; 62 49 63 private: 50 /// \cond 51 struct Compare_ 52 { 53 bool operator()(const value_type& lhs, const value_type& rhs) const 54 { return lhs.begin() < rhs.begin(); } 55 }; 56 /// \endcond 57 58 typedef std::set<value_type, Compare_> Set_; 64 typedef std::set<value_type, value_compare> Set_; 59 65 60 66 public: … … 144 150 145 151 private: 146 std::set<value_type, Compare_>set_;152 Set_ set_; 147 153 148 154 /**
Note: See TracChangeset
for help on using the changeset viewer.