Qore Programming Language - C/C++ Library  0.8.12.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QoreClass.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3  QoreClass.h
4 
5  Qore Programming Language
6 
7  Copyright (C) 2003 - 2016 David Nichols
8 
9  Permission is hereby granted, free of charge, to any person obtaining a
10  copy of this software and associated documentation files (the "Software"),
11  to deal in the Software without restriction, including without limitation
12  the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  and/or sell copies of the Software, and to permit persons to whom the
14  Software is furnished to do so, subject to the following conditions:
15 
16  The above copyright notice and this permission notice shall be included in
17  all copies or substantial portions of the Software.
18 
19  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25  DEALINGS IN THE SOFTWARE.
26 
27  Note that the Qore library is released under a choice of three open-source
28  licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
29  information.
30 */
31 
32 #ifndef _QORE_QORECLASS_H
33 
34 #define _QORE_QORECLASS_H
35 
36 #include <stdarg.h>
37 #include <string>
38 
39 // all qore class IDs
40 DLLEXPORT extern qore_classid_t CID_AUTOGATE;
41 DLLEXPORT extern qore_classid_t CID_AUTOLOCK;
42 DLLEXPORT extern qore_classid_t CID_AUTOREADLOCK;
43 DLLEXPORT extern qore_classid_t CID_AUTOWRITELOCK;
44 DLLEXPORT extern qore_classid_t CID_CONDITION;
45 DLLEXPORT extern qore_classid_t CID_COUNTER;
46 DLLEXPORT extern qore_classid_t CID_DATASOURCE;
47 DLLEXPORT extern qore_classid_t CID_DATASOURCEPOOL;
48 DLLEXPORT extern qore_classid_t CID_FILE;
49 DLLEXPORT extern qore_classid_t CID_FTPCLIENT;
50 DLLEXPORT extern qore_classid_t CID_GATE;
51 DLLEXPORT extern qore_classid_t CID_GETOPT;
52 DLLEXPORT extern qore_classid_t CID_HTTPCLIENT;
53 DLLEXPORT extern qore_classid_t CID_MUTEX;
54 DLLEXPORT extern qore_classid_t CID_PROGRAM;
55 DLLEXPORT extern qore_classid_t CID_QUEUE;
56 DLLEXPORT extern qore_classid_t CID_RWLOCK;
57 DLLEXPORT extern qore_classid_t CID_SSLCERTIFICATE;
58 DLLEXPORT extern qore_classid_t CID_SSLPRIVATEKEY;
59 DLLEXPORT extern qore_classid_t CID_SEQUENCE;
60 DLLEXPORT extern qore_classid_t CID_SOCKET;
61 DLLEXPORT extern qore_classid_t CID_TERMIOS;
62 
63 DLLEXPORT extern QoreClass* QC_QUEUE;
64 DLLEXPORT extern QoreClass* QC_HTTPCLIENT;
65 
66 class BCList;
67 class BCSMList;
68 class BCAList;
69 class QoreObject;
70 class QoreClass;
71 class BCEAList;
72 class ParamList;
73 class QoreMemberInfo;
74 class BuiltinMethod;
75 class AbstractQoreFunctionVariant;
76 class AbstractFunctionSignature;
77 class UserMethod;
78 class BCANode;
79 class qore_method_private;
80 class MethodFunctionBase;
81 class QoreExternalMethodVariant;
82 class QoreExternalStaticMethodVariant;
83 class NamedScope;
84 class ConstantList;
85 class MethodVariantBase;
86 
88 
91 class QoreMethod {
92  friend class StaticMethodCallNode;
93  friend class QoreObject;
94  friend class qore_class_private;
95  friend class qore_method_private;
96  friend class BCList;
97 
98 private:
100  class qore_method_private* priv;
101 
103  DLLLOCAL QoreMethod(const QoreMethod&);
104 
106  DLLLOCAL QoreMethod& operator=(const QoreMethod&);
107 
108 public:
110 
113  DLLEXPORT bool isSynchronized() const;
114 
116 
119  DLLEXPORT bool newCallingConvention() const;
120 
122 
124  DLLEXPORT bool isUser() const;
125 
127 
129  DLLEXPORT bool isBuiltin() const;
130 
132 
134  DLLEXPORT bool isPrivate() const;
135 
137 
140  DLLEXPORT bool isStatic() const;
141 
143 
146  DLLEXPORT const char* getName() const;
147 
149 
152  DLLEXPORT const std::string& getNameStr() const;
153 
155  DLLEXPORT const QoreClass* getClass() const;
156 
158  DLLEXPORT const char* getClassName() const;
159 
161  DLLEXPORT bool existsVariant(const type_vec_t& paramTypeInfo) const;
162 
163  /* returns the return type information for the method if it is available and if
164  there is only one return type (there can be more return types if the method is
165  overloaded)
166  */
167  DLLEXPORT const QoreTypeInfo* getUniqueReturnTypeInfo() const;
168 
170 
174  DLLEXPORT QoreValue execManaged(QoreObject* self, const QoreListNode* args, ExceptionSink* xsink) const;
175 
176  DLLLOCAL QoreMethod(const QoreClass* p_class, MethodFunctionBase* n_func, bool n_static = false);
177 
178  DLLLOCAL ~QoreMethod();
179  DLLLOCAL bool inMethod(const QoreObject* self) const;
180  DLLLOCAL QoreMethod* copy(const QoreClass* p_class) const;
181  DLLLOCAL void assign_class(const QoreClass* p_class);
182  DLLLOCAL MethodFunctionBase* getFunction() const;
183 
185 
187  DLLLOCAL bool parseIsPrivate() const;
188 };
189 
191 
195 class QoreClass {
196  friend class BCList;
197  friend class BCNode;
198  friend class BCSMList;
199  friend class qore_object_private;
200  friend class qore_class_private;
201  friend class QoreObject;
202  friend class BCANode;
203  friend class qore_method_private;
204  friend class QoreMethodIterator;
205  friend class QoreStaticMethodIterator;
206  friend class ConstructorMethodFunction;
207 
208 private:
210  DLLLOCAL QoreClass& operator=(const QoreClass&);
211 
213  class qore_class_private* priv;
214 
215  // private constructor only called when the class is copied
216  DLLLOCAL QoreClass(qore_classid_t id, const char* nme);
217 
218  DLLLOCAL void insertMethod(QoreMethod* o);
219  DLLLOCAL void insertStaticMethod(QoreMethod* o);
220  DLLLOCAL QoreValue evalMethodGate(QoreObject* self, const char* nme, const QoreListNode* args, ExceptionSink* xsink) const;
221  DLLLOCAL const QoreMethod* parseResolveSelfMethodIntern(const char* nme);
222 
224 
233  DLLLOCAL QoreValue evalMethod(QoreObject* self, const char* method_name, const QoreListNode* args, ExceptionSink* xsink) const;
234 
235  // This function must only be called from QoreObject
236  DLLLOCAL QoreValue evalMemberGate(QoreObject* self, const QoreString *nme, ExceptionSink* xsink) const;
237  // This function must only be called from QoreObject
238  DLLLOCAL void execMemberNotification(QoreObject* self, const char* mem, ExceptionSink* xsink) const;
239  // This function must only be called from QoreObject and BCList
240  DLLLOCAL bool execDeleteBlocker(QoreObject* self, ExceptionSink* xsink) const;
241  // This function must only be called from QoreObject
242  DLLLOCAL void execDestructor(QoreObject* self, ExceptionSink* xsink) const;
243  // This function is only called from BCList
244  DLLEXPORT const QoreClass* getClassIntern(qore_classid_t cid, bool& priv) const;
245 
246 public:
248 
253  DLLEXPORT QoreClass(const char* n_name, int n_domain = QDOM_DEFAULT);
254 
256 
263  DLLEXPORT QoreClass(const char* n_name, int64 n_domain, const QoreTypeInfo* n_typeInfo);
264 
266 
268  DLLEXPORT QoreClass(const QoreClass &old);
269 
271  DLLEXPORT ~QoreClass();
272 
274 
299  DLLEXPORT void addMethod(const char* n_name, q_method_n_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
300 
302  DLLEXPORT void addStaticMethod(const char* n_name, q_func_n_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
303 
305 
328  DLLEXPORT void addMethod(const char* n_name, q_method_t meth, bool priv = false);
329 
331 
333  DLLEXPORT void addMethodExtended(const char* n_name, q_method_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
334 
336 
338  DLLEXPORT void addMethodExtended(const char* n_name, q_method_int64_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
339 
341 
343  DLLEXPORT void addMethodExtendedList(const char* n_name, q_method_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
344 
346 
348  DLLEXPORT void addMethod2(const char* n_name, q_method2_t meth, bool priv = false);
349 
351 
353  DLLEXPORT void addMethodExtended2(const char* n_name, q_method2_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
354 
356 
358  DLLEXPORT void addMethodExtendedList2(const char* n_name, q_method2_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
359 
361 
373  DLLEXPORT void addMethodExtendedList3(const void* ptr, const char* n_name, q_method3_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
374 
376 
378  DLLEXPORT void addMethodExtended3(const char* n_name, q_method_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
379 
381 
383  DLLEXPORT void addMethodExtended3(const char* n_name, q_method_int64_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
384 
386 
388  DLLEXPORT void addMethodExtended3(const char* n_name, q_method_bool_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
389 
391 
393  DLLEXPORT void addMethodExtended3(const char* n_name, q_method_double_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
394 
396  DLLEXPORT void addAbstractMethodVariantExtended3(const char* n_name, bool priv = false, int64 n_flags = QC_NO_FLAGS, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
397 
399 
406  DLLEXPORT void addStaticMethod(const char* n_name, q_func_t meth, bool priv = false);
407 
409 
411  DLLEXPORT void addStaticMethodExtended(const char* n_name, q_func_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
412 
414 
416  DLLEXPORT void addStaticMethodExtendedList(const char* n_name, q_func_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
417 
419 
421  DLLEXPORT void addStaticMethod2(const char* n_name, q_static_method2_t meth, bool priv = false);
422 
424 
426  DLLEXPORT void addStaticMethodExtended2(const char* n_name, q_static_method2_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
427 
429 
431  DLLEXPORT void addStaticMethodExtendedList2(const char* n_name, q_static_method2_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
432 
434 
446  DLLEXPORT void addStaticMethodExtendedList3(const void* ptr, const char* n_name, q_static_method3_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
447 
449 
451  DLLEXPORT void addStaticMethodExtended3(const char* n_name, q_func_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
452 
454 
456  DLLEXPORT void addStaticMethodExtended3(const char* n_name, q_func_int64_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
457 
459 
461  DLLEXPORT void addStaticMethodExtended3(const char* n_name, q_func_bool_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
462 
464 
466  DLLEXPORT void addStaticMethodExtended3(const char* n_name, q_func_double_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
467 
469 
480  DLLEXPORT void setDestructor(q_destructor_t m);
481 
483 
494  DLLEXPORT void setDestructor2(q_destructor2_t m);
495 
497 
509  DLLEXPORT void setDestructor3(const void* ptr, q_destructor3_t m);
510 
512  DLLEXPORT void addConstructor(q_constructor_n_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, unsigned num_params = 0, ...);
513 
515 
520  DLLEXPORT void setConstructor(q_constructor_t m);
521 
523  /*
524  @deprecated use addConstructor(q_constructor_n_t, bool priv, int64, int64, unsigned, ...) instead
525  */
526  DLLEXPORT void setConstructorExtended(q_constructor_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, unsigned num_params = 0, ...);
527 
529  /*
530  @deprecated use addConstructor(q_constructor_n_t, bool priv, int64, int64, unsigned, ...) instead
531  */
532  DLLEXPORT void setConstructorExtendedList(q_constructor_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
533 
535 
540  DLLEXPORT void setConstructor2(q_constructor2_t m);
541 
543  /*
544  @deprecated use addConstructor(q_constructor_n_t, bool priv, int64, int64, unsigned, ...) instead
545  */
546  DLLEXPORT void setConstructorExtended2(q_constructor2_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, unsigned num_params = 0, ...);
547 
549  /*
550  @deprecated use addConstructor(q_constructor_n_t, bool priv, int64, int64, unsigned, ...) instead
551  */
552  DLLEXPORT void setConstructorExtendedList2(q_constructor2_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
553 
555 
565  DLLEXPORT void setConstructorExtendedList3(const void* ptr, q_constructor3_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const type_vec_t& n_typeList = type_vec_t(), const arg_vec_t& defaultArgList = arg_vec_t());
566 
568  /*
569  @deprecated use addConstructor(q_constructor_n_t, bool priv, int64, int64, unsigned, ...) instead
570  */
571  DLLEXPORT void setConstructorExtended3(q_constructor_t meth, bool priv = false, int64 n_flags = QC_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, unsigned num_params = 0, ...);
572 
574 
578 
580 
584 
586 
597  DLLEXPORT void setCopy(q_copy_t m);
598 
600 
611  DLLEXPORT void setCopy2(q_copy2_t m);
612 
614 
626  DLLEXPORT void setCopy3(const void* ptr, q_copy3_t m);
627 
629 
637  DLLEXPORT void setDeleteBlocker(q_delete_blocker_t m);
638 
640 
644  DLLEXPORT bool isPrivateMember(const char* str) const;
645 
647 
652  DLLEXPORT bool isPublicOrPrivateMember(const char* str, bool& priv) const;
653 
655 
661  DLLEXPORT QoreObject* execConstructor(const QoreValueList* args, ExceptionSink* xsink) const;
662 
664 
672  DLLEXPORT QoreObject* execConstructor(const QoreListNode* args, ExceptionSink* xsink) const;
673 
675 
679  DLLEXPORT QoreObject* execSystemConstructor(int code = 0, ...) const;
680 
682 
686  DLLEXPORT QoreObject* execCopy(QoreObject* old, ExceptionSink* xsink) const;
687 
689 
694  DLLEXPORT const QoreMethod* findLocalMethod(const char* name) const;
695 
697 
702  DLLEXPORT const QoreMethod* findLocalStaticMethod(const char* name) const;
703 
705 
708  DLLEXPORT QoreListNode* getMethodList() const;
709 
711 
714  DLLEXPORT QoreListNode* getStaticMethodList() const;
715 
717 
725  DLLEXPORT QoreClass* getClass(qore_classid_t cid) const;
726 
728 
735  DLLEXPORT const QoreClass* getClass(qore_classid_t cid, bool& priv) const;
736 
738 
745  DLLEXPORT const QoreClass* getClass(const QoreClass& qc, bool& priv) const;
746 
748  DLLEXPORT int numMethods() const;
749 
751  DLLEXPORT int numStaticMethods() const;
752 
754  DLLEXPORT int numUserMethods() const;
755 
757  DLLEXPORT int numStaticUserMethods() const;
758 
760  DLLEXPORT bool hasCopy() const;
761 
763  DLLEXPORT qore_classid_t getID() const;
764 
766  DLLEXPORT bool isSystem() const;
767 
769  DLLEXPORT bool hasMemberGate() const;
770 
772  DLLEXPORT bool hasMethodGate() const;
773 
775  DLLEXPORT bool hasMemberNotification() const;
776 
778 
780  DLLEXPORT int getDomain() const;
781 
783 
785  DLLEXPORT int64 getDomain64() const;
786 
788  DLLEXPORT const char* getName() const;
789 
791  // used at run-time
792  DLLEXPORT const QoreMethod* findMethod(const char* nme) const;
793 
795  // used at run-time
796  DLLEXPORT const QoreMethod* findStaticMethod(const char* nme) const;
797 
799  DLLEXPORT const QoreMethod* findMethod(const char* nme, bool& priv) const;
800 
802  DLLEXPORT const QoreMethod* findStaticMethod(const char* nme, bool& priv) const;
803 
805 
809  DLLEXPORT void addBuiltinBaseClass(QoreClass* qc, QoreListNode* xargs = 0);
810 
812 
818  DLLEXPORT void addDefaultBuiltinBaseClass(QoreClass* qc, QoreListNode* xargs = 0);
819 
821 
827  DLLEXPORT void addBuiltinVirtualBaseClass(QoreClass* qc);
828 
830 
832  DLLEXPORT void setSynchronousClass();
833 
835 
838  DLLEXPORT const QoreMethod* getConstructor() const;
839 
841 
844  DLLEXPORT const QoreMethod* getSystemConstructor() const;
845 
847 
850  DLLEXPORT const QoreMethod* getDestructor() const;
851 
853 
856  DLLEXPORT const QoreMethod* getCopyMethod() const;
857 
859 
862  DLLEXPORT const QoreMethod* getMemberGateMethod() const;
863 
865 
868  DLLEXPORT const QoreMethod* getMethodGate() const;
869 
871 
874  DLLEXPORT const QoreMethod* getMemberNotificationMethod() const;
875 
877  DLLEXPORT const QoreTypeInfo* getTypeInfo() const;
878 
880  DLLEXPORT const QoreTypeInfo* getOrNothingTypeInfo() const;
881 
883  DLLEXPORT void addPublicMember(const char* mem, const QoreTypeInfo* n_typeInfo, AbstractQoreNode* initial_value = 0);
884 
886  DLLEXPORT void addPrivateMember(const char* mem, const QoreTypeInfo* n_typeInfo, AbstractQoreNode* initial_value = 0);
887 
889  DLLEXPORT void setUserData(const void* ptr);
890 
892  DLLEXPORT const void* getUserData() const;
893 
895  DLLEXPORT void recheckBuiltinMethodHierarchy();
896 
898 
900  DLLEXPORT const QoreExternalMethodVariant* findUserMethodVariant(const char* name, const QoreMethod*& method, const type_vec_t& argTypeList) const;
901 
903 
908  DLLEXPORT void addBuiltinConstant(const char* name, AbstractQoreNode* value, bool priv = false, const QoreTypeInfo* typeInfo = 0);
909 
911 
916  DLLEXPORT void addBuiltinStaticVar(const char* name, AbstractQoreNode* value, bool priv = false, const QoreTypeInfo* typeInfo = 0);
917 
919 
921  DLLEXPORT bool hasAbstract() const;
922 
924  DLLLOCAL QoreClass();
925 
926  // used when parsing, finds committed non-static methods within the entire class hierarchy (local class plus base classes)
927  DLLLOCAL const QoreMethod* parseFindCommittedMethod(const char* nme);
928 
929  // adds public constants to pending list
930  DLLLOCAL void parseAssimilatePublicConstants(ConstantList& cmap);
931  // adds private constants to pending list
932  DLLLOCAL void parseAssimilatePrivateConstants(ConstantList& cmap);
933  // adds a single public constant to pending list
934  DLLLOCAL void parseAddPublicConstant(const std::string& name, AbstractQoreNode* val);
935 
936  // returns 0 for success, -1 for error
937  DLLLOCAL int parseAddBaseClassArgumentList(BCAList* bcal);
938  // only called when parsing, sets the name of the class
939  DLLLOCAL void setName(const char* n);
940 
941  DLLLOCAL qore_classid_t getIDForMethod() const;
942  // get base class list to add virtual class indexes for private data
943  DLLLOCAL BCSMList* getBCSMList() const;
944  // returns true if the class has a delete_blocker function (somewhere in the hierarchy)
945  DLLLOCAL bool has_delete_blocker() const;
946  DLLLOCAL bool parseCheckHierarchy(const QoreClass* cls) const;
947  DLLLOCAL bool parseHasPublicMembersInHierarchy() const;
948  DLLLOCAL bool runtimeGetMemberInfo(const char* mem, const QoreTypeInfo*& memberTypeInfo, bool& priv) const;
949  DLLLOCAL bool runtimeHasPublicMembersInHierarchy() const;
950  // returns true if the class has one or more parent classes
951  DLLLOCAL bool hasParentClass() const;
952  DLLLOCAL bool hasPrivateCopyMethod() const;
953  // returns the status including the pending variant (if any)
954  DLLLOCAL bool parseHasPrivateCopyMethod() const;
955  DLLLOCAL const QoreMethod* parseGetConstructor() const;
956  // returns true if the class implements a "methodGate" method, also in pending uncommitted methods
957  DLLLOCAL bool parseHasMethodGate() const;
958  // called when there is an empty public member declaration or a "no_public" declaration
959  DLLLOCAL void parseSetEmptyPublicMemberDeclaration();
960  // unsets the public member flag for builtin classes
961  DLLLOCAL void unsetPublicMemberFlag();
962 };
963 
966 private:
967  void* priv;
968 
969 public:
970  DLLEXPORT QoreMethodIterator(const QoreClass* qc);
971  DLLEXPORT ~QoreMethodIterator();
972  DLLEXPORT bool next();
973  DLLEXPORT const QoreMethod* getMethod() const;
974 };
975 
978 private:
979  void* priv;
980 
981 public:
982  DLLEXPORT QoreStaticMethodIterator(const QoreClass* qc);
983  DLLEXPORT ~QoreStaticMethodIterator();
984  DLLEXPORT bool next();
985  DLLEXPORT const QoreMethod* getMethod() const;
986 };
987 
988 #endif // _QORE_QORECLASS_H
DLLEXPORT const std::string & getNameStr() const
returns the method&#39;s name
DLLEXPORT void setUserData(const void *ptr)
sets a pointer to user-specific data in the class
DLLEXPORT const QoreTypeInfo * getOrNothingTypeInfo() const
returns the &quot;or nothing&quot; type information structure for this class
DLLEXPORT void addStaticMethod(const char *n_name, q_func_n_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin static method with extended information; additional functional domain info...
DLLEXPORT const QoreMethod * findLocalMethod(const char *name) const
looks for a non-static method in the current class without searching base classes ...
DLLEXPORT void addMethodExtended(const char *n_name, q_method_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin method with extended information; additional functional domain info, return and parameter type info
void(* q_copy3_t)(const QoreClass &thisclass, const void *ptr, QoreObject *self, QoreObject *old, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass copy signatures with the new generic calling convention ...
Definition: common.h:469
DLLEXPORT void setCopy3(const void *ptr, q_copy3_t m)
sets the builtin copy method for the class using the new generic calling convention ...
DLLEXPORT void setDestructor(q_destructor_t m)
sets the builtin destructor method for the class
DLLEXPORT const QoreMethod * getMemberNotificationMethod() const
returns a const pointer to the QoreMethod object of the memberNotification method, if any is set
DLLEXPORT void addBuiltinVirtualBaseClass(QoreClass *qc)
sets &quot;virtual&quot; base class for a class, meaning that the base class data is appropriate for use in the...
DLLEXPORT void addMethodExtended2(const char *n_name, q_method2_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin method with the new calling convention and extended information; additional functional...
To be used to iterate through a class&#39; normal (non-static) methods.
Definition: QoreClass.h:965
DLLEXPORT const char * getClassName() const
returns the class name for the method
DLLEXPORT void addStaticMethodExtendedList(const char *n_name, q_func_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
adds a builtin static method with extended information; additional functional domain info...
DLLEXPORT void addMethodExtendedList2(const char *n_name, q_method2_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
adds a builtin method with the new calling convention and extended information; additional functional...
DLLEXPORT void addBuiltinBaseClass(QoreClass *qc, QoreListNode *xargs=0)
make a builtin class a child of another builtin class
DLLEXPORT qore_classid_t getID() const
returns the class ID of this class
bool(* q_delete_blocker_t)(QoreObject *self, AbstractPrivateData *private_data)
the typed used for QoreClass deleteBlocker signatures
Definition: common.h:477
DLLEXPORT QoreObject * execSystemConstructor(int code=0,...) const
creates a new &quot;system&quot; object for use as the value of a constant, executes the system constructor on ...
DLLEXPORT void setCopy(q_copy_t m)
sets the builtin copy method for the class
DLLEXPORT QoreListNode * getMethodList() const
returns a list strings of all non-static methods in the class, the caller owns the reference count re...
AbstractQoreNode *(* q_static_method3_t)(const QoreMethod &method, const type_vec_t &typeList, const void *ptr, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin static method signatures for static methods using the even newer generic ca...
Definition: common.h:360
DLLEXPORT bool isPublicOrPrivateMember(const char *str, bool &priv) const
returns true if the member is private or public
DLLEXPORT void setDeleteBlocker(q_delete_blocker_t m)
sets the deleteBlocker method for the class
DLLEXPORT void addStaticMethod2(const char *n_name, q_static_method2_t meth, bool priv=false)
adds a builtin static method with the new generic calling convention
DLLEXPORT void setConstructor2(q_constructor2_t m)
sets the builtin constructor method for the class using the new calling convention (or adds an overlo...
DLLEXPORT int numStaticMethods() const
returns the number of static methods in this class (user and builtin)
AbstractQoreNode *(* q_method3_t)(const QoreMethod &method, const type_vec_t &typeList, const void *ptr, QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures when called with the even newer generic calling...
Definition: common.h:340
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreValueList.h:45
DLLEXPORT int numMethods() const
returns the number of non-static methods in this class (user and builtin)
DLLEXPORT bool hasMemberGate() const
returns true if the class implements a &quot;memberGate&quot; method
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:55
DLLEXPORT const void * getUserData() const
retrieves the user-specific data pointer
int64(* q_func_int64_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures returning an integer value
Definition: common.h:250
DLLEXPORT int getDomain() const
returns the functional domain of the class
DLLEXPORT const QoreMethod * getDestructor() const
returns a const pointer to the QoreMethod object of the constructor method, if any is set ...
DLLEXPORT bool isSystem() const
returns true if the class is a builtin class
DLLEXPORT const char * getName() const
returns the class name
DLLEXPORT bool hasAbstract() const
returns true if the class has at least one abstract method variant
AbstractQoreNode *(* q_method2_t)(const QoreMethod &method, QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures when called with the new generic calling conven...
Definition: common.h:327
DLLEXPORT void setConstructorExtendedList3(const void *ptr, q_constructor3_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
sets the constructor method using the new calling convention with extended information; can set a pri...
DLLEXPORT void addBuiltinStaticVar(const char *name, AbstractQoreNode *value, bool priv=false, const QoreTypeInfo *typeInfo=0)
adds a static variable to the class
DLLEXPORT QoreListNode * getStaticMethodList() const
returns a list strings of all static methods in the class, the caller owns the reference count return...
DLLEXPORT const QoreMethod * getCopyMethod() const
returns a const pointer to the QoreMethod object of the destructor method, if any is set ...
DLLEXPORT bool isUser() const
returns true if all variants of the method are user variants
void(* q_system_constructor2_t)(const QoreClass &thisclass, QoreObject *self, int code, va_list args)
the type used for builtin QoreClass system constructor method signatures using the new generic callin...
Definition: common.h:412
DLLEXPORT void addMethodExtendedList3(const void *ptr, const char *n_name, q_method3_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
adds a builtin method with the even newer calling convention and extended information; additional fun...
DLLEXPORT const QoreMethod * getMethodGate() const
returns a const pointer to the QoreMethod object of the methodGate method, if any is set ...
DLLEXPORT void addConstructor(q_constructor_n_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, unsigned num_params=0,...)
sets the constructor method with extended information; can set a private constructor, set additional functional domain info, and parameter type info (or adds an overloaded variant)
int64(* q_method_int64_t)(QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures, returns int64
Definition: common.h:286
DLLEXPORT void setConstructorExtended3(q_constructor_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, unsigned num_params=0,...)
sets the constructor method with extended information; can set a private constructor, set additional functional domain info, and parameter type info (or adds an overloaded variant)
DLLEXPORT QoreValue execManaged(QoreObject *self, const QoreListNode *args, ExceptionSink *xsink) const
evaluates the method and returns the value, does not reference the object for the call ...
double(* q_method_double_t)(QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures when called with the even newer generic calling...
Definition: common.h:316
To be used to iterate through a class&#39; static methods.
Definition: QoreClass.h:977
Qore&#39;s string type supported by the QoreEncoding class.
Definition: QoreString.h:82
AbstractQoreNode *(* q_func_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures
Definition: common.h:247
DLLEXPORT bool hasMemberNotification() const
returns true if the class implements a &quot;memberNotification&quot; method
DLLEXPORT void addMethod2(const char *n_name, q_method2_t meth, bool priv=false)
adds a builtin method with the new generic calling convention
DLLEXPORT const QoreMethod * getSystemConstructor() const
returns a const pointer to the QoreMethod object of the constuctor method, if any is set ...
std::vector< AbstractQoreNode * > arg_vec_t
vector of value information for default argument lists
Definition: common.h:222
DLLEXPORT QoreClass * getClass(qore_classid_t cid) const
returns a pointer to the QoreClass object representing the class ID passed if it exists in the class ...
DLLEXPORT void addMethodExtendedList(const char *n_name, q_method_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
adds a builtin method with extended information; additional functional domain info, return and parameter type info from lists
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
DLLEXPORT void addStaticMethodExtended(const char *n_name, q_func_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin static method with extended information; additional functional domain info...
DLLEXPORT void setConstructorExtendedList(q_constructor_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
sets the constructor method with extended information; can set a private constructor, set additional functional domain info, and parameter type info from lists (or adds an overloaded variant)
void(* q_copy_t)(QoreObject *self, QoreObject *old, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass copy signatures
Definition: common.h:448
void(* q_destructor_t)(QoreObject *self, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass destructor signatures
Definition: common.h:420
double(* q_func_double_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures returning an double value
Definition: common.h:256
DLLEXPORT void addDefaultBuiltinBaseClass(QoreClass *qc, QoreListNode *xargs=0)
make a builtin class a child of another builtin class and ensures that the given class&#39; private data ...
defines a Qore-language class
Definition: QoreClass.h:195
void(* q_destructor2_t)(const QoreClass &thisclass, QoreObject *self, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass destructor signatures with the new generic calling convention ...
Definition: common.h:429
DLLEXPORT void addMethod(const char *n_name, q_method_n_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin method to a class
DLLEXPORT const char * getName() const
returns the method&#39;s name
DLLEXPORT const QoreExternalMethodVariant * findUserMethodVariant(const char *name, const QoreMethod *&method, const type_vec_t &argTypeList) const
returns the user variant for the given non-static method and argument types
DLLEXPORT bool newCallingConvention() const
DEPRECATED: always returns false, do not use.
DLLEXPORT int64 getDomain64() const
returns the functional domain of the class
void(* q_constructor_t)(QoreObject *self, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures
Definition: common.h:374
DLLLOCAL bool parseIsPrivate() const
returns true if all overloaded variants of a methods are private, false if at least one variant is pu...
DLLEXPORT const QoreClass * getClass() const
returns a pointer to the parent class
void(* q_system_constructor_t)(QoreObject *self, int code, va_list args)
the type used for builtin QoreClass system constructor method signatures
Definition: common.h:402
DLLEXPORT const QoreMethod * findLocalStaticMethod(const char *name) const
looks for a static method in the current class without searching base classes
DLLEXPORT void setConstructorExtendedList2(q_constructor2_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
sets the constructor method using the new calling convention with extended information; can set a pri...
DLLEXPORT QoreObject * execCopy(QoreObject *old, ExceptionSink *xsink) const
executes a class&#39; &quot;copy&quot; method on an object and returns the new object (or 0 in the case of an excep...
void(* q_constructor_n_t)(QoreObject *self, const QoreValueList *args, q_rt_flags_t rtflags, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures
Definition: common.h:367
DLLEXPORT bool isPrivateMember(const char *str) const
returns true if the member is private
DLLEXPORT void addPublicMember(const char *mem, const QoreTypeInfo *n_typeInfo, AbstractQoreNode *initial_value=0)
adds a public member
DLLEXPORT void addBuiltinConstant(const char *name, AbstractQoreNode *value, bool priv=false, const QoreTypeInfo *typeInfo=0)
adds a class constant to the class
the implementation of Qore&#39;s object data type, reference counted, dynamically-allocated only ...
Definition: QoreObject.h:64
DLLEXPORT const QoreMethod * getMemberGateMethod() const
returns a const pointer to the QoreMethod object of the memberGate method, if any is set ...
unsigned qore_classid_t
used for the unique class ID for QoreClass objects
Definition: common.h:77
static unsigned num_params(const QoreListNode *n)
returns the number of arguments passed to the function
Definition: params.h:62
DLLEXPORT const QoreMethod * getConstructor() const
returns a const pointer to the QoreMethod object of the constuctor method, if any is set ...
container for holding Qore-language exception information and also for registering a &quot;thread_exit&quot; ca...
Definition: ExceptionSink.h:43
void(* q_constructor2_t)(const QoreClass &thisclass, QoreObject *self, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures using the new generic calling conve...
Definition: common.h:382
DLLEXPORT void recheckBuiltinMethodHierarchy()
rechecks for inherited methods in base classes when adding builtin classes
DLLLOCAL QoreClass()
constructor not exported in library&#39;s API
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition: common.h:228
DLLEXPORT bool hasMethodGate() const
returns true if the class implements a &quot;methodGate&quot; method
bool(* q_method_bool_t)(QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures when called with the even newer generic calling...
Definition: common.h:306
DLLEXPORT void addStaticMethodExtendedList2(const char *n_name, q_static_method2_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
adds a builtin static method with the new generic calling convention with extended information; addit...
DLLEXPORT void setSynchronousClass()
call this function if your builtin class requires *all* methods (except the constructor) to be run in...
DLLEXPORT void setConstructor(q_constructor_t m)
sets the builtin constructor method for the class (or adds an overloaded variant) ...
DLLEXPORT void setCopy2(q_copy2_t m)
sets the builtin copy method for the class using the new generic calling convention ...
DLLEXPORT ~QoreClass()
deletes the object and frees all memory
AbstractQoreNode *(* q_static_method2_t)(const QoreMethod &method, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin static method signatures for static methods using the new generic calling c...
Definition: common.h:349
DLLEXPORT void addStaticMethodExtended3(const char *n_name, q_func_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin static method with extended information; additional functional domain info...
QoreValue(* q_method_n_t)(QoreObject *self, AbstractPrivateData *private_data, const QoreValueList *args, q_rt_flags_t flags, ExceptionSink *xsink)
the new type used for builtin QoreClass method signatures
Definition: common.h:266
AbstractQoreNode *(* q_method_t)(QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures
Definition: common.h:276
DLLEXPORT const QoreMethod * findStaticMethod(const char *nme) const
finds a static method in the class hierarchy
DLLEXPORT bool isStatic() const
returns true if the method is static
DLLEXPORT bool isPrivate() const
returns true if all overloaded variants of a methods are private, false if at least one variant is pu...
DLLEXPORT void setSystemConstructor2(q_system_constructor2_t m)
sets the builtin constructor for system objects (ex: used as constant values) using the new calling c...
QoreValue(* q_func_n_t)(const QoreValueList *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin function signatures
Definition: common.h:239
DLLEXPORT void addPrivateMember(const char *mem, const QoreTypeInfo *n_typeInfo, AbstractQoreNode *initial_value=0)
adds a private member
DLLEXPORT void addStaticMethodExtendedList3(const void *ptr, const char *n_name, q_static_method3_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, const type_vec_t &n_typeList=type_vec_t(), const arg_vec_t &defaultArgList=arg_vec_t())
adds a builtin static method with the even newer generic calling convention with extended information...
DLLEXPORT int numUserMethods() const
returns the number of non-static user methods in this class
DLLEXPORT int numStaticUserMethods() const
returns the number of static user methods in this class
DLLEXPORT const QoreTypeInfo * getTypeInfo() const
returns the type information structure for this class
DLLEXPORT bool isSynchronized() const
DEPRECATED: always returns false, do not use.
DLLEXPORT bool hasCopy() const
returns true if the class implements a copy method
DLLEXPORT void setDestructor2(q_destructor2_t m)
sets the builtin destructor method for the class with the new generic calling convention ...
void(* q_constructor3_t)(const QoreClass &thisclass, const type_vec_t &typeList, const void *ptr, QoreObject *self, const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures using the even newer generic callin...
Definition: common.h:392
DLLEXPORT void setDestructor3(const void *ptr, q_destructor3_t m)
sets the builtin destructor method for the class with the new generic calling convention ...
std::vector< const QoreTypeInfo * > type_vec_t
vector of type information for parameter lists
Definition: common.h:219
a method in a QoreClass
Definition: QoreClass.h:91
DLLEXPORT bool existsVariant(const type_vec_t &paramTypeInfo) const
returns true if a variant with the given parameter signature already exists in the method ...
DLLEXPORT void setConstructorExtended2(q_constructor2_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, unsigned num_params=0,...)
sets the constructor method using the new calling convention with extended information; can set a pri...
DLLEXPORT void setSystemConstructor(q_system_constructor_t m)
sets the builtin constructor for system objects (ex: used as constant values)
bool(* q_func_bool_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures returning a boolean value
Definition: common.h:253
DLLEXPORT void setConstructorExtended(q_constructor_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, unsigned num_params=0,...)
sets the constructor method with extended information; can set a private constructor, set additional functional domain info, and parameter type info (or adds an overloaded variant)
DLLEXPORT void addAbstractMethodVariantExtended3(const char *n_name, bool priv=false, int64 n_flags=QC_NO_FLAGS, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds an unimplemented abstract method variant to the class with extended information; with return and...
void(* q_copy2_t)(const QoreClass &thisclass, QoreObject *self, QoreObject *old, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass copy signatures with the new generic calling convention ...
Definition: common.h:458
DLLEXPORT void addStaticMethodExtended2(const char *n_name, q_static_method2_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin static method with the new generic calling convention with extended information; addit...
DLLEXPORT void addMethodExtended3(const char *n_name, q_method_t meth, bool priv=false, int64 n_flags=QC_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin method with extended information; additional functional domain info, return and parameter type info
DLLEXPORT QoreObject * execConstructor(const QoreValueList *args, ExceptionSink *xsink) const
creates a new object and executes the constructor on it and returns the new object ...
DLLEXPORT bool isBuiltin() const
returns true if all variants of the method are builtin variants
void(* q_destructor3_t)(const QoreClass &thisclass, const void *ptr, QoreObject *self, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass destructor signatures with the new generic calling convention and...
Definition: common.h:439
DLLEXPORT const QoreMethod * findMethod(const char *nme) const
finds a non-static method in the class hierarchy
#define QDOM_DEFAULT
the default domain (no domain)
Definition: Restrictions.h:137