ArnLib
4.0.x
Active Registry Network
|
! Non Qt and threadsafe handle for an Arn Data Object. More...
#include <ArnAdaptItem.hpp>
Public Types | |
typedef void(* | ChangedCB) (ArnAdaptItem &target, const QByteArray &value) |
typedef void(* | LinkDestroyedCB) (ArnAdaptItem &target) |
typedef void(* | ArnEventCB) (QEvent *ev, int arnEvIdx) |
Public Member Functions | |
ArnAdaptItem () | |
Standard constructor of a closed handle. More... | |
virtual | ~ArnAdaptItem () |
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 |
Arn::ObjectSyncMode | syncMode () const |
ArnAdaptItem & | setBiDirMode () |
Set general mode as Bidirectional for this Arn Data Object More... | |
bool | isBiDirMode () const |
ArnAdaptItem & | setPipeMode () |
Set general mode as Pipe for this Arn Data Object More... | |
bool | isPipeMode () const |
ArnAdaptItem & | setSaveMode () |
Set general mode as Save for this Arn Data Object More... | |
bool | isSaveMode () const |
ArnAdaptItem & | setMaster () |
Set client session sync mode as Master for this ArnItem. More... | |
bool | isMaster () const |
ArnAdaptItem & | setAutoDestroy () |
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 |
ArnAdaptItem & | operator= (const ArnAdaptItem &other) |
ArnAdaptItem & | operator= (int val) |
ArnAdaptItem & | operator= (ARNREAL val) |
ArnAdaptItem & | operator= (const QString &val) |
ArnAdaptItem & | operator= (const QByteArray &val) |
ArnAdaptItem & | operator= (const QVariant &val) |
ArnAdaptItem & | operator= (const char *val) |
ArnAdaptItem & | operator= (uint val) |
ArnAdaptItem & | operator= (qint64 val) |
ArnAdaptItem & | operator= (quint64 val) |
ArnAdaptItem & | operator+= (int val) |
ArnAdaptItem & | operator+= (ARNREAL val) |
void | setValue (const ArnAdaptItem &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... | |
ARN_RecursiveMutex & | mutex () const |
Get the mutex of this ArnAdaptItem. More... | |
QThread * | thread () const |
Get the thread affinity of this ArnAdaptItem. More... | |
void | setChangedCallback (ChangedCB changedCB) |
Set changed-callback for this ArnAdaptItem. More... | |
ChangedCB | ChangedCallback () const |
Get the changed-callback of this ArnAdaptItem. More... | |
void | setLinkDestroyedCallback (LinkDestroyedCB linkDestroyedCB) |
Set link-destroyed-callback for this ArnAdaptItem. More... | |
LinkDestroyedCB | linkDestroyedCallback () const |
Get the link-destroyed-callback of this ArnAdaptItem. More... | |
void | setArnEventCallback (ArnEventCB evCB) |
Set event callback for this ArnAdaptItem. More... | |
ArnEventCB | arnEventCallback () const |
Get the event callback of this ArnAdaptItem. More... | |
void | setUncrossed (bool isUncrossed=true) |
Set a Bidirectional item as Uncrossed. More... | |
bool | isUncrossed () const |
Get the Uncrossed state of an object. More... | |
Additional Inherited Members | |
![]() | |
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 |
ArnBasicItem & | setBiDirMode () |
Set general mode as Bidirectional for this Arn Data Object More... | |
bool | isBiDirMode () const |
ArnBasicItem & | setPipeMode () |
Set general mode as Pipe for this Arn Data Object More... | |
bool | isPipeMode () const |
ArnBasicItem & | setSaveMode () |
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 |
ArnBasicItem & | setMaster () |
Set client session sync mode as Master for this ArnItem. More... | |
bool | isMaster () const |
ArnBasicItem & | setAutoDestroy () |
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 |
ArnBasicItem & | operator= (const ArnBasicItem &other) |
ArnBasicItem & | operator= (int val) |
ArnBasicItem & | operator= (ARNREAL val) |
ArnBasicItem & | operator= (const QString &val) |
ArnBasicItem & | operator= (const QByteArray &val) |
ArnBasicItem & | operator= (const QVariant &val) |
ArnBasicItem & | operator= (const char *val) |
ArnBasicItem & | operator= (uint val) |
ArnBasicItem & | operator= (qint64 val) |
ArnBasicItem & | operator= (quint64 val) |
ArnBasicItem & | operator+= (int val) |
ArnBasicItem & | operator+= (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... | |
![]() | |
ArnCoreItem () | |
Standard constructor of a closed handle. More... | |
virtual | ~ArnCoreItem () |
QThread * | thread () const |
Get the thread affinity of this ArnCoreItem. More... | |
! Non Qt and threadsafe handle for an Arn Data Object.
See ArnItem.
ArnAdaptItem is based on ArnBasicItem and is used to get a handle (pointer) for accessing an Arn Data Object. It is very similar to ArnBasicItem but it is slower and its typical usage is in a non Qt thread. It don't use or need a Qt eventloop.
There can be any amount of ArnAdaptItem:s opened (pointing) to the same Arn Data object. Deleting the ArnAdaptItem won't effect the Arn Data object.
This class is thread-safe, so any thread could use its instances. This includes booth Qt (based on QThread) and non Qt started thread.
For callbacks it's easiest to use setChangedCallback() and setLinkDestroyedCallback() when this is sufficient. For advanced usage it's also possible to use setArnEventCallback() which gives all possible events but is more complicated and includes decoding of an event structure.
Example usage
Definition at line 133 of file ArnAdaptItem.hpp.
typedef void(* ArnAdaptItem::ArnEventCB) (QEvent *ev, int arnEvIdx) |
Definition at line 140 of file ArnAdaptItem.hpp.
typedef void(* ArnAdaptItem::ChangedCB) (ArnAdaptItem &target, const QByteArray &value) |
Definition at line 138 of file ArnAdaptItem.hpp.
typedef void(* ArnAdaptItem::LinkDestroyedCB) (ArnAdaptItem &target) |
Definition at line 139 of file ArnAdaptItem.hpp.
ArnAdaptItem::ArnAdaptItem | ( | ) |
Standard constructor of a closed handle.
Definition at line 70 of file ArnAdaptItem.cpp.
|
virtual |
Definition at line 77 of file ArnAdaptItem.cpp.
void ArnAdaptItem::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.
[in] | mode | The modes to be added. |
Definition at line 221 of file ArnAdaptItem.cpp.
void ArnAdaptItem::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
[in] | value | to be added to this Arn Data Object |
Definition at line 644 of file ArnAdaptItem.cpp.
void ArnAdaptItem::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
[in] | value | to be added to this Arn Data Object |
Definition at line 652 of file ArnAdaptItem.cpp.
ArnAdaptItem::ArnEventCB ArnAdaptItem::arnEventCallback | ( | ) | const |
Get the event callback of this ArnAdaptItem.
Definition at line 714 of file ArnAdaptItem.cpp.
QByteArray ArnAdaptItem::arnExport | ( | ) | const |
Definition at line 345 of file ArnAdaptItem.cpp.
void ArnAdaptItem::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.
[in] | data | is the data blob |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 337 of file ArnAdaptItem.cpp.
ArnAdaptItem::ChangedCB ArnAdaptItem::ChangedCallback | ( | ) | const |
Get the changed-callback of this ArnAdaptItem.
Definition at line 682 of file ArnAdaptItem.cpp.
void ArnAdaptItem::close | ( | ) |
Close the handle.
Definition at line 92 of file ArnAdaptItem.cpp.
void ArnAdaptItem::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.
[in] | isGlobal | If true, removes from server and all connected clients, otherwise only local link. |
Definition at line 100 of file ArnAdaptItem.cpp.
|
inline |
Destroy the local Arn Data Object
The link (Arn Data Object) will be removed locally. Server is allways forcing global destroy.
Definition at line 172 of file ArnAdaptItem.hpp.
Arn::ObjectMode ArnAdaptItem::getMode | ( | ) | const |
Definition at line 229 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isAutoDestroy | ( | ) | const |
true | if AutoDestroy mode |
Definition at line 328 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isBiDirMode | ( | ) | const |
true | if Bidirectional |
Definition at line 256 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isFolder | ( | ) | const |
true | if this ArnItem is a folder |
Definition at line 177 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isIgnoreSameValue | ( | ) | const |
true | if skipping equal values |
Definition at line 212 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isMaster | ( | ) | const |
true | if Master mode |
Definition at line 310 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isOpen | ( | ) | const |
State of the handle.
true | if this ArnItem is open |
Definition at line 108 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isPipeMode | ( | ) | const |
true | if Pipe mode |
Definition at line 274 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isProvider | ( | ) | const |
true | if this ArnItem is a provider |
Definition at line 186 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isSaveMode | ( | ) | const |
true | if Save mode |
Definition at line 292 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::isUncrossed | ( | ) | const |
Get the Uncrossed state of an object.
true | if Uncrossed is set or Arn Data Object is not in Bidirectional mode. |
Definition at line 730 of file ArnAdaptItem.cpp.
uint ArnAdaptItem::itemId | ( | ) | const |
ArnAdaptItem::LinkDestroyedCB ArnAdaptItem::linkDestroyedCallback | ( | ) | const |
Get the link-destroyed-callback of this ArnAdaptItem.
Definition at line 698 of file ArnAdaptItem.cpp.
uint ArnAdaptItem::linkId | ( | ) | const |
ARN_RecursiveMutex & ArnAdaptItem::mutex | ( | ) | const |
Get the mutex of this ArnAdaptItem.
This can be used for atomic operations etc on the item. The item it self is thread safe without the application code is using this mutex. Also this mutex is using QMutex::Recursive.
Definition at line 660 of file ArnAdaptItem.cpp.
QString ArnAdaptItem::name | ( | Arn::NameF | nameF | ) | const |
Name of the Arn Data Object
[in] | nameF | The format of the returned name |
Definition at line 125 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::open | ( | const QString & | path | ) |
Open a handle to an Arn Data Object
[in] | path | The Arn Data Object path e.g. "//Measure/Water/Level/value" |
false | if error |
Definition at line 82 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator+= | ( | int | val | ) |
Definition at line 530 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator+= | ( | ARNREAL | val | ) |
Definition at line 539 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | const ArnAdaptItem & | other | ) |
Definition at line 440 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | int | val | ) |
Definition at line 449 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | ARNREAL | val | ) |
Definition at line 458 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | const QString & | val | ) |
Definition at line 467 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | const QByteArray & | val | ) |
Definition at line 476 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | const QVariant & | val | ) |
Definition at line 485 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | const char * | val | ) |
Definition at line 494 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | uint | val | ) |
Definition at line 503 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | qint64 | val | ) |
Definition at line 512 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::operator= | ( | quint64 | val | ) |
Definition at line 521 of file ArnAdaptItem.cpp.
QString ArnAdaptItem::path | ( | Arn::NameF | nameF = Arn::NameF::EmptyOk | ) | const |
Path of the Arn Data Object
[in] | nameF | The format of the returned path |
Definition at line 117 of file ArnAdaptItem.cpp.
int ArnAdaptItem::refCount | ( | ) | const |
Get the number of refs to this Arn Data Object
Definition at line 168 of file ArnAdaptItem.cpp.
void * ArnAdaptItem::reference | ( | ) | const |
Get the stored external reference.
Definition at line 141 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setArnEventCallback | ( | ArnEventCB | evCB | ) |
Set event callback for this ArnAdaptItem.
Use e.g prototype: void myArnEventCB( QEvent* ev, int arnEvIdx); The event callback function must be threadsafe as it can be called from any thread.
[in] | evCB | callback to be assigned |
Definition at line 706 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::setAutoDestroy | ( | ) |
Set client session sync mode as AutoDestroy for this ArnItem.
This ArnItem at client side is setup for auto destruction.
Definition at line 319 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::setBiDirMode | ( | ) |
Set general mode as Bidirectional for this Arn Data Object
A two way object, typically for validation or pipe
Definition at line 247 of file ArnAdaptItem.cpp.
void ArnAdaptItem::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
[in] | mask | to specify bits that is affected |
[in] | value | to be assigned to affected bits |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 636 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setChangedCallback | ( | ArnAdaptItem::ChangedCB | changedCB | ) |
Set changed-callback for this ArnAdaptItem.
The callback is called when data in Arn Data Object is changed. Use e.g prototype: void myChangeCB( ArnAdaptItem& target, const QByteArray& value); The changed-callback function must be threadsafe as it can be called from any thread.
[in] | changedCB | callback to be assigned |
Definition at line 674 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setIgnoreSameValue | ( | bool | isIgnore = true | ) |
Set skipping of equal value.
[in] | isIgnore | If true, assignment of equal value don't give a changed signal. |
Definition at line 204 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setLinkDestroyedCallback | ( | ArnAdaptItem::LinkDestroyedCB | linkDestroyedCB | ) |
Set link-destroyed-callback for this ArnAdaptItem.
The callback is called when the Arn Data Object is destroyed. Use e.g prototype: void myLinkDestroyedCB( ArnAdaptItem& target); The link-destroyed-callback function must be threadsafe as it can be called from any thread.
[in] | linkDestroyedCB | callback to be assigned |
Definition at line 690 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::setMaster | ( | ) |
ArnAdaptItem & ArnAdaptItem::setPipeMode | ( | ) |
Set general mode as Pipe for this Arn Data Object
Implies Bidir.
Definition at line 265 of file ArnAdaptItem.cpp.
void ArnAdaptItem::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.
[in] | reference | Any external structure or id. |
Definition at line 133 of file ArnAdaptItem.cpp.
ArnAdaptItem & ArnAdaptItem::setSaveMode | ( | ) |
Set general mode as Save for this Arn Data Object
Data is persistent and will be saved
Definition at line 283 of file ArnAdaptItem.cpp.
void ArnAdaptItem::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.
Definition at line 722 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | const ArnAdaptItem & | other, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Definition at line 548 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | int | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign an integer to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 556 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | ARNREAL | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign an ARNREAL to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 564 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | bool | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign a bool to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 572 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | const QString & | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign a QString to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 580 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | const QByteArray & | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign a QByteArray to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 588 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | const QVariant & | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign a QVariant to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 596 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | const char * | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign a char* to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 604 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | uint | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign an unsigned int to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 612 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | qint64 | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign an int 64 bit to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 620 of file ArnAdaptItem.cpp.
void ArnAdaptItem::setValue | ( | quint64 | value, |
int | ignoreSame = Arn::SameValue::DefaultAction |
||
) |
Assign an unsigned int 64 bit to an Arn Data Object
[in] | value | to be assigned |
[in] | ignoreSame | can override default ignoreSameValue setting. |
Definition at line 628 of file ArnAdaptItem.cpp.
Arn::ObjectSyncMode ArnAdaptItem::syncMode | ( | ) | const |
Definition at line 238 of file ArnAdaptItem.cpp.
QThread * ArnAdaptItem::thread | ( | ) | const |
Get the thread affinity of this ArnAdaptItem.
The affinity is allways the same as the caller thread.
Definition at line 668 of file ArnAdaptItem.cpp.
bool ArnAdaptItem::toBool | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 404 of file ArnAdaptItem.cpp.
QByteArray ArnAdaptItem::toByteArray | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 388 of file ArnAdaptItem.cpp.
double ArnAdaptItem::toDouble | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 362 of file ArnAdaptItem.cpp.
int ArnAdaptItem::toInt | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 353 of file ArnAdaptItem.cpp.
qint64 ArnAdaptItem::toInt64 | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 422 of file ArnAdaptItem.cpp.
ARNREAL ArnAdaptItem::toReal | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 371 of file ArnAdaptItem.cpp.
QString ArnAdaptItem::toString | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 380 of file ArnAdaptItem.cpp.
uint ArnAdaptItem::toUInt | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 413 of file ArnAdaptItem.cpp.
quint64 ArnAdaptItem::toUInt64 | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 431 of file ArnAdaptItem.cpp.
QVariant ArnAdaptItem::toVariant | ( | bool * | isOk = arnNullptr | ) | const |
[out] | isOk | If not 0 when a conversion error occurs, *isOk is set to false, otherwise *isOk is set to true. |
Definition at line 396 of file ArnAdaptItem.cpp.
Arn::DataType ArnAdaptItem::type | ( | ) | const |
The type stored in the Arn Data Object
Definition at line 195 of file ArnAdaptItem.cpp.