summaryrefslogtreecommitdiff
path: root/include/parameters.h
blob: 346586384c5f3016ee1921314385477eb04056eb (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/**
 *  Parameters.h
 *
 *  Wrapper around parameters that are passed to a

 *  @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
 *  @copyright 2013 Copernica BV
 */

/**
 *  Namespace
 */
namespace Php {

/**
 *  Forward declarations
 */
class Base;

/**
 *  Class definition
 */
class PHPCPP_EXPORT Parameters : public std::vector<Value>
{
private:
    /**
     *  The base object
     *  @var Base
     */
    Base *_object = nullptr;

protected:
    /**
     *  Protected constructor
     *
     *  The constructor is protected because extension programmers are not
     *  supposed to instantiate parameters objects themselves
     *
     *  @param  object      The 'this' object
     */
    Parameters(Base *object) : _object(object) {}

public:
    /**
     *  Destructor
     */
    virtual ~Parameters() {}

    /**
     *  The object that is being called
     *  @return Base
     */
    Base *object() const
    {
        return _object;
    }
};

/**
 *  End of namespace
 */
}