32 #ifndef ARNADAPTITEM_HPP 33 #define ARNADAPTITEM_HPP 46 class ArnAdaptItemPrivate;
138 typedef void (*ChangedCB)(
ArnAdaptItem& target,
const QByteArray& value);
140 typedef void (*ArnEventCB)( QEvent* ev,
int arnEvIdx);
153 bool open(
const QString& path);
363 int toInt(
bool* isOk = arnNullptr)
const;
369 double toDouble(
bool* isOk = arnNullptr)
const;
381 QString
toString(
bool* isOk = arnNullptr)
const;
387 QByteArray
toByteArray(
bool* isOk = arnNullptr)
const;
393 QVariant
toVariant(
bool* isOk = arnNullptr)
const;
400 bool toBool(
bool* isOk = arnNullptr)
const;
407 uint
toUInt(
bool* isOk = arnNullptr)
const;
414 qint64
toInt64(
bool* isOk = arnNullptr)
const;
421 quint64
toUInt64(
bool* isOk = arnNullptr)
const;
562 void setChangedCallback( ChangedCB changedCB);
569 ChangedCB ChangedCallback()
const;
579 void setLinkDestroyedCallback( LinkDestroyedCB linkDestroyedCB);
586 LinkDestroyedCB linkDestroyedCallback()
const;
595 void setArnEventCallback( ArnEventCB evCB);
602 ArnEventCB arnEventCallback()
const;
624 bool sendArnEventLink(
ArnEvent* ev);
625 void sendArnEventItem(
ArnEvent* ev,
bool isAlienThread,
bool isLocked =
false);
628 virtual void arnEvent( QEvent* ev,
bool isAlienThread);
640 void setValue(
const QByteArray& value,
int ignoreSame, ArnLinkHandle& handleData);
641 void arnImport(
const QByteArray& data,
int ignoreSame, ArnLinkHandle& handleData);
644 using ArnBasicItem::openWithFlags;
646 using ArnBasicItem::addSyncMode;
647 using ArnBasicItem::resetOnlyEcho;
648 using ArnBasicItem::addIsOnlyEcho;
649 using ArnBasicItem::isOnlyEcho;
650 using ArnBasicItem::retireType;
651 using ArnBasicItem::childItemsMain;
654 #endif // ARNADAPTITEM_HPP Data type of an Arn Data Object
bool isUncrossed() const
Get the Uncrossed state of an object.
QString toString(bool *isOk=arnNullptr) const
void destroyLink(bool isGlobal=true)
Destroy the Arn Data Object
QThread * thread() const
Get the thread affinity of this ArnBasicItem.
void setValue(const ArnBasicItem &other, int ignoreSame=Arn::SameValue::DefaultAction)
ArnBasicItem & setPipeMode()
Set general mode as Pipe for this Arn Data Object
quint64 toUInt64(bool *isOk=arnNullptr) const
void destroyLinkLocal()
Destroy the local Arn Data Object
Arn::ObjectSyncMode syncMode() const
bool toBool(bool *isOk=arnNullptr) const
Path: "/@/test" ==> "//test", Item: "@" ==> "".
void close()
Close the handle.
bool open(const QString &path)
Open a handle to an Arn Data Object
void setReference(void *reference)
Set an associated external reference.
ArnBasicItem & setSaveMode()
Set general mode as Save for this Arn Data Object
int refCount() const
Get the number of refs to this Arn Data Object
uint toUInt(bool *isOk=arnNullptr) const
! Non Qt and threadsafe handle for an Arn Data Object.
void setIgnoreSameValue(bool isIgnore=true)
Set skipping of equal value.
void setUncrossed(bool isUncrossed=true)
Set a Bidirectional item as Uncrossed.
Arn::ObjectMode getMode() const
Use with care, link must be "referenced" before use, otherwise it might have been deleted...
int toInt(bool *isOk=arnNullptr) const
uint itemId() const
Get the id for this ArnItem.
bool isIgnoreSameValue() const
ARNREAL toReal(bool *isOk=arnNullptr) const
QByteArray toByteArray(bool *isOk=arnNullptr) const
void addValue(int value)
AtomicOp adds an integer to an Arn Data Object
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
Assigning same value gives default action set in ArnM or ArnItem.
ArnBasicItem & operator+=(int val)
QVariant toVariant(bool *isOk=arnNullptr) const
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
bool isAutoDestroy() const
ArnBasicItem & setAutoDestroy()
Set client session sync mode as AutoDestroy for this ArnItem.
double toDouble(bool *isOk=arnNullptr) const
uint linkId() const
Get the id for this Arn Data Object
qint64 toInt64(bool *isOk=arnNullptr) const
#define ARNLIBSHARED_EXPORT
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.
ArnBasicItem & operator=(const ArnBasicItem &other)
QObject * eventHandler() const
Get the event handler of this ArnBasicItem.
void setEventHandler(QObject *eventHandler)
Set event handler for this ArnBasicItem.
Base class handle for an Arn Data Object.