Qore Programming Language - C/C++ Library  0.8.13.2
QoreObject.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3  QoreObject.h
4 
5  thread-safe object definition
6 
7  Qore Programming Language
8 
9  Copyright (C) 2003 - 2016 Qore Technologies, s.r.o.
10 
11  Permission is hereby granted, free of charge, to any person obtaining a
12  copy of this software and associated documentation files (the "Software"),
13  to deal in the Software without restriction, including without limitation
14  the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  and/or sell copies of the Software, and to permit persons to whom the
16  Software is furnished to do so, subject to the following conditions:
17 
18  The above copyright notice and this permission notice shall be included in
19  all copies or substantial portions of the Software.
20 
21  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  DEALINGS IN THE SOFTWARE.
28 
29  Note that the Qore library is released under a choice of three open-source
30  licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
31  information.
32 */
33 
34 #ifndef _QORE_QOREOBJECT_H
35 
36 #define _QORE_QOREOBJECT_H
37 
38 class AutoVLock;
39 class VRMutex;
40 class BuiltinCopy;
41 class BuiltinDeleteBlocker;
42 class BuiltinNormalMethodVariantBase;
43 class BuiltinCopyVariantBase;
44 class QoreExternalMethodVariant;
45 class QoreExternalStaticMethodVariant;
46 class QoreProgram;
47 
49 
62 class QoreObject : public AbstractQoreNode {
63  friend class qore_object_private;
64  friend class ObjectRSetHelper;
65  friend class ObjectRSet;
66  friend class qore_object_dereference_helper;
67 
68 private:
70  class qore_object_private* priv;
71 
73  DLLLOCAL QoreObject(const QoreObject&);
74 
76  DLLLOCAL QoreObject& operator=(const QoreObject&);
77 
78 protected:
80 
84  DLLEXPORT virtual bool derefImpl(ExceptionSink* xsink);
85 
87 
89  DLLLOCAL virtual AbstractQoreNode* evalImpl(ExceptionSink* xsink) const;
90 
92 
94  DLLLOCAL virtual AbstractQoreNode* evalImpl(bool& needs_deref, ExceptionSink* xsink) const;
95 
97 
99  DLLLOCAL virtual int64 bigIntEvalImpl(ExceptionSink* xsink) const;
100 
102 
104  DLLLOCAL virtual int integerEvalImpl(ExceptionSink* xsink) const;
105 
107 
109  DLLLOCAL virtual bool boolEvalImpl(ExceptionSink* xsink) const;
110 
112 
114  DLLLOCAL virtual double floatEvalImpl(ExceptionSink* xsink) const;
115 
117  DLLLOCAL virtual void customRef() const;
118 
120  DLLLOCAL virtual void customDeref(ExceptionSink* xsink);
121 
123  DLLLOCAL virtual ~QoreObject();
124 
125 public:
127 
131  DLLEXPORT QoreObject(const QoreClass* oc, QoreProgram* p);
132 
134 
139  DLLEXPORT QoreObject(const QoreClass* oc, QoreProgram* p, AbstractPrivateData* data);
140 
142 
144  DLLEXPORT virtual bool getAsBoolImpl() const;
145 
147 
153  DLLEXPORT virtual int getAsString(QoreString &str, int foff, ExceptionSink* xsink) const;
154 
156 
163  DLLEXPORT virtual QoreString* getAsString(bool& del, int foff, ExceptionSink* xsink) const;
164 
166  DLLEXPORT virtual AbstractQoreNode* realCopy() const;
167 
169 
173  DLLEXPORT virtual bool is_equal_soft(const AbstractQoreNode* v, ExceptionSink* xsink) const;
174 
176 
180  DLLEXPORT virtual bool is_equal_hard(const AbstractQoreNode* v, ExceptionSink* xsink) const;
181 
183  DLLEXPORT virtual const char* getTypeName() const;
184 
186  DLLLOCAL static const char* getStaticTypeName() {
187  return "object";
188  }
189 
191  DLLLOCAL static qore_type_t getStaticTypeCode() {
192  return NT_OBJECT;
193  }
194 
196 
200  DLLEXPORT bool validInstanceOf(qore_classid_t cid) const;
201 
203 
205  DLLEXPORT bool validInstanceOf(const QoreClass& qc) const;
206 
208 
213  DLLEXPORT void setValue(const char* key, AbstractQoreNode* val, ExceptionSink* xsink);
214 
216 
219  DLLEXPORT QoreListNode* getMemberList(ExceptionSink* xsink) const;
220 
222 
226  DLLEXPORT void deleteMemberValue(const QoreString* key, ExceptionSink* xsink);
227 
229 
233  DLLEXPORT void deleteMemberValue(const char* key, ExceptionSink* xsink);
234 
236 
240  DLLEXPORT void removeMember(const QoreString* key, ExceptionSink* xsink);
241 
243 
247  DLLEXPORT void removeMember(const char* key, ExceptionSink* xsink);
248 
250 
255  DLLEXPORT AbstractQoreNode* takeMember(const QoreString* key, ExceptionSink* xsink);
256 
258 
263  DLLEXPORT AbstractQoreNode* takeMember(const char* key, ExceptionSink* xsink);
264 
266 
269  DLLEXPORT int size(ExceptionSink* xsink) const;
270 
272 
276  DLLEXPORT bool compareSoft(const QoreObject* obj, ExceptionSink* xsink) const;
277 
279 
283  DLLEXPORT bool compareHard(const QoreObject* obj, ExceptionSink* xsink) const;
284 
286 
291  DLLEXPORT AbstractQoreNode* getReferencedMemberNoMethod(const char* mem, ExceptionSink* xsink) const;
292 
294 
300  DLLEXPORT int64 getMemberAsBigInt(const char* mem, bool& found, ExceptionSink* xsink) const;
301 
303 
306  DLLEXPORT QoreHashNode* copyData(ExceptionSink* xsink) const;
307 
309 
313  DLLEXPORT void mergeDataToHash(QoreHashNode* hash, ExceptionSink* xsink);
314 
316 
320  DLLEXPORT void setPrivate(qore_classid_t key, AbstractPrivateData* pd);
321 
323 
328 
330 
337 
339 
344  DLLEXPORT QoreValue evalMethodValue(const QoreString* name, const QoreListNode* args, ExceptionSink* xsink);
345 
347 
352  DLLEXPORT QoreValue evalMethodValue(const char* name, const QoreListNode* args, ExceptionSink* xsink);
353 
355 
362  DLLEXPORT AbstractQoreNode* evalMethod(const QoreString* name, const QoreListNode* args, ExceptionSink* xsink);
363 
365 
372  DLLEXPORT AbstractQoreNode* evalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
373 
375 
382  DLLEXPORT int64 bigIntEvalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
383 
385 
392  DLLEXPORT int intEvalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
393 
395 
402  DLLEXPORT bool boolEvalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
403 
405 
412  DLLEXPORT double floatEvalMethod(const char* name, const QoreListNode* args, ExceptionSink* xsink);
413 
415 
420  DLLEXPORT QoreValue evalMethodValue(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
421 
423 
430  DLLEXPORT AbstractQoreNode* evalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
431 
433 
440  DLLEXPORT int64 bigIntEvalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
441 
443 
450  DLLEXPORT int intEvalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
451 
453 
460  DLLEXPORT bool boolEvalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
461 
463 
470  DLLEXPORT double floatEvalMethod(const QoreMethod& method, const QoreListNode* args, ExceptionSink* xsink);
471 
473 
476  DLLEXPORT void doDelete(ExceptionSink* xsink);
477 
479 
483  DLLEXPORT const QoreClass* getClass(qore_classid_t cid) const;
484 
486 
493  DLLEXPORT const QoreClass* getClass(qore_classid_t cid, bool& priv) const;
494 
496 
499  DLLEXPORT const QoreClass* getClass() const;
500 
502 
505  DLLEXPORT const char* getClassName() const;
506 
508 
511  DLLEXPORT bool isValid() const;
512 
514 
517  DLLEXPORT QoreProgram* getProgram() const;
518 
520 
523  DLLEXPORT bool isSystemObject() const;
524 
526 
531  DLLEXPORT void tRef() const;
532 
534 
537  DLLEXPORT void tDeref();
538 
540  DLLEXPORT void realRef();
541 
543  DLLEXPORT void realDeref(ExceptionSink* xsink);
544 
546 
554  DLLEXPORT AbstractQoreNode* getMemberValueNoMethod(const QoreString* key, AutoVLock* vl, ExceptionSink* xsink) const;
555 
557 
563  DLLEXPORT AbstractQoreNode* getMemberValueNoMethod(const char* key, AutoVLock* vl, ExceptionSink* xsink) const;
564 
566 
568  DLLEXPORT void deleteBlockerRef() const;
569 
571 
575  DLLEXPORT void externalDelete(qore_classid_t key, ExceptionSink* xsink);
576 
578  DLLEXPORT AbstractQoreNode* evalMethodVariant(const QoreMethod& method, const QoreExternalMethodVariant* variant, const QoreListNode* args, ExceptionSink* xsink);
579 
580  DLLLOCAL int getStatus() const;
581 
583 
587  DLLLOCAL QoreValue evalMember(const QoreString* member, ExceptionSink* xsink);
588 
589  DLLLOCAL class KeyNode* getReferencedPrivateDataNode(qore_classid_t key);
590 
592 
597 
599 
605  DLLLOCAL QoreValue evalBuiltinMethodWithPrivateData(const QoreMethod& method, const BuiltinNormalMethodVariantBase* meth, const QoreListNode* args, ExceptionSink* xsink);
606 
608  DLLLOCAL void evalCopyMethodWithPrivateData(const QoreClass &thisclass, const BuiltinCopyVariantBase* meth, QoreObject* self, ExceptionSink* xsink);
609 
611 
615  DLLLOCAL void addPrivateDataToString(QoreString* str, ExceptionSink* xsink) const;
616 
618 
621  DLLLOCAL void obliterate(ExceptionSink* xsink);
622 
624 
628  DLLLOCAL void defaultSystemDestructor(qore_classid_t classID, ExceptionSink* xsink);
629 
631 
639  DLLLOCAL AbstractQoreNode** getExistingValuePtr(const QoreString* mem, AutoVLock* vl, ExceptionSink* xsink) const;
640 
642 
649  DLLLOCAL AbstractQoreNode** getExistingValuePtr(const char* mem, AutoVLock* vl, ExceptionSink* xsink) const;
650 
651  // returns a new hash consisting of just the members of value_list
652  DLLLOCAL QoreHashNode* getSlice(const QoreListNode* value_list, ExceptionSink* xsink) const;
653 
655  DLLLOCAL QoreObject(const QoreClass* oc, QoreProgram* p, QoreHashNode* d);
656 
658  DLLLOCAL bool evalDeleteBlocker(qore_classid_t classid_for_method, BuiltinDeleteBlocker* meth);
659 
661  DLLLOCAL bool hasMemberNotification() const;
662 
664  DLLLOCAL void execMemberNotification(const char* member, ExceptionSink* xsink);
665 };
666 
668 template <class T>
670 public:
671  DLLLOCAL PrivateDataRefHolder(const QoreObject* o, qore_classid_t cid, ExceptionSink* xsink) : ReferenceHolder<T>(reinterpret_cast<T*>(o->getReferencedPrivateData(cid, xsink)), xsink) {
672  }
673 };
674 
676 template <class T>
678 public:
679  DLLLOCAL TryPrivateDataRefHolder(const QoreObject* o, qore_classid_t cid, ExceptionSink* xsink) : ReferenceHolder<T>(reinterpret_cast<T*>(o->tryGetReferencedPrivateData(cid, xsink)), xsink) {
680  }
681 };
682 
683 class QorePrivateObjectAccessHelper {
684 public:
685  DLLLOCAL QorePrivateObjectAccessHelper(ExceptionSink* xs) : xsink(xs), ptr(0) {
686  }
687 
688  DLLLOCAL operator bool() const {
689  return (bool)ptr;
690  }
691 
692 private:
693  DLLLOCAL QorePrivateObjectAccessHelper(const QorePrivateObjectAccessHelper&) = delete;
694  DLLLOCAL QorePrivateObjectAccessHelper& operator=(const QorePrivateObjectAccessHelper&) = delete;
695  DLLLOCAL void* operator new(size_t) = delete;
696 
697 protected:
698  ExceptionSink* xsink;
699  void* ptr;
700 };
701 
702 #endif
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 "self" (n...
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
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...
DLLLOCAL void execMemberNotification(const char *member, ExceptionSink *xsink)
executes the member notification on the object the given member
This is the hash or associative list container type in Qore, dynamically allocated only...
Definition: QoreHashNode.h:50
DLLEXPORT void setValue(const char *key, AbstractQoreNode *val, ExceptionSink *xsink)
sets the value of the given member to the given value
virtual DLLEXPORT const char * getTypeName() const
returns the type name as a c string
virtual DLLLOCAL void customRef() const
custom reference handler
DLLEXPORT void doDelete(ExceptionSink *xsink)
runs the destructor on the object (if it hasn&#39;t already been deleted)
the base class for all data to be used as private data of Qore objects
Definition: AbstractPrivateData.h:44
DLLEXPORT int64 getMemberAsBigInt(const char *mem, bool &found, ExceptionSink *xsink) const
returns the value of the given member as an int64
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
DLLEXPORT void mergeDataToHash(QoreHashNode *hash, ExceptionSink *xsink)
copies all member data of the current object to the passed QoreHashNode
DLLEXPORT void externalDelete(qore_classid_t key, ExceptionSink *xsink)
call this function when an object&#39;s private data is deleted externally
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...
virtual DLLEXPORT bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality ("deep compare" including all contained values) with possible type conversion (sof...
DLLEXPORT void removeMember(const QoreString *key, ExceptionSink *xsink)
removes a member from the object without explicitly calling destructors; the value is only dereferenc...
DLLEXPORT bool compareHard(const QoreObject *obj, ExceptionSink *xsink) const
tests for equality ("deep compare" including all contained values) with possible type conversion of c...
DLLEXPORT void deleteBlockerRef() const
increment the reference count of the object, to be called only from within a delete blocker ...
DLLEXPORT void realRef()
increments the standard reference count of the object for references that cannot be part of a recursi...
DLLEXPORT AbstractQoreNode * takeMember(const QoreString *key, ExceptionSink *xsink)
removes a member from the object without explicitly calling destructors and returns the value removed...
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:54
const qore_type_t NT_OBJECT
type value for QoreObject
Definition: node_types.h:52
DLLEXPORT bool compareSoft(const QoreObject *obj, ExceptionSink *xsink) const
tests for equality ("deep compare" including all contained values) with possible type conversion of c...
DLLLOCAL bool hasMemberNotification() const
returns true if the class has a memberNotification method
virtual DLLLOCAL ~QoreObject()
destructor
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 ...
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 ...
DLLEXPORT void tRef() const
increments the existence reference count
DLLEXPORT bool isValid() const
returns true if the object is valid
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
DLLEXPORT AbstractQoreNode * getMemberValueNoMethod(const QoreString *key, AutoVLock *vl, ExceptionSink *xsink) const
returns the pointer to the value of the member
virtual DLLLOCAL void customDeref(ExceptionSink *xsink)
custom dereference handler - with delete
virtual DLLEXPORT bool derefImpl(ExceptionSink *xsink)
runs the destructor if necessary and dereferences all members
Qore&#39;s string type supported by the QoreEncoding class.
Definition: QoreString.h:82
DLLLOCAL void obliterate(ExceptionSink *xsink)
destroys all members and dereferences all private data structures
virtual DLLLOCAL double floatEvalImpl(ExceptionSink *xsink) const
should never be called, does nothing
virtual DLLLOCAL int64 bigIntEvalImpl(ExceptionSink *xsink) const
should never be called, does nothing
static DLLLOCAL qore_type_t getStaticTypeCode()
returns the type code (useful in templates)
Definition: QoreObject.h:191
DLLEXPORT void tDeref()
decrements the existence reference count, when it reaches 0 the C++ object ("this") will be deleted ...
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 ...
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
convenience class for holding AbstractPrivateData references
Definition: QoreObject.h:669
virtual DLLLOCAL int integerEvalImpl(ExceptionSink *xsink) const
should never be called, does nothing
DLLLOCAL bool evalDeleteBlocker(qore_classid_t classid_for_method, BuiltinDeleteBlocker *meth)
evaluates the delete blocker function for the managed private data
defines a Qore-language class
Definition: QoreClass.h:214
DLLEXPORT QoreListNode * getMemberList(ExceptionSink *xsink) const
returns the list of members, caller owns the list returned
virtual DLLLOCAL AbstractQoreNode * evalImpl(ExceptionSink *xsink) const
should never be called, does nothing
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
DLLEXPORT const QoreClass * getClass() const
returns a pointer to the QoreClass of this object
virtual DLLEXPORT bool getAsBoolImpl() const
returns false unless perl-boolean-evaluation is enabled, in which case it returns false only when emp...
DLLLOCAL QoreValue evalMember(const QoreString *member, ExceptionSink *xsink)
returns the value of the member with an incremented reference count, or executes the memberGate() met...
DLLEXPORT bool isSystemObject() const
returns true if the object is a system object (created with the system constructor) ...
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:112
supports parsing and executing Qore-language code, reference counted, dynamically-allocated only ...
Definition: QoreProgram.h:117
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...
the implementation of Qore&#39;s object data type, reference counted, dynamically-allocated only ...
Definition: QoreObject.h:62
DLLLOCAL void defaultSystemDestructor(qore_classid_t classID, ExceptionSink *xsink)
runs the destructor for system objects
unsigned qore_classid_t
used for the unique class ID for QoreClass objects
Definition: common.h:80
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:47
virtual DLLEXPORT bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality ("deep compare" including all contained values) without type conversions (hard com...
virtual DLLLOCAL bool boolEvalImpl(ExceptionSink *xsink) const
should never be called, does nothing
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
virtual DLLEXPORT AbstractQoreNode * realCopy() const
performs a deep copy of the list and returns the new list
DLLEXPORT bool validInstanceOf(qore_classid_t cid) const
returns true if this object is a valid instance of the classid passed
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
DLLEXPORT AbstractQoreNode * evalMethodVariant(const QoreMethod &method, const QoreExternalMethodVariant *variant, const QoreListNode *args, ExceptionSink *xsink)
executes a normal object method variant
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...
DLLEXPORT QoreProgram * getProgram() const
returns the QoreProgram object associated with this object
DLLEXPORT void realDeref(ExceptionSink *xsink)
decrements the standard reference count of the object for references that cannot be part of a recursi...
convenience class for holding AbstractPrivateData references
Definition: QoreObject.h:677
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode) ...
Definition: common.h:71
static DLLLOCAL const char * getStaticTypeName()
returns the type name (useful in templates)
Definition: QoreObject.h:186
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...
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 ...
DLLEXPORT int size(ExceptionSink *xsink) const
returns the number of members of the object
DLLEXPORT const char * getClassName() const
returns the name of the class
a method in a QoreClass
Definition: QoreClass.h:94
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
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...
a templated class to manage a reference count of an object that can throw a Qore-language exception w...
Definition: ReferenceHolder.h:51
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 ...
DLLLOCAL void addPrivateDataToString(QoreString *str, ExceptionSink *xsink) const
concatenates info about private data to a string