File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ namespace Php {
24
24
* Class definition of the class
25
25
*/
26
26
template <typename T>
27
- class PHPCPP_EXPORT Class : private ClassBase
27
+ class PHPCPP_EXPORT Class : public ClassBase
28
28
{
29
29
public:
30
30
/* *
@@ -302,6 +302,8 @@ class PHPCPP_EXPORT Class : private ClassBase
302
302
template <typename CLASS>
303
303
Class<T> &extends (const Class<CLASS> &base) { ClassBase::extends (base); return *this ; }
304
304
305
+ Class<T> &extends (const ClassBase &base) { ClassBase::extends (base); return *this ; }
306
+
305
307
private:
306
308
/* *
307
309
* Method to create the object if it is default constructable
Original file line number Diff line number Diff line change @@ -156,6 +156,19 @@ class PHPCPP_EXPORT Namespace
156
156
return *this ;
157
157
}
158
158
159
+ Namespace &add (const ClassBase &type)
160
+ {
161
+ // skip when locked
162
+ if (locked ()) return *this ;
163
+
164
+ // and add it to the list of classes
165
+ _classes.push_back (std::unique_ptr<ClassBase>(new ClassBase (type)));
166
+
167
+ // allow chaining
168
+ return *this ;
169
+ }
170
+
171
+
159
172
/* *
160
173
* Add an interface to the namespace by moving it
161
174
* @param interface The interface properties
You can’t perform that action at this time.
0 commit comments