ArnLib  4.0.x
Active Registry Network
ArnAdaptItem.cpp
Go to the documentation of this file.
1 // Copyright (C) 2010-2022 Michael Wiklund.
2 // All rights reserved.
3 // Contact: arnlib@wiklunden.se
4 //
5 // This file is part of the ArnLib - Active Registry Network.
6 // Parts of ArnLib depend on Qt and/or other libraries that have their own
7 // licenses. Usage of these other libraries is subject to their respective
8 // license agreements.
9 //
10 // GNU Lesser General Public License Usage
11 // This file may be used under the terms of the GNU Lesser General Public
12 // License version 2.1 as published by the Free Software Foundation and
13 // appearing in the file LICENSE_LGPL.txt included in the packaging of this
14 // file. In addition, as a special exception, you may use the rights described
15 // in the Nokia Qt LGPL Exception version 1.1, included in the file
16 // LGPL_EXCEPTION.txt in this package.
17 //
18 // GNU General Public License Usage
19 // Alternatively, this file may be used under the terms of the GNU General Public
20 // License version 3.0 as published by the Free Software Foundation and appearing
21 // in the file LICENSE_GPL.txt included in the packaging of this file.
22 //
23 // Other Usage
24 // Alternatively, this file may be used in accordance with the terms and conditions
25 // contained in a signed written agreement between you and Michael Wiklund.
26 //
27 // This program is distributed in the hope that it will be useful, but WITHOUT ANY
28 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
29 // PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
30 //
31 
32 #include "ArnInc/ArnAdaptItem.hpp"
33 #include "private/ArnAdaptItem_p.hpp"
34 #include "ArnInc/ArnEvent.hpp"
35 #include "ArnInc/ArnLib.hpp"
36 #include <QThread>
37 #include <QMutexLocker>
38 #include <QDebug>
39 
40 #define MUTEX_CALL( funcCall ) \
41  d->_mutex.lock(); \
42  funcCall; \
43  d->_mutex.unlock();
44 
45 #define MUTEX_CALL_RET( funcCall ) \
46  QMutexLocker mutexLocker( &d->_mutex); \
47  return funcCall;
48 
49 
50 ArnAdaptItemPrivate::ArnAdaptItemPrivate()
51  : _mutex( ARN_ModeRecursiveMutex )
52  , _changedCB( arnNullptr)
53  , _linkDestroyedCB( arnNullptr)
54  , _arnEventCB( arnNullptr)
55 {
56 }
57 
58 
59 ArnAdaptItemPrivate::~ArnAdaptItemPrivate()
60 {
61 }
62 
63 
64 void ArnAdaptItem::init()
65 {
67 }
68 
69 
71  : ArnBasicItem( *new ArnAdaptItemPrivate)
72 {
73  init();
74 }
75 
76 
78 {
79 }
80 
81 
82 bool ArnAdaptItem::open( const QString& path)
83 {
84  Q_D(ArnAdaptItem);
85 
86  typedef Arn::LinkFlags Flags;
87  MUTEX_CALL( bool r = openWithFlags( path, Flags::CreateAllowed | Flags::Threaded))
88  return r;
89 }
90 
91 
93 {
94  Q_D(ArnAdaptItem);
95 
97 }
98 
99 
100 void ArnAdaptItem::destroyLink( bool isGlobal)
101 {
102  Q_D(ArnAdaptItem);
103 
105 }
106 
107 
109 {
110  Q_D(const ArnAdaptItem);
111 
112  MUTEX_CALL( bool r = ArnBasicItem::isOpen())
113  return r;
114 }
115 
116 
117 QString ArnAdaptItem::path( Arn::NameF nameF) const
118 {
119  Q_D(const ArnAdaptItem);
120 
122 }
123 
124 
125 QString ArnAdaptItem::name( Arn::NameF nameF) const
126 {
127  Q_D(const ArnAdaptItem);
128 
130 }
131 
132 
133 void ArnAdaptItem::setReference( void* reference)
134 {
135  Q_D(ArnAdaptItem);
136 
138 }
139 
140 
142 {
143  Q_D(const ArnAdaptItem);
144 
145  MUTEX_CALL( void* r = ArnBasicItem::reference())
146  return r;
147 }
148 
149 
151 {
152  Q_D(const ArnAdaptItem);
153 
154  MUTEX_CALL( uint r = ArnBasicItem::itemId())
155  return r;
156 }
157 
158 
160 {
161  Q_D(const ArnAdaptItem);
162 
163  MUTEX_CALL( uint r = ArnBasicItem::linkId())
164  return r;
165 }
166 
167 
169 {
170  Q_D(const ArnAdaptItem);
171 
173  return r;
174 }
175 
176 
178 {
179  Q_D(const ArnAdaptItem);
180 
182  return r;
183 }
184 
185 
187 {
188  Q_D(const ArnAdaptItem);
189 
191  return r;
192 }
193 
194 
196 {
197  Q_D(const ArnAdaptItem);
198 
200  return r;
201 }
202 
203 
205 {
206  Q_D(ArnAdaptItem);
207 
209 }
210 
211 
213 {
214  Q_D(const ArnAdaptItem);
215 
217  return r;
218 }
219 
220 
222 {
223  Q_D(ArnAdaptItem);
224 
226 }
227 
228 
230 {
231  Q_D(const ArnAdaptItem);
232 
234  return r;
235 }
236 
237 
239 {
240  Q_D(const ArnAdaptItem);
241 
243  return r;
244 }
245 
246 
248 {
249  Q_D(ArnAdaptItem);
250 
252  return *this;
253 }
254 
255 
257 {
258  Q_D(const ArnAdaptItem);
259 
261  return r;
262 }
263 
264 
266 {
267  Q_D(ArnAdaptItem);
268 
270  return *this;
271 }
272 
273 
275 {
276  Q_D(const ArnAdaptItem);
277 
279  return r;
280 }
281 
282 
284 {
285  Q_D(ArnAdaptItem);
286 
288  return *this;
289 }
290 
291 
293 {
294  Q_D(const ArnAdaptItem);
295 
297  return r;
298 }
299 
300 
302 {
303  Q_D(ArnAdaptItem);
304 
306  return *this;
307 }
308 
309 
311 {
312  Q_D(const ArnAdaptItem);
313 
315  return r;
316 }
317 
318 
320 {
321  Q_D(ArnAdaptItem);
322 
324  return *this;
325 }
326 
327 
329 {
330  Q_D(const ArnAdaptItem);
331 
333  return r;
334 }
335 
336 
337 void ArnAdaptItem::arnImport( const QByteArray& data, int ignoreSame)
338 {
339  Q_D(const ArnAdaptItem);
340 
341  MUTEX_CALL( ArnBasicItem::arnImport( data, ignoreSame))
342 }
343 
344 
345 QByteArray ArnAdaptItem::arnExport() const
346 {
347  Q_D(const ArnAdaptItem);
348 
350 }
351 
352 
353 int ArnAdaptItem::toInt( bool* isOk) const
354 {
355  Q_D(const ArnAdaptItem);
356 
357  MUTEX_CALL( int r = ArnBasicItem::toInt( isOk))
358  return r;
359 }
360 
361 
362 double ArnAdaptItem::toDouble( bool* isOk) const
363 {
364  Q_D(const ArnAdaptItem);
365 
366  MUTEX_CALL( double r = ArnBasicItem::toDouble( isOk))
367  return r;
368 }
369 
370 
371 ARNREAL ArnAdaptItem::toReal( bool* isOk) const
372 {
373  Q_D(const ArnAdaptItem);
374 
376  return r;
377 }
378 
379 
380 QString ArnAdaptItem::toString( bool* isOk) const
381 {
382  Q_D(const ArnAdaptItem);
383 
385 }
386 
387 
388 QByteArray ArnAdaptItem::toByteArray( bool* isOk) const
389 {
390  Q_D(const ArnAdaptItem);
391 
393 }
394 
395 
396 QVariant ArnAdaptItem::toVariant( bool* isOk) const
397 {
398  Q_D(const ArnAdaptItem);
399 
401 }
402 
403 
404 bool ArnAdaptItem::toBool( bool* isOk) const
405 {
406  Q_D(const ArnAdaptItem);
407 
408  MUTEX_CALL( bool r = ArnBasicItem::toBool( isOk))
409  return r;
410 }
411 
412 
413 uint ArnAdaptItem::toUInt( bool* isOk) const
414 {
415  Q_D(const ArnAdaptItem);
416 
417  MUTEX_CALL( uint r = ArnBasicItem::toUInt( isOk))
418  return r;
419 }
420 
421 
422 qint64 ArnAdaptItem::toInt64( bool* isOk) const
423 {
424  Q_D(const ArnAdaptItem);
425 
426  MUTEX_CALL( qint64 r = ArnBasicItem::toInt64( isOk))
427  return r;
428 }
429 
430 
431 quint64 ArnAdaptItem::toUInt64( bool* isOk) const
432 {
433  Q_D(const ArnAdaptItem);
434 
435  MUTEX_CALL( quint64 r = ArnBasicItem::toUInt64( isOk))
436  return r;
437 }
438 
439 
441 {
442  Q_D(ArnAdaptItem);
443 
445  return *this;
446 }
447 
448 
450 {
451  Q_D(ArnAdaptItem);
452 
454  return *this;
455 }
456 
457 
459 {
460  Q_D(ArnAdaptItem);
461 
463  return *this;
464 }
465 
466 
468 {
469  Q_D(ArnAdaptItem);
470 
472  return *this;
473 }
474 
475 
476 ArnAdaptItem& ArnAdaptItem::operator=( const QByteArray& val)
477 {
478  Q_D(ArnAdaptItem);
479 
481  return *this;
482 }
483 
484 
485 ArnAdaptItem& ArnAdaptItem::operator=( const QVariant& val)
486 {
487  Q_D(ArnAdaptItem);
488 
490  return *this;
491 }
492 
493 
495 {
496  Q_D(ArnAdaptItem);
497 
499  return *this;
500 }
501 
502 
504 {
505  Q_D(ArnAdaptItem);
506 
508  return *this;
509 }
510 
511 
513 {
514  Q_D(ArnAdaptItem);
515 
517  return *this;
518 }
519 
520 
522 {
523  Q_D(ArnAdaptItem);
524 
526  return *this;
527 }
528 
529 
531 {
532  Q_D(ArnAdaptItem);
533 
535  return *this;
536 }
537 
538 
540 {
541  Q_D(ArnAdaptItem);
542 
544  return *this;
545 }
546 
547 
548 void ArnAdaptItem::setValue( const ArnAdaptItem& other, int ignoreSame)
549 {
550  Q_D(ArnAdaptItem);
551 
552  MUTEX_CALL( ArnBasicItem::setValue( other, ignoreSame))
553 }
554 
555 
556 void ArnAdaptItem::setValue( int value, int ignoreSame)
557 {
558  Q_D(ArnAdaptItem);
559 
560  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
561 }
562 
563 
564 void ArnAdaptItem::setValue( ARNREAL value, int ignoreSame)
565 {
566  Q_D(ArnAdaptItem);
567 
568  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
569 }
570 
571 
572 void ArnAdaptItem::setValue( bool value, int ignoreSame)
573 {
574  Q_D(ArnAdaptItem);
575 
576  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
577 }
578 
579 
580 void ArnAdaptItem::setValue( const QString& value, int ignoreSame)
581 {
582  Q_D(ArnAdaptItem);
583 
584  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
585 }
586 
587 
588 void ArnAdaptItem::setValue( const QByteArray& value, int ignoreSame)
589 {
590  Q_D(ArnAdaptItem);
591 
592  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
593 }
594 
595 
596 void ArnAdaptItem::setValue( const QVariant& value, int ignoreSame)
597 {
598  Q_D(ArnAdaptItem);
599 
600  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
601 }
602 
603 
604 void ArnAdaptItem::setValue( const char* value, int ignoreSame)
605 {
606  Q_D(ArnAdaptItem);
607 
608  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
609 }
610 
611 
612 void ArnAdaptItem::setValue( uint value, int ignoreSame)
613 {
614  Q_D(ArnAdaptItem);
615 
616  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
617 }
618 
619 
620 void ArnAdaptItem::setValue( qint64 value, int ignoreSame)
621 {
622  Q_D(ArnAdaptItem);
623 
624  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
625 }
626 
627 
628 void ArnAdaptItem::setValue( quint64 value, int ignoreSame)
629 {
630  Q_D(ArnAdaptItem);
631 
632  MUTEX_CALL( ArnBasicItem::setValue( value, ignoreSame))
633 }
634 
635 
636 void ArnAdaptItem::setBits( int mask, int value, int ignoreSame)
637 {
638  Q_D(ArnAdaptItem);
639 
640  MUTEX_CALL( ArnBasicItem::setBits( mask, value, ignoreSame))
641 }
642 
643 
644 void ArnAdaptItem::addValue( int value)
645 {
646  Q_D(ArnAdaptItem);
647 
649 }
650 
651 
653 {
654  Q_D(ArnAdaptItem);
655 
657 }
658 
659 
661 {
662  Q_D(const ArnAdaptItem);
663 
664  return d->_mutex;
665 }
666 
667 
668 QThread* ArnAdaptItem::thread() const
669 {
670  return QThread::currentThread(); // Same thread as now running (no real affinity)
671 }
672 
673 
675 {
676  Q_D(ArnAdaptItem);
677 
678  d->_changedCB = changedCB;
679 }
680 
681 
683 {
684  Q_D(const ArnAdaptItem);
685 
686  return d->_changedCB;
687 }
688 
689 
691 {
692  Q_D(ArnAdaptItem);
693 
694  d->_linkDestroyedCB = linkDestroyedCB;
695 }
696 
697 
699 {
700  Q_D(const ArnAdaptItem);
701 
702  return d->_linkDestroyedCB;
703 }
704 
705 
706 void ArnAdaptItem::setArnEventCallback( ArnEventCB evCB)
707 {
708  Q_D(ArnAdaptItem);
709 
710  d->_arnEventCB = evCB;
711 }
712 
713 
715 {
716  Q_D(const ArnAdaptItem);
717 
718  return d->_arnEventCB;
719 }
720 
721 
722 void ArnAdaptItem::setUncrossed( bool isUncrossed)
723 {
724  Q_D(ArnAdaptItem);
725 
727 }
728 
729 
731 {
732  Q_D(const ArnAdaptItem);
733 
735  return r;
736 }
737 
738 
739 bool ArnAdaptItem::sendArnEventLink( ArnEvent* ev)
740 {
741  Q_D(ArnAdaptItem);
742 
743  MUTEX_CALL( bool r = ArnBasicItem::sendArnEventLink( ev))
744  return r;
745 }
746 
747 
748 void ArnAdaptItem::sendArnEventItem( ArnEvent* ev, bool isAlienThread, bool isLocked)
749 {
750  Q_UNUSED(isLocked)
751 
752  if (!ev) return; // No event ...
753 
754  ev->setTarget( this);
755 
756  arnEvent( ev, isAlienThread);
757 
758  if (isAlienThread) {
759  delete ev;
760  }
761 }
762 
763 
764 void ArnAdaptItem::arnEvent( QEvent* ev, bool isAlienThread)
765 {
766  Q_UNUSED(isAlienThread)
767  Q_D(ArnAdaptItem);
768 
769  //int evIdx = ev->type() - ArnEvent::baseType();
770  int evIdx = ArnEvent::toIdx( ev->type());
771 
772  if (d->_arnEventCB) {
773  (*(d->_arnEventCB))( ev, evIdx);
774  }
775 
776  switch (evIdx) {
778  {
779  if (!d->_changedCB) return;
780  ArnEvValueChange* e = static_cast<ArnEvValueChange*>( ev);
781  ArnAdaptItem* target = static_cast<ArnAdaptItem*>( e->target());
782  if (!target) return; // No target, deleted/closed ...
783 
784  QByteArray val = e->valueData() ? *e->valueData() : target->toByteArray();
785  (*(d->_changedCB))( *target, val);
786  // qDebug() << "ArnAdaptEvValueChange: path=" << target->path()
787  // << " value=" << val;
788  return;
789  }
791  {
792  ArnEvModeChange* e = static_cast<ArnEvModeChange*>( ev);
793  ArnAdaptItem* target = static_cast<ArnAdaptItem*>( e->target());
794  if (!target) return; // No target, deleted/closed ...
795 
796  QMutexLocker mutexLocker( &target->mutex()); // Force atomic operation on target
797 
798  // qDebug() << "ArnAdaptEvModeChange: path=" << e->path() << " mode=" << e->mode()
799  // << " inItemPath=" << target->path();
800  if (!target->isFolder()) {
801  if (e->mode().is( Arn::ObjectMode::Pipe)) { // Pipe-mode never IgnoreSameValue
802  target->setIgnoreSameValue(false);
803  }
804  }
805  return;
806  }
808  {
809  ArnEvRetired* e = static_cast<ArnEvRetired*>( ev);
810  ArnAdaptItem* target = static_cast<ArnAdaptItem*>( e->target());
811  if (!target) return; // No target, deleted/closed ...
812 
813  QMutexLocker mutexLocker( &target->mutex()); // Force atomic operation on target
814 
815  if (!e->isBelow()) {
816  if (Arn::debugLinkDestroy) qDebug() << "AdaptItem arnLinkDestroyed: path=" << target->path();
817  if (d->_linkDestroyedCB) {
818  (*(d->_linkDestroyedCB))( *target);
819  }
820  target->close();
821  e->setTarget( arnNullptr); // target is not available any more
822  }
823  return;
824  }
825  default:;
826  }
827 }
828 
829 
830 void ArnAdaptItem::errorLog( const QString& errText, ArnError err, void* reference) const
831 {
832  Q_D(const ArnAdaptItem);
833 
834  MUTEX_CALL( ArnBasicItem::errorLog( errText, err, reference))
835 }
836 
837 
838 ArnAdaptItem::ArnAdaptItem( ArnAdaptItemPrivate& dd)
839  : ArnBasicItem( dd)
840 {
841  init();
842 }
Data type of an Arn Data Object
Definition: Arn.hpp:74
bool isUncrossed() const
Get the Uncrossed state of an object.
ArnAdaptItem & setSaveMode()
Set general mode as Save for this Arn Data Object
void addMode(Arn::ObjectMode mode)
Add general mode settings for this Arn Data Object
QString toString(bool *isOk=arnNullptr) const
void destroyLink(bool isGlobal=true)
Destroy the Arn Data Object
bool isAutoDestroy() const
ArnAdaptItem & setBiDirMode()
Set general mode as Bidirectional for this Arn Data Object
void setValue(const ArnBasicItem &other, int ignoreSame=Arn::SameValue::DefaultAction)
ArnBasicItem & setPipeMode()
Set general mode as Pipe for this Arn Data Object
Arn::ObjectMode getMode() const
uint itemId() const
Get the id for this ArnItem.
quint64 toUInt64(bool *isOk=arnNullptr) const
void addValue(int value)
AtomicOp adds an integer to an Arn Data Object
bool isMaster() const
#define MUTEX_CALL_RET(funcCall)
const QByteArray * valueData() const
Definition: ArnEvent.hpp:250
qint64 toInt64(bool *isOk=arnNullptr) const
Arn::ObjectSyncMode syncMode() const
void setArnEventCallback(ArnEventCB evCB)
Set event callback for this ArnAdaptItem.
bool toBool(bool *isOk=arnNullptr) const
void arnImport(const QByteArray &data, int ignoreSame=Arn::SameValue::DefaultAction)
Import data to an Arn Data Object
bool isOpen() const
State of the handle.
QByteArray arnExport() const
void close()
Close the handle.
void setReference(void *reference)
Set an associated external reference.
ArnBasicItem & setSaveMode()
Set general mode as Save for this Arn Data Object
void setUncrossed(bool isUncrossed=true)
Set a Bidirectional item as Uncrossed.
bool debugLinkDestroy
Definition: ArnLib.cpp:40
bool open(const QString &path)
Open a handle to an Arn Data Object
int refCount() const
Get the number of refs to this Arn Data Object
ArnAdaptItem & operator+=(int val)
int toInt(bool *isOk=arnNullptr) const
ArnAdaptItem & setPipeMode()
Set general mode as Pipe for this Arn Data Object
uint toUInt(bool *isOk=arnNullptr) const
void setReference(void *reference)
Set an associated external reference.
Implies BiDir and all data is preserved as a stream.
Definition: Arn.hpp:128
QString toString(bool *isOk=arnNullptr) const
! Non Qt and threadsafe handle for an Arn Data Object.
uint linkId() const
Get the id for this Arn Data Object
#define MUTEX_CALL(funcCall)
uint toUInt(bool *isOk=arnNullptr) const
bool toBool(bool *isOk=arnNullptr) const
QThread * thread() const
Get the thread affinity of this ArnAdaptItem.
void setIgnoreSameValue(bool isIgnore=true)
Set skipping of equal value.
void setUncrossed(bool isUncrossed=true)
Set a Bidirectional item as Uncrossed.
void(* ChangedCB)(ArnAdaptItem &target, const QByteArray &value)
Arn::ObjectMode getMode() const
Use with care, link must be "referenced" before use, otherwise it might have been deleted...
bool isPipeMode() const
QByteArray toByteArray(bool *isOk=arnNullptr) const
Arn::ObjectSyncMode syncMode() const
int toInt(bool *isOk=arnNullptr) const
uint itemId() const
Get the id for this ArnItem.
void setValue(const ArnAdaptItem &other, int ignoreSame=Arn::SameValue::DefaultAction)
bool isIgnoreSameValue() const
ARN_RecursiveMutex & mutex() const
Get the mutex of this ArnAdaptItem.
ARNREAL toReal(bool *isOk=arnNullptr) const
#define ARN_ModeRecursiveMutex
Definition: ArnCompat.hpp:74
void setIgnoreSameValue(bool isIgnore=true)
Set skipping of equal value.
Arn::ObjectMode mode() const
Definition: ArnEvent.hpp:168
bool isUncrossed() const
Get the Uncrossed state of an object.
virtual ~ArnAdaptItem()
QByteArray toByteArray(bool *isOk=arnNullptr) const
Arn::DataType type() const
The type stored in the Arn Data Object
void setBits(int mask, int value, int ignoreSame=Arn::SameValue::DefaultAction)
AtomicOp assign an integer to specified bits in an Arn Data Object
void setLinkDestroyedCallback(LinkDestroyedCB linkDestroyedCB)
Set link-destroyed-callback for this ArnAdaptItem.
quint64 toUInt64(bool *isOk=arnNullptr) const
double toDouble(bool *isOk=arnNullptr) const
ARNREAL toReal(bool *isOk=arnNullptr) const
LinkDestroyedCB linkDestroyedCallback() const
Get the link-destroyed-callback of this ArnAdaptItem.
bool isSaveMode() const
bool isMaster() const
void addValue(int value)
AtomicOp adds an integer to an Arn Data Object
ArnAdaptItem & operator=(const ArnAdaptItem &other)
ArnAdaptItem()
Standard constructor of a closed handle.
void * reference() const
Get the stored external reference.
void setBits(int mask, int value, int ignoreSame=Arn::SameValue::DefaultAction)
AtomicOp assign an integer to specified bits in an Arn Data Object
void arnImport(const QByteArray &data, int ignoreSame=Arn::SameValue::DefaultAction)
Import data to an Arn Data Object
#define ARN_RecursiveMutex
Definition: ArnCompat.hpp:73
void setChangedCallback(ChangedCB changedCB)
Set changed-callback for this ArnAdaptItem.
bool isProvider() const
QVariant toVariant(bool *isOk=arnNullptr) const
int refCount() const
Get the number of refs to this Arn Data Object
void * reference() const
Get the stored external reference.
bool isOpen() const
State of the handle.
QString path(Arn::NameF nameF=Arn::NameF::EmptyOk) const
Path of the Arn Data Object
ArnBasicItem & setBiDirMode()
Set general mode as Bidirectional for this Arn Data Object
void addMode(Arn::ObjectMode mode)
Add general mode settings for this Arn Data Object
Arn::DataType type() const
The type stored in the Arn Data Object
ArnAdaptItem & setMaster()
Set client session sync mode as Master for this ArnItem.
#define ARNREAL
Definition: Arn.hpp:44
void(* ArnEventCB)(QEvent *ev, int arnEvIdx)
bool isAutoDestroy() const
bool isBelow() const
Definition: ArnEvent.hpp:213
ArnEventCB arnEventCallback() const
Get the event callback of this ArnAdaptItem.
ArnAdaptItem & setAutoDestroy()
Set client session sync mode as AutoDestroy for this ArnItem.
ArnBasicItem & setAutoDestroy()
Set client session sync mode as AutoDestroy for this ArnItem.
QString path(Arn::NameF nameF=Arn::NameF::EmptyOk) const
Path of the Arn Data Object
double toDouble(bool *isOk=arnNullptr) const
bool isFolder() const
bool isBiDirMode() const
ChangedCB ChangedCallback() const
Get the changed-callback of this ArnAdaptItem.
QVariant toVariant(bool *isOk=arnNullptr) const
int toIdx() const
Definition: ArnEvent.cpp:109
uint linkId() const
Get the id for this Arn Data Object
void destroyLink(bool isGlobal=true)
Destroy the Arn Data Object
void close()
Close the handle.
bool isFolder() const
qint64 toInt64(bool *isOk=arnNullptr) const
bool isIgnoreSameValue() const
bool isSaveMode() const
bool isBiDirMode() const
QString name(Arn::NameF nameF) const
Name of the Arn Data Object
void setTarget(void *target)
Definition: ArnEvent.cpp:138
QString name(Arn::NameF nameF) const
Name of the Arn Data Object
QByteArray arnExport() const
ArnBasicItem & setMaster()
Set client session sync mode as Master for this ArnItem.
void * target() const
Definition: ArnEvent.hpp:116
bool isProvider() const
bool isPipeMode() const
Base class handle for an Arn Data Object.
void(* LinkDestroyedCB)(ArnAdaptItem &target)