All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QoreObject.h
/* -*- mode: c++; indent-tabs-mode: nil -*- */
/*
QoreObject.h
thread-safe object definition
Qore Programming Language
Copyright (C) 2003 - 2016 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_QOREOBJECT_H
#define _QORE_QOREOBJECT_H
class AutoVLock;
class VRMutex;
class BuiltinCopy;
class BuiltinDeleteBlocker;
class BuiltinNormalMethodVariantBase;
class BuiltinCopyVariantBase;
class QoreExternalMethodVariant;
class QoreExternalStaticMethodVariant;
class QoreProgram;
class QoreObject : public AbstractQoreNode {
friend class qore_object_private;
friend class ObjectRSetHelper;
friend class ObjectRSet;
friend class qore_object_dereference_helper;
private:
class qore_object_private* priv;
DLLLOCAL QoreObject(const QoreObject&);
DLLLOCAL QoreObject& operator=(const QoreObject&);
protected:
DLLEXPORT virtual bool derefImpl(ExceptionSink* xsink);
DLLLOCAL virtual AbstractQoreNode* evalImpl(ExceptionSink* xsink) const;
DLLLOCAL virtual AbstractQoreNode* evalImpl(bool& needs_deref, ExceptionSink* xsink) const;
DLLLOCAL virtual int64 bigIntEvalImpl(ExceptionSink* xsink) const;
DLLLOCAL virtual int integerEvalImpl(ExceptionSink* xsink) const;
DLLLOCAL virtual bool boolEvalImpl(ExceptionSink* xsink) const;
DLLLOCAL virtual double floatEvalImpl(ExceptionSink* xsink) const;
DLLLOCAL virtual void customRef() const;
DLLLOCAL virtual void customDeref(ExceptionSink* xsink);
DLLLOCAL virtual ~QoreObject();
public:
DLLEXPORT QoreObject(const QoreClass* oc, QoreProgram* p);
DLLEXPORT QoreObject(const QoreClass* oc, QoreProgram* p, AbstractPrivateData* data);
DLLEXPORT virtual bool getAsBoolImpl() const;
DLLEXPORT virtual int getAsString(QoreString &str, int foff, ExceptionSink* xsink) const;
DLLEXPORT virtual QoreString* getAsString(bool& del, int foff, ExceptionSink* xsink) const;
DLLEXPORT virtual AbstractQoreNode* realCopy() const;
DLLEXPORT virtual bool is_equal_soft(const AbstractQoreNode* v, ExceptionSink* xsink) const;
DLLEXPORT virtual bool is_equal_hard(const AbstractQoreNode* v, ExceptionSink* xsink) const;
DLLEXPORT virtual const char* getTypeName() const;
DLLLOCAL static const char* getStaticTypeName() {
return "object";
}
DLLLOCAL static qore_type_t getStaticTypeCode() {
return NT_OBJECT;
}
DLLEXPORT bool validInstanceOf(qore_classid_t cid) const;
DLLEXPORT bool validInstanceOf(const QoreClass& qc) const;
DLLEXPORT void setValue(const char* key, AbstractQoreNode* val, ExceptionSink* xsink);
DLLEXPORT QoreListNode* getMemberList(ExceptionSink* xsink) const;
DLLEXPORT void deleteMemberValue(const QoreString* key, ExceptionSink* xsink);
DLLEXPORT void deleteMemberValue(const char* key, ExceptionSink* xsink);
DLLEXPORT void removeMember(const QoreString* key, ExceptionSink* xsink);
DLLEXPORT void removeMember(const char* key, ExceptionSink* xsink);
DLLEXPORT AbstractQoreNode* takeMember(const QoreString* key, ExceptionSink* xsink);
DLLEXPORT AbstractQoreNode* takeMember(const char* key, ExceptionSink* xsink);
DLLEXPORT int size(ExceptionSink* xsink) const;
DLLEXPORT bool compareSoft(const QoreObject* obj, ExceptionSink* xsink) const;
DLLEXPORT bool compareHard(const QoreObject* obj, ExceptionSink* xsink) const;
DLLEXPORT AbstractQoreNode* getReferencedMemberNoMethod(const char* mem, ExceptionSink* xsink) const;
DLLEXPORT int64 getMemberAsBigInt(const char* mem, bool& found, ExceptionSink* xsink) const;
DLLEXPORT QoreHashNode* copyData(ExceptionSink* xsink) const;
DLLEXPORT void mergeDataToHash(QoreHashNode* hash, ExceptionSink* xsink);
DLLEXPORT void setPrivate(qore_classid_t key, AbstractPrivateData* pd);
DLLEXPORT AbstractPrivateData* getReferencedPrivateData(qore_classid_t key, ExceptionSink* xsink) const;
DLLEXPORT AbstractPrivateData* tryGetReferencedPrivateData(qore_classid_t key, ExceptionSink* xsink) const;
DLLEXPORT QoreValue evalMethodValue(const QoreString* name, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT QoreValue evalMethodValue(const char* name, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT AbstractQoreNode* evalMethod(const QoreString* name, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT AbstractQoreNode* evalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT int64 bigIntEvalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT int intEvalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT bool boolEvalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT double floatEvalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT QoreValue evalMethodValue(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT AbstractQoreNode* evalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT int64 bigIntEvalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT int intEvalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT bool boolEvalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT double floatEvalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
DLLEXPORT void doDelete(ExceptionSink* xsink);
DLLEXPORT const QoreClass* getClass(qore_classid_t cid) const;
DLLEXPORT const QoreClass* getClass(qore_classid_t cid, bool& priv) const;
DLLEXPORT const QoreClass* getClass() const;
DLLEXPORT const char* getClassName() const;
DLLEXPORT bool isValid() const;
DLLEXPORT QoreProgram* getProgram() const;
DLLEXPORT bool isSystemObject() const;
DLLEXPORT void tRef() const;
DLLEXPORT void tDeref();
DLLEXPORT void realRef();
DLLEXPORT void realDeref(ExceptionSink* xsink);
DLLEXPORT AbstractQoreNode* getMemberValueNoMethod(const QoreString* key, AutoVLock* vl, ExceptionSink* xsink) const;
DLLEXPORT AbstractQoreNode* getMemberValueNoMethod(const char* key, AutoVLock* vl, ExceptionSink* xsink) const;
DLLEXPORT void deleteBlockerRef() const;
DLLEXPORT void externalDelete(qore_classid_t key, ExceptionSink* xsink);
DLLEXPORT AbstractQoreNode* evalMethodVariant(const QoreMethod& method, const QoreExternalMethodVariant* variant, const QoreListNode* args, ExceptionSink* xsink);
DLLLOCAL int getStatus() const;
DLLLOCAL QoreValue evalMember(const QoreString* member, ExceptionSink* xsink);
DLLLOCAL class KeyNode* getReferencedPrivateDataNode(qore_classid_t key);
DLLLOCAL AbstractPrivateData* getAndClearPrivateData(qore_classid_t key, ExceptionSink* xsink);
DLLLOCAL QoreValue evalBuiltinMethodWithPrivateData(const QoreMethod& method, const BuiltinNormalMethodVariantBase* meth, const QoreListNode* args, ExceptionSink* xsink);
DLLLOCAL void evalCopyMethodWithPrivateData(const QoreClass &thisclass, const BuiltinCopyVariantBase* meth, QoreObject* self, ExceptionSink* xsink);
DLLLOCAL void addPrivateDataToString(QoreString* str, ExceptionSink* xsink) const;
DLLLOCAL void obliterate(ExceptionSink* xsink);
DLLLOCAL void defaultSystemDestructor(qore_classid_t classID, ExceptionSink* xsink);
DLLLOCAL AbstractQoreNode** getExistingValuePtr(const QoreString* mem, AutoVLock* vl, ExceptionSink* xsink) const;
DLLLOCAL AbstractQoreNode** getExistingValuePtr(const char* mem, AutoVLock* vl, ExceptionSink* xsink) const;
// returns a new hash consisting of just the members of value_list
DLLLOCAL QoreHashNode* getSlice(const QoreListNode* value_list, ExceptionSink* xsink) const;
DLLLOCAL QoreObject(const QoreClass* oc, QoreProgram* p, QoreHashNode* d);
DLLLOCAL bool evalDeleteBlocker(qore_classid_t classid_for_method, BuiltinDeleteBlocker* meth);
DLLLOCAL bool hasMemberNotification() const;
DLLLOCAL void execMemberNotification(const char* member, ExceptionSink* xsink);
};
template <class T>
class PrivateDataRefHolder : public ReferenceHolder<T> {
public:
DLLLOCAL PrivateDataRefHolder(const QoreObject* o, qore_classid_t cid, ExceptionSink* xsink) : ReferenceHolder<T>(reinterpret_cast<T*>(o->getReferencedPrivateData(cid, xsink)), xsink) {
}
};
template <class T>
class TryPrivateDataRefHolder : public ReferenceHolder<T> {
public:
DLLLOCAL TryPrivateDataRefHolder(const QoreObject* o, qore_classid_t cid, ExceptionSink* xsink) : ReferenceHolder<T>(reinterpret_cast<T*>(o->tryGetReferencedPrivateData(cid, xsink)), xsink) {
}
};
class QorePrivateObjectAccessHelper {
public:
DLLLOCAL QorePrivateObjectAccessHelper(ExceptionSink* xs) : xsink(xs), ptr(0) {
}
DLLLOCAL operator bool() const {
return (bool)ptr;
}
private:
DLLLOCAL QorePrivateObjectAccessHelper(const QorePrivateObjectAccessHelper&) = delete;
DLLLOCAL QorePrivateObjectAccessHelper& operator=(const QorePrivateObjectAccessHelper&) = delete;
DLLLOCAL void* operator new(size_t) = delete;
protected:
ExceptionSink* xsink;
void* ptr;
};
#endif
QoreObject::evalCopyMethodWithPrivateData
DLLLOCAL void evalCopyMethodWithPrivateData(const QoreClass &thisclass, const BuiltinCopyVariantBase *meth, QoreObject *self, ExceptionSink *xsink)
called on the old object (this) to acquire private data, copy method called with pointer to &quot;self&quot; (n...
QoreObject::compareHard
DLLEXPORT bool compareHard(const QoreObject *obj, ExceptionSink *xsink) const
tests for equality (&quot;deep compare&quot; including all contained values) with possible type conversion of c...
AutoVLock
AutoVLock is a container for safely managing global variable and object lock handovers, required for functions accessing global variables and object data where locking is necessary.
Definition: AutoVLock.h:80
QoreObject::isSystemObject
DLLEXPORT bool isSystemObject() const
returns true if the object is a system object (created with the system constructor) ...
QoreObject::execMemberNotification
DLLLOCAL void execMemberNotification(const char *member, ExceptionSink *xsink)
executes the member notification on the object the given member
QoreHashNode
This is the hash or associative list container type in Qore, dynamically allocated only...
Definition: QoreHashNode.h:50
QoreObject::setValue
DLLEXPORT void setValue(const char *key, AbstractQoreNode *val, ExceptionSink *xsink)
sets the value of the given member to the given value
QoreObject::doDelete
DLLEXPORT void doDelete(ExceptionSink *xsink)
runs the destructor on the object (if it hasn&#39;t already been deleted)
QoreObject::boolEvalImpl
virtual DLLLOCAL bool boolEvalImpl(ExceptionSink *xsink) const
should never be called, does nothing
AbstractPrivateData
the base class for all data to be used as private data of Qore objects
Definition: AbstractPrivateData.h:44
QoreObject::mergeDataToHash
DLLEXPORT void mergeDataToHash(QoreHashNode *hash, ExceptionSink *xsink)
copies all member data of the current object to the passed QoreHashNode
QoreObject::getClassName
DLLEXPORT const char * getClassName() const
returns the name of the class
QoreObject::compareSoft
DLLEXPORT bool compareSoft(const QoreObject *obj, ExceptionSink *xsink) const
tests for equality (&quot;deep compare&quot; including all contained values) with possible type conversion of c...
QoreObject::externalDelete
DLLEXPORT void externalDelete(qore_classid_t key, ExceptionSink *xsink)
call this function when an object&#39;s private data is deleted externally
QoreObject::removeMember
DLLEXPORT void removeMember(const QoreString *key, ExceptionSink *xsink)
removes a member from the object without explicitly calling destructors; the value is only dereferenc...
QoreObject::getReferencedPrivateData
DLLEXPORT AbstractPrivateData * getReferencedPrivateData(qore_classid_t key, ExceptionSink *xsink) const
returns the private data corresponding to the class ID passed with an incremented reference count...
QoreObject::size
DLLEXPORT int size(ExceptionSink *xsink) const
returns the number of members of the object
QoreObject::realRef
DLLEXPORT void realRef()
increments the standard reference count of the object for references that cannot be part of a recursi...
QoreObject::takeMember
DLLEXPORT AbstractQoreNode * takeMember(const QoreString *key, ExceptionSink *xsink)
removes a member from the object without explicitly calling destructors and returns the value removed...
QoreObject::getAsBoolImpl
virtual DLLEXPORT bool getAsBoolImpl() const
returns false unless perl-boolean-evaluation is enabled, in which case it returns false only when emp...
AbstractQoreNode
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:54
NT_OBJECT
const qore_type_t NT_OBJECT
type value for QoreObject
Definition: node_types.h:52
QoreObject::~QoreObject
virtual DLLLOCAL ~QoreObject()
destructor
QoreObject::boolEvalMethod
DLLEXPORT bool boolEvalMethod(const char *name, const QoreListNode *args, ExceptionSink *xsink)
evaluates the given method with the arguments passed and returns the return value as a bool ...
QoreObject::getClass
DLLEXPORT const QoreClass * getClass() const
returns a pointer to the QoreClass of this object
QoreObject::bigIntEvalMethod
DLLEXPORT int64 bigIntEvalMethod(const char *name, const QoreListNode *args, ExceptionSink *xsink)
evaluates the given method with the arguments passed and returns the return value as an int64 ...
QoreObject::getMemberList
DLLEXPORT QoreListNode * getMemberList(ExceptionSink *xsink) const
returns the list of members, caller owns the list returned
QoreObject::realCopy
virtual DLLEXPORT AbstractQoreNode * realCopy() const
performs a deep copy of the list and returns the new list
QoreObject::evalImpl
virtual DLLLOCAL AbstractQoreNode * evalImpl(ExceptionSink *xsink) const
should never be called, does nothing
QoreObject::evalMethod
DLLEXPORT AbstractQoreNode * evalMethod(const QoreString *name, const QoreListNode *args, ExceptionSink *xsink)
evaluates the given method with the arguments passed and returns the return value, caller owns the AbstractQoreNode (reference) returned
QoreObject::customDeref
virtual DLLLOCAL void customDeref(ExceptionSink *xsink)
custom dereference handler - with delete
QoreObject::getProgram
DLLEXPORT QoreProgram * getProgram() const
returns the QoreProgram object associated with this object
QoreObject::derefImpl
virtual DLLEXPORT bool derefImpl(ExceptionSink *xsink)
runs the destructor if necessary and dereferences all members
QoreObject::hasMemberNotification
DLLLOCAL bool hasMemberNotification() const
returns true if the class has a memberNotification method
QoreObject::copyData
DLLEXPORT QoreHashNode * copyData(ExceptionSink *xsink) const
retuns all member data of the object (or 0 if there&#39;s an exception), caller owns the QoreHashNode ref...
QoreObject::is_equal_soft
virtual DLLEXPORT bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality (&quot;deep compare&quot; including all contained values) with possible type conversion (sof...
QoreString
Qore&#39;s string type supported by the QoreEncoding class.
Definition: QoreString.h:82
QoreObject::obliterate
DLLLOCAL void obliterate(ExceptionSink *xsink)
destroys all members and dereferences all private data structures
QoreObject::customRef
virtual DLLLOCAL void customRef() const
custom reference handler
QoreObject::getStaticTypeCode
static DLLLOCAL qore_type_t getStaticTypeCode()
returns the type code (useful in templates)
Definition: QoreObject.h:191
QoreObject::tDeref
DLLEXPORT void tDeref()
decrements the existence reference count, when it reaches 0 the C++ object (&quot;this&quot;) will be deleted ...
QoreObject::getTypeName
virtual DLLEXPORT const char * getTypeName() const
returns the type name as a c string
QoreObject::floatEvalMethod
DLLEXPORT double floatEvalMethod(const char *name, const QoreListNode *args, ExceptionSink *xsink)
evaluates the given method with the arguments passed and returns the return value as a double ...
QoreListNode
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
QoreObject::is_equal_hard
virtual DLLEXPORT bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality (&quot;deep compare&quot; including all contained values) without type conversions (hard com...
PrivateDataRefHolder
convenience class for holding AbstractPrivateData references
Definition: QoreObject.h:669
QoreObject::evalDeleteBlocker
DLLLOCAL bool evalDeleteBlocker(qore_classid_t classid_for_method, BuiltinDeleteBlocker *meth)
evaluates the delete blocker function for the managed private data
QoreObject::addPrivateDataToString
DLLLOCAL void addPrivateDataToString(QoreString *str, ExceptionSink *xsink) const
concatenates info about private data to a string
QoreClass
defines a Qore-language class
Definition: QoreClass.h:214
QoreObject::evalMethodValue
DLLEXPORT QoreValue evalMethodValue(const QoreString *name, const QoreListNode *args, ExceptionSink *xsink)
evaluates the given method with the arguments passed and returns the return value, caller owns the AbstractQoreNode (reference) returned
QoreObject::evalMember
DLLLOCAL QoreValue evalMember(const QoreString *member, ExceptionSink *xsink)
returns the value of the member with an incremented reference count, or executes the memberGate() met...
QoreValue
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:112
QoreObject::getReferencedMemberNoMethod
DLLEXPORT AbstractQoreNode * getReferencedMemberNoMethod(const char *mem, ExceptionSink *xsink) const
returns the value of the given member with the reference count incremented, the caller owns the Abstr...
QoreProgram
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only ...
Definition: QoreProgram.h:117
QoreObject
the implementation of Qore&#39;s object data type, reference counted, dynamically-allocated only ...
Definition: QoreObject.h:62
QoreObject::getMemberValueNoMethod
DLLEXPORT AbstractQoreNode * getMemberValueNoMethod(const QoreString *key, AutoVLock *vl, ExceptionSink *xsink) const
returns the pointer to the value of the member
QoreObject::defaultSystemDestructor
DLLLOCAL void defaultSystemDestructor(qore_classid_t classID, ExceptionSink *xsink)
runs the destructor for system objects
qore_classid_t
unsigned qore_classid_t
used for the unique class ID for QoreClass objects
Definition: common.h:80
ExceptionSink
container for holding Qore-language exception information and also for registering a &quot;thread_exit&quot; ca...
Definition: ExceptionSink.h:47
QoreObject::integerEvalImpl
virtual DLLLOCAL int integerEvalImpl(ExceptionSink *xsink) const
should never be called, does nothing
QoreObject::floatEvalImpl
virtual DLLLOCAL double floatEvalImpl(ExceptionSink *xsink) const
should never be called, does nothing
QoreObject::getAsString
virtual DLLEXPORT int getAsString(QoreString &str, int foff, ExceptionSink *xsink) const
concatenate the verbose string representation of the list (including all contained values) to an exis...
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:241
QoreObject::getAndClearPrivateData
DLLLOCAL AbstractPrivateData * getAndClearPrivateData(qore_classid_t key, ExceptionSink *xsink)
retrieves the private data pointer and clears it from the object&#39;s private data store, used when executing destructors
QoreObject::getExistingValuePtr
DLLLOCAL AbstractQoreNode ** getExistingValuePtr(const QoreString *mem, AutoVLock *vl, ExceptionSink *xsink) const
returns a pointer to a pointer to the value of the member only if it already exists, so it can be set externally
QoreObject::evalMethodVariant
DLLEXPORT AbstractQoreNode * evalMethodVariant(const QoreMethod &method, const QoreExternalMethodVariant *variant, const QoreListNode *args, ExceptionSink *xsink)
executes a normal object method variant
QoreObject::bigIntEvalImpl
virtual DLLLOCAL int64 bigIntEvalImpl(ExceptionSink *xsink) const
should never be called, does nothing
QoreObject::deleteMemberValue
DLLEXPORT void deleteMemberValue(const QoreString *key, ExceptionSink *xsink)
removes a member from the object, if the member&#39;s value is an object it is deleted as well (destructo...
QoreObject::realDeref
DLLEXPORT void realDeref(ExceptionSink *xsink)
decrements the standard reference count of the object for references that cannot be part of a recursi...
TryPrivateDataRefHolder
convenience class for holding AbstractPrivateData references
Definition: QoreObject.h:677
qore_type_t
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode) ...
Definition: common.h:71
QoreObject::deleteBlockerRef
DLLEXPORT void deleteBlockerRef() const
increment the reference count of the object, to be called only from within a delete blocker ...
QoreObject::getStaticTypeName
static DLLLOCAL const char * getStaticTypeName()
returns the type name (useful in templates)
Definition: QoreObject.h:186
QoreMethod
a method in a QoreClass
Definition: QoreClass.h:94
QoreObject::tRef
DLLEXPORT void tRef() const
increments the existence reference count
QoreObject::evalBuiltinMethodWithPrivateData
DLLLOCAL QoreValue evalBuiltinMethodWithPrivateData(const QoreMethod &method, const BuiltinNormalMethodVariantBase *meth, const QoreListNode *args, ExceptionSink *xsink)
called to evaluate a builtin method when private data is available
QoreObject::setPrivate
DLLEXPORT void setPrivate(qore_classid_t key, AbstractPrivateData *pd)
sets private data for the object against the class ID passed, used in C++ functions implementing Qore...
QoreObject::isValid
DLLEXPORT bool isValid() const
returns true if the object is valid
ReferenceHolder
a templated class to manage a reference count of an object that can throw a Qore-language exception w...
Definition: ReferenceHolder.h:51
QoreObject::getMemberAsBigInt
DLLEXPORT int64 getMemberAsBigInt(const char *mem, bool &found, ExceptionSink *xsink) const
returns the value of the given member as an int64
QoreObject::validInstanceOf
DLLEXPORT bool validInstanceOf(qore_classid_t cid) const
returns true if this object is a valid instance of the classid passed
QoreObject::intEvalMethod
DLLEXPORT int intEvalMethod(const char *name, const QoreListNode *args, ExceptionSink *xsink)
evaluates the given method with the arguments passed and returns the return value as an int ...
QoreObject::tryGetReferencedPrivateData
DLLEXPORT AbstractPrivateData * tryGetReferencedPrivateData(qore_classid_t key, ExceptionSink *xsink) const
returns the private data corresponding to the class ID passed with an incremented reference count if ...