summaryrefslogtreecommitdiff
path: root/src/mixedobject.h
blob: 4db74da35b8c30d9ad48ed1c28fd040c00d5f17a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
 *  MixedObject.h
 *
 *  Structure that combines a Zend object with an object in C++
 *
 *  @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
 *  @copyright 2013 Copernica BV
 */

/**
 *  Set up namespace
 */
namespace Php {

/**
 *  Structure that combines a C++ object with a zend object
 */
struct MixedObject
{
    /**
     *  The actual object is the first member, so that casting
     *  the MixedObject to a zend_object will also result in a valid pointer
     *  @var    zend_object
     */
    zend_object php;
    
    /**
     *  Pointer to the C++ implementation
     *  @var    Base
     */
    Base *cpp;
};

/**
 *  End of namespace
 */
}