ArnLib  4.0.x
Active Registry Network
ArnItem Class Reference

Handle for an Arn Data Object. More...

#include <ArnItem.hpp>

Inheritance diagram for ArnItem:
Collaboration diagram for ArnItem:

Public Slots

void setValue (int value)
 Assign an integer to an Arn Data Object More...
 
void setValue (double value)
 Assign an ARNREAL to an Arn Data Object More...
 
void setValue (bool value)
 Assign a bool to an Arn Data Object More...
 
void setValue (const QString &value)
 Assign a QString to an Arn Data Object More...
 
void setValue (const QByteArray &value)
 Assign a QByteArray to an Arn Data Object More...
 
void setValue (const QVariant &value)
 Assign a QVariant to an Arn Data Object More...
 
void setValue (const char *value)
 Assign a char* to an Arn Data Object More...
 
void toggleBool ()
 Toggle the bool at the Arn Data Object More...
 

Signals

void changed ()
 Signals emitted when data in Arn Data Object is changed. More...
 
void changed (int value)
 
void changed (double value)
 
void changed (bool value)
 
void changed (const QString &value)
 
void changed (const QByteArray &value)
 
void changed (const QVariant &value)
 
void modeChanged (Arn::ObjectMode mode)
 Signal emitted when mode in Arn Data Object is changed. More...
 
void arnItemCreated (const QString &path)
 Signal emitted when an Arn Data Object is created in the tree below. More...
 
void arnModeChanged (const QString &path, uint linkId, Arn::ObjectMode mode)
 Signal emitted when an Arn Data Object in the tree below has a general mode change. More...
 
- Signals inherited from ArnItemB
void arnLinkDestroyed ()
 Signal emitted when the Arn Data Object is destroyed. More...
 

Public Member Functions

 ArnItem (QObject *parent=arnNullptr)
 Standard constructor of a closed handle. More...
 
 ArnItem (const QString &path, QObject *parent=arnNullptr)
 Construction of a handle to a path. More...
 
 ArnItem (const ArnItem &itemTemplate, const QString &path, QObject *parent=arnNullptr)
 Construction of a handle to a path with a template for modes More...
 
virtual ~ArnItem ()
 
bool openUuid (const QString &path)
 Open a handle to an Arn Object with a unique uuid name. More...
 
bool openUuidPipe (const QString &path)
 Open a handle to an Arn Pipe Object with a unique uuid name. More...
 
bool openFolder (const QString &path)
 Open a handle to an Arn folder. More...
 
bool isFolder () const
 
bool isProvider () const
 
Arn::DataType type () const
 The type stored in the Arn Data Object More...
 
void setIgnoreSameValue (bool isIgnore=true)
 Set skipping assignment of equal value. More...
 
bool isIgnoreSameValue ()
 
void addMode (Arn::ObjectMode mode)
 Add general mode settings for this Arn Data Object More...
 
Arn::ObjectMode getMode () const
 
Arn::ObjectSyncMode syncMode () const
 
ArnItemsetTemplate (bool isTemplate=true)
 Mark this ArnItem as a template. More...
 
bool isTemplate () const
 
ArnItemsetBiDirMode ()
 Set general mode as Bidirectional for this Arn Data Object More...
 
bool isBiDirMode () const
 
ArnItemsetPipeMode ()
 Set general mode as Pipe for this Arn Data Object More...
 
bool isPipeMode () const
 
ArnItemsetSaveMode ()
 Set general mode as Save for this Arn Data Object More...
 
bool isSaveMode () const
 
ArnItemsetMaster ()
 Set client session sync mode as Master for this ArnItem. More...
 
bool isMaster () const
 
ArnItemsetAutoDestroy ()
 Set client session sync mode as AutoDestroy for this ArnItem. More...
 
bool isAutoDestroy () const
 
void setUncrossed (bool isUncrossed=true)
 Set a Bidirectional item as Uncrossed. More...
 
bool isUncrossed () const
 Get the Uncrossed state of an object. More...
 
void setBlockEcho (bool blockEcho=true)
 Control echo cancellation for this item. More...
 
void setDelay (int delay)
 Set delay of data changed signal. More...
 
int delay () const
 Get delay of data changed signal. More...
 
bool isDelayPending () const
 
void bypassDelayPending ()
 
void arnImport (const QByteArray &data, int ignoreSame=Arn::SameValue::DefaultAction)
 Import data to an Arn Data Object More...
 
QByteArray arnExport () const
 
int toInt (bool *isOk=arnNullptr) const
 
double toDouble (bool *isOk=arnNullptr) const
 
ARNREAL toReal (bool *isOk=arnNullptr) const
 
bool toBool (bool *isOk=arnNullptr) const
 
QString toString (bool *isOk=arnNullptr) const
 
QByteArray toByteArray (bool *isOk=arnNullptr) const
 
QVariant toVariant (bool *isOk=arnNullptr) const
 
uint toUInt (bool *isOk=arnNullptr) const
 
qint64 toInt64 (bool *isOk=arnNullptr) const
 
quint64 toUInt64 (bool *isOk=arnNullptr) const
 
ArnItemoperator= (const ArnItem &other)
 
ArnItemoperator= (int val)
 
ArnItemoperator= (ARNREAL other)
 
ArnItemoperator= (const QString &val)
 
ArnItemoperator= (const QByteArray &val)
 
ArnItemoperator= (const QVariant &val)
 
ArnItemoperator= (const char *val)
 
ArnItemoperator= (uint val)
 
ArnItemoperator= (qint64 val)
 
ArnItemoperator= (quint64 val)
 
ArnItemoperator+= (int val)
 
ArnItemoperator+= (ARNREAL val)
 
void setValue (const ArnItem &other, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign the value of an other ArnItem to an Arn Data Object More...
 
void setValue (uint value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign an unsigned int to an Arn Data Object More...
 
void setValue (qint64 value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign an int 64 bit to an Arn Data Object More...
 
void setValue (quint64 value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign an unsigned int 64 bit to an Arn Data Object More...
 
void setValue (int value, int ignoreSame)
 Assign an integer to an Arn Data Object More...
 
void setValue (double value, int ignoreSame)
 Assign an ARNREAL to an Arn Data Object More...
 
void setValue (bool value, int ignoreSame)
 Assign a bool to an Arn Data Object More...
 
void setValue (const QString &value, int ignoreSame)
 Assign a QString to an Arn Data Object More...
 
void setValue (const QByteArray &value, int ignoreSame)
 Assign a QByteArray to an Arn Data Object More...
 
void setValue (const QVariant &value, int ignoreSame)
 Assign a QVariant to an Arn Data Object More...
 
void setValue (const char *value, int ignoreSame)
 Assign a char* to an Arn Data Object More...
 
void setBits (int mask, int value, int ignoreSame=Arn::SameValue::DefaultAction)
 AtomicOp assign an integer to specified bits in an Arn Data Object More...
 
void addValue (int value)
 AtomicOp adds an integer to an Arn Data Object More...
 
void addValue (ARNREAL value)
 AtomicOp adds an ARNREAL to an Arn Data Object More...
 
- Public Member Functions inherited from ArnItemB
 ArnItemB (QObject *parent=arnNullptr)
 Standard constructor of a closed handle. More...
 
virtual ~ArnItemB ()
 
bool open (const QString &path)
 Open a handle to an Arn Data Object More...
 
- Public Member Functions inherited from ArnBasicItem
 ArnBasicItem ()
 Standard constructor of a closed handle. More...
 
virtual ~ArnBasicItem ()
 
bool open (const QString &path)
 Open a handle to an Arn Data Object More...
 
void close ()
 Close the handle. More...
 
void destroyLink (bool isGlobal=true)
 Destroy the Arn Data Object More...
 
void destroyLinkLocal ()
 Destroy the local Arn Data Object More...
 
bool isOpen () const
 State of the handle. More...
 
QString path (Arn::NameF nameF=Arn::NameF::EmptyOk) const
 Path of the Arn Data Object More...
 
QString name (Arn::NameF nameF) const
 Name of the Arn Data Object More...
 
void setReference (void *reference)
 Set an associated external reference. More...
 
void * reference () const
 Get the stored external reference. More...
 
uint itemId () const
 Get the id for this ArnItem. More...
 
uint linkId () const
 Get the id for this Arn Data Object More...
 
int refCount () const
 Get the number of refs to this Arn Data Object More...
 
bool isFolder () const
 
bool isProvider () const
 
Arn::DataType type () const
 The type stored in the Arn Data Object More...
 
void setIgnoreSameValue (bool isIgnore=true)
 Set skipping of equal value. More...
 
bool isIgnoreSameValue () const
 
void addMode (Arn::ObjectMode mode)
 Add general mode settings for this Arn Data Object More...
 
Arn::ObjectMode getMode () const
 Use with care, link must be "referenced" before use, otherwise it might have been deleted. More...
 
Arn::ObjectSyncMode syncMode () const
 
ArnBasicItemsetBiDirMode ()
 Set general mode as Bidirectional for this Arn Data Object More...
 
bool isBiDirMode () const
 
ArnBasicItemsetPipeMode ()
 Set general mode as Pipe for this Arn Data Object More...
 
bool isPipeMode () const
 
ArnBasicItemsetSaveMode ()
 Set general mode as Save for this Arn Data Object More...
 
bool isSaveMode () const
 
void setAtomicOpProvider ()
 Set this Arn Data Object as Atomic Operator Provider More...
 
bool isAtomicOpProvider () const
 
ArnBasicItemsetMaster ()
 Set client session sync mode as Master for this ArnItem. More...
 
bool isMaster () const
 
ArnBasicItemsetAutoDestroy ()
 Set client session sync mode as AutoDestroy for this ArnItem. More...
 
bool isAutoDestroy () const
 
void arnImport (const QByteArray &data, int ignoreSame=Arn::SameValue::DefaultAction)
 Import data to an Arn Data Object More...
 
QByteArray arnExport () const
 
int toInt (bool *isOk=arnNullptr) const
 
double toDouble (bool *isOk=arnNullptr) const
 
ARNREAL toReal (bool *isOk=arnNullptr) const
 
QString toString (bool *isOk=arnNullptr) const
 
QByteArray toByteArray (bool *isOk=arnNullptr) const
 
QVariant toVariant (bool *isOk=arnNullptr) const
 
bool toBool (bool *isOk=arnNullptr) const
 
uint toUInt (bool *isOk=arnNullptr) const
 
qint64 toInt64 (bool *isOk=arnNullptr) const
 
quint64 toUInt64 (bool *isOk=arnNullptr) const
 
ArnBasicItemoperator= (const ArnBasicItem &other)
 
ArnBasicItemoperator= (int val)
 
ArnBasicItemoperator= (ARNREAL val)
 
ArnBasicItemoperator= (const QString &val)
 
ArnBasicItemoperator= (const QByteArray &val)
 
ArnBasicItemoperator= (const QVariant &val)
 
ArnBasicItemoperator= (const char *val)
 
ArnBasicItemoperator= (uint val)
 
ArnBasicItemoperator= (qint64 val)
 
ArnBasicItemoperator= (quint64 val)
 
ArnBasicItemoperator+= (int val)
 
ArnBasicItemoperator+= (ARNREAL val)
 
void setValue (const ArnBasicItem &other, int ignoreSame=Arn::SameValue::DefaultAction)
 
void setValue (int value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign an integer to an Arn Data Object More...
 
void setValue (ARNREAL value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign an ARNREAL to an Arn Data Object More...
 
void setValue (bool value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign a bool to an Arn Data Object More...
 
void setValue (const QString &value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign a QString to an Arn Data Object More...
 
void setValue (const QByteArray &value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign a QByteArray to an Arn Data Object More...
 
void setValue (const QVariant &value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign a QVariant to an Arn Data Object More...
 
void setValue (const char *value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign a char* to an Arn Data Object More...
 
void setValue (uint value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign an unsigned int to an Arn Data Object More...
 
void setValue (qint64 value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign an int 64 bit to an Arn Data Object More...
 
void setValue (quint64 value, int ignoreSame=Arn::SameValue::DefaultAction)
 Assign an unsigned int 64 bit to an Arn Data Object More...
 
void setBits (int mask, int value, int ignoreSame=Arn::SameValue::DefaultAction)
 AtomicOp assign an integer to specified bits in an Arn Data Object More...
 
void addValue (int value)
 AtomicOp adds an integer to an Arn Data Object More...
 
void addValue (ARNREAL value)
 AtomicOp adds an ARNREAL to an Arn Data Object More...
 
QThread * thread () const
 Get the thread affinity of this ArnBasicItem. More...
 
void setEventHandler (QObject *eventHandler)
 Set event handler for this ArnBasicItem. More...
 
QObject * eventHandler () const
 Get the event handler of this ArnBasicItem. More...
 
void setUncrossed (bool isUncrossed=true)
 Set a Bidirectional item as Uncrossed. More...
 
bool isUncrossed () const
 Get the Uncrossed state of an object. More...
 
bool isAssigning () const
 Tells if this ArnItem is assigned right now. More...
 
- Public Member Functions inherited from ArnCoreItem
 ArnCoreItem ()
 Standard constructor of a closed handle. More...
 
virtual ~ArnCoreItem ()
 
QThread * thread () const
 Get the thread affinity of this ArnCoreItem. More...
 

Detailed Description

Handle for an Arn Data Object.

About ArnItem access

See ArnBasicItem.

When opening an ArnItem to an Arn Data object, the ArnItem act as a handle (pointer) to the object. There can be any amount of ArnItem:s opened (pointing) to the same Arn Data object. Deleting the ArnItem won't effect the Arn Data object.

This class is not thread-safe, but the Arn Data object is, so each thread should have it's own handles i.e ArnItem instances.

Example usage

// In class declare
ArnItem _arnTime;
// In class code
_arnTime.open("//Chat/Time/value");
connect( &_arnTime, SIGNAL(changed(QString)), this, SLOT(doTimeUpdate(QString)));
_arnTime = "Undefined ...";
Examples:
ArnDemoChat/MainWindow.hpp, ArnDemoChatServer/MainWindow.cpp, and ArnDemoChatServer/MainWindow.hpp.

Definition at line 72 of file ArnItem.hpp.

Constructor & Destructor Documentation

◆ ArnItem() [1/3]

ArnItem::ArnItem ( QObject *  parent = arnNullptr)

Standard constructor of a closed handle.

Parameters
[in]parent

Definition at line 109 of file ArnItem.cpp.

◆ ArnItem() [2/3]

ArnItem::ArnItem ( const QString &  path,
QObject *  parent = arnNullptr 
)

Construction of a handle to a path.

Parameters
[in]pathThe Arn Data Object path e.g. "//Measure/Water/Level/value"
[in]parent
See also
open()

Definition at line 116 of file ArnItem.cpp.

◆ ArnItem() [3/3]

ArnItem::ArnItem ( const ArnItem itemTemplate,
const QString &  path,
QObject *  parent = arnNullptr 
)

Construction of a handle to a path with a template for modes

Parameters
[in]itemTemplateThe template for setting modes
[in]pathThe Arn Data Object path e.g. "//Measure/Water/Level/value"
[in]parent

Definition at line 124 of file ArnItem.cpp.

◆ ~ArnItem()

ArnItem::~ArnItem ( )
virtual

Definition at line 545 of file ArnItem.cpp.

Member Function Documentation

◆ addMode()

void ArnItem::addMode ( Arn::ObjectMode  mode)
inline

Add general mode settings for this Arn Data Object

If this ArnItem is in closed state, the added modes will be stored and the real mode change is done when this ArnItem is opened to an Arn Data Object. This implies that ArnItems can benefit from setting modes before opening.

Parameters
[in]modeThe modes to be added.
See also
getMode()
Modes

Definition at line 159 of file ArnItem.hpp.

◆ addValue() [1/2]

void ArnItem::addValue ( int  value)
inline

AtomicOp adds an integer to an Arn Data Object

Operation is done atomicly. If bidir, it can also be done remotely by an AtomicOpProvider

Parameters
[in]valueto be added to this Arn Data Object
See also
setAtomicOpProvider()

Definition at line 548 of file ArnItem.hpp.

◆ addValue() [2/2]

void ArnItem::addValue ( ARNREAL  value)
inline

AtomicOp adds an ARNREAL to an Arn Data Object

Operation is done atomicly. If bidir, it can also be done remotely by an AtomicOpProvider

Parameters
[in]valueto be added to this Arn Data Object
See also
setAtomicOpProvider()

Definition at line 557 of file ArnItem.hpp.

◆ arnExport()

QByteArray ArnItem::arnExport ( ) const
inline
Returns
A data blob representing the Arn Data Object
See also
arnImport()

Definition at line 345 of file ArnItem.hpp.

◆ arnImport()

void ArnItem::arnImport ( const QByteArray &  data,
int  ignoreSame = Arn::SameValue::DefaultAction 
)
inline

Import data to an Arn Data Object

Data blob from a previos arnExport() can be imported. This is essentially assigning the Arn Data Object with same as exported.

Parameters
[in]datais the data blob
[in]ignoreSamecan override default ignoreSameValue setting.
See also
arnExport()
setIgnoreSameValue()

Definition at line 339 of file ArnItem.hpp.

◆ arnItemCreated

void ArnItem::arnItemCreated ( const QString &  path)
signal

Signal emitted when an Arn Data Object is created in the tree below.

The ArnItem is a folder. Created objects in this folder or its children will give this signal. Only created non folder objects will give this signal.

Parameters
[in]pathto the created Arn Data Object
Deprecated:
use ArnMonitor instead.

◆ arnModeChanged

void ArnItem::arnModeChanged ( const QString &  path,
uint  linkId,
Arn::ObjectMode  mode 
)
signal

Signal emitted when an Arn Data Object in the tree below has a general mode change.

The ArnItem is a folder. Objects changing general mode in this folder or its children will give this signal.

Parameters
[in]pathto the general mode changing Arn Data Object
[in]linkIdfor the general mode changing Arn Data Object
[in]modeis the new general mode
See also
linkId()
Modes
Deprecated:
use ArnMonitor instead.

◆ bypassDelayPending()

void ArnItem::bypassDelayPending ( )

For delay pending, immediately signal changed If the changed signal is pending in a delay, the changed signal is immediately emitted and the delay is canceled. Otherwise nothing is done.

See also
setDelay()
isDelayPending()

Definition at line 228 of file ArnItem.cpp.

◆ changed [1/7]

void ArnItem::changed ( )
signal

Signals emitted when data in Arn Data Object is changed.

Only the connected (used) signals are emitted for efficiency. When using pipes with queued connection to a slot, it's strongly advised to use the signal that carries the updated data. Otherwise some stream data can be lost and other will be doubled, because reading is done late in the slot.

changed(...) is using connectNotify & disconnectNotify. Must be updated if new types are added

See also
setIgnoreSameValue()

◆ changed [2/7]

void ArnItem::changed ( int  value)
signal
See also
changed()

◆ changed [3/7]

void ArnItem::changed ( double  value)
signal
See also
changed()

◆ changed [4/7]

void ArnItem::changed ( bool  value)
signal
See also
changed()

◆ changed [5/7]

void ArnItem::changed ( const QString &  value)
signal
See also
changed()

◆ changed [6/7]

void ArnItem::changed ( const QByteArray &  value)
signal
See also
changed()

◆ changed [7/7]

void ArnItem::changed ( const QVariant &  value)
signal
See also
changed()

◆ delay()

int ArnItem::delay ( ) const

Get delay of data changed signal.

Read current value of the delay.

Returns
the delay in ms.
See also
setDelay()

Definition at line 210 of file ArnItem.cpp.

◆ getMode()

Arn::ObjectMode ArnItem::getMode ( ) const
inline
Returns
The general mode of the Arn Data Object
See also
addMode()
Modes

Definition at line 166 of file ArnItem.hpp.

◆ isAutoDestroy()

bool ArnItem::isAutoDestroy ( ) const
inline
Return values
trueif AutoDestroy mode
See also
setAutoDestroy()

Definition at line 264 of file ArnItem.hpp.

◆ isBiDirMode()

bool ArnItem::isBiDirMode ( ) const
inline
Return values
trueif Bidirectional
See also
setBiDirMode()
Modes
Bidirectional Arn Data Objects

Definition at line 203 of file ArnItem.hpp.

◆ isDelayPending()

bool ArnItem::isDelayPending ( ) const

Delay pending status

Return values
trueif the Arn Data Object is changed, but the changed signal is pending in a delay.
See also
setDelay()
bypassDelayPending()

Definition at line 220 of file ArnItem.cpp.

◆ isFolder()

bool ArnItem::isFolder ( ) const
inline
Return values
trueif this ArnItem is a folder

Definition at line 122 of file ArnItem.hpp.

◆ isIgnoreSameValue()

bool ArnItem::isIgnoreSameValue ( )
inline
Return values
trueif skipping equal values
See also
setIgnoreSameValue()

Definition at line 147 of file ArnItem.hpp.

◆ isMaster()

bool ArnItem::isMaster ( ) const
inline
Return values
trueif Master mode
See also
setMaster()
Modes

Definition at line 251 of file ArnItem.hpp.

◆ isPipeMode()

bool ArnItem::isPipeMode ( ) const
inline
Return values
trueif Pipe mode
See also
setPipeMode()
Modes
Pipe Arn Data Objects

Definition at line 219 of file ArnItem.hpp.

◆ isProvider()

bool ArnItem::isProvider ( ) const
inline
Return values
trueif this ArnItem is a provider
See also
setBiDirMode()
Modes

Definition at line 129 of file ArnItem.hpp.

◆ isSaveMode()

bool ArnItem::isSaveMode ( ) const
inline
Return values
trueif Save mode
See also
setSaveMode()
Modes
Persistent Arn Data Objects

Definition at line 236 of file ArnItem.hpp.

◆ isTemplate()

bool ArnItem::isTemplate ( ) const
Return values
trueif this is a template
See also
setTemplate()

Definition at line 191 of file ArnItem.cpp.

◆ isUncrossed()

bool ArnItem::isUncrossed ( ) const
inline

Get the Uncrossed state of an object.

Return values
trueif Uncrossed is set or Arn Data Object is not in Bidirectional mode.
See also
setUncrossed()
setBiDirMode()
Modes
Bidirectional Arn Data Objects

Definition at line 285 of file ArnItem.hpp.

◆ modeChanged

void ArnItem::modeChanged ( Arn::ObjectMode  mode)
signal

Signal emitted when mode in Arn Data Object is changed.

Object changing general mode will give this signal.

Parameters
[in]modeis the new general mode
See also
Modes

◆ openFolder()

bool ArnItem::openFolder ( const QString &  path)
inline

Open a handle to an Arn folder.

Parameters
[in]pathThe Arn folder path e.g. "//Measure/Water" (the / is appended)
Return values
falseif error

Definition at line 117 of file ArnItem.hpp.

◆ openUuid()

bool ArnItem::openUuid ( const QString &  path)
inline

Open a handle to an Arn Object with a unique uuid name.

Parameters
[in]pathThe prefix for Arn uuid path e.g. "//Names/name"
Return values
falseif error

Definition at line 103 of file ArnItem.hpp.

◆ openUuidPipe()

bool ArnItem::openUuidPipe ( const QString &  path)
inline

Open a handle to an Arn Pipe Object with a unique uuid name.

Parameters
[in]pathThe prefix for Arn uuid pipe path e.g. "//Pipes/pipe"
Return values
falseif error

Definition at line 110 of file ArnItem.hpp.

◆ operator+=() [1/2]

ArnItem & ArnItem::operator+= ( int  val)

Definition at line 306 of file ArnItem.cpp.

◆ operator+=() [2/2]

ArnItem & ArnItem::operator+= ( ARNREAL  val)

Definition at line 313 of file ArnItem.cpp.

◆ operator=() [1/10]

ArnItem & ArnItem::operator= ( const ArnItem other)

Definition at line 236 of file ArnItem.cpp.

◆ operator=() [2/10]

ArnItem & ArnItem::operator= ( int  val)

Definition at line 243 of file ArnItem.cpp.

◆ operator=() [3/10]

ArnItem & ArnItem::operator= ( ARNREAL  other)

Definition at line 250 of file ArnItem.cpp.

◆ operator=() [4/10]

ArnItem & ArnItem::operator= ( const QString &  val)

Definition at line 257 of file ArnItem.cpp.

◆ operator=() [5/10]

ArnItem & ArnItem::operator= ( const QByteArray &  val)

Definition at line 264 of file ArnItem.cpp.

◆ operator=() [6/10]

ArnItem & ArnItem::operator= ( const QVariant &  val)

Definition at line 299 of file ArnItem.cpp.

◆ operator=() [7/10]

ArnItem & ArnItem::operator= ( const char *  val)

Definition at line 271 of file ArnItem.cpp.

◆ operator=() [8/10]

ArnItem & ArnItem::operator= ( uint  val)

Definition at line 278 of file ArnItem.cpp.

◆ operator=() [9/10]

ArnItem & ArnItem::operator= ( qint64  val)

Definition at line 285 of file ArnItem.cpp.

◆ operator=() [10/10]

ArnItem & ArnItem::operator= ( quint64  val)

Definition at line 292 of file ArnItem.cpp.

◆ setAutoDestroy()

ArnItem& ArnItem::setAutoDestroy ( )
inline

Set client session sync mode as AutoDestroy for this ArnItem.

This ArnItem at client side is setup for auto destruction.

Precondition
This must be set before open().

Definition at line 258 of file ArnItem.hpp.

◆ setBiDirMode()

ArnItem& ArnItem::setBiDirMode ( )
inline

Set general mode as Bidirectional for this Arn Data Object

A two way object, typically for validation or pipe

See also
Modes
Bidirectional Arn Data Objects

Definition at line 195 of file ArnItem.hpp.

◆ setBits()

void ArnItem::setBits ( int  mask,
int  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)
inline

AtomicOp assign an integer to specified bits in an Arn Data Object

Operation is done atomicly. If bidir, it can also be done remotely by an AtomicOpProvider

Parameters
[in]maskto specify bits that is affected
[in]valueto be assigned to affected bits
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setAtomicOpProvider()
setIgnoreSameValue()

Definition at line 539 of file ArnItem.hpp.

◆ setBlockEcho()

void ArnItem::setBlockEcho ( bool  blockEcho = true)
inline

Control echo cancellation for this item.

When an ArnObject is changed via this item, the changed() signal on this item can be blocked.

Parameters
[in]blockEchoif true echo is blocked.

Definition at line 293 of file ArnItem.hpp.

◆ setDelay()

void ArnItem::setDelay ( int  delay)

Set delay of data changed signal.

Normally any change of the Arn Data Object is immediately signalled. By setting this delay, intensive updates gives predictive and fewer signals. Signalling will not be faster than delay as period time. The latency from a change to a signal will not be more than delay.

Parameters
[in]delayin ms.
See also
delay()
isDelayPending()
bypassDelayPending()

Definition at line 199 of file ArnItem.cpp.

◆ setIgnoreSameValue()

void ArnItem::setIgnoreSameValue ( bool  isIgnore = true)
inline

Set skipping assignment of equal value.

Parameters
[in]isIgnoreIf true, assignment of equal value don't give a changed signal.

Definition at line 141 of file ArnItem.hpp.

◆ setMaster()

ArnItem& ArnItem::setMaster ( )
inline

Set client session sync mode as Master for this ArnItem.

This ArnItem at client side is set as default generator of data.

Precondition
This must be set before open().
See also
Modes

Definition at line 244 of file ArnItem.hpp.

◆ setPipeMode()

ArnItem& ArnItem::setPipeMode ( )
inline

Set general mode as Pipe for this Arn Data Object

Implies Bidir.

See also
Modes
Pipe Arn Data Objects

Definition at line 211 of file ArnItem.hpp.

◆ setSaveMode()

ArnItem& ArnItem::setSaveMode ( )
inline

Set general mode as Save for this Arn Data Object

Data is persistent and will be saved

Precondition
The persistent service must be started at the server.
See also
Modes
Persistent Arn Data Objects

Definition at line 228 of file ArnItem.hpp.

◆ setTemplate()

ArnItem & ArnItem::setTemplate ( bool  isTemplate = true)

Mark this ArnItem as a template.

When marked as a template it can be setup with a combination of modes which are used for other ArnItems using this template. The effected modes can be both general modes and sync modes.

Parameters
[in]isTemplateTrue for template mode.
See also
open()
Modes

Definition at line 182 of file ArnItem.cpp.

◆ setUncrossed()

void ArnItem::setUncrossed ( bool  isUncrossed = true)
inline

Set a Bidirectional item as Uncrossed.

The two way object is not twisted at writes, i.e. exactly the same object is read and written. This has no effect on an Arn Data Object that not is in Bidirectional mode.

See also
isUncrossed()
Modes
Bidirectional Arn Data Objects

Definition at line 275 of file ArnItem.hpp.

◆ setValue() [1/18]

void ArnItem::setValue ( const ArnItem other,
int  ignoreSame = Arn::SameValue::DefaultAction 
)
inline

Assign the value of an other ArnItem to an Arn Data Object

Parameters
[in]otheris the ArnItem containing the value to assign
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()

Definition at line 440 of file ArnItem.hpp.

◆ setValue() [2/18]

void ArnItem::setValue ( uint  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)
inline

Assign an unsigned int to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()
Note
Not native ARN datatype. ByteArray is assigned.

Definition at line 449 of file ArnItem.hpp.

◆ setValue() [3/18]

void ArnItem::setValue ( qint64  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)
inline

Assign an int 64 bit to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()
Note
Not native ARN datatype. ByteArray is assigned.

Definition at line 458 of file ArnItem.hpp.

◆ setValue() [4/18]

void ArnItem::setValue ( quint64  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)
inline

Assign an unsigned int 64 bit to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()
Note
Not native ARN datatype. ByteArray is assigned.

Definition at line 467 of file ArnItem.hpp.

◆ setValue() [5/18]

void ArnItem::setValue ( int  value,
int  ignoreSame 
)
inline

Assign an integer to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()

Definition at line 475 of file ArnItem.hpp.

◆ setValue() [6/18]

void ArnItem::setValue ( double  value,
int  ignoreSame 
)
inline

Assign an ARNREAL to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()

Definition at line 486 of file ArnItem.hpp.

◆ setValue() [7/18]

void ArnItem::setValue ( bool  value,
int  ignoreSame 
)
inline

Assign a bool to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()

Definition at line 495 of file ArnItem.hpp.

◆ setValue() [8/18]

void ArnItem::setValue ( const QString &  value,
int  ignoreSame 
)
inline

Assign a QString to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()

Definition at line 503 of file ArnItem.hpp.

◆ setValue() [9/18]

void ArnItem::setValue ( const QByteArray &  value,
int  ignoreSame 
)
inline

Assign a QByteArray to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()

Definition at line 511 of file ArnItem.hpp.

◆ setValue() [10/18]

void ArnItem::setValue ( const QVariant &  value,
int  ignoreSame 
)
inline

Assign a QVariant to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()

Definition at line 519 of file ArnItem.hpp.

◆ setValue() [11/18]

void ArnItem::setValue ( const char *  value,
int  ignoreSame 
)
inline

Assign a char* to an Arn Data Object

Parameters
[in]valueto be assigned
[in]ignoreSamecan override default ignoreSameValue setting.
See also
setIgnoreSameValue()

Definition at line 527 of file ArnItem.hpp.

◆ setValue [12/18]

void ArnItem::setValue ( int  value)
inlineslot

Assign an integer to an Arn Data Object

Parameters
[in]valueto be assigned
See also
setIgnoreSameValue()

Definition at line 565 of file ArnItem.hpp.

◆ setValue [13/18]

void ArnItem::setValue ( double  value)
inlineslot

Assign an ARNREAL to an Arn Data Object

Parameters
[in]valueto be assigned
See also
setIgnoreSameValue()

Definition at line 575 of file ArnItem.hpp.

◆ setValue [14/18]

void ArnItem::setValue ( bool  value)
inlineslot

Assign a bool to an Arn Data Object

Parameters
[in]valueto be assigned
See also
setIgnoreSameValue()

Definition at line 583 of file ArnItem.hpp.

◆ setValue [15/18]

void ArnItem::setValue ( const QString &  value)
inlineslot

Assign a QString to an Arn Data Object

Parameters
[in]valueto be assigned
See also
setIgnoreSameValue()

Definition at line 590 of file ArnItem.hpp.

◆ setValue [16/18]

void ArnItem::setValue ( const QByteArray &  value)
inlineslot

Assign a QByteArray to an Arn Data Object

Parameters
[in]valueto be assigned
See also
setIgnoreSameValue()

Definition at line 597 of file ArnItem.hpp.

◆ setValue [17/18]

void ArnItem::setValue ( const QVariant &  value)
inlineslot

Assign a QVariant to an Arn Data Object

Parameters
[in]valueto be assigned
See also
setIgnoreSameValue()

Definition at line 604 of file ArnItem.hpp.

◆ setValue [18/18]

void ArnItem::setValue ( const char *  value)
inlineslot

Assign a char* to an Arn Data Object

Parameters
[in]valueto be assigned
See also
setIgnoreSameValue()

Definition at line 611 of file ArnItem.hpp.

◆ syncMode()

Arn::ObjectSyncMode ArnItem::syncMode ( ) const
inline
Returns
The client session sync mode of an Arn Data Object
See also
Modes

Definition at line 172 of file ArnItem.hpp.

◆ toBool()

bool ArnItem::toBool ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to a bool
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.

Definition at line 373 of file ArnItem.hpp.

◆ toByteArray()

QByteArray ArnItem::toByteArray ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to a QByteArray
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.

Definition at line 387 of file ArnItem.hpp.

◆ toDouble()

double ArnItem::toDouble ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to a double
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.

Definition at line 359 of file ArnItem.hpp.

◆ toggleBool

void ArnItem::toggleBool ( )
slot

Toggle the bool at the Arn Data Object

The Arn Data Object is first converted to a bool, then the toggled value is assigned back to the Arn Data Object.

Definition at line 320 of file ArnItem.cpp.

◆ toInt()

int ArnItem::toInt ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to a integer
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.

Definition at line 352 of file ArnItem.hpp.

◆ toInt64()

qint64 ArnItem::toInt64 ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to an int 64 bit
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.
Note
Not native ARN datatype. It's converted from ByteArray.

Definition at line 410 of file ArnItem.hpp.

◆ toReal()

ARNREAL ArnItem::toReal ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to an ARNREAL
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.

Definition at line 366 of file ArnItem.hpp.

◆ toString()

QString ArnItem::toString ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to a QString
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.

Definition at line 380 of file ArnItem.hpp.

◆ toUInt()

uint ArnItem::toUInt ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to an unsigned int
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.
Note
Not native ARN datatype. It's converted from ByteArray.

Definition at line 402 of file ArnItem.hpp.

◆ toUInt64()

quint64 ArnItem::toUInt64 ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to an unsigned int 64 bit
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.
Note
Not native ARN datatype. It's converted from ByteArray.

Definition at line 418 of file ArnItem.hpp.

◆ toVariant()

QVariant ArnItem::toVariant ( bool *  isOk = arnNullptr) const
inline
Returns
Convert Arn Data Object to a QVariant
Parameters
[out]isOkIf not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true.

Definition at line 394 of file ArnItem.hpp.

◆ type()

Arn::DataType ArnItem::type ( ) const
inline

The type stored in the Arn Data Object

Returns
The type stored

Definition at line 135 of file ArnItem.hpp.


The documentation for this class was generated from the following files: