esp8266ndn
NDN Arduino library for ESP8266 and more
Loading...
Searching...
No Matches
NDNph
src
ndnph
port
queue
null.hpp
Go to the documentation of this file.
1
#ifndef NDNPH_PORT_QUEUE_NULL_HPP
2
#define NDNPH_PORT_QUEUE_NULL_HPP
3
4
#include "../../core/common.hpp"
5
6
namespace
ndnph
{
7
namespace
port_queue_null {
8
10
template
<
typename
T,
size_t
capacity>
11
class
SafeQueue
{
12
public
:
13
using
Item
= T;
14
15
bool
push
(
Item
) {
16
return
false
;
17
}
18
19
std::tuple<Item, bool>
pop
() {
20
return
std::make_tuple(T(),
false
);
21
}
22
};
23
24
}
// namespace port_queue_null
25
26
#ifdef NDNPH_PORT_QUEUE_NULL
27
namespace
port {
28
template
<
typename
T,
size_t
capacity>
29
using
SafeQueue = port_queue_null::SafeQueue<T, capacity>;
30
}
// namespace port
31
#endif
32
33
}
// namespace ndnph
34
35
#endif
// NDNPH_PORT_QUEUE_NULL_HPP
ndnph::port_queue_null::SafeQueue
Generic thread-safe queue stub.
Definition
null.hpp:11
ndnph::port_queue_null::SafeQueue::push
bool push(Item)
Definition
null.hpp:15
ndnph::port_queue_null::SafeQueue::Item
T Item
Definition
null.hpp:13
ndnph::port_queue_null::SafeQueue::pop
std::tuple< Item, bool > pop()
Definition
null.hpp:19
ndnph
Definition
fs.hpp:33
Generated by
1.9.8