32 #ifndef _QORE_QORECLASS_H
34 #define _QORE_QORECLASS_H
67 DLLEXPORT
extern QoreClass* QC_HTTPCLIENT;
78 class AbstractQoreFunctionVariant;
79 class AbstractFunctionSignature;
82 class qore_method_private;
83 class MethodFunctionBase;
84 class QoreExternalMethodVariant;
85 class QoreExternalStaticMethodVariant;
88 class MethodVariantBase;
95 friend class StaticMethodCallNode;
97 friend class qore_class_private;
98 friend class qore_method_private;
103 class qore_method_private* priv;
109 DLLLOCAL QoreMethod& operator=(
const QoreMethod&);
131 DLLEXPORT
bool isUser()
const;
156 DLLEXPORT
const char*
getName()
const;
162 DLLEXPORT
const std::string&
getNameStr()
const;
177 DLLEXPORT
const QoreTypeInfo* getUniqueReturnTypeInfo()
const;
186 DLLLOCAL QoreMethod(
const QoreClass* p_class, MethodFunctionBase* n_func,
bool n_static =
false);
188 DLLLOCAL ~QoreMethod();
189 DLLLOCAL
bool inMethod(
const QoreObject*
self)
const;
190 DLLLOCAL QoreMethod* copy(
const QoreClass* p_class)
const;
191 DLLLOCAL
void assign_class(
const QoreClass* p_class);
192 DLLLOCAL MethodFunctionBase* getFunction()
const;
217 friend class BCSMList;
218 friend class qore_object_private;
219 friend class qore_class_private;
221 friend class BCANode;
222 friend class qore_method_private;
225 friend class ConstructorMethodFunction;
247 DLLEXPORT
explicit QoreClass(
const char* n_name,
int n_domain);
257 DLLEXPORT
QoreClass(
const char* n_name,
int64 n_domain,
const QoreTypeInfo* n_typeInfo);
262 DLLEXPORT
QoreClass(
const QoreClass &old);
838 DLLEXPORT
const QoreClass*
getClass(
const QoreClass& qc,
bool& priv)
const;
853 DLLEXPORT
bool hasCopy()
const;
884 DLLEXPORT
const char*
getName()
const;
989 DLLEXPORT
void addMember(
const char* mem, ClassAccess access,
const QoreTypeInfo* n_typeInfo,
AbstractQoreNode* initial_value = 0);
1024 template <
typename T>
1059 DLLEXPORT
void addBuiltinConstant(
const char* name,
QoreValue value, ClassAccess access = Public,
const QoreTypeInfo* typeInfo = 0);
1097 DLLLOCAL
const QoreMethod* parseFindCommittedMethod(
const char* nme);
1100 DLLLOCAL
int parseAddBaseClassArgumentList(BCAList* bcal);
1102 DLLLOCAL
void setName(
const char* n);
1106 DLLLOCAL BCSMList* getBCSMList()
const;
1108 DLLLOCAL
bool has_delete_blocker()
const;
1110 DLLLOCAL
bool parseHasPublicMembersInHierarchy()
const;
1111 DLLLOCAL
bool runtimeHasPublicMembersInHierarchy()
const;
1114 DLLLOCAL
bool hasParentClass()
const;
1115 DLLLOCAL
bool hasPrivateCopyMethod()
const;
1117 DLLLOCAL
bool parseHasPrivateCopyMethod()
const;
1118 DLLLOCAL
const QoreMethod* parseGetConstructor()
const;
1120 DLLLOCAL
bool parseHasMethodGate()
const;
1122 DLLLOCAL
void parseSetEmptyPublicMemberDeclaration();
1124 DLLLOCAL
void unsetPublicMemberFlag();
1132 QoreClass& operator=(
const QoreClass&) =
delete;
1135 class qore_class_private* priv;
1141 DLLLOCAL
void insertStaticMethod(
QoreMethod* o);
1143 DLLLOCAL
const QoreMethod* parseResolveSelfMethodIntern(
const char* nme);
1174 DLLEXPORT ~QoreMethodIterator();
1175 DLLEXPORT
bool next();
1176 DLLEXPORT
const QoreMethod* getMethod()
const;
1186 DLLEXPORT ~QoreStaticMethodIterator();
1187 DLLEXPORT
bool next();
1188 DLLEXPORT
const QoreMethod* getMethod()
const;
1230 #endif // _QORE_QORECLASS_H
DLLEXPORT const std::string & getNameStr() const
returns the method'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 "or nothing" type information structure for this class
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:525
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 "virtual" 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's normal (non-static) methods.
Definition: QoreClass.h:1168
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:533
DLLEXPORT QoreObject * execSystemConstructor(int code=0,...) const
creates a new "system" 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:403
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
virtual void doDeref()=0
for non-reference counted classes, deletes the object immediately
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...
an abstract class for class-specific external user data
Definition: QoreClass.h:198
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:370
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 "memberGate" method
allows for temporary storage of a QoreClass pointer
Definition: QoreClass.h:1194
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:54
DLLEXPORT void addConstructorVariant(const void *ptr, q_external_constructor_t meth, ClassAccess access=Public, 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(), const name_vec_t &n_names=name_vec_t())
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 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:264
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
virtual AbstractQoreClassUserData * copy() const =0
for reference-counted classes, returns the same object with the reference count incremented ...
DLLEXPORT const char * getName() const
returns the class name
DLLLOCAL QoreClass * release()
releases the QoreClass*
Definition: QoreClass.h:1209
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:357
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:468
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 ...
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:316
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 ...
DLLEXPORT void setManagedUserData(AbstractQoreClassUserData *cud)
sets a pointer to user-specific data in the class
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:346
To be used to iterate through a class's static methods.
Definition: QoreClass.h:1180
QoreValue(* q_external_static_method_t)(const QoreMethod &method, const void *ptr, const QoreValueList *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for external static methods
Definition: common.h:383
Qore'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:261
DLLEXPORT bool hasMemberNotification() const
returns true if the class implements a "memberNotification" 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:235
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:504
DLLEXPORT void addMethod(const char *n_name, q_method_n_t meth, ClassAccess access=Public, 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
void(* q_destructor_t)(QoreObject *self, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass destructor signatures
Definition: common.h:476
double(* q_func_double_t)(const QoreListNode *args, ExceptionSink *xsink)
the type used for builtin function signatures returning an double value
Definition: common.h:270
DLLEXPORT void addDefaultBuiltinBaseClass(QoreClass *qc, QoreListNode *xargs=0)
make a builtin class a child of another builtin class and ensures that the given class's private data...
defines a Qore-language class
Definition: QoreClass.h:214
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:485
DLLEXPORT const char * getName() const
returns the method's name
DLLEXPORT void addStaticMethod(const char *n_name, q_func_n_t meth, ClassAccess access=Public, 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 addMember(const char *mem, ClassAccess access, const QoreTypeInfo *n_typeInfo, AbstractQoreNode *initial_value=0)
adds a member
creates a builtin class
Definition: QoreClass.h:1221
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 void addAbstractMethodVariant(const char *n_name, ClassAccess access=Public, 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...
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:430
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:458
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's "copy" method on an object and returns the new object (or 0 in the case of an exce...
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:112
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:411
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's object data type, reference counted, dynamically-allocated only ...
Definition: QoreObject.h:62
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:80
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 "thread_exit" ca...
Definition: ExceptionSink.h:47
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:438
std::vector< std::string > name_vec_t
vector of parameter names for parameter lists
Definition: common.h:238
DLLEXPORT void recheckBuiltinMethodHierarchy()
rechecks for inherited methods in base classes when adding builtin classes
DLLLOCAL QoreClassHolder(QoreClass *c)
creates the object
Definition: QoreClass.h:1197
DLLEXPORT AbstractQoreClassUserData * getManagedUserData() const
retrieves the user-specific data pointer
DLLEXPORT void setSystem()
marks the class as a builtin class
DLLEXPORT void addMethodVariant(const void *ptr, const char *n_name, q_external_method_t meth, ClassAccess access=Public, 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(), const name_vec_t &n_names=name_vec_t())
adds a builtin method variant to a class with the calling convention for external modules ...
DLLLOCAL QoreClass()
constructor not exported in library'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:241
DLLEXPORT bool hasMethodGate() const
returns true if the class implements a "methodGate" 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:336
DLLEXPORT void setGateAccessFlag()
sets the class's gate access flag so that memberGate() and methodGate() methods will be called with a...
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
DLLLOCAL T * getManagedUserData() const
retrieves the user-specific data pointer
Definition: QoreClass.h:1025
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:392
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...
DLLEXPORT QoreBuiltinClass(const char *name, int64 n_domain=QDOM_DEFAULT)
creates the object and marks it as a builtin class
DLLEXPORT void addStaticMethodVariant(const void *ptr, const char *n_name, q_external_static_method_t meth, ClassAccess access=Public, 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(), const name_vec_t &n_names=name_vec_t())
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:281
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:306
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 or class internal, false if at least one variant is public
DLLEXPORT ~QoreClassHolder()
deletes the QoreClass object if still managed
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:253
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 ClassAccess getAccess() const
returns the lowest access code of all variants in the method
DLLEXPORT void setPublicMemberFlag()
sets the class's public member flag so that undeclared member references will fail ...
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 ...
DLLEXPORT void addConstructor(q_constructor_n_t meth, ClassAccess access=Public, 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)
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:448
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:232
a method in a QoreClass
Definition: QoreClass.h:94
DLLEXPORT void rescanParents()
rescan builtin parent classes in a class hierarchy; to be used with out-of-order class hierarchy cons...
DLLEXPORT void setFinal()
sets the final flag of the class
DLLEXPORT bool existsVariant(const type_vec_t ¶mTypeInfo) 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:267
void(* q_external_constructor_t)(const QoreMethod &method, const void *ptr, QoreObject *self, const QoreValueList *args, q_rt_flags_t rtflags, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures
Definition: common.h:423
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:514
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
QoreValue(* q_external_method_t)(const QoreMethod &method, const void *ptr, 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:296
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:495
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:146