Ignore:
Timestamp:
May 11, 2023, 2:23:16 PM (12 months ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/combination/bnccomb.h

    r10039 r10040  
    2222 Q_OBJECT
    2323 public:
    24   bncComb();
    25   virtual ~bncComb();
    26   static bncComb* instance();
     24  static bncComb* getInstance() {
     25    if (instance == 0) {
     26      instance = new bncComb;
     27    }
     28    return instance;
     29  }
     30  bncComb(const bncComb&) = delete;
     31  bncComb& operator=(const bncComb&) = delete;
     32  static void destruct() {
     33    delete instance;
     34    instance = nullptr;
     35  }
    2736  int  nStreams() const {return _ACs.size();}
    2837
     
    3342  void slotNewCodeBiases(QList<t_satCodeBias> satCodeBiases);
    3443
    35 
    3644 private slots:
    3745  void slotReadBiasSnxFile();
     
    4452
    4553 private:
    46   //bncComb();                  // private constructor
    47   bncComb(const bncComb&);
    48   bncComb& operator=(const bncComb&);
    49 
     54  bncComb();                // no public constructor
     55  ~bncComb();               // no public destructor
     56  static bncComb* instance; // declaration class variable
    5057  enum e_method{singleEpoch, filter};
    5158
     
    267274};
    268275
    269 #define BNC_CMB (bncComb::instance())
     276#define BNC_CMB (bncComb::getInstance())
    270277
    271278#endif
Note: See TracChangeset for help on using the changeset viewer.