5 #ifndef JODA_READERFLAGS_H
6 #define JODA_READERFLAGS_H
10 #define JODA_READER_FLAG_T JODA_FLAG_T
41 using type =
typename std::underlying_type<argument_type>::type;
42 return std::hash<type>()(
static_cast<type
>(x));
56 if (!first) os <<
"|";
61 if (!first) os <<
"|";
63 os <<
"LINESEPERATED";
66 if (!first) os <<
"|";
77 #define JODA_JSON_FILE_LINESEPERATED_READER_FLAG \
78 (ReaderFlag::JSON | ReaderFlag::FILE | ReaderFlag::LINESEPERATED)
79 #define JODA_JSON_FILE_BEAUTIFIED_READER_FLAG \
80 (ReaderFlag::JSON | ReaderFlag::FILE | ReaderFlag::BEAUTIFUL)
81 #define JODA_JSON_URL_READER_FLAG (ReaderFlag::JSON | ReaderFlag::URL)
87 template <ReaderFlag R_FLAGS>
114 return std::make_unique<queue_t>();
116 static std::unique_ptr<queue_t>
getQueue(
size_t minCapacity,
117 size_t maxExplicitProducers,
118 size_t maxImplicitProducers = 0) {
119 return std::make_unique<queue_t>(minCapacity, maxExplicitProducers,
120 maxImplicitProducers);
140 return std::make_unique<queue_t>();
142 static std::unique_ptr<queue_t>
getQueue(
size_t minCapacity,
143 size_t maxExplicitProducers,
144 size_t maxImplicitProducers = 0) {
145 return std::make_unique<queue_t>(minCapacity, maxExplicitProducers,
146 maxImplicitProducers);
168 return std::make_unique<queue_t>();
171 static std::unique_ptr<queue_t>
getQueue(
size_t minCapacity,
172 size_t maxExplicitProducers,
173 size_t maxImplicitProducers = 0) {
174 return std::make_unique<queue_t>(minCapacity, maxExplicitProducers,
175 maxImplicitProducers);
#define JODA_FLAG_T
Definition: Queue.h:11
#define JODA_JSON_URL_READER_FLAG
Definition: ReaderFlags.h:81
#define JODA_JSON_FILE_BEAUTIFIED_READER_FLAG
Definition: ReaderFlags.h:79
JODA_READER_QUEUE< JODA_JSON_FILE_LINESEPERATED_READER_FLAG > JsonFileSeperatedReaderQueue
Definition: ReaderFlags.h:183
double sample
Definition: ReaderFlags.h:93
ReaderFlag
Definition: ReaderFlags.h:11
#define JODA_JSON_FILE_LINESEPERATED_READER_FLAG
Definition: ReaderFlags.h:77
std::ostream & operator<<(std::ostream &os, const ReaderFlag &flag)
Definition: ReaderFlags.h:46
std::string url
Definition: ReaderFlags.h:151
std::string file
Definition: ReaderFlags.h:94
JODA_READER_QUEUE< JODA_JSON_URL_READER_FLAG > JsonURLReaderQueue
Definition: ReaderFlags.h:186
constexpr enum ReaderFlag operator&(const enum ReaderFlag selfValue, const enum ReaderFlag inValue)
Definition: ReaderFlags.h:28
#define JODA_READER_FLAG_T
Definition: ReaderFlags.h:10
constexpr enum ReaderFlag operator|(const enum ReaderFlag selfValue, const enum ReaderFlag inValue)
Definition: ReaderFlags.h:22
JODA_READER_QUEUE< JODA_JSON_FILE_BEAUTIFIED_READER_FLAG > JsonFileBeautifiedReaderQueue
Definition: ReaderFlags.h:185
Definition: ReaderFlags.h:150
Definition: ReaderFlags.h:92
Definition: ReaderFlags.h:126
static std::unique_ptr< queue_t > getQueue(size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers=0)
Definition: ReaderFlags.h:142
static constexpr bool hasFlag(ReaderFlag flag)
Definition: ReaderFlags.h:132
SampleFile payload_t
Definition: ReaderFlags.h:127
static constexpr ReaderFlag getFlag()
Definition: ReaderFlags.h:135
static std::unique_ptr< queue_t > getQueue()
Definition: ReaderFlags.h:139
Definition: ReaderFlags.h:99
static std::unique_ptr< queue_t > getQueue()
Definition: ReaderFlags.h:113
SampleFile payload_t
Definition: ReaderFlags.h:100
static constexpr ReaderFlag getFlag()
Definition: ReaderFlags.h:109
static std::unique_ptr< queue_t > getQueue(size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers=0)
Definition: ReaderFlags.h:116
static constexpr bool hasFlag(ReaderFlag flag)
Definition: ReaderFlags.h:105
Definition: ReaderFlags.h:156
static constexpr ReaderFlag getFlag()
Definition: ReaderFlags.h:165
static constexpr bool hasFlag(ReaderFlag flag)
Definition: ReaderFlags.h:161
URLPayload payload_t
Definition: ReaderFlags.h:157
static std::unique_ptr< queue_t > getQueue(size_t minCapacity, size_t maxExplicitProducers, size_t maxImplicitProducers=0)
Definition: ReaderFlags.h:171
static std::unique_ptr< queue_t > getQueue()
Definition: ReaderFlags.h:167
Definition: ReaderFlags.h:88
JODA_READER_QUEUE(JODA_READER_QUEUE &q)=delete
result_type operator()(const argument_type &x) const
Definition: ReaderFlags.h:40
ReaderFlag argument_type
Definition: ReaderFlags.h:37
size_t result_type
Definition: ReaderFlags.h:38