summaryrefslogtreecommitdiff
path: root/include/member.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/member.h')
-rw-r--r--include/member.h93
1 files changed, 87 insertions, 6 deletions
diff --git a/include/member.h b/include/member.h
index 4a9a754..5043ead 100644
--- a/include/member.h
+++ b/include/member.h
@@ -18,6 +18,11 @@ struct _zend_class_entry;
namespace Php {
/**
+ * Forward declarations
+ */
+class MemberInfo;
+
+/**
* Class definition
*/
class Member
@@ -27,15 +32,90 @@ public:
* Constructor
* @param name Name of the member
* @param pub Is this a public property (otherwise it is protected)
+ */
+ Member(const char *name, bool pub);
+
+ /**
+ * Constructor
+ * @param name Name of the member
+ * @param pub Is this a public property (otherwise it is protected)
+ * @param value The value to add
+ */
+ Member(const char *name, bool pub, std::nullptr_t value);
+
+ /**
+ * Constructor
+ * @param name Name of the member
+ * @param pub Is this a public property (otherwise it is protected)
+ * @param value The value to add
+ */
+ Member(const char *name, bool pub, int value);
+
+ /**
+ * Constructor
+ * @param name Name of the member
+ * @param pub Is this a public property (otherwise it is protected)
+ * @param value The value to add
+ */
+ Member(const char *name, bool pub, long value);
+
+ /**
+ * Constructor
+ * @param name Name of the member
+ * @param pub Is this a public property (otherwise it is protected)
+ * @param value The value to add
+ */
+ Member(const char *name, bool pub, bool value);
+
+ /**
+ * Constructor
+ * @param name Name of the member
+ * @param pub Is this a public property (otherwise it is protected)
* @param value The value to add
*/
- Member(const char *name, bool pub, const Value &value) :
- _name(name), _public(pub), _value(value) {}
+ Member(const char *name, bool pub, char value);
+
+ /**
+ * Constructor
+ * @param name Name of the member
+ * @param pub Is this a public property (otherwise it is protected)
+ * @param value The value to add
+ */
+ Member(const char *name, bool pub, const std::string &value);
+
+ /**
+ * Constructor
+ * @param name Name of the member
+ * @param pub Is this a public property (otherwise it is protected)
+ * @param value The value to add
+ * @param size String length
+ */
+ Member(const char *name, bool pub, const char *value, int size = -1);
+
+ /**
+ * Constructor
+ * @param name Name of the member
+ * @param pub Is this a public property (otherwise it is protected)
+ * @param value The value to add
+ */
+ Member(const char *name, bool pub, double value);
+
+ /**
+ * Copy constructor
+ * @param member The member to copy
+ */
+ Member(const Member &member);
+
+ /**
+ * Move constructor
+ * @param member The member to move
+ */
+ Member(Member &&member);
/**
* Destructor
*/
- virtual ~Member() {}
+ virtual ~Member();
/**
* Internal method to declare the property
@@ -58,10 +138,11 @@ private:
bool _public;
/**
- * The default value
- * @var Value
+ * The implementation for the member
+ * @var MemberInfo
*/
- Value _value;
+ MemberInfo *_info;
+
};