~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/common_cpp/API/InputBase.hh

  • Committer: Durga Rajaram
  • Date: 2014-07-16 15:13:05 UTC
  • mfrom: (659.1.92 cand)
  • Revision ID: durga@fnal.gov-20140716151305-q27rv1y9p03v9lks
Tags: MAUS-v0.9, MAUS-v0.9.0
MAUS-v0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#ifndef _SRC_COMMON_CPP_API_INPUTBASE_
28
28
#define _SRC_COMMON_CPP_API_INPUTBASE_
29
29
#include <string>
 
30
 
 
31
 
 
32
// These ifdefs are required to avoid cpp compiler warning
 
33
#ifdef _POSIX_C_SOURCE
 
34
#undef _POSIX_C_SOURCE
 
35
#endif
 
36
 
 
37
#ifdef _XOPEN_SOURCE
 
38
#undef _XOPEN_SOURCE
 
39
#endif
 
40
 
 
41
#include "Python.h"
 
42
 
30
43
#include "src/common_cpp/API/IInput.hh"
31
44
#include "src/common_cpp/API/ModuleBase.hh"
32
45
 
56
69
    virtual ~InputBase();
57
70
 
58
71
  public:
 
72
    /** Emits a wrapped object of type T
 
73
     *
 
74
     *  Python owns returned object (Py_INCREF was called)
 
75
     */
 
76
    PyObject* emit_pyobj();
 
77
 
59
78
    /*!\brief Generate data
60
79
     *
61
80
     * Implementation of the interface. Wraps the _emitter function
64
83
     *
65
84
     * \return The data generated
66
85
     */
67
 
    T emitter_cpp();
68
 
 
69
 
    /** Python emitter - should be overloaded by SWIG script
70
 
     */
71
 
    T emitter() {
72
 
      throw(std::exception());
73
 
    }
 
86
    T emit_cpp();
74
87
 
75
88
  private:
76
89
    /*!\brief Generate data
79
92
     * derived inputter author to correctly generate the input data.
80
93
     * \return The data generated
81
94
     */
82
 
    virtual T _emitter_cpp() = 0;
 
95
    virtual T _emit_cpp() = 0;
83
96
  };
84
97
 
85
98
}// end of namespace