Table of Contents

Callback

Erklaerung

source

Lets assume the following 2 classes exist, and that we want to have methodB() as our callback method. From the code we can see that when methodB() is invoked with the paramter of class A, methodB() will then invoke the method output() in class A. The proof that the callback really worked is if we see the line “I am class A :D” in the stdout.

class A{
   public:
    void output() {
       std::cout << "I am class A :D" << std::endl;
    };
};
 
class B{
   public:
    bool methodB(A a) {
       a.output();
       return true;
    }
};

Vorteile

source

Verschiedenes

Pointer

Typen

Ueberpruefungen

Klassendeklarationen

Code-Beispiel:

class ProjectionProcessor {
 
private:
 
public:
  typedef enum CorrectionMode {
    OFF = 0, // no  correction
    DARKFIELD = 1, // only apply darkfield correction
    FLATFIELD = 2, // 
...
};