Loading [MathJax]/extensions/tex2jax.js
USRP Hardware Driver and USRP Manual
Version: 4.8.0.0
UHD and USRP Manual
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
dict.hpp
Go to the documentation of this file.
1
//
2
// Copyright 2010-2011,2015 Ettus Research LLC
3
// Copyright 2018 Ettus Research, a National Instruments Company
4
//
5
// SPDX-License-Identifier: GPL-3.0-or-later
6
//
7
8
#pragma once
9
10
#include <
uhd/config.hpp
>
11
#include <cstddef>
12
#include <list>
13
#include <map>
14
#include <utility>
15
#include <vector>
16
17
namespace
uhd
{
18
22
template
<
typename
Key,
typename
Val>
23
class
UHD_API_HEADER
dict
24
{
25
public
:
29
dict
(
void
);
30
37
template
<
typename
InputIterator>
38
dict
(InputIterator first, InputIterator last);
39
44
std::size_t size(
void
)
const
;
45
51
std::vector<Key> keys(
void
)
const
;
52
58
std::vector<Val> vals(
void
)
const
;
59
65
bool
has_key(
const
Key& key)
const
;
66
73
const
Val& get(
const
Key& key,
const
Val& other)
const
;
74
80
const
Val& get(
const
Key& key)
const
;
81
87
void
set(
const
Key& key,
const
Val& val);
88
96
const
Val& operator[](
const
Key& key)
const
;
97
104
Val& operator[](
const
Key& key);
105
111
bool
operator==
(
const
dict<Key, Val>
& other)
const
;
112
118
bool
operator!=
(
const
dict<Key, Val>
& other)
const
;
119
126
Val pop(
const
Key& key);
127
143
void
update(
const
dict<Key, Val>
& new_dict,
bool
fail_on_conflict =
true
);
144
147
operator
std::map<Key, Val>()
const
;
148
149
private
:
150
typedef
std::pair<Key, Val> pair_t;
151
std::list<pair_t> _map;
// private container
152
};
153
154
}
// namespace uhd
155
156
#include <
uhd/types/dict.ipp
>
config.hpp
uhd::operator==
UHD_API bool operator==(const time_spec_t &, const time_spec_t &)
Implement equality_comparable interface.
uhd
Definition:
build_info.hpp:12
dict.ipp
uhd::dict
Definition:
dict.hpp:23
uhd::math::fp_compare::operator!=
UHD_INLINE bool operator!=(fp_compare_delta< float_t > lhs, fp_compare_delta< float_t > rhs)
Definition:
fp_compare_delta.ipp:71
UHD_API_HEADER
#define UHD_API_HEADER
Definition:
config.h:88
include
uhd
types
dict.hpp
Generated by
1.8.17