QoreClass.h
/* -*- mode: c++; indent-tabs-mode: nil -*- */
/*
QoreClass.h
Qore Programming Language
Copyright (C) 2003 - 2020 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Note that the Qore library is released under a choice of three open-source
licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
information.
*/
#ifndef _QORE_QORECLASS_H
#define _QORE_QORECLASS_H
#include <cstdarg>
#include <memory>
#include <string>
// all qore class IDs
DLLEXPORT extern qore_classid_t CID_AUTOGATE;
DLLEXPORT extern qore_classid_t CID_AUTOLOCK;
DLLEXPORT extern qore_classid_t CID_AUTOREADLOCK;
DLLEXPORT extern qore_classid_t CID_AUTOWRITELOCK;
DLLEXPORT extern qore_classid_t CID_CONDITION;
DLLEXPORT extern qore_classid_t CID_COUNTER;
DLLEXPORT extern qore_classid_t CID_DATASOURCE;
DLLEXPORT extern qore_classid_t CID_DATASOURCEPOOL;
DLLEXPORT extern qore_classid_t CID_FILE;
DLLEXPORT extern qore_classid_t CID_FTPCLIENT;
DLLEXPORT extern qore_classid_t CID_GATE;
DLLEXPORT extern qore_classid_t CID_GETOPT;
DLLEXPORT extern qore_classid_t CID_HTTPCLIENT;
DLLEXPORT extern qore_classid_t CID_MUTEX;
DLLEXPORT extern qore_classid_t CID_PROGRAM;
DLLEXPORT extern qore_classid_t CID_PROGRAMDEBUG;
DLLEXPORT extern qore_classid_t CID_QUEUE;
DLLEXPORT extern qore_classid_t CID_RWLOCK;
DLLEXPORT extern qore_classid_t CID_SSLCERTIFICATE;
DLLEXPORT extern qore_classid_t CID_SSLPRIVATEKEY;
DLLEXPORT extern qore_classid_t CID_SEQUENCE;
DLLEXPORT extern qore_classid_t CID_SOCKET;
DLLEXPORT extern qore_classid_t CID_TERMIOS;
DLLEXPORT extern qore_classid_t CID_INPUTSTREAM;
DLLEXPORT extern qore_classid_t CID_OUTPUTSTREAM;
DLLEXPORT extern qore_classid_t CID_INPUTSTREAMBASE;
DLLEXPORT extern qore_classid_t CID_OUTPUTSTREAMBASE;
DLLEXPORT extern qore_classid_t CID_PROGRAM;
DLLEXPORT extern qore_classid_t CID_SERIALIZABLE;
DLLEXPORT extern QoreClass* QC_QUEUE;
DLLEXPORT extern QoreClass* QC_HTTPCLIENT;
DLLEXPORT extern QoreClass* QC_SSLCERTIFICATE;
DLLEXPORT extern QoreClass* QC_SSLPRIVATEKEY;
DLLEXPORT extern QoreClass* QC_PROGRAM;
DLLEXPORT extern QoreClass* QC_SERIALIZABLE;
class BCList;
class BCSMList;
class BCAList;
class QoreObject;
class QoreClass;
class BCEAList;
class ParamList;
class QoreMemberInfo;
class BuiltinMethod;
class AbstractQoreFunctionVariant;
class AbstractFunctionSignature;
class UserMethod;
class BCANode;
class qore_method_private;
class MethodFunctionBase;
class NamedScope;
class ConstantList;
class MethodVariantBase;
class QoreExternalVariant;
class QoreExternalMethodVariant;
class QoreExternalNormalMember;
class QoreExternalStaticMember;
class QoreExternalProgramLocation;
class QoreExternalMethodFunction;
class QoreExternalMemberVarBase;
class QoreExternalStaticMember;
class QoreExternalNormalMember;
class QoreExternalConstant;
enum method_type_e {
MT_None = 0, // not a method function/variant
MT_Normal = 1,
MT_Static = 2,
MT_Constructor = 3,
MT_Destructor = 4,
MT_Copy = 5,
MT_Pseudo = 6,
};
class QoreMethod {
friend class StaticMethodCallNode;
friend class QoreObject;
friend class qore_class_private;
friend class qore_method_private;
friend class BCList;
private:
class qore_method_private* priv;
DLLLOCAL QoreMethod(const QoreMethod&);
DLLLOCAL QoreMethod& operator=(const QoreMethod&);
public:
DLLEXPORT bool isUser() const;
DLLEXPORT bool isBuiltin() const;
DLLEXPORT bool isPrivate() const;
DLLEXPORT ClassAccess getAccess() const;
DLLEXPORT bool isStatic() const;
DLLEXPORT const char* getName() const;
DLLEXPORT const std::string& getNameStr() const;
DLLEXPORT const QoreClass* getClass() const;
DLLEXPORT const char* getClassName() const;
DLLEXPORT bool existsVariant(const type_vec_t& paramTypeInfo) const;
/* returns the return type information for the method if it is available and if
there is only one return type (there can be more return types if the method is
overloaded)
*/
DLLEXPORT const QoreTypeInfo* getUniqueReturnTypeInfo() const;
DLLEXPORT QoreValue execManaged(QoreObject* self, const QoreListNode* args, ExceptionSink* xsink) const;
DLLEXPORT method_type_e getMethodType() const;
DLLEXPORT const QoreExternalMethodFunction* getFunction() const;
DLLLOCAL QoreMethod(const QoreClass* p_class, MethodFunctionBase* n_func, bool n_static = false);
DLLLOCAL bool inMethod(const QoreObject* self) const;
DLLLOCAL QoreMethod* copy(const QoreClass* p_class) const;
DLLLOCAL void assign_class(const QoreClass* p_class);
// non-exported destructor
DLLLOCAL ~QoreMethod();
};
class AbstractQoreClassUserData {
public:
DLLEXPORT virtual ~AbstractQoreClassUserData();
virtual AbstractQoreClassUserData* copy() const = 0;
virtual void doDeref() = 0;
};
class QoreClass {
friend class BCList;
friend class BCNode;
friend class BCSMList;
friend class qore_object_private;
friend class qore_class_private;
friend class QoreObject;
friend class BCANode;
friend class qore_method_private;
friend class QoreMethodIterator;
friend class QoreStaticMethodIterator;
friend class ConstructorMethodFunction;
public:
DLLEXPORT QoreClass(const char* n_name, int64 n_domain = QDOM_DEFAULT);
DLLEXPORT explicit QoreClass(const char* n_name, int n_domain);
DLLEXPORT QoreClass(const char* n_name, int64 n_domain, const QoreTypeInfo* n_typeInfo);
DLLEXPORT QoreClass(const QoreClass &old);
DLLEXPORT void addMethod(const char* n_name, q_method_n_t meth, ClassAccess access = Public, int64 n_flags = QCF_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
DLLEXPORT void addMethod(const void* ptr, const char* n_name, q_external_method_t meth, ClassAccess access = Public, int64 n_flags = QCF_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());
DLLEXPORT void addStaticMethod(const char* n_name, q_func_n_t meth, ClassAccess access = Public, int64 n_flags = QCF_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
DLLEXPORT void addStaticMethod(const void* ptr, const char* n_name, q_external_static_method_t meth, ClassAccess access = Public, int64 n_flags = QCF_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());
DLLEXPORT void addAbstractMethod(const char* n_name, ClassAccess access = Public, int64 n_flags = QCF_NO_FLAGS, const QoreTypeInfo* returnTypeInfo = 0, unsigned num_params = 0, ...);
DLLEXPORT void addAbstractMethod(const char* n_name, ClassAccess access, int64 n_flags, const QoreTypeInfo* returnTypeInfo, const type_vec_t& n_typeList, const arg_vec_t& defaultArgList = arg_vec_t(), const name_vec_t& n_names = name_vec_t());
DLLEXPORT void setDestructor(q_destructor_t m);
DLLEXPORT void setDestructor(const void* ptr, q_external_destructor_t m);
DLLEXPORT void addConstructor(q_constructor_n_t meth, ClassAccess access = Public, int64 n_flags = QCF_NO_FLAGS, int64 n_domain = QDOM_DEFAULT, unsigned num_params = 0, ...);
DLLEXPORT void addConstructor(const void* ptr, q_external_constructor_t meth, ClassAccess access = Public, int64 n_flags = QCF_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());
DLLEXPORT void setSystemConstructor(q_system_constructor_t m);
DLLEXPORT void setCopy(q_copy_t m);
DLLEXPORT void setCopy(const void* ptr, q_external_copy_t m);
DLLEXPORT void setDeleteBlocker(q_delete_blocker_t m);
DLLEXPORT void setSerializer(q_serializer_t m);
DLLEXPORT void setDeserializer(q_deserializer_t m);
DLLEXPORT q_serializer_t getSerializer() const;
DLLEXPORT q_deserializer_t getDeserializer() const;
DLLEXPORT void setFinal();
DLLEXPORT bool isPrivateMember(const char* str) const;
DLLEXPORT bool isPublicOrPrivateMember(const char* str, bool& priv) const;
DLLEXPORT QoreObject* execConstructor(const QoreListNode* args, ExceptionSink* xsink) const;
DLLEXPORT QoreObject* execConstructorVariant(const QoreExternalMethodVariant* mv, const QoreListNode *args, ExceptionSink* xsink) const;
DLLEXPORT QoreObject* execSystemConstructor(int code = 0, ...) const;
DLLEXPORT QoreObject* execCopy(QoreObject* old, ExceptionSink* xsink) const;
DLLEXPORT QoreListNode* getMethodList() const;
DLLEXPORT QoreListNode* getStaticMethodList() const;
DLLEXPORT QoreClass* getClass(qore_classid_t cid) const;
DLLEXPORT const QoreClass* getClass(qore_classid_t cid, bool& priv) const;
DLLEXPORT const QoreClass* getClass(const QoreClass& qc, bool& priv) const;
DLLEXPORT int numMethods() const;
DLLEXPORT int numStaticMethods() const;
DLLEXPORT int numUserMethods() const;
DLLEXPORT int numStaticUserMethods() const;
DLLEXPORT bool hasCopy() const;
DLLEXPORT qore_classid_t getID() const;
DLLEXPORT bool isSystem() const;
DLLEXPORT bool isModulePublic() const;
DLLEXPORT bool isAbstract() const;
DLLEXPORT bool isFinal() const;
DLLEXPORT bool isInjected() const;
DLLEXPORT bool isPseudoClass() const;
DLLEXPORT qore_type_t getPseudoClassType() const;
DLLEXPORT QoreValue evalPseudoMethod(const QoreValue n, const char* nme, const QoreListNode* args, ExceptionSink* xsink) const;
DLLEXPORT QoreValue evalPseudoMethod(const QoreMethod* m, const QoreExternalMethodVariant* variant, const QoreValue n, const QoreListNode* args, ExceptionSink* xsink) const;
DLLEXPORT void setSystem();
DLLEXPORT bool hasMemberGate() const;
DLLEXPORT bool hasMethodGate() const;
DLLEXPORT bool hasMemberNotification() const;
DLLEXPORT int64 getDomain() const;
DLLEXPORT const char* getName() const;
DLLEXPORT const QoreMethod* findMethod(const char* nme) const;
DLLEXPORT const QoreMethod* findStaticMethod(const char* nme) const;
DLLEXPORT const QoreMethod* findMethod(const char* nme, ClassAccess& access) const;
DLLEXPORT const QoreMethod* findStaticMethod(const char* nme, ClassAccess& access) const;
DLLEXPORT const QoreMethod* findLocalMethod(const char* name) const;
DLLEXPORT const QoreMethod* findLocalStaticMethod(const char* name) const;
DLLEXPORT void addBuiltinBaseClass(QoreClass* qc);
DLLEXPORT void addDefaultBuiltinBaseClass(QoreClass* qc);
DLLEXPORT void addBuiltinVirtualBaseClass(QoreClass* qc);
DLLEXPORT void setSynchronousClass();
DLLEXPORT const QoreMethod* getConstructor() const;
DLLEXPORT const QoreMethod* getSystemConstructor() const;
DLLEXPORT const QoreMethod* getDestructor() const;
DLLEXPORT const QoreMethod* getCopyMethod() const;
DLLEXPORT const QoreMethod* getMemberGateMethod() const;
DLLEXPORT const QoreMethod* getMethodGate() const;
DLLEXPORT const QoreMethod* getMemberNotificationMethod() const;
DLLEXPORT const QoreTypeInfo* getTypeInfo() const;
DLLEXPORT const QoreTypeInfo* getOrNothingTypeInfo() const;
DLLEXPORT void addMember(const char* mem, ClassAccess access, const QoreTypeInfo* n_typeInfo, QoreValue initial_value = QoreValue());
DLLEXPORT void setUserData(const void* ptr);
DLLEXPORT const void* getUserData() const;
DLLEXPORT void setManagedUserData(AbstractQoreClassUserData* cud);
DLLEXPORT AbstractQoreClassUserData* getManagedUserData() const;
template <typename T>
DLLLOCAL T* getManagedUserData() const {
return static_cast<T*>(getManagedUserData());
}
DLLEXPORT void recheckBuiltinMethodHierarchy();
DLLEXPORT const QoreExternalMethodVariant* findUserMethodVariant(const char* name, const QoreMethod*& method, const type_vec_t& argTypeList) const;
DLLEXPORT void addBuiltinConstant(const char* name, QoreValue value, ClassAccess access = Public, const QoreTypeInfo* typeInfo = nullptr);
DLLEXPORT void addBuiltinStaticVar(const char* name, QoreValue value, ClassAccess access = Public, const QoreTypeInfo* typeInfo = nullptr);
DLLEXPORT void rescanParents();
DLLEXPORT void setPublicMemberFlag();
DLLEXPORT void setGateAccessFlag();
DLLEXPORT const QoreExternalNormalMember* findLocalMember(const char* name) const;
DLLEXPORT const QoreExternalStaticMember* findLocalStaticMember(const char* name) const;
DLLEXPORT std::string getNamespacePath(bool anchored = false) const;
DLLEXPORT bool isEqual(const QoreClass& cls) const;
DLLEXPORT BinaryNode* getBinaryHash() const;
DLLEXPORT int runtimeCheckInstantiateClass(ExceptionSink* xsink) const;
DLLEXPORT const QoreExternalConstant* findConstant(const char* name) const;
DLLEXPORT const QoreNamespace* getNamespace() const;
DLLEXPORT bool inHierarchy(const QoreClass& cls, ClassAccess& n_access) const;
DLLEXPORT bool hasTransientMember() const;
DLLEXPORT const char* getModuleName() const;
DLLLOCAL QoreClass();
// used when parsing, finds committed non-static methods within the entire class hierarchy (local class plus base classes)
DLLLOCAL const QoreMethod* parseFindCommittedMethod(const char* nme);
// returns 0 for success, -1 for error
DLLLOCAL int parseAddBaseClassArgumentList(BCAList* bcal);
// only called when parsing, sets the name of the class
DLLLOCAL void setName(const char* n);
DLLLOCAL qore_classid_t getIDForMethod() const;
// get base class list to add virtual class indexes for private data
DLLLOCAL BCSMList* getBCSMList() const;
// returns true if the class has a delete_blocker function (somewhere in the hierarchy)
DLLLOCAL bool has_delete_blocker() const;
DLLLOCAL bool parseHasPublicMembersInHierarchy() const;
DLLLOCAL bool runtimeHasPublicMembersInHierarchy() const;
// returns true if the class has one or more parent classes
DLLLOCAL bool hasParentClass() const;
DLLLOCAL bool hasPrivateCopyMethod() const;
// returns the status including the pending variant (if any)
DLLLOCAL bool parseHasPrivateCopyMethod() const;
DLLLOCAL const QoreMethod* parseGetConstructor() const;
// returns true if the class implements a "methodGate" method, also in pending uncommitted methods
DLLLOCAL bool parseHasMethodGate() const;
// called when there is an empty public member declaration or a "no_public" declaration
DLLLOCAL void parseSetEmptyPublicMemberDeclaration();
// unsets the public member flag for builtin classes
DLLLOCAL void unsetPublicMemberFlag();
protected:
DLLEXPORT ~QoreClass();
private:
QoreClass& operator=(const QoreClass&) = delete;
class qore_class_private* priv;
// private constructor only called when the class is copied
DLLLOCAL QoreClass(qore_class_private* priv);
DLLLOCAL void insertMethod(QoreMethod* o);
DLLLOCAL void insertStaticMethod(QoreMethod* o);
DLLLOCAL QoreValue evalMethodGate(QoreObject* self, const char* nme, const QoreListNode* args, ExceptionSink* xsink) const;
DLLLOCAL const QoreMethod* parseResolveSelfMethodIntern(const char* nme);
DLLLOCAL QoreValue evalMethod(QoreObject* self, const char* method_name, const QoreListNode* args, ExceptionSink* xsink) const;
// This function must only be called from QoreObject
DLLLOCAL QoreValue evalMemberGate(QoreObject* self, const QoreString *nme, ExceptionSink* xsink) const;
// This function must only be called from QoreObject
DLLLOCAL void execMemberNotification(QoreObject* self, const char* mem, ExceptionSink* xsink) const;
// This function must only be called from QoreObject and BCList
DLLLOCAL bool execDeleteBlocker(QoreObject* self, ExceptionSink* xsink) const;
// This function must only be called from QoreObject
DLLLOCAL void execDestructor(QoreObject* self, ExceptionSink* xsink) const;
};
class QoreMethodIterator {
private:
void* priv;
public:
DLLEXPORT QoreMethodIterator(const QoreClass& qc);
DLLEXPORT ~QoreMethodIterator();
DLLEXPORT bool next();
DLLEXPORT const QoreMethod* getMethod() const;
};
class QoreStaticMethodIterator {
private:
void* priv;
public:
DLLEXPORT QoreStaticMethodIterator(const QoreClass& qc);
DLLEXPORT ~QoreStaticMethodIterator();
DLLEXPORT bool next();
DLLEXPORT const QoreMethod* getMethod() const;
};
class QoreClassHolder {
public:
DLLLOCAL QoreClassHolder(QoreClass* c) : c(c) {
}
DLLEXPORT ~QoreClassHolder();
DLLLOCAL operator QoreClass*() const {
return c;
}
DLLLOCAL QoreClass* release() {
auto rv = c;
c = 0;
return rv;
}
private:
QoreClass* c;
};
class QoreBuiltinClass : public QoreClass {
public:
DLLEXPORT QoreBuiltinClass(const char* name, int64 n_domain = QDOM_DEFAULT);
DLLEXPORT QoreBuiltinClass(const QoreBuiltinClass& old);
};
class QoreParentClassIterator final {
public:
DLLEXPORT QoreParentClassIterator(const QoreClass& cls);
DLLEXPORT ~QoreParentClassIterator();
DLLEXPORT bool next();
DLLEXPORT bool valid() const;
DLLEXPORT const QoreClass& getParentClass() const;
DLLEXPORT ClassAccess getAccess() const;
private:
std::unique_ptr<class qore_parent_class_iterator_private> priv;
};
class QoreClassMemberIterator final {
public:
DLLEXPORT QoreClassMemberIterator(const QoreClass& cls);
DLLEXPORT ~QoreClassMemberIterator();
DLLEXPORT bool next();
DLLEXPORT bool valid() const;
DLLEXPORT const QoreExternalNormalMember& getMember() const;
DLLEXPORT const char* getName() const;
private:
std::unique_ptr<class qore_class_member_iterator_private> priv;
};
class QoreClassStaticMemberIterator final {
public:
DLLEXPORT QoreClassStaticMemberIterator(const QoreClass& cls);
DLLEXPORT ~QoreClassStaticMemberIterator();
DLLEXPORT bool next();
DLLEXPORT bool valid() const;
DLLEXPORT const QoreExternalStaticMember& getMember() const;
DLLEXPORT const char* getName() const;
private:
std::unique_ptr<class qore_class_static_member_iterator_private> priv;
};
class QoreClassConstantIterator final {
public:
DLLEXPORT QoreClassConstantIterator(const QoreClass& cls);
DLLEXPORT ~QoreClassConstantIterator();
DLLEXPORT bool next();
DLLEXPORT bool valid() const;
DLLEXPORT const QoreExternalConstant& get() const;
private:
std::unique_ptr<class qore_class_constant_iterator> priv;
};
class QoreClassHierarchyIterator final {
public:
DLLEXPORT QoreClassHierarchyIterator(const QoreClass& cls);
DLLEXPORT ~QoreClassHierarchyIterator();
DLLEXPORT bool next();
DLLEXPORT bool valid() const;
DLLEXPORT const QoreClass& get() const;
DLLEXPORT bool isVirtual() const;
private:
std::unique_ptr<class qore_class_hierarchy_iterator> priv;
};
class QoreClassDestructorHierarchyIterator {
public:
DLLEXPORT QoreClassDestructorHierarchyIterator(const QoreClass* cls);
DLLEXPORT ~QoreClassDestructorHierarchyIterator();
DLLEXPORT bool next();
DLLEXPORT bool valid() const;
DLLEXPORT const QoreClass* get() const;
DLLEXPORT bool isVirtual() const;
private:
class qore_class_destructor_hierarchy_iterator* priv;
};
DLLEXPORT const char* get_access_string(ClassAccess access);
#endif // _QORE_QORECLASS_H
QoreClass::setSerializer
DLLEXPORT void setSerializer(q_serializer_t m)
sets the serializer method for builtin classes
AbstractQoreClassUserData::doDeref
virtual void doDeref()=0
for non-reference counted classes, deletes the object immediately
QoreClass::addBuiltinVirtualBaseClass
DLLEXPORT void addBuiltinVirtualBaseClass(QoreClass *qc)
sets "virtual" base class for a class, meaning that the base class data is appropriate for use in the...
QoreClass::addBuiltinBaseClass
DLLEXPORT void addBuiltinBaseClass(QoreClass *qc)
make a builtin class a child of another builtin class
QoreClassConstantIterator::next
DLLEXPORT bool next()
returns advances to the next element (or to the first element if starting to iterate) and returns tru...
QoreClassDestructorHierarchyIterator::~QoreClassDestructorHierarchyIterator
DLLEXPORT ~QoreClassDestructorHierarchyIterator()
destroys the object
QoreClass::setFinal
DLLEXPORT void setFinal()
sets the final flag of the class
AbstractQoreClassUserData::copy
virtual AbstractQoreClassUserData * copy() const =0
for reference-counted classes, returns the same object with the reference count incremented
QoreClassConstantIterator::valid
DLLEXPORT bool valid() const
returns true if the iterator is pointing at a valid element
q_func_n_t
QoreValue(* q_func_n_t)(const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin function signatures
Definition: common.h:307
QoreClassConstantIterator::~QoreClassConstantIterator
DLLEXPORT ~QoreClassConstantIterator()
destroys the object
QoreClassStaticMemberIterator::next
DLLEXPORT bool next()
returns advances to the next element (or to the first element if starting to iterate) and returns tru...
q_external_constructor_t
void(* q_external_constructor_t)(const QoreMethod &method, const void *ptr, QoreObject *self, const QoreListNode *args, q_rt_flags_t rtflags, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures
Definition: common.h:366
QoreClassStaticMemberIterator
iterates static members of a class
Definition: QoreClass.h:1113
QoreExternalNormalMember
external wrapper base class for class normal members
Definition: QoreReflection.h:174
QoreMethod::getClassName
DLLEXPORT const char * getClassName() const
returns the class name for the method
QoreExternalMethodVariant
external wrapper class for method variants
Definition: QoreReflection.h:90
QoreClassHolder::release
DLLLOCAL QoreClass * release()
releases the QoreClass*
Definition: QoreClass.h:1035
QoreValue
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:262
QoreClass::getDomain
DLLEXPORT int64 getDomain() const
returns the functional domain of the class
QoreMethod::getAccess
DLLEXPORT ClassAccess getAccess() const
returns the lowest access code of all variants in the method
QDOM_DEFAULT
#define QDOM_DEFAULT
the default domain (no domain)
Definition: Restrictions.h:155
q_system_constructor_t
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:378
QoreClassStaticMemberIterator::getName
DLLEXPORT const char * getName() const
returns the member's name
QoreClass::getClass
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 ...
QoreMethod::getFunction
DLLEXPORT const QoreExternalMethodFunction * getFunction() const
returns the function for the method
QoreClass::execConstructor
DLLEXPORT QoreObject * execConstructor(const QoreListNode *args, ExceptionSink *xsink) const
creates a new object and executes the constructor on it and returns the new object
QoreClass::setCopy
DLLEXPORT void setCopy(q_copy_t m)
sets the builtin copy method for the class
QoreParentClassIterator::next
DLLEXPORT bool next()
returns advances to the next element (or to the first element if starting to iterate) and returns tru...
QoreExternalStaticMember
external wrapper base class for class static members
Definition: QoreReflection.h:153
QoreClass::runtimeCheckInstantiateClass
DLLEXPORT int runtimeCheckInstantiateClass(ExceptionSink *xsink) const
Throws a Qore-language exception if the class cannot be instantiated.
QoreParentClassIterator::~QoreParentClassIterator
DLLEXPORT ~QoreParentClassIterator()
destroys the object
QoreClass::setDeleteBlocker
DLLEXPORT void setDeleteBlocker(q_delete_blocker_t m)
sets the deleteBlocker method for the class
QoreClass::findLocalStaticMember
DLLEXPORT const QoreExternalStaticMember * findLocalStaticMember(const char *name) const
Finds the given local static member or returns nullptr.
QoreClass
defines a Qore-language class
Definition: QoreClass.h:239
QoreClass::setDestructor
DLLEXPORT void setDestructor(q_destructor_t m)
sets the builtin destructor method for the class
QoreClassHierarchyIterator::valid
DLLEXPORT bool valid() const
returns true if the iterator is pointing at a valid element
QoreBuiltinClass
creates a builtin class
Definition: QoreClass.h:1047
QoreClass::findLocalMethod
DLLEXPORT const QoreMethod * findLocalMethod(const char *name) const
finds a normal (non-static) method in the class hierarchy
QoreParentClassIterator::getParentClass
DLLEXPORT const QoreClass & getParentClass() const
returns the parent class
QoreClass::execCopy
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...
QoreClass::isPrivateMember
DLLEXPORT bool isPrivateMember(const char *str) const
returns true if the member is private
q_deserializer_t
void(* q_deserializer_t)(QoreObject &self, const QoreHashNode *sdata, QoreDeserializationContext &context, ExceptionSink *xsink)
the type used for builtin QoreClass deserializer method signatures
Definition: common.h:446
QoreClassDestructorHierarchyIterator::next
DLLEXPORT bool next()
returns advances to the next element (or to the first element if starting to iterate) and returns tru...
QoreClass::execSystemConstructor
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 ...
QoreClass::findStaticMethod
DLLEXPORT const QoreMethod * findStaticMethod(const char *nme) const
finds a static method in the class hierarchy
QoreClassDestructorHierarchyIterator::isVirtual
DLLEXPORT bool isVirtual() const
returns true if the class has virtual inheritance, meaning that it is a builtin class without its own...
QoreClassStaticMemberIterator::QoreClassStaticMemberIterator
DLLEXPORT QoreClassStaticMemberIterator(const QoreClass &cls)
creates the iterator; call next() to start iterating
QoreClass::addStaticMethod
DLLEXPORT void addStaticMethod(const char *n_name, q_func_n_t meth, ClassAccess access=Public, int64 n_flags=QCF_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,...
QoreClassMemberIterator::getMember
DLLEXPORT const QoreExternalNormalMember & getMember() const
returns the member
QoreListNode
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
QoreClass::numStaticMethods
DLLEXPORT int numStaticMethods() const
returns the number of static methods in this class (user and builtin)
QoreClass::getBinaryHash
DLLEXPORT BinaryNode * getBinaryHash() const
returns a binary hash for the class's API
QoreClass::isAbstract
DLLEXPORT bool isAbstract() const
returns true if the class has at least one unimplemented abstract method variant
int64
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:260
QoreClassMemberIterator::~QoreClassMemberIterator
DLLEXPORT ~QoreClassMemberIterator()
destroys the object
arg_vec_t
std::vector< QoreValue > arg_vec_t
vector of value information for default argument lists
Definition: common.h:254
QoreClass::numUserMethods
DLLEXPORT int numUserMethods() const
returns the number of non-static user methods in this class
QoreClass::hasMethodGate
DLLEXPORT bool hasMethodGate() const
returns true if the class implements a "methodGate" method
QoreClass::addDefaultBuiltinBaseClass
DLLEXPORT void addDefaultBuiltinBaseClass(QoreClass *qc)
make a builtin class a child of another builtin class and ensures that the given class's private data...
q_external_copy_t
void(* q_external_copy_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:416
QoreClass::setDeserializer
DLLEXPORT void setDeserializer(q_deserializer_t m)
sets the deserializer method for builtin classes
QoreClass::getCopyMethod
DLLEXPORT const QoreMethod * getCopyMethod() const
returns a const pointer to the QoreMethod object of the destructor method, if any is set
QoreClassMemberIterator
iterates normal (non-static) members of a class
Definition: QoreClass.h:1086
QoreClass::isPublicOrPrivateMember
DLLEXPORT bool isPublicOrPrivateMember(const char *str, bool &priv) const
returns true if the member is private or public
QoreClassConstantIterator::get
DLLEXPORT const QoreExternalConstant & get() const
returns the
QoreNamespace
contains constants, classes, and subnamespaces in QoreProgram objects
Definition: QoreNamespace.h:64
QoreClass::getOrNothingTypeInfo
DLLEXPORT const QoreTypeInfo * getOrNothingTypeInfo() const
returns the "or nothing" type information structure for this class
QoreClass::getModuleName
DLLEXPORT const char * getModuleName() const
Returns the module name the class was loaded from or nullptr if it is a builtin class.
QoreExternalConstant
external wrapper class for constants
Definition: QoreReflection.h:200
QoreClassDestructorHierarchyIterator::get
DLLEXPORT const QoreClass * get() const
returns the parent class
QoreString
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:81
q_method_n_t
QoreValue(* q_method_n_t)(QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures
Definition: common.h:318
QoreClassDestructorHierarchyIterator::valid
DLLEXPORT bool valid() const
returns true if the iterator is pointing at a valid element
QoreClass::addMethod
DLLEXPORT void addMethod(const char *n_name, q_method_n_t meth, ClassAccess access=Public, int64 n_flags=QCF_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, const QoreTypeInfo *returnTypeInfo=0, unsigned num_params=0,...)
adds a builtin method variant to a class
QoreClass::getDestructor
DLLEXPORT const QoreMethod * getDestructor() const
returns a const pointer to the QoreMethod object of the constructor method, if any is set
QoreClassDestructorHierarchyIterator::QoreClassDestructorHierarchyIterator
DLLEXPORT QoreClassDestructorHierarchyIterator(const QoreClass *cls)
creates the iterator; call next() to start iterating
QoreMethod::execManaged
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
QoreClass::isFinal
DLLEXPORT bool isFinal() const
returns true if the class is final
QoreClass::findMethod
DLLEXPORT const QoreMethod * findMethod(const char *nme) const
finds a normal (non-static) method in the class hierarchy
QoreParentClassIterator
iterates parent classes for a class with inheritance access information
Definition: QoreClass.h:1059
QoreClass::findConstant
DLLEXPORT const QoreExternalConstant * findConstant(const char *name) const
Finds the given constant or returns nullptr if not found.
QoreClass::isModulePublic
DLLEXPORT bool isModulePublic() const
returns true if the class has its module public flag set
q_external_static_method_t
QoreValue(* q_external_static_method_t)(const QoreMethod &method, const void *ptr, const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for external static methods
Definition: common.h:346
QoreClass::getMethodList
DLLEXPORT QoreListNode * getMethodList() const
returns a list strings of all non-static methods in the class, the caller owns the reference count re...
QoreClass::hasCopy
DLLEXPORT bool hasCopy() const
returns true if the class implements a copy method
QoreClass::getID
DLLEXPORT qore_classid_t getID() const
returns the class ID of this class
QoreClass::getMemberGateMethod
DLLEXPORT const QoreMethod * getMemberGateMethod() const
returns a const pointer to the QoreMethod object of the memberGate method, if any is set
QoreClassHierarchyIterator
iterates the class hierarchy in the order of constructor execution
Definition: QoreClass.h:1166
QoreClassHierarchyIterator::QoreClassHierarchyIterator
DLLEXPORT QoreClassHierarchyIterator(const QoreClass &cls)
creates the iterator; call next() to start iterating
QoreMethod::isPrivate
DLLEXPORT bool isPrivate() const
returns true if all overloaded variants of a methods are private or class internal,...
QoreClassDestructorHierarchyIterator
iterates the class hierarchy in the order of destructor execution
Definition: QoreClass.h:1197
QoreClassStaticMemberIterator::valid
DLLEXPORT bool valid() const
returns true if the iterator is pointing at a valid element
QoreClass::getConstructor
DLLEXPORT const QoreMethod * getConstructor() const
returns a const pointer to the QoreMethod object of the constuctor method, if any is set
QoreClass::execConstructorVariant
DLLEXPORT QoreObject * execConstructorVariant(const QoreExternalMethodVariant *mv, const QoreListNode *args, ExceptionSink *xsink) const
creates a new object and executes the constructor on it and returns the new object
QoreClass::setManagedUserData
DLLEXPORT void setManagedUserData(AbstractQoreClassUserData *cud)
sets a pointer to user-specific data in the class
QoreClass::getSystemConstructor
DLLEXPORT const QoreMethod * getSystemConstructor() const
returns a const pointer to the QoreMethod object of the constuctor method, if any is set
QoreExternalProgramLocation
external wrapper class for source code location information
Definition: QoreReflection.h:187
QoreClassMemberIterator::next
DLLEXPORT bool next()
returns advances to the next element (or to the first element if starting to iterate) and returns tru...
QoreObject
the implementation of Qore's object data type, reference counted, dynamically-allocated only
Definition: QoreObject.h:61
QoreClass::addMember
DLLEXPORT void addMember(const char *mem, ClassAccess access, const QoreTypeInfo *n_typeInfo, QoreValue initial_value=QoreValue())
adds a member
QoreClass::getSerializer
DLLEXPORT q_serializer_t getSerializer() const
returns the serializer method or nullptr if not present
ExceptionSink
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:46
q_external_method_t
QoreValue(* q_external_method_t)(const QoreMethod &method, const void *ptr, QoreObject *self, AbstractPrivateData *private_data, const QoreListNode *args, q_rt_flags_t flags, ExceptionSink *xsink)
the type used for builtin QoreClass method signatures
Definition: common.h:333
QoreClassMemberIterator::QoreClassMemberIterator
DLLEXPORT QoreClassMemberIterator(const QoreClass &cls)
creates the iterator; call next() to start iterating
QoreClassMemberIterator::getName
DLLEXPORT const char * getName() const
returns the member's name
QoreClass::setSystem
DLLEXPORT void setSystem()
marks the class as a builtin class
QoreClass::addBuiltinStaticVar
DLLEXPORT void addBuiltinStaticVar(const char *name, QoreValue value, ClassAccess access=Public, const QoreTypeInfo *typeInfo=nullptr)
adds a static variable to the class
QoreExternalMemberVarBase
external wrapper base class for class members
Definition: QoreReflection.h:137
q_delete_blocker_t
bool(* q_delete_blocker_t)(QoreObject *self, AbstractPrivateData *private_data)
the typed used for QoreClass deleteBlocker signatures
Definition: common.h:424
QoreClass::getManagedUserData
DLLEXPORT AbstractQoreClassUserData * getManagedUserData() const
retrieves the user-specific data pointer
QoreClass::isEqual
DLLEXPORT bool isEqual(const QoreClass &cls) const
returns true if the classes are equal
QoreClass::getMemberNotificationMethod
DLLEXPORT const QoreMethod * getMemberNotificationMethod() const
returns a const pointer to the QoreMethod object of the memberNotification method,...
qore_classid_t
unsigned qore_classid_t
used for the unique class ID for QoreClass objects
Definition: common.h:79
QoreClassHolder
allows for temporary storage of a QoreClass pointer
Definition: QoreClass.h:1020
QoreBuiltinClass::QoreBuiltinClass
DLLEXPORT QoreBuiltinClass(const char *name, int64 n_domain=QDOM_DEFAULT)
creates the object and marks it as a builtin class
QoreClass::hasMemberGate
DLLEXPORT bool hasMemberGate() const
returns true if the class implements a "memberGate" method
QoreMethod::isBuiltin
DLLEXPORT bool isBuiltin() const
returns true if all variants of the method are builtin variants
QoreClass::numMethods
DLLEXPORT int numMethods() const
returns the number of non-static methods in this class (user and builtin)
QoreClass::setGateAccessFlag
DLLEXPORT void setGateAccessFlag()
sets the class's gate access flag so that memberGate() and methodGate() methods will be called with a...
QoreClass::getMethodGate
DLLEXPORT const QoreMethod * getMethodGate() const
returns a const pointer to the QoreMethod object of the methodGate method, if any is set
q_serializer_t
QoreHashNode *(* q_serializer_t)(const QoreObject &self, const AbstractPrivateData &data, QoreSerializationContext &context, ExceptionSink *xsink)
the type used for builtin QoreClass serializer method signatures
Definition: common.h:434
QoreClassConstantIterator
iterates class constants
Definition: QoreClass.h:1140
q_constructor_n_t
void(* q_constructor_n_t)(QoreObject *self, const QoreListNode *args, q_rt_flags_t rtflags, ExceptionSink *xsink)
the type used for builtin QoreClass constructor method signatures
Definition: common.h:354
QoreClass::inHierarchy
DLLEXPORT bool inHierarchy(const QoreClass &cls, ClassAccess &n_access) const
Returns true if the class passed as an argument is present in the current class's hierachy,...
QoreClass::addConstructor
DLLEXPORT void addConstructor(q_constructor_n_t meth, ClassAccess access=Public, int64 n_flags=QCF_NO_FLAGS, int64 n_domain=QDOM_DEFAULT, unsigned num_params=0,...)
adds a constructor method variant with the access specifier, additional functional domain info,...
QoreClassHierarchyIterator::next
DLLEXPORT bool next()
returns advances to the next element (or to the first element if starting to iterate) and returns tru...
QoreClass::findLocalStaticMethod
DLLEXPORT const QoreMethod * findLocalStaticMethod(const char *name) const
finds a static method in the class hierarchy
QoreClass::getTypeInfo
DLLEXPORT const QoreTypeInfo * getTypeInfo() const
returns the type information structure for this class
QoreClassHierarchyIterator::~QoreClassHierarchyIterator
DLLEXPORT ~QoreClassHierarchyIterator()
destroys the object
QoreClass::isInjected
DLLEXPORT bool isInjected() const
returns true if the class has been injected as a dependency injection
QoreClass::getStaticMethodList
DLLEXPORT QoreListNode * getStaticMethodList() const
returns a list strings of all static methods in the class, the caller owns the reference count return...
QoreMethod::getName
DLLEXPORT const char * getName() const
returns the method's name
QoreClassMemberIterator::valid
DLLEXPORT bool valid() const
returns true if the iterator is pointing at a valid element
QoreClass::findLocalMember
DLLEXPORT const QoreExternalNormalMember * findLocalMember(const char *name) const
Finds the given local member or returns nullptr.
QoreClass::QoreClass
DLLLOCAL QoreClass()
constructor not exported in library's API
QoreClass::getPseudoClassType
DLLEXPORT qore_type_t getPseudoClassType() const
returns a pseudo-classes base type
QoreClass::setSystemConstructor
DLLEXPORT void setSystemConstructor(q_system_constructor_t m)
sets the builtin constructor for system objects (ex: used as constant values)
QoreClass::getName
DLLEXPORT const char * getName() const
returns the class name
QoreClass::addBuiltinConstant
DLLEXPORT void addBuiltinConstant(const char *name, QoreValue value, ClassAccess access=Public, const QoreTypeInfo *typeInfo=nullptr)
adds a class constant to the class
q_external_destructor_t
void(* q_external_destructor_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:396
QoreClass::hasTransientMember
DLLEXPORT bool hasTransientMember() const
Returns true if the class has at least one locally-declared transient member.
QoreClass::hasMemberNotification
DLLEXPORT bool hasMemberNotification() const
returns true if the class implements a "memberNotification" method
QoreClass::setSynchronousClass
DLLEXPORT void setSynchronousClass()
call this function if your builtin class requires *all* methods (except the constructor) to be run in...
num_params
static unsigned num_params(const QoreListNode *n)
returns the number of arguments passed to the function
Definition: params.h:54
QoreClass::~QoreClass
DLLEXPORT ~QoreClass()
deletes the object and frees all memory
QoreClass::recheckBuiltinMethodHierarchy
DLLEXPORT void recheckBuiltinMethodHierarchy()
rechecks for inherited methods in base classes when adding builtin classes
QoreClass::getNamespacePath
DLLEXPORT std::string getNamespacePath(bool anchored=false) const
returns the full namespace path of the class
QoreClassStaticMemberIterator::~QoreClassStaticMemberIterator
DLLEXPORT ~QoreClassStaticMemberIterator()
destroys the object
QoreClass::numStaticUserMethods
DLLEXPORT int numStaticUserMethods() const
returns the number of static user methods in this class
QoreMethod::getMethodType
DLLEXPORT method_type_e getMethodType() const
returns the type of method
QoreStaticMethodIterator
To be used to iterate through a class's static methods.
Definition: QoreClass.h:1006
QoreClass::rescanParents
DLLEXPORT void rescanParents()
rescan builtin parent classes in a class hierarchy; to be used with out-of-order class hierarchy cons...
QoreClass::isPseudoClass
DLLEXPORT bool isPseudoClass() const
returns true if the class is a pseudo class
QoreMethod::getClass
DLLEXPORT const QoreClass * getClass() const
returns a pointer to the parent class
QoreClass::setUserData
DLLEXPORT void setUserData(const void *ptr)
sets a pointer to user-specific data in the class
type_vec_t
std::vector< const QoreTypeInfo * > type_vec_t
vector of type information for parameter lists
Definition: common.h:251
QoreMethod
a method in a QoreClass
Definition: QoreClass.h:125
QoreParentClassIterator::getAccess
DLLEXPORT ClassAccess getAccess() const
returns the access of the parent class
QoreClass::evalPseudoMethod
DLLEXPORT QoreValue evalPseudoMethod(const QoreValue n, const char *nme, const QoreListNode *args, ExceptionSink *xsink) const
evaluates a pseudo-method on a pseudo-class
QoreClass::getUserData
DLLEXPORT const void * getUserData() const
retrieves the user-specific data pointer
q_destructor_t
void(* q_destructor_t)(QoreObject *self, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass destructor signatures
Definition: common.h:386
QoreClass::isSystem
DLLEXPORT bool isSystem() const
returns true if the class is a builtin class
QoreExternalVariant
external wrapper class for function and call variants
Definition: QoreReflection.h:38
QoreClass::findUserMethodVariant
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
QoreClassStaticMemberIterator::getMember
DLLEXPORT const QoreExternalStaticMember & getMember() const
returns the member
QoreMethodIterator
To be used to iterate through a class's normal (non-static) methods.
Definition: QoreClass.h:994
QoreClassHolder::~QoreClassHolder
DLLEXPORT ~QoreClassHolder()
deletes the QoreClass object if still managed
BinaryNode
holds arbitrary binary data
Definition: BinaryNode.h:41
QoreParentClassIterator::valid
DLLEXPORT bool valid() const
returns true if the iterator is pointing at a valid element
QoreMethod::isUser
DLLEXPORT bool isUser() const
returns true if all variants of the method are user variants
QoreClass::setPublicMemberFlag
DLLEXPORT void setPublicMemberFlag()
sets the class's public member flag so that undeclared member references will fail
name_vec_t
std::vector< std::string > name_vec_t
vector of parameter names for parameter lists
Definition: common.h:257
qore_type_t
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode)
Definition: common.h:70
QoreParentClassIterator::QoreParentClassIterator
DLLEXPORT QoreParentClassIterator(const QoreClass &cls)
creates the iterator; call next() to start iterating
QoreMethod::getNameStr
DLLEXPORT const std::string & getNameStr() const
returns the method's name
QoreClassConstantIterator::QoreClassConstantIterator
DLLEXPORT QoreClassConstantIterator(const QoreClass &cls)
creates the iterator; call next() to start iterating
QoreClass::getNamespace
DLLEXPORT const QoreNamespace * getNamespace() const
Returns the namespace that owns this class.
QoreMethod::existsVariant
DLLEXPORT bool existsVariant(const type_vec_t &paramTypeInfo) const
returns true if a variant with the given parameter signature already exists in the method
QoreClass::addAbstractMethod
DLLEXPORT void addAbstractMethod(const char *n_name, ClassAccess access=Public, int64 n_flags=QCF_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...
AbstractQoreClassUserData
an abstract class for class-specific external user data
Definition: QoreClass.h:223
q_copy_t
void(* q_copy_t)(QoreObject *self, QoreObject *old, AbstractPrivateData *private_data, ExceptionSink *xsink)
the type used for builtin QoreClass copy signatures
Definition: common.h:405
QoreClassHolder::QoreClassHolder
DLLLOCAL QoreClassHolder(QoreClass *c)
creates the object
Definition: QoreClass.h:1023
QoreClassHierarchyIterator::isVirtual
DLLEXPORT bool isVirtual() const
returns true if the class has virtual inheritance, meaning that it is a builtin class without its own...
QoreClassHierarchyIterator::get
DLLEXPORT const QoreClass & get() const
returns the parent class
QoreClass::getDeserializer
DLLEXPORT q_deserializer_t getDeserializer() const
returns the deserializer method or nullptr if not present
QoreMethod::isStatic
DLLEXPORT bool isStatic() const
returns true if the method is static