Sha256: e630f5ca1ef765838b1f6e1225b0236d3d2d183e1628df2b57f5199455623102

Contents?: true

Size: 441 Bytes

Versions: 10

Compression:

Stored size: 441 Bytes

Contents

#ifndef __FUNC_POINTERS_CLASS_H__
#define __FUNC_POINTERS_CLASS_H__

namespace function_pointers_class {
  
  // With argument and returns a value
  typedef int(*Callback) (int num);

  class PointerTest {
    public:
      PointerTest() {}

      void setCallback(Callback cb) {
        mCallback = cb;
      }

      int callCallback(int num) {
        return mCallback(num);
      }

    private:
      Callback mCallback;
  };
}

#endif

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rbplusplus-1.4.0 test/headers/function_pointers_class.h
rbplusplus-1.3.0 test/headers/function_pointers_class.h
rbplusplus-1.2.1 test/headers/function_pointers_class.h
rbplusplus-1.2.0 test/headers/function_pointers_class.h
rbplusplus-1.1.0 test/headers/function_pointers_class.h
rbplusplus-1.0.3 test/headers/function_pointers_class.h
rbplusplus-1.0.1 test/headers/function_pointers_class.h
rbplusplus-1.0 test/headers/function_pointers_class.h
rbplusplus-0.9.1 test/headers/function_pointers_class.h
rbplusplus-0.9 test/headers/function_pointers_class.h