ArnLib  4.0.x
Active Registry Network
ArnM Class Reference

Arn main class. More...

#include <ArnM.hpp>

Inheritance diagram for ArnM:
Collaboration diagram for ArnM:

Public Slots

static void destroyLink (const QString &path, bool isGlobal=true)
 Destroy the Arn Data Object at path More...
 
static void setupErrorlog (QObject *errLog)
 

Signals

void errorLogSig (const QString &errText, uint errCode, void *reference)
 

Public Member Functions

bool skipLocalSysLoading () const
 Return mode skip "/Local/Sys/" loading. More...
 
void setSkipLocalSysLoading (bool skipLocalSysLoading)
 Set mode skip "/Local/Sys/" loading. More...
 

Static Public Member Functions

static ArnMinstance ()
 
static void setConsoleError (bool isConsoleError)
 
static void setDefaultIgnoreSameValue (bool isIgnore=true)
 Set system default skipping of equal assignment value. More...
 
static bool defaultIgnoreSameValue ()
 
static bool isMainThread ()
 
static bool isThreadedApp ()
 
static int valueInt (const QString &path)
 Get the value of Arn Data Object at path More...
 
static double valueDouble (const QString &path)
 Get the value of Arn Data Object at path More...
 
static ARNREAL valueReal (const QString &path)
 Get the value of Arn Data Object at path More...
 
static QString valueString (const QString &path)
 Get the value of Arn Data Object at path More...
 
static QByteArray valueByteArray (const QString &path)
 Get the value of Arn Data Object at path More...
 
static QVariant valueVariant (const QString &path)
 Get the value of Arn Data Object at path More...
 
static QStringList items (const QString &path)
 Get the childrens of the folder at path More...
 
static bool exist (const QString &path)
 
static bool isFolder (const QString &path)
 
static bool isLeaf (const QString &path)
 
static void setAtomicOpProvider (const QString &path)
 Set this Arn Data Object as Atomic Operator Provider More...
 
static bool isAtomicOpProvider (const QString &path)
 
static void setValue (const QString &path, int value)
 Assign an integer to an Arn Data Object at path More...
 
static void setValue (const QString &path, ARNREAL value)
 Assign an ARNREAL to an Arn Data Object at path More...
 
static void setValue (const QString &path, const QString &value)
 Assign a QString to an Arn Data Object at path More...
 
static void setValue (const QString &path, const QByteArray &value)
 Assign a QByteArray to an Arn Data Object at path More...
 
static void setValue (const QString &path, const QVariant &value, const char *typeName=arnNullptr)
 Assign a QVariant to an Arn Data Object at path More...
 
static void setValue (const QString &path, const char *value)
 Assign a char* to an Arn Data Object at path More...
 
static bool loadFromFile (const QString &path, const QString &fileName, Arn::Coding coding)
 Load from a file to an Arn Data Object at path More...
 
static bool loadFromDirRoot (const QString &path, const QDir &dirRoot, Arn::Coding coding)
 Load relative a directory root to an Arn Data Object at path More...
 
static bool saveToFile (const QString &path, const QString &fileName, Arn::Coding coding)
 Save to a file from an Arn Data Object at path More...
 
static void errorLog (QString errText, ArnError err=ArnError::Undef, void *reference=arnNullptr)
 
static QString errorSysName ()
 
static QByteArray info ()
 Give information about this library. More...
 
static void destroyLinkLocal (const QString &path)
 Destroy the local Arn Data Object at path More...
 

Friends

class ArnBasicItem
 

Detailed Description

Arn main class.

About Arn Data Object

This singleton class is the main reference to the Active Registry Network.

Definition at line 106 of file ArnM.hpp.

Member Function Documentation

◆ defaultIgnoreSameValue()

bool ArnM::defaultIgnoreSameValue ( )
static
Return values
trueif default skipping equal assignment value
See also
setDefaultIgnoreSameValue()

Definition at line 1068 of file ArnM.cpp.

◆ destroyLink

void ArnM::destroyLink ( const QString &  path,
bool  isGlobal = true 
)
staticslot

Destroy the Arn Data Object at path

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]path
[in]isGlobalIf true, removes from server and all connected clients, otherwise only local link.
See also
destroyLinkLocal()

Threaded version of destroyLink

Definition at line 853 of file ArnM.cpp.

◆ destroyLinkLocal()

static void ArnM::destroyLinkLocal ( const QString &  path)
inlinestatic

Destroy the local Arn Data Object at path

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

Parameters
[in]path
See also
destroyLink()

Definition at line 296 of file ArnM.hpp.

◆ errorLog()

void ArnM::errorLog ( QString  errText,
ArnError  err = ArnError::Undef,
void *  reference = arnNullptr 
)
static

Definition at line 1025 of file ArnM.cpp.

◆ errorLogSig

void ArnM::errorLogSig ( const QString &  errText,
uint  errCode,
void *  reference 
)
signal

◆ errorSysName()

QString ArnM::errorSysName ( )
static

Definition at line 961 of file ArnM.cpp.

◆ exist()

bool ArnM::exist ( const QString &  path)
static
Parameters
[in]path
Return values
trueif Arn Data Object exist at path

Definition at line 402 of file ArnM.cpp.

◆ info()

QByteArray ArnM::info ( )
static

Give information about this library.

Returns
The info, e.g. "Name=ArnLib Ver=1.0.0 Date=12-12-30 Time=00:37"

Definition at line 967 of file ArnM.cpp.

◆ instance()

ArnM & ArnM::instance ( )
static

Definition at line 1048 of file ArnM.cpp.

◆ isAtomicOpProvider()

bool ArnM::isAtomicOpProvider ( const QString &  path)
static
Return values
trueif this is a Atomic Operator Provider
Parameters
[in]path
See also
setAtomicOpProvider()

Definition at line 449 of file ArnM.cpp.

◆ isFolder()

bool ArnM::isFolder ( const QString &  path)
static
Parameters
[in]path
Return values
trueif Arn Data Object at path is a folder

Definition at line 413 of file ArnM.cpp.

◆ isLeaf()

bool ArnM::isLeaf ( const QString &  path)
static
Parameters
[in]path
Return values
trueif Arn Data Object at path is a leaf (non folder)

Definition at line 424 of file ArnM.cpp.

◆ isMainThread()

bool ArnM::isMainThread ( )
static
Return values
trueif this is the main thread in the application

Definition at line 379 of file ArnM.cpp.

◆ isThreadedApp()

bool ArnM::isThreadedApp ( )
static
Return values
trueif this is a threaded application

Definition at line 396 of file ArnM.cpp.

◆ items()

QStringList ArnM::items ( const QString &  path)
static

Get the childrens of the folder at path

Example: return list = {"test"; "folder/"; "@/"; "value"}

Parameters
[in]path
Returns
The items (children)

Definition at line 315 of file ArnM.cpp.

◆ loadFromDirRoot()

bool ArnM::loadFromDirRoot ( const QString &  path,
const QDir &  dirRoot,
Arn::Coding  coding 
)
static

Load relative a directory root to an Arn Data Object at path

Example: path = "//Doc/help.txt", dirRoot = "/usr/local", will load file from "/usr/local/@/Doc/help.txt" to Arn path at "//Doc/help.txt".

Parameters
[in]pathis the path of the Arn Data Object and also path relative to dirRoot
[in]dirRootis the file directory to be used as root for the path
[in]codingindicates if text or binary mode will be used
Return values
trueif loading from file is successful

Definition at line 556 of file ArnM.cpp.

◆ loadFromFile()

bool ArnM::loadFromFile ( const QString &  path,
const QString &  fileName,
Arn::Coding  coding 
)
static

Load from a file to an Arn Data Object at path

Parameters
[in]pathis the path of the Arn Data Object
[in]fileNameis the file to be loaded
[in]codingindicates if text or binary mode will be used
Return values
trueif loading from file is successful

Definition at line 538 of file ArnM.cpp.

◆ saveToFile()

bool ArnM::saveToFile ( const QString &  path,
const QString &  fileName,
Arn::Coding  coding 
)
static

Save to a file from an Arn Data Object at path

Parameters
[in]pathis the path of the Arn Data Object
[in]fileNameis the file to be saved
[in]codingindicates if text or binary mode will be used
Return values
trueif saving to file is successful

Definition at line 565 of file ArnM.cpp.

◆ setAtomicOpProvider()

void ArnM::setAtomicOpProvider ( const QString &  path)
static

Set this Arn Data Object as Atomic Operator Provider

The atomic operation is performed at this object

Parameters
[in]path

Definition at line 436 of file ArnM.cpp.

◆ setConsoleError()

void ArnM::setConsoleError ( bool  isConsoleError)
static

Definition at line 1056 of file ArnM.cpp.

◆ setDefaultIgnoreSameValue()

void ArnM::setDefaultIgnoreSameValue ( bool  isIgnore = true)
static

Set system default skipping of equal assignment value.

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

Definition at line 1062 of file ArnM.cpp.

◆ setSkipLocalSysLoading()

void ArnM::setSkipLocalSysLoading ( bool  skipLocalSysLoading)

Set mode skip "/Local/Sys/" loading.

Can disable auto loading of ARN Data Objects into "/Local/Sys/ tree".

Parameters
[in]skipLocalSysLoading
Note
Must be called before entering the Qt event loop
Check the rules for Local path
See also
skipLocalSysLoading()

Definition at line 1080 of file ArnM.cpp.

◆ setupErrorlog

void ArnM::setupErrorlog ( QObject *  errLog)
staticslot

Definition at line 973 of file ArnM.cpp.

◆ setValue() [1/6]

void ArnM::setValue ( const QString &  path,
int  value 
)
static

Assign an integer to an Arn Data Object at path

Parameters
[in]path
[in]valueto be assigned

Definition at line 473 of file ArnM.cpp.

◆ setValue() [2/6]

void ArnM::setValue ( const QString &  path,
ARNREAL  value 
)
static

Assign an ARNREAL to an Arn Data Object at path

Parameters
[in]path
[in]valueto be assigned

Definition at line 484 of file ArnM.cpp.

◆ setValue() [3/6]

void ArnM::setValue ( const QString &  path,
const QString &  value 
)
static

Assign a QString to an Arn Data Object at path

Parameters
[in]path
[in]valueto be assigned

Definition at line 462 of file ArnM.cpp.

◆ setValue() [4/6]

void ArnM::setValue ( const QString &  path,
const QByteArray &  value 
)
static

Assign a QByteArray to an Arn Data Object at path

Parameters
[in]path
[in]valueto be assigned

Definition at line 495 of file ArnM.cpp.

◆ setValue() [5/6]

void ArnM::setValue ( const QString &  path,
const QVariant &  value,
const char *  typeName = arnNullptr 
)
static

Assign a QVariant to an Arn Data Object at path

Parameters
[in]path
[in]valueto be assigned
[in]typeNameto convert variant into, default no conversion

Definition at line 506 of file ArnM.cpp.

◆ setValue() [6/6]

void ArnM::setValue ( const QString &  path,
const char *  value 
)
static

Assign a char* to an Arn Data Object at path

Parameters
[in]path
[in]valueto be assigned

Definition at line 532 of file ArnM.cpp.

◆ skipLocalSysLoading()

bool ArnM::skipLocalSysLoading ( ) const

Return mode skip "/Local/Sys/" loading.

Returns
mode skipLocalSysLoading
See also
setSkipLocalSysLoading()

Definition at line 1074 of file ArnM.cpp.

◆ valueByteArray()

QByteArray ArnM::valueByteArray ( const QString &  path)
static

Get the value of Arn Data Object at path

Parameters
[in]path
Returns
The Arn Data Object as a QByteArray

Definition at line 283 of file ArnM.cpp.

◆ valueDouble()

double ArnM::valueDouble ( const QString &  path)
static

Get the value of Arn Data Object at path

Parameters
[in]path
Returns
The Arn Data Object as a double

Definition at line 255 of file ArnM.cpp.

◆ valueInt()

int ArnM::valueInt ( const QString &  path)
static

Get the value of Arn Data Object at path

Parameters
[in]path
Returns
The Arn Data Object as an integer

Definition at line 244 of file ArnM.cpp.

◆ valueReal()

ARNREAL ArnM::valueReal ( const QString &  path)
static

Get the value of Arn Data Object at path

Parameters
[in]path
Returns
The Arn Data Object as an ARNREAL

Definition at line 261 of file ArnM.cpp.

◆ valueString()

QString ArnM::valueString ( const QString &  path)
static

Get the value of Arn Data Object at path

Parameters
[in]path
Returns
The Arn Data Object as a QString

Definition at line 272 of file ArnM.cpp.

◆ valueVariant()

QVariant ArnM::valueVariant ( const QString &  path)
static

Get the value of Arn Data Object at path

Parameters
[in]path
Returns
The Arn Data Object as a QVariant

Definition at line 294 of file ArnM.cpp.

Friends And Related Function Documentation

◆ ArnBasicItem

friend class ArnBasicItem
friend

Definition at line 109 of file ArnM.hpp.


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