COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
11/05/04 01:31:49 (16 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1345
Message:

Undirect graph implementation.
Not yet done, untested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/alteration_observer_registry.h

    r946 r962  
    279279
    280280
    281   /// Class to extend a graph functionality with the possibility of alteration observing.
    282 
    283   /// AlterableGraphExtender extends the _Base graphs functionality with the possibility of
    284   /// alteration observing. It defines two observer registrys for the nodes and mapes.
     281  /// \brief Class to extend a graph with the functionality of alteration
     282  /// observing.
     283  ///
     284  /// AlterableGraphExtender extends the _Base graphs functionality with
     285  /// the possibility of alteration observing. It defines two observer
     286  /// registrys for the nodes and mapes.
     287  ///
     288  /// \todo Document what "alteration observing" is. And probably find a
     289  /// better (shorter) name.
    285290  ///
    286291  /// \param _Base is the base class to extend.
     
    288293  /// \pre _Base is conform to the BaseGraphComponent concept.
    289294  ///
    290   /// \post AlterableGraphExtender<_Base> is conform to the AlterableGraphComponent concept.
     295  /// \post AlterableGraphExtender<_Base> is conform to the
     296  /// AlterableGraphComponent concept.
    291297  ///
    292298  /// \author Balazs Dezso
     
    302308    typedef typename Parent::Edge Edge;
    303309
     310    /// The edge observer registry.
     311    typedef AlterationObserverRegistry<Edge> EdgeObserverRegistry;
    304312    /// The node observer registry.
    305     typedef AlterationObserverRegistry<Edge> EdgeObserverRegistry;
    306     /// The edge observer registry.
    307313    typedef AlterationObserverRegistry<Node> NodeObserverRegistry;
    308314
     
    331337  };
    332338
     339  /// \brief Class to extend an undirected graph with the functionality of
     340  /// alteration observing.
     341  ///
     342  /// \todo Document.
     343  ///
     344  /// \sa AlterableGraphExtender
     345  ///
     346  /// \bug This should be done some other way. Possibilities: template
     347  /// specialization (not very easy, if at all possible); some kind of
     348  /// enable_if boost technique?
     349
     350  template <typename _Base>
     351  class AlterableUndirGraphExtender
     352    : public AlterableGraphExtender<_Base> {
     353  public:
     354
     355    typedef AlterableUndirGraphExtender Graph;
     356    typedef AlterableGraphExtender<_Base> Parent;
     357
     358    typedef typename Parent::UndirEdge UndirEdge;
     359
     360    /// The edge observer registry.
     361    typedef AlterationObserverRegistry<UndirEdge> UndirEdgeObserverRegistry;
     362
     363  protected:
     364
     365    mutable UndirEdgeObserverRegistry undir_edge_observers;
     366
     367    UndirEdgeObserverRegistry& getUndirEdgeObserverRegistry() const {
     368      return undir_edge_observers;
     369    }
     370
     371    ~AlterableUndirGraphExtender() {
     372      undir_edge_observers.clear();
     373    }
     374  };
    333375 
    334376/// @}
Note: See TracChangeset for help on using the changeset viewer.