6 #ifndef SWIFT_MISC_IDENTIFIER_H
7 #define SWIFT_MISC_IDENTIFIER_H
34 IndexName = CPropertyIndexRef::GlobalIndexCIdentifier,
40 IndexIsFromLocalMachine,
41 IndexIsFromSameProcess,
42 IndexIsFromSameProcessName
51 CIdentifier(
const QString &name);
55 CIdentifier(
const QString &name, QObject *
object);
59 static const CIdentifier &anonymous();
62 static const CIdentifier &
null();
65 static const CIdentifier &fake();
71 QString toUuidString()
const;
74 QString toDBusObjectPath(
const QString &root = {})
const;
77 static CIdentifier fromDBusObjectPath(
const QString &path,
const QString &root = {});
80 const QString &
getName()
const {
return m_name; }
83 bool hasName()
const {
return !m_name.isEmpty(); }
86 void setName(
const QString &name) { m_name = name; }
91 void appendName(
const QString &name);
94 void linkWithQObjectName(QObject *
object);
97 QByteArray getMachineId()
const;
106 bool hasSameMachineName(
const CIdentifier &other)
const;
109 bool hasSameMachineId(
const CIdentifier &other)
const;
112 bool hasSameMachineNameOrId(
const CIdentifier &other)
const;
121 bool isFromLocalMachine()
const;
124 bool hasApplicationProcessId()
const;
127 bool hasApplicationProcessName()
const;
130 bool isAnonymous()
const;
136 void updateToCurrentMachine();
139 void updateToCurrentProcess();
142 QString convertToQString(
bool i18n =
false)
const;
155 CIdentifier(
const QString &name,
const QString &machineId,
const QString &machineName,
156 const QString &processName, qint64 processId = 0);
159 QString m_machineIdBase64;
160 QString m_machineName;
161 QString m_processName;
Value object encapsulating information identifying a component of a modular distributed swift process...
ColumnIndex
Properties by index.
qint64 getProcessId() const
Get process id.
const QString & getProcessName() const
Get process name.
bool hasName() const
Has name.
const QString & getName() const
Name.
const QString & getMachineName() const
Machine name.
const QString & getMachineIdBase64() const
Machine base64 encoded.
void setName(const QString &name)
Set the name.
Non-owning reference to a CPropertyIndex with a subset of its features.
Mix of the most commonly used mixin classes.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...