|
QString | convertName (const QString &name, Arn::NameF nameF=Arn::NameF()) |
| Convert a name to a specific format. More...
|
|
QString | fullPath (const QString &path) |
| Convert a path to a full absolute path. More...
|
|
QString | itemName (const QString &path) |
| The last part of a path More...
|
|
QString | childPath (const QString &parentPath, const QString &posterityPath) |
| Get substring for child from a path (posterityPath) More...
|
|
QString | changeBasePath (const QString &oldBasePath, const QString &newBasePath, const QString &path) |
| Change the base (start) of a path. More...
|
|
QString | makePath (const QString &parentPath, const QString &itemName) |
| Make a path from a parent and an item name. More...
|
|
QString | addPath (const QString &parentPath, const QString &childRelPath, Arn::NameF nameF=Arn::NameF::EmptyOk) |
| Make a path from a parent and an additional relative path. More...
|
|
QString | convertPath (const QString &path, Arn::NameF nameF=Arn::NameF::EmptyOk) |
| Convert a path to a specific format. More...
|
|
QString | parentPath (const QString &path) |
| Get the parent to a given path More...
|
|
QString | twinPath (const QString &path) |
| Get the bidirectional twin to a given path More...
|
|
QString | providerPathIf (const QString &path, bool giveProviderPath=true) |
| Get provider path or requester path More...
|
|
bool | isFolderPath (const QString &path) |
| Test if path is a folder path More...
|
|
bool | isProviderPath (const QString &path) |
| Test if path is a provider path More...
|
|
QString | uuidPath (const QString &path) |
| Get a path to an Arn Object with a unique uuid name. More...
|
|
QString | makeHostWithInfo (const QString &host, const QString &info) |
| Make a combined host and info string, i.e. HostWithInfo More...
|
|
QString | hostFromHostWithInfo (const QString &hostWithInfo) |
| Get the host from the HostWithInfo string. More...
|
|
bool | isNullPtr (const void *ptr) |
|
uint | rand () |
|
int | _mod_i (int x, int y) |
|
qlonglong | _mod_ll (qlonglong x, qlonglong y) |
|
int | _log2_u (uint x) |
|
int | _log2_ull (qulonglong x) |
|
template<typename T > |
T | mod (T x, T y) |
|
template<typename T > |
T | circVal (T x, T lo, T hi) |
|
template<typename T > |
bool | isPower2 (T x) |
|
template<typename T > |
int | log2 (T x) |
|
template<typename T > |
T | minLim (const T &x, const T &lim) |
|
template<typename T > |
T | maxLim (const T &x, const T &lim) |
|
template<typename T > |
T | rangeLim (const T &x, const T &min, const T &max) |
|
Make a path from a parent and an additional relative path.
parentPath don't have to end with a "/", if missing it's added.
Example: parentPath = "//Measure/", childRelPath = "depth/value" ==> return = "//Measure/depth/value"
- Parameters
-
[in] | parentPath | |
[in] | childRelPath | |
[in] | nameF | is the path naming format |
- Returns
- The path
- See also
- convertPath()
Definition at line 137 of file Arn.cpp.
QString Arn::changeBasePath |
( |
const QString & |
oldBasePath, |
|
|
const QString & |
newBasePath, |
|
|
const QString & |
path |
|
) |
| |
Change the base (start) of a path.
oldBasePath and newBasePath don't have to end with a "/", if missing it's added. If path not starts with oldBasePath, path is returned. Otherwise the path is returned with its base changed from oldBasePath to newBasePath.
Example: path = "//Measure/depth/value", oldBasePath = "//Measure/", newBasePath = "/Measure/Tmp/" ==> return = "/Measure/Tmp/depth/value"
- Parameters
-
[in] | oldBasePath | |
[in] | newBasePath | |
[in] | path | |
- Returns
- The changed path
Definition at line 114 of file Arn.cpp.
QString Arn::childPath |
( |
const QString & |
parentPath, |
|
|
const QString & |
posterityPath |
|
) |
| |
Get substring for child from a path (posterityPath)
parentPath don't have to end with a "/", if missing it's added.
If posterityPath not starts with parentPath, QString() is returned. Otherwise given the posterityPath the child to parentPath is returned.
Example 1: posterityPath = "//Measure/depth/value", parentPath = "//Measure/" ==> return = "//Measure/depth/"
Example 2: posterityPath = "//Measure/depth/value", parentPath = "//Measure/depth/" ==> return = //Measure/depth/value"
- Parameters
-
[in] | parentPath | |
[in] | posterityPath | |
- Returns
- The child path
Definition at line 100 of file Arn.cpp.
QString Arn::makeHostWithInfo |
( |
const QString & |
host, |
|
|
const QString & |
info |
|
) |
| |
Make a combined host and info string, i.e. HostWithInfo
This is typically used to pass some extra information about the host, but still be used for connection to the host.
ArnClient and alike accepts such HostWithInfo strings for connection. Hosts discovered using e.g. ArnDiscoverBrowser will be using the ip-address as host and the host name as info.
Example: host = "192.168.1.1", info = "myhost.local" ==> return = "192.168.1.1 [myhost.local]"
- Parameters
-
[in] | host | the name or address of the host |
[in] | info | is corresponding info for the host |
- Returns
- The HostWithInfo string
- See also
- hostFromHostWithInfo()
- Note
- As the format of the HostWithInfo string can be changed in the future, allways use makeHostWithInfo() and hostFromHostWithInfo() for coding and decoding.
Definition at line 235 of file Arn.cpp.
QString Arn::makePath |
( |
const QString & |
parentPath, |
|
|
const QString & |
itemName |
|
) |
| |
Make a path from a parent and an item name.
parentPath don't have to end with a "/", if missing it's added. Empty folder itemName is allowed on returned path.
Example: parentPath = "//Measure/depth/", itemName = "value" ==> return = "//Measure/depth/value"
- Parameters
-
[in] | parentPath | |
[in] | itemName | |
- Returns
- The path
Definition at line 128 of file Arn.cpp.