Changeset 1991:d7442141d9ef in lemon-0.x for lemon/bits
- Timestamp:
- 03/01/06 11:25:30 (18 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2593
- Location:
- lemon/bits
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/edge_set_extender.h
r1979 r1991 69 69 public: 70 70 71 using Parent::getNotifier; 72 71 73 /// \brief Gives back the edge alteration notifier. 72 74 /// … … 323 325 324 326 public: 327 328 using Parent::getNotifier; 325 329 326 330 EdgeNotifier& getNotifier(Edge) const { -
lemon/bits/graph_extender.h
r1983 r1991 1569 1569 1570 1570 template <typename _Value> 1571 class NodeMapBase : public NodeNotifier::ObserverBase{1571 class NodeMapBase { 1572 1572 public: 1573 1573 typedef BpUGraphExtender Graph; … … 1591 1591 1592 1592 NodeMapBase(const Graph& _g) 1593 : graph(&_g), bNodeMap(_g), aNodeMap(_g) { 1594 NodeNotifier::ObserverBase::attach(_g.getNotifier(Node())); 1595 } 1593 : aNodeMap(_g), bNodeMap(_g) {} 1596 1594 NodeMapBase(const Graph& _g, const _Value& _v) 1597 : graph(&_g), bNodeMap(_g, _v), 1598 aNodeMap(_g, _v) { 1599 NodeNotifier::ObserverBase::attach(_g.getNotifier(Node())); 1600 } 1601 1602 virtual ~NodeMapBase() { 1603 if (NodeNotifier::ObserverBase::attached()) { 1604 NodeNotifier::ObserverBase::detach(); 1605 } 1606 } 1607 1595 : aNodeMap(_g, _v), bNodeMap(_g, _v) {} 1596 1608 1597 ConstReference operator[](const Key& node) const { 1609 1598 if (Parent::aNode(node)) { … … 1630 1619 } 1631 1620 1632 protected: 1633 1634 virtual void add(const Node&) {} 1635 virtual void add(const std::vector<Node>&) {} 1636 virtual void erase(const Node&) {} 1637 virtual void erase(const std::vector<Node>&) {} 1638 virtual void clear() {} 1639 virtual void build() {} 1640 1641 const Graph* getGraph() const { return graph; } 1642 1621 const Graph* getGraph() const { 1622 return aNodeMap.getGraph(); 1623 } 1624 1643 1625 private: 1644 const Graph* graph;1626 ANodeMap<_Value> aNodeMap; 1645 1627 BNodeMap<_Value> bNodeMap; 1646 ANodeMap<_Value> aNodeMap;1647 1628 }; 1648 1629
Note: See TracChangeset
for help on using the changeset viewer.