summaryrefslogtreecommitdiff
path: root/include/classbase.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-01 23:50:27 +0100
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-03-01 23:50:27 +0100
commit20091783de937a72a86800f8025dd238afb139a1 (patch)
tree996a0439fb0b1d55a059cabe2b23df708b2201a7 /include/classbase.h
parent6abc8b4c062c7333a98830004da894ff81613d5b (diff)
grouped all class constants in a single file ClassType.h
to make it easier to edit in the event of future changes to the Zend API
Diffstat (limited to 'include/classbase.h')
-rw-r--r--include/classbase.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/include/classbase.h b/include/classbase.h
index 1cfba83..ad501ea 100644
--- a/include/classbase.h
+++ b/include/classbase.h
@@ -42,9 +42,9 @@ protected:
/**
* Protected constructor
* @param classname Class name
- * @param flags The class flags
+ * @param type The class type
*/
- ClassBase(const char *classname, int flags = 0) : _name(classname), _flags(flags) {}
+ ClassBase(const char *classname, ClassType type = ClassType::Regular) : _name(classname), _type(type) {}
public:
/**
@@ -54,14 +54,14 @@ public:
* @todo prefer move
*/
ClassBase(const ClassBase &that) :
- _name(that._name), _flags(that._flags), _methods(that._methods), _members(that._members) {}
+ _name(that._name), _type(that._type), _methods(that._methods), _members(that._members) {}
/**
* Move constructor
* @param that
*/
ClassBase(ClassBase &&that) :
- _flags(that._flags), _methods(std::move(that._methods)), _members(std::move(that._members)), _entry(that._entry)
+ _type(that._type), _methods(std::move(that._methods)), _members(std::move(that._members)), _entry(that._entry)
{
// other entry are invalid now (not that it is used..., class objects are
// only moved during extension setup, when the entry pointer has not yet
@@ -165,10 +165,10 @@ private:
std::string _name;
/**
- * The class flags (this can be values like Php::Abstract and Php::Final)
- * @var int
+ * The class type (this can be values like Php::Abstract and Php::Final)
+ * @var ClassType
*/
- int _flags = 0;
+ ClassType _type = ClassType::Regular;
/**
* The class entry
@@ -193,6 +193,7 @@ private:
* @var std::list
*/
std::list<std::shared_ptr<Member>> _members;
+
};
/**