Some bugfixes
authordeba
Fri, 16 Sep 2005 09:00:18 +0000
changeset 16855b37a10234bc
parent 1684 df3820d7989d
child 1686 a5b8e0fde2be
Some bugfixes
lemon/bits/alteration_notifier.h
lemon/graph_adaptor.h
lemon/iterable_maps.h
     1.1 --- a/lemon/bits/alteration_notifier.h	Wed Sep 14 10:00:43 2005 +0000
     1.2 +++ b/lemon/bits/alteration_notifier.h	Fri Sep 16 09:00:18 2005 +0000
     1.3 @@ -80,6 +80,12 @@
     1.4        /// 
     1.5        ObserverBase() : registry(0) {}
     1.6  
     1.7 +      ObserverBase(const ObserverBase& copy) {
     1.8 +	if (copy.attached()) {
     1.9 +	  copy.getRegistry()->attach(*this);
    1.10 +	}
    1.11 +      }
    1.12 +	
    1.13        virtual ~ObserverBase() {}
    1.14  
    1.15        /// \brief Attaches the observer into an AlterationNotifier.
    1.16 @@ -111,10 +117,9 @@
    1.17        
    1.18        /// Gives back true when the observer is attached into a registry.
    1.19        bool attached() const { return registry != 0; }
    1.20 -	
    1.21 +
    1.22      private:
    1.23  
    1.24 -      ObserverBase(const ObserverBase& copy);
    1.25        ObserverBase& operator=(const ObserverBase& copy);
    1.26  
    1.27      protected:
     2.1 --- a/lemon/graph_adaptor.h	Wed Sep 14 10:00:43 2005 +0000
     2.2 +++ b/lemon/graph_adaptor.h	Fri Sep 16 09:00:18 2005 +0000
     2.3 @@ -679,7 +679,7 @@
     2.4  			   EdgeFilterMap, false> {
     2.5    public:
     2.6      typedef SubGraphAdaptor<Graph, ConstMap<typename Graph::Node,bool>, 
     2.7 -			    EdgeFilterMap> Parent;
     2.8 +			    EdgeFilterMap, false> Parent;
     2.9    protected:
    2.10      ConstMap<typename Graph::Node, bool> const_true_map;
    2.11    public:
     3.1 --- a/lemon/iterable_maps.h	Wed Sep 14 10:00:43 2005 +0000
     3.2 +++ b/lemon/iterable_maps.h	Fri Sep 16 09:00:18 2005 +0000
     3.3 @@ -140,11 +140,11 @@
     3.4    template <class Graph>
     3.5    class IterableBoolNodeMap
     3.6    {
     3.7 -    typename Graph::NodeMap<int> cmap;
     3.8 +    typename Graph::template NodeMap<int> cmap;
     3.9    
    3.10    public:
    3.11    
    3.12 -    typedef IterableBoolMap<typename Graph::NodeMap<int> > BimType;
    3.13 +    typedef IterableBoolMap<typename Graph::template NodeMap<int> > BimType;
    3.14      BimType imap;
    3.15  
    3.16  
    3.17 @@ -198,11 +198,11 @@
    3.18    template <class Graph>
    3.19    class IterableBoolEdgeMap
    3.20    {
    3.21 -    typename Graph::EdgeMap<int> cmap;
    3.22 +    typename Graph::template EdgeMap<int> cmap;
    3.23    
    3.24    public:
    3.25    
    3.26 -    typedef IterableBoolMap<typename Graph::EdgeMap<int> > BimType;
    3.27 +    typedef IterableBoolMap<typename Graph::template EdgeMap<int> > BimType;
    3.28      BimType imap;
    3.29  
    3.30