Candidate_v1.7.0
        stable
      
      
        
          | 
            Last change
 on this file since 1ca493a was             9eb71b3, checked in by Frederik Heber <frederik.heber@…>, 9 years ago           | 
        
        
          | 
             
Commented out MemDebug include and Memory::ignore. 
 
- MemDebug clashes with various allocation operators that use a specific
placement in memory. It is so far not possible to wrap new/delete fully.
Hence, we stop this effort which so far has forced us to put ever more
includes (with clashes) into MemDebug and thereby bloat compilation time.
 - MemDebug does not add that much usefulness which is not also provided by
valgrind.
  
           | 
        
        
          
            
              - 
Property                 mode
 set to                 
100644
               
             
           | 
        
        
          | 
            File size:
            1.2 KB
           | 
        
      
      
| Rev | Line |   | 
|---|
| [35302b] | 1 | /*
 | 
|---|
 | 2 |  * QSeisCurveRegistry.cpp
 | 
|---|
 | 3 |  *
 | 
|---|
 | 4 |  *  Created on: Jan 30, 2011
 | 
|---|
 | 5 |  *      Author: landvogt
 | 
|---|
 | 6 |  */
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | // include config.h
 | 
|---|
 | 9 | #ifdef HAVE_CONFIG_H
 | 
|---|
 | 10 | #include <config.h>
 | 
|---|
 | 11 | #endif
 | 
|---|
 | 12 | 
 | 
|---|
 | 13 | #include "UIElements/Views/Qt4/Plotting/QSeisCurveRegistry.hpp"
 | 
|---|
 | 14 | #include "UIElements/Views/Qt4/Plotting/QSeisPlotCurve.hpp"
 | 
|---|
 | 15 | 
 | 
|---|
 | 16 | // have this after(!) all Qt includes
 | 
|---|
| [9eb71b3] | 17 | //#include "CodePatterns/MemDebug.hpp"
 | 
|---|
| [35302b] | 18 | 
 | 
|---|
 | 19 | #include "CodePatterns/Registry_impl.hpp"
 | 
|---|
 | 20 | #include "CodePatterns/Singleton_impl.hpp"
 | 
|---|
 | 21 | 
 | 
|---|
 | 22 | #include <iostream>
 | 
|---|
 | 23 | 
 | 
|---|
 | 24 | QSeisCurveRegistry::QSeisCurveRegistry()
 | 
|---|
 | 25 | {
 | 
|---|
 | 26 | }
 | 
|---|
 | 27 | 
 | 
|---|
 | 28 | QSeisCurveRegistry::~QSeisCurveRegistry()
 | 
|---|
 | 29 | {}
 | 
|---|
 | 30 | 
 | 
|---|
 | 31 | void QSeisCurveRegistry::registerInstance(QSeisPlotCurve *instance)
 | 
|---|
 | 32 | {
 | 
|---|
 | 33 |     Registry<QSeisPlotCurve>::registerInstance(instance);
 | 
|---|
 | 34 |     emit curveAdded(instance->getName(), instance->type);
 | 
|---|
 | 35 | }
 | 
|---|
 | 36 | 
 | 
|---|
 | 37 | void QSeisCurveRegistry::unregisterInstance(QSeisPlotCurve *instance)
 | 
|---|
 | 38 | {
 | 
|---|
 | 39 |     Registry<QSeisPlotCurve>::unregisterInstance(instance);
 | 
|---|
 | 40 |     emit curveRemoved(instance->getName(), instance->type);
 | 
|---|
 | 41 | }
 | 
|---|
 | 42 | 
 | 
|---|
 | 43 | void QSeisCurveRegistry::resetRegistry()
 | 
|---|
 | 44 | {
 | 
|---|
 | 45 |         for (std::map<const std::string,QSeisPlotCurve*>::iterator iter = getBeginIter(); iter != getEndIter(); ++iter)
 | 
|---|
 | 46 |                 emit curveRemoved(iter->first, iter->second->type);
 | 
|---|
 | 47 |                 Registry<QSeisPlotCurve>::cleanup();
 | 
|---|
 | 48 | }
 | 
|---|
 | 49 | 
 | 
|---|
 | 50 | 
 | 
|---|
 | 51 | CONSTRUCT_SINGLETON(QSeisCurveRegistry)
 | 
|---|
 | 52 | CONSTRUCT_REGISTRY(QSeisPlotCurve)
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.