swift
|
Value object for a set of callsigns. More...
Public Member Functions | |
CCallsignSet () | |
Default constructor. | |
CCallsignSet (const QStringList &callsigns, CCallsign::TypeHint typeHint=CCallsign::NoHint) | |
By string list. | |
CCallsignSet (const CCallsign &callsign) | |
Construct from single callsign. | |
CCallsignSet (const CCollection< CCallsign > &other) | |
Construct from a base class object. | |
bool | containsCallsign (const QString &callsign) const |
Contains by string. | |
QStringList | getCallsignStrings (bool sorted=false) const |
The callsign strings. | |
QString | getCallsignsAsString (bool sorted=false, const QString &separator=", ") const |
Callsigns as string. | |
![]() | |
CCollection ()=default | |
Default constructor. | |
CCollection (std::initializer_list< CCallsign > il) | |
Initializer list constructor. | |
CCollection (const CCollection &other)=default | |
Copy constructor. | |
CCollection (const QList< CCallsign > &list) | |
Constructor from QList. | |
CCollection (CCollection &&other)=default | |
Move constructor. | |
CCollection & | operator= (const CCollection &other)=default |
Copy assignment. | |
CCollection & | operator= (CCollection &&other)=default |
Move assignment. | |
~CCollection ()=default | |
Destructor. | |
iterator | begin () |
Returns iterator at the beginning of the collection. | |
const_iterator | begin () const |
Returns iterator at the beginning of the collection. | |
const_iterator | cbegin () const |
Returns iterator at the beginning of the collection. | |
iterator | end () |
Returns iterator one past the end of the collection. | |
const_iterator | end () const |
Returns const iterator one past the end of the collection. | |
const_iterator | cend () const |
Returns const iterator one past the end of the collection. | |
void | swap (CCollection &other) noexcept |
Swap this collection with another. | |
size_type | size () const |
Returns number of elements in the collection. | |
bool | empty () const |
Returns true if the collection is empty. | |
bool | isEmpty () const |
Synonym for empty. | |
void | clear () |
Removes all elements in the collection. | |
iterator | insert (const_iterator hint, const CCallsign &value) |
For compatibility with std::inserter. More... | |
iterator | insert (const_iterator hint, CCallsign &&value) |
For compatibility with std::inserter. More... | |
iterator | insert (const CCallsign &value) |
Inserts an element into the collection. More... | |
iterator | insert (CCallsign &&value) |
Moves an element into the collection. More... | |
void | insert (const CCollection &other) |
Inserts all elements from another collection into this collection. | |
void | insert (CCollection &&other) |
Inserts all elements from another collection into this collection. This version moves elements instead of copying. | |
void | insert (const CRange< I > &range) |
Appends all elements from a range at the end of this collection. | |
iterator | push_back (const CCallsign &value) |
Synonym for insert. More... | |
iterator | push_back (CCallsign &&value) |
Synonym for insert. More... | |
void | push_back (const CCollection &other) |
Synonym for insert. | |
void | push_back (CCollection &&other) |
Synonym for insert. | |
void | push_back (const CRange< I > &range) |
Synonym for insert. | |
CCollection | makeUnion (const C &other) const |
Returns a collection which is the union of this collection and another container. | |
CCollection | intersection (const C &other) const |
Returns a collection which is the intersection of this collection and another. | |
CCollection | difference (const C &other) const |
Returns a collection which contains all the elements from this collection which are not in the other collection. | |
iterator | erase (iterator pos) |
Remove the element pointed to by the given iterator. More... | |
iterator | erase (iterator it1, iterator it2) |
Remove the range of elements between two iterators. More... | |
iterator | find (const CCallsign &value) |
Efficient find method using the find of the implementation container. Typically O(log n). More... | |
const_iterator | find (const CCallsign &value) const |
Efficient find method using the find of the implementation container. Typically O(log n). More... | |
void | remove (const CCallsign &object) |
Efficient remove using the find and erase of the implementation container. Typically O(log n). More... | |
void | remove (const CCollection &other) |
Removes from this collection all of the elements of another collection. More... | |
int | removeIf (Predicate p) |
Remove elements for which a given predicate returns true. More... | |
int | removeIf (K0 k0, V0 v0, KeysValues... keysValues) |
Remove elements matching some particular key/value pair(s). More... | |
QList< CCallsign > | toQList () const |
Convert to a QList. | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. More... | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. More... | |
![]() | |
template<template< class > class Other> | |
auto | to () const |
Return a new container of a different type, containing the same elements as this one. More... | |
template<template< class > class Other, class T > | |
Other< T > | to (Other< T > other) const |
Return a new container of a different type, containing the same elements as this one. More... | |
template<class K0 , class V0 , class... KeysValues> | |
int | removeIf (K0 k0, V0 v0, KeysValues... keysValues) |
Remove elements matching some particular key/value pair(s). More... | |
QJsonObject | toJson () const |
Cast to JSON object. More... | |
QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
Convenience function JSON as string. | |
void | convertFromJson (const QJsonObject &json) |
Assign from JSON object. More... | |
void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
Assign from JSON object string. | |
CStatusMessage | convertFromJsonNoThrow (const QJsonObject &json, const CLogCategoryList &categories, const QString &prefix) |
Call convertFromJson, catch any CJsonException that is thrown and return it as CStatusMessage. | |
CStatusMessage | convertFromJsonNoThrow (const QString &jsonString, const CLogCategoryList &categories, const QString &prefix) |
Call convertFromJson, catch any CJsonException that is thrown and return it as CStatusMessage. | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
QStringList | toStringList (bool i18n=false) const |
To string list. | |
void | marshallToDbus (QDBusArgument &argument) const |
Marshall without begin/endStructure, for when composed within another object. More... | |
void | unmarshallFromDbus (const QDBusArgument &argument) |
Unmarshall without begin/endStructure, for when composed within another object. More... | |
![]() | |
template<class F > | |
auto | transform (F function) const |
Return a new container generated by applying some transformation function to all elements of this one. | |
template<class Predicate > | |
auto | findBy (Predicate p) const |
Return a copy containing only those elements for which a given predicate returns true. | |
template<class K0 , class V0 , class... KeysValues> | |
auto | findBy (K0 k0, V0 v0, KeysValues... keysValues) const |
Return a copy containing only those elements matching some particular key/value pair(s). More... | |
template<class Predicate > | |
const auto & | findFirstBy (Predicate p) const |
Return a reference to the first element for which a given predicate returns true. Undefined if there is none. | |
template<class K , class V > | |
const auto & | findFirstBy (K key, V value) const |
Return a reference to the first element matching some particular key/value pair(s). Undefined if there is none. | |
template<class Predicate , class Value > | |
auto | findFirstByOrDefault (Predicate p, const Value &def) const |
Return a copy of the first element for which a given predicate returns true, or a default value if there is none. | |
template<class Predicate > | |
auto | findFirstByOrDefault (Predicate p) const |
Return a copy of the first element for which a given predicate returns true, or a default value if there is none. | |
template<class K , class V , class Value > | |
auto | findFirstByOrDefault (K key, V value, const Value &def) const |
Return a copy of the first element matching some particular key/value pair(s), or a default value if there is none. | |
template<class T , class K , class V > | |
auto | findFirstByOrDefault (K T::*key, V value) const |
Return a copy of the first element matching some particular key/value pair(s), or a default value if there is none. | |
template<class Predicate > | |
bool | containsBy (Predicate p) const |
Return true if there is an element for which a given predicate returns true. | |
template<class T > | |
bool | contains (const T &object) const |
Return true if there is an element equal to given object. Uses the most efficient implementation available in the derived container. | |
template<class K0 , class V0 , class... KeysValues> | |
bool | contains (K0 k0, V0 v0, KeysValues... keysValues) const |
Return a copy containing only those elements matching some particular key/value pair(s). More... | |
template<class T , class Predicate > | |
bool | equalsBy (const T &other, Predicate c) const |
Return true if this container equals another container according to the given element equality predicate. | |
template<class T , class Key0 , class... Keys> | |
bool | equalsByKeys (const T &other, Key0 k0, Keys... keys) const |
Return true if this container equals another container, considering only the given element members. | |
template<class T > | |
T | randomElement () const |
Pick one random element. | |
Derived | randomElements (int n) const |
Copy n elements from the container at random. | |
Derived | sampleElements (int n) const |
Copy n elements from the container, randomly selected but evenly distributed. | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
QString | getClassName () const |
Class name. | |
bool | isA (int metaTypeId) const |
Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
![]() | |
QString | toQString (bool i18n=false) const |
Cast as QString. | |
std::string | toStdString (bool i18n=false) const |
To std string. | |
QString | stringForStreaming () const |
String for streaming operators. | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
QString | getClassName () const |
Class name. | |
bool | isA (int metaTypeId) const |
Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
Static Public Member Functions | |
static void | registerMetadata () |
Register metadata. | |
![]() | |
static Derived | fromJson (const QJsonObject &json) |
Static version of convertFromJson. | |
static Derived | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
Static version of convertFromJson. | |
static Derived | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
Static version of convertFromJson. | |
![]() | |
static void | registerMetadata () |
Register metadata. | |
![]() | |
static void | registerMetadata () |
Register metadata. | |
Additional Inherited Members | |
![]() | |
using | key_type = CCallsign |
STL compatibility. | |
using | value_type = CCallsign |
STL compatibility. | |
using | reference = CCallsign & |
STL compatibility. | |
using | const_reference = const CCallsign & |
STL compatibility. | |
using | pointer = CCallsign * |
STL compatibility. | |
using | const_pointer = const CCallsign * |
STL compatibility. | |
using | const_iterator = typename QOrderedSet< CCallsign >::const_iterator |
STL compatibility. | |
using | iterator = const_iterator |
STL compatibility. | |
using | difference_type = ptrdiff_t |
STL compatibility. | |
using | size_type = int |
STL compatibility. | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
![]() | |
template<typename T , typename U > | |
static bool | equalPointers (const T *a, const U *b) |
Efficiently compare addresses of two objects. Return false if types are not compatible. | |
Value object for a set of callsigns.
Definition at line 25 of file callsignset.h.