diff options
author | Martijn Otto <martijn.otto@copernica.com> | 2015-03-26 16:00:10 +0100 |
---|---|---|
committer | Martijn Otto <martijn.otto@copernica.com> | 2015-03-26 16:00:10 +0100 |
commit | 7a928e2b19bddf152fd838469cc50805d4132401 (patch) | |
tree | 0a6657f4b94c27556b2f218e407f752018540d3b /include/global.h | |
parent | ae4fa5f871d937773e9facde87a32784e715e3ae (diff) |
Changed default visibility for symbols in the PHP-CPP library to hidden and explicitly exported all symbols available from the public API. Moved the hiddenpointer to the zend implementation directory as it is not meant to be used publicly and not referenced anywhere from the API anyway
Diffstat (limited to 'include/global.h')
-rw-r--r-- | include/global.h | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/include/global.h b/include/global.h index 2757979..7a66997 100644 --- a/include/global.h +++ b/include/global.h @@ -21,7 +21,7 @@ namespace Php { /** * Class definition */ -class Global : public Value +class PHPCPP_EXPORT Global : public Value { public: /** @@ -40,7 +40,7 @@ public: * Destructor */ virtual ~Global() {} - + /** * Assignment operator * @param global @@ -51,14 +51,14 @@ public: { // skip self assignment if (&global == this) return *this; - + // call base Value::operator=(global); - + // copy name and exists setting _name = global._name; _exists = global._exists; - + // done return *this; } @@ -74,19 +74,19 @@ public: { // skip self assignment if (&global == this) return *this; - + // call base Value::operator=(std::move(global)); - + // copy name and exists setting _name = std::move(global._name); _exists = global._exists; - + // done return *this; } */ - + /** * Assignment operator * @param value @@ -110,11 +110,11 @@ public: { // update current object update(); - + // call base Value::set(index, value); } - + /** * Set a certain property * Calling this method will turn the value into an array @@ -127,7 +127,7 @@ public: { // update current object update(); - + // call base Value::set(key, size, value); } @@ -139,14 +139,14 @@ protected: * @return Value */ Global &update(); - + private: /** * Constructor for non-existing var * @param name */ Global(const char *name) : Value(), _name(name), _exists(false) {} - + /** * Alternative constructor for non-existing var * @param name @@ -159,7 +159,7 @@ private: * @param val */ Global(const char *name, struct _zval_struct *val) : Value(val, true), _name(name), _exists(true) {} - + /** * Alternative constructor to wrap zval * @param name @@ -172,13 +172,13 @@ private: * @var string */ std::string _name; - + /** * Does it already exist? * @var bool */ bool _exists; - + /** * The globals can access the private method from this class */ @@ -189,5 +189,3 @@ private: * End of namespace */ } - - |