Changeset 962:1a770e9f80b2 in lemon-0.x for src/lemon/alteration_observer_registry.h
- Timestamp:
- 11/05/04 01:31:49 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1345
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/alteration_observer_registry.h
r946 r962 279 279 280 280 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. 285 290 /// 286 291 /// \param _Base is the base class to extend. … … 288 293 /// \pre _Base is conform to the BaseGraphComponent concept. 289 294 /// 290 /// \post AlterableGraphExtender<_Base> is conform to the AlterableGraphComponent concept. 295 /// \post AlterableGraphExtender<_Base> is conform to the 296 /// AlterableGraphComponent concept. 291 297 /// 292 298 /// \author Balazs Dezso … … 302 308 typedef typename Parent::Edge Edge; 303 309 310 /// The edge observer registry. 311 typedef AlterationObserverRegistry<Edge> EdgeObserverRegistry; 304 312 /// The node observer registry. 305 typedef AlterationObserverRegistry<Edge> EdgeObserverRegistry;306 /// The edge observer registry.307 313 typedef AlterationObserverRegistry<Node> NodeObserverRegistry; 308 314 … … 331 337 }; 332 338 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 }; 333 375 334 376 /// @}
Note: See TracChangeset
for help on using the changeset viewer.