ArnLib  4.0.x
Active Registry Network
ArnBasicItem Class Reference

Base class handle for an Arn Data Object. More...

#include <ArnBasicItem.hpp>

Inheritance diagram for ArnBasicItem:
Collaboration diagram for ArnBasicItem:

Public Member Functions

 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...
 

Friends

class ArnBasicItemEventHandler
 

Detailed Description

Base class handle for an Arn Data Object.

About ArnItem access

See ArnItem.

ArnBasicItem is the basic way to get a handle (pointer) for accessing an Arn Data Object. It is fast, small and is not based on QObject. As such it can not use signals and slots, but it can provide ArnEvents (based on QEvents) to be sent to any QObject based receiver.

There can be any amount of ArnBasicItem:s opened (pointing) to the same Arn Data object. Deleting the ArnBasicItem 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 ArnBasicItem instances.

Example usage

// In class declare
ArnBasicItem _arnTime;
MyReceiver _myRec; // QObject derived
// In class code
_arnTime.open("//Chat/Time/value");
_arnTime.setEventHandler( &_myRec);
_arnTime = "Undefined ...";
void MyReceiver::customEvent( QEvent* ev)
{
// Is setup as ArnEvent handler for my ArnBasicItem.
// Handler must finish with ArnBasicItemEventHandler::defaultEvent( ev).
int evIdx = ev->type() - ArnEvent::baseType();
switch (evIdx) {
{
ArnEvValueChange* e = static_cast<ArnEvValueChange*>( ev);
ArnBasicItem* item = static_cast<ArnBasicItem*>( e->target());
if (!item) break; // No target, deleted/closed ...
QByteArray val = e->valueData() ? *e->valueData() : item->toByteArray();
qDebug() << "MyReceiver ArnEvValueChange: inItemPath=" << item->path()
<< " value=" << val;
}
default:
break;
}
ArnBasicItemEventHandler::defaultEvent( ev);
}

Definition at line 120 of file ArnBasicItem.hpp.

Constructor & Destructor Documentation

◆ ArnBasicItem()

ArnBasicItem::ArnBasicItem ( )

Standard constructor of a closed handle.

Definition at line 92 of file ArnBasicItem.cpp.

◆ ~ArnBasicItem()

ArnBasicItem::~ArnBasicItem ( )
virtual

Definition at line 106 of file ArnBasicItem.cpp.

Member Function Documentation

◆ addMode()

void ArnBasicItem::addMode ( Arn::ObjectMode  mode)

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 421 of file ArnBasicItem.cpp.

◆ addValue() [1/2]

void ArnBasicItem::addValue ( int  value)

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 1101 of file ArnBasicItem.cpp.

◆ addValue() [2/2]

void ArnBasicItem::addValue ( ARNREAL  value)

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 1116 of file ArnBasicItem.cpp.

◆ arnExport()

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

Definition at line 623 of file ArnBasicItem.cpp.

◆ arnImport()

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

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 512 of file ArnBasicItem.cpp.

◆ close()

void ArnBasicItem::close ( )

Close the handle.

Definition at line 153 of file ArnBasicItem.cpp.

◆ destroyLink()

void ArnBasicItem::destroyLink ( bool  isGlobal = true)

Destroy the Arn Data Object

The link (Arn Data Object) will be removed locally and optionally from server and all connected clients. Server is allways forcing global destroy.

Parameters
[in]isGlobalIf true, removes from server and all connected clients, otherwise only local link.
See also
destroyLinkLocal()

Definition at line 178 of file ArnBasicItem.cpp.

◆ destroyLinkLocal()

void ArnBasicItem::destroyLinkLocal ( )
inline

Destroy the local Arn Data Object

The link (Arn Data Object) will be removed locally. Server is allways forcing global destroy.

See also
destroyLink()

Definition at line 156 of file ArnBasicItem.hpp.

◆ eventHandler()

QObject * ArnBasicItem::eventHandler ( ) const

Get the event handler of this ArnBasicItem.

Returns
the event handler
See also
setEventHandler()
thread()

Definition at line 1209 of file ArnBasicItem.cpp.

◆ getMode()

Arn::ObjectMode ArnBasicItem::getMode ( ) const

Use with care, link must be "referenced" before use, otherwise it might have been deleted.

Returns
The general mode of the Arn Data Object
See also
addMode()
Modes

Definition at line 439 of file ArnBasicItem.cpp.

◆ isAssigning()

bool ArnBasicItem::isAssigning ( ) const

Tells if this ArnItem is assigned right now.

Typically used to stop endless recusion due to signal/slot direct call when assigned

Return values
trueif beeing assigned right now.

Definition at line 1233 of file ArnBasicItem.cpp.

◆ isAtomicOpProvider()

bool ArnBasicItem::isAtomicOpProvider ( ) const
Return values
trueif this is a Atomic Operator Provider
See also
setAtomicOpProvider()

Definition at line 379 of file ArnBasicItem.cpp.

◆ isAutoDestroy()

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

Definition at line 415 of file ArnBasicItem.cpp.

◆ isBiDirMode()

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

Definition at line 309 of file ArnBasicItem.cpp.

◆ isFolder()

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

Definition at line 190 of file ArnBasicItem.cpp.

◆ isIgnoreSameValue()

bool ArnBasicItem::isIgnoreSameValue ( ) const
Return values
trueif skipping equal values
See also
setIgnoreSameValue()

Definition at line 464 of file ArnBasicItem.cpp.

◆ isMaster()

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

Definition at line 398 of file ArnBasicItem.cpp.

◆ isOpen()

bool ArnBasicItem::isOpen ( ) const

State of the handle.

Return values
trueif this ArnItem is open

Definition at line 184 of file ArnBasicItem.cpp.

◆ isPipeMode()

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

Definition at line 338 of file ArnBasicItem.cpp.

◆ isProvider()

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

Definition at line 198 of file ArnBasicItem.cpp.

◆ isSaveMode()

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

Definition at line 360 of file ArnBasicItem.cpp.

◆ isUncrossed()

bool ArnBasicItem::isUncrossed ( ) const

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 1225 of file ArnBasicItem.cpp.

◆ itemId()

uint ArnBasicItem::itemId ( ) const

Get the id for this ArnItem.

The ArnItem id is unique within its running program. Even if 2 ArnItems are pointing to the same Arn Data Object, they have different item id.

Returns
id for this ArnItem
See also
linkId()

Definition at line 504 of file ArnBasicItem.cpp.

◆ linkId()

uint ArnBasicItem::linkId ( ) const

Get the id for this Arn Data Object

The link (Arn Data Object) id is unique within its running program. If 2 ArnItems are pointing to the same Arn Data Object, they have same link id.

Returns
Id for the Arn Data Object, 0 if closed
See also
itemId()

Definition at line 214 of file ArnBasicItem.cpp.

◆ name()

QString ArnBasicItem::name ( Arn::NameF  nameF) const

Name of the Arn Data Object

Parameters
[in]nameFThe format of the returned name
Returns
The object name

Definition at line 480 of file ArnBasicItem.cpp.

◆ open()

bool ArnBasicItem::open ( const QString &  path)

Open a handle to an Arn Data Object

Parameters
[in]pathThe Arn Data Object path e.g. "//Measure/Water/Level/value"
Return values
falseif error

Definition at line 147 of file ArnBasicItem.cpp.

◆ operator+=() [1/2]

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

Definition at line 827 of file ArnBasicItem.cpp.

◆ operator+=() [2/2]

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

Definition at line 834 of file ArnBasicItem.cpp.

◆ operator=() [1/10]

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

Definition at line 757 of file ArnBasicItem.cpp.

◆ operator=() [2/10]

ArnBasicItem & ArnBasicItem::operator= ( int  val)

Definition at line 764 of file ArnBasicItem.cpp.

◆ operator=() [3/10]

ArnBasicItem & ArnBasicItem::operator= ( ARNREAL  val)

Definition at line 771 of file ArnBasicItem.cpp.

◆ operator=() [4/10]

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

Definition at line 778 of file ArnBasicItem.cpp.

◆ operator=() [5/10]

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

Definition at line 785 of file ArnBasicItem.cpp.

◆ operator=() [6/10]

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

Definition at line 820 of file ArnBasicItem.cpp.

◆ operator=() [7/10]

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

Definition at line 792 of file ArnBasicItem.cpp.

◆ operator=() [8/10]

ArnBasicItem & ArnBasicItem::operator= ( uint  val)

Definition at line 799 of file ArnBasicItem.cpp.

◆ operator=() [9/10]

ArnBasicItem & ArnBasicItem::operator= ( qint64  val)

Definition at line 806 of file ArnBasicItem.cpp.

◆ operator=() [10/10]

ArnBasicItem & ArnBasicItem::operator= ( quint64  val)

Definition at line 813 of file ArnBasicItem.cpp.

◆ path()

QString ArnBasicItem::path ( Arn::NameF  nameF = Arn::NameF::EmptyOk) const

Path of the Arn Data Object

Parameters
[in]nameFThe format of the returned path
Returns
The object path

Definition at line 472 of file ArnBasicItem.cpp.

◆ refCount()

int ArnBasicItem::refCount ( ) const

Get the number of refs to this Arn Data Object

Returns
The number of refs for the Arn Data Object, -1 if closed

Definition at line 222 of file ArnBasicItem.cpp.

◆ reference()

void * ArnBasicItem::reference ( ) const

Get the stored external reference.

Returns
The associated external reference
See also
setReference()

Definition at line 496 of file ArnBasicItem.cpp.

◆ setAtomicOpProvider()

void ArnBasicItem::setAtomicOpProvider ( )

Set this Arn Data Object as Atomic Operator Provider

The atomic operation is performed at this object

Definition at line 370 of file ArnBasicItem.cpp.

◆ setAutoDestroy()

ArnBasicItem & ArnBasicItem::setAutoDestroy ( )

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 404 of file ArnBasicItem.cpp.

◆ setBiDirMode()

ArnBasicItem & ArnBasicItem::setBiDirMode ( )

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

Bidirectional-mode is the pair of value & provider

Definition at line 292 of file ArnBasicItem.cpp.

◆ setBits()

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

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 1075 of file ArnBasicItem.cpp.

◆ setEventHandler()

void ArnBasicItem::setEventHandler ( QObject *  eventHandler)

Set event handler for this ArnBasicItem.

The event handler must be QObject based

Parameters
[in]eventHandlerto be assigned
See also
eventHandler()
thread()

Definition at line 1200 of file ArnBasicItem.cpp.

◆ setIgnoreSameValue()

void ArnBasicItem::setIgnoreSameValue ( bool  isIgnore = true)

Set skipping of equal value.

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

Definition at line 456 of file ArnBasicItem.cpp.

◆ setMaster()

ArnBasicItem & ArnBasicItem::setMaster ( )

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 387 of file ArnBasicItem.cpp.

◆ setPipeMode()

ArnBasicItem & ArnBasicItem::setPipeMode ( )

Set general mode as Pipe for this Arn Data Object

Implies Bidir.

See also
Modes
Pipe Arn Data Objects

Definition at line 319 of file ArnBasicItem.cpp.

◆ setReference()

void ArnBasicItem::setReference ( void *  reference)

Set an associated external reference.

This is typically used when having many ArnItems changed signal connected to a common slot. The slot can then discover the signalling ArnItem:s associated structure for further processing.

Parameters
[in]referenceAny external structure or id.
See also
reference()

Definition at line 488 of file ArnBasicItem.cpp.

◆ setSaveMode()

ArnBasicItem & ArnBasicItem::setSaveMode ( )

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 348 of file ArnBasicItem.cpp.

◆ setUncrossed()

void ArnBasicItem::setUncrossed ( bool  isUncrossed = true)

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 1217 of file ArnBasicItem.cpp.

◆ setValue() [1/11]

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

Definition at line 841 of file ArnBasicItem.cpp.

◆ setValue() [2/11]

void ArnBasicItem::setValue ( int  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)

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 883 of file ArnBasicItem.cpp.

◆ setValue() [3/11]

void ArnBasicItem::setValue ( ARNREAL  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)

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 908 of file ArnBasicItem.cpp.

◆ setValue() [4/11]

void ArnBasicItem::setValue ( bool  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)

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 933 of file ArnBasicItem.cpp.

◆ setValue() [5/11]

void ArnBasicItem::setValue ( const QString &  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)

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 958 of file ArnBasicItem.cpp.

◆ setValue() [6/11]

void ArnBasicItem::setValue ( const QByteArray &  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)

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 983 of file ArnBasicItem.cpp.

◆ setValue() [7/11]

void ArnBasicItem::setValue ( const QVariant &  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)

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 1008 of file ArnBasicItem.cpp.

◆ setValue() [8/11]

void ArnBasicItem::setValue ( const char *  value,
int  ignoreSame = Arn::SameValue::DefaultAction 
)

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 1033 of file ArnBasicItem.cpp.

◆ setValue() [9/11]

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

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 1039 of file ArnBasicItem.cpp.

◆ setValue() [10/11]

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

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 1051 of file ArnBasicItem.cpp.

◆ setValue() [11/11]

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

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 1063 of file ArnBasicItem.cpp.

◆ syncMode()

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

Definition at line 281 of file ArnBasicItem.cpp.

◆ thread()

QThread * ArnBasicItem::thread ( ) const

Get the thread affinity of this ArnBasicItem.

The affinity (see QObject) is set when the ArnBasicItem is created and bound to an internal QObject based event handler. When a custom event handler is set, its affinity is used.

Returns
the thread affinity
See also
setEventHandler()

Definition at line 1131 of file ArnBasicItem.cpp.

◆ toBool()

bool ArnBasicItem::toBool ( bool *  isOk = arnNullptr) const
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.
Note
Not native ARN datatype. It's converted from Int.

Definition at line 725 of file ArnBasicItem.cpp.

◆ toByteArray()

QByteArray ArnBasicItem::toByteArray ( bool *  isOk = arnNullptr) const
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 685 of file ArnBasicItem.cpp.

◆ toDouble()

double ArnBasicItem::toDouble ( bool *  isOk = arnNullptr) const
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 709 of file ArnBasicItem.cpp.

◆ toInt()

int ArnBasicItem::toInt ( bool *  isOk = arnNullptr) const
Returns
Convert Arn Data Object to an 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 701 of file ArnBasicItem.cpp.

◆ toInt64()

qint64 ArnBasicItem::toInt64 ( bool *  isOk = arnNullptr) const
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 741 of file ArnBasicItem.cpp.

◆ toReal()

ARNREAL ArnBasicItem::toReal ( bool *  isOk = arnNullptr) const
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 717 of file ArnBasicItem.cpp.

◆ toString()

QString ArnBasicItem::toString ( bool *  isOk = arnNullptr) const
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 677 of file ArnBasicItem.cpp.

◆ toUInt()

uint ArnBasicItem::toUInt ( bool *  isOk = arnNullptr) const
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 733 of file ArnBasicItem.cpp.

◆ toUInt64()

quint64 ArnBasicItem::toUInt64 ( bool *  isOk = arnNullptr) const
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 749 of file ArnBasicItem.cpp.

◆ toVariant()

QVariant ArnBasicItem::toVariant ( bool *  isOk = arnNullptr) const
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 693 of file ArnBasicItem.cpp.

◆ type()

Arn::DataType ArnBasicItem::type ( ) const

The type stored in the Arn Data Object

Returns
The type stored

Definition at line 206 of file ArnBasicItem.cpp.

Friends And Related Function Documentation

◆ ArnBasicItemEventHandler

friend class ArnBasicItemEventHandler
friend

Definition at line 123 of file ArnBasicItem.hpp.


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