#[repr(C)]pub struct QPairOfQCborValueRefQCborValueRef { /* private fields */ }
Expand description
The QPair class is a template class that stores a pair of items.
C++ class: QPair<QCborValueRef, QCborValueRef>
.
The QPair class is a template class that stores a pair of items.
QPair<T1, T2> can be used in your application if the STL pair
type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a function that needs to return two values, or as the value type of a generic container.
Here's an example of a QPair that stores one QString and one double
value:
The components are accessible as public data members called first and second. For example:
pair.first = “pi”; pair.second = 3.14159265358979323846;
Note, however, that it is almost always preferable to define a small struct to hold the result of a function with multiple return values. A struct trivially generalizes to more than two values, and allows more descriptive member names than first
and second
:
struct Variable { QString name; double value; }; Variable v; v.name = “pi”; v.value = 3.14159265358979323846;
The advent of C++11 automatic variable type deduction (auto
) shifts the emphasis from the type name to the name of functions and members. Thus, QPair, like std::pair
and std::tuple
, is mostly useful in generic (template) code, where defining a dedicated type is not possible.
QPair's template data types (T1 and T2) must be assignable data types. You cannot, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; these requirements are documented on a per-function basis.
Implementations§
source§impl QPairOfQCborValueRefQCborValueRef
impl QPairOfQCborValueRefQCborValueRef
sourcepub unsafe fn copy_from(
&self,
other: impl CastInto<Ref<QPairOfQCborValueRefQCborValueRef>>
) -> Ref<QPairOfQCborValueRefQCborValueRef>
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn copy_from( &self, other: impl CastInto<Ref<QPairOfQCborValueRefQCborValueRef>> ) -> Ref<QPairOfQCborValueRefQCborValueRef>
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.The QPair class is a template class that stores a pair of items.
Calls C++ function: QPair<QCborValueRef, QCborValueRef>& QPair<QCborValueRef, QCborValueRef>::operator=(const QPair<QCborValueRef, QCborValueRef>& other)
.
The QPair class is a template class that stores a pair of items.
QPair<T1, T2> can be used in your application if the STL pair
type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a function that needs to return two values, or as the value type of a generic container.
Here's an example of a QPair that stores one QString and one double
value:
The components are accessible as public data members called first and second. For example:
pair.first = “pi”; pair.second = 3.14159265358979323846;
Note, however, that it is almost always preferable to define a small struct to hold the result of a function with multiple return values. A struct trivially generalizes to more than two values, and allows more descriptive member names than first
and second
:
struct Variable { QString name; double value; }; Variable v; v.name = “pi”; v.value = 3.14159265358979323846;
The advent of C++11 automatic variable type deduction (auto
) shifts the emphasis from the type name to the name of functions and members. Thus, QPair, like std::pair
and std::tuple
, is mostly useful in generic (template) code, where defining a dedicated type is not possible.
QPair's template data types (T1 and T2) must be assignable data types. You cannot, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; these requirements are documented on a per-function basis.
sourcepub unsafe fn new(
t1: impl CastInto<Ref<QCborValueRef>>,
t2: impl CastInto<Ref<QCborValueRef>>
) -> CppBox<QPairOfQCborValueRefQCborValueRef>
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn new( t1: impl CastInto<Ref<QCborValueRef>>, t2: impl CastInto<Ref<QCborValueRef>> ) -> CppBox<QPairOfQCborValueRefQCborValueRef>
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Constructs a pair and initializes the first
element with value1 and the second
element with value2.
Calls C++ function: [constructor] void QPair<QCborValueRef, QCborValueRef>::QPair(const QCborValueRef& t1, const QCborValueRef& t2)
.
Constructs a pair and initializes the first
element with value1 and the second
element with value2.
See also qMakePair().
sourcepub unsafe fn new_copy(
other: impl CastInto<Ref<QPairOfQCborValueRefQCborValueRef>>
) -> CppBox<QPairOfQCborValueRefQCborValueRef>
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn new_copy( other: impl CastInto<Ref<QPairOfQCborValueRefQCborValueRef>> ) -> CppBox<QPairOfQCborValueRefQCborValueRef>
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.The QPair class is a template class that stores a pair of items.
Calls C++ function: [constructor] void QPair<QCborValueRef, QCborValueRef>::QPair(const QPair<QCborValueRef, QCborValueRef>& other)
.
The QPair class is a template class that stores a pair of items.
QPair<T1, T2> can be used in your application if the STL pair
type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a function that needs to return two values, or as the value type of a generic container.
Here's an example of a QPair that stores one QString and one double
value:
The components are accessible as public data members called first and second. For example:
pair.first = “pi”; pair.second = 3.14159265358979323846;
Note, however, that it is almost always preferable to define a small struct to hold the result of a function with multiple return values. A struct trivially generalizes to more than two values, and allows more descriptive member names than first
and second
:
struct Variable { QString name; double value; }; Variable v; v.name = “pi”; v.value = 3.14159265358979323846;
The advent of C++11 automatic variable type deduction (auto
) shifts the emphasis from the type name to the name of functions and members. Thus, QPair, like std::pair
and std::tuple
, is mostly useful in generic (template) code, where defining a dedicated type is not possible.
QPair's template data types (T1 and T2) must be assignable data types. You cannot, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; these requirements are documented on a per-function basis.
sourcepub unsafe fn swap(
&self,
other: impl CastInto<Ref<QPairOfQCborValueRefQCborValueRef>>
)
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
pub unsafe fn swap( &self, other: impl CastInto<Ref<QPairOfQCborValueRefQCborValueRef>> )
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.Swaps this pair with other.
Calls C++ function: void QPair<QCborValueRef, QCborValueRef>::swap(QPair<QCborValueRef, QCborValueRef>& other)
.
Trait Implementations§
source§impl CppDeletable for QPairOfQCborValueRefQCborValueRef
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
impl CppDeletable for QPairOfQCborValueRefQCborValueRef
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.source§unsafe fn delete(&self)
unsafe fn delete(&self)
The QPair class is a template class that stores a pair of items.
Calls C++ function: [destructor] void QPair<QCborValueRef, QCborValueRef>::~QPair()
.
The QPair class is a template class that stores a pair of items.
QPair<T1, T2> can be used in your application if the STL pair
type is not available. It stores one value of type T1 and one value of type T2. It can be used as a return value for a function that needs to return two values, or as the value type of a generic container.
Here's an example of a QPair that stores one QString and one double
value:
The components are accessible as public data members called first and second. For example:
pair.first = “pi”; pair.second = 3.14159265358979323846;
Note, however, that it is almost always preferable to define a small struct to hold the result of a function with multiple return values. A struct trivially generalizes to more than two values, and allows more descriptive member names than first
and second
:
struct Variable { QString name; double value; }; Variable v; v.name = “pi”; v.value = 3.14159265358979323846;
The advent of C++11 automatic variable type deduction (auto
) shifts the emphasis from the type name to the name of functions and members. Thus, QPair, like std::pair
and std::tuple
, is mostly useful in generic (template) code, where defining a dedicated type is not possible.
QPair's template data types (T1 and T2) must be assignable data types. You cannot, for example, store a QWidget as a value; instead, store a QWidget *. A few functions have additional requirements; these requirements are documented on a per-function basis.
source§impl Ge<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
impl Ge<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.source§unsafe fn ge(&self, p2: &Ref<QPairOfQCborValueRefQCborValueRef>) -> bool
unsafe fn ge(&self, p2: &Ref<QPairOfQCborValueRefQCborValueRef>) -> bool
Returns true
if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false
.
Calls C++ function: bool operator>=(const QPair<QCborValueRef, QCborValueRef>& p1, const QPair<QCborValueRef, QCborValueRef>& p2)
.
Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator>=(QChar c1, QChar c2)
:
Returns true
if the numeric Unicode value of c1 is greater than or equal to that of c2; otherwise returns false
.
source§impl Gt<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
impl Gt<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.source§impl Le<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
impl Le<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.source§unsafe fn le(&self, p2: &Ref<QPairOfQCborValueRefQCborValueRef>) -> bool
unsafe fn le(&self, p2: &Ref<QPairOfQCborValueRefQCborValueRef>) -> bool
Returns true
if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false
.
Calls C++ function: bool operator<=(const QPair<QCborValueRef, QCborValueRef>& p1, const QPair<QCborValueRef, QCborValueRef>& p2)
.
Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator<=(QChar c1, QChar c2)
:
Returns true
if the numeric Unicode value of c1 is less than or equal to that of c2; otherwise returns false
.
source§impl Lt<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
impl Lt<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.source§impl PartialEq<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
Available on cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.
impl PartialEq<Ref<QPairOfQCborValueRefQCborValueRef>> for QPairOfQCborValueRefQCborValueRef
cpp_lib_version="5.12.2"
or cpp_lib_version="5.13.0"
or cpp_lib_version="5.14.0"
only.source§fn eq(&self, p2: &Ref<QPairOfQCborValueRefQCborValueRef>) -> bool
fn eq(&self, p2: &Ref<QPairOfQCborValueRefQCborValueRef>) -> bool
Returns true
if c1 and c2 are the same Unicode character; otherwise returns false
.
Calls C++ function: bool operator==(const QPair<QCborValueRef, QCborValueRef>& p1, const QPair<QCborValueRef, QCborValueRef>& p2)
.
Warning: no exact match found in C++ documentation. Below is the C++ documentation for bool operator==(QChar c1, QChar c2)
:
Returns true
if c1 and c2 are the same Unicode character; otherwise returns false
.