Changeset 987:87f7c54892df in lemon-0.x for src/work/alpar/rw_nonref_map.cc
- Timestamp:
- 11/13/04 18:07:10 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1377
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/alpar/rw_nonref_map.cc
r986 r987 11 11 typedef typename GG::Edge Edge; 12 12 13 typedef Edge Key Type;14 typedef TT Value Type;13 typedef Edge Key; 14 typedef TT Value; 15 15 16 16 class RefType … … 21 21 RefType(Graph &_G,Edge _e) : G(_G), e(_e) { } 22 22 23 operator Value Type() const23 operator Value() const 24 24 { 25 Value Typetmp;25 Value tmp; 26 26 std::cout << G.id(G.source(e)) << "->" 27 27 << G.id(G.target(e)) << ": "; … … 29 29 return tmp; 30 30 } 31 Value Type operator = (ValueType v) const31 Value operator = (Value v) const 32 32 { 33 33 std::cout << G.id(G.source(e)) << "->" … … 48 48 { 49 49 public: 50 typedef K Key Type;51 typedef T Value Type;50 typedef K Key; 51 typedef T Value; 52 52 53 53 class RefType 54 54 { 55 Value Typeval;55 Value val; 56 56 public: 57 RefType(Value Typev) : val(v) { }58 operator Value Type() const { return val; }59 Value Type operator = (ValueType v) const { return val; }57 RefType(Value v) : val(v) { } 58 operator Value() const { return val; } 59 Value operator = (Value v) const { return val; } 60 60 }; 61 61 62 62 private: 63 Value Typeval;63 Value val; 64 64 public: 65 NullMap(Value Typev) : val(v) { }66 RefType operator[] (Key Typee) const { return RefType(v);}65 NullMap(Value v) : val(v) { } 66 RefType operator[] (Key e) const { return RefType(v);} 67 67 }; 68 68
Note: See TracChangeset
for help on using the changeset viewer.