|
ipcq 0.12.0
|
Shared memory queue. More...
Topics | |
| implementation details | |
| Shared memory queue implementation details. | |
Files | |
| file | adapter.hpp |
Provides iterator adapter for ipcq::BasicReader. | |
| file | error.hpp |
| Contains declarations for ipcq::Error and related. | |
| file | policies.hpp |
| Declares ipcq policies. | |
| file | reader.hpp |
| Contains definition of ipcq::BasicReader. | |
| file | writer.hpp |
Contains declarations for ipcq::BasicWriter. | |
| file | version.hpp |
| Contains version macro. | |
Classes | |
| struct | ipcq::IteratorTraits< Iterator, class > |
| Primary template for InputIterators. More... | |
| struct | ipcq::IteratorTraits< Iterator, std::void_t< typename Iterator::container_type > > |
| Template specialization for OutputIterators for which normal std::iterator_traits::value_type is void. More... | |
| struct | ipcq::OutputIteratorAdapter< Iterator > |
Adapts either LegacyOutputIterator or Iterator type (e.g. More... | |
| class | ipcq::ErrorCategory |
| ipcq error category. More... | |
| class | ipcq::BasicReader< T, ConditionPolicy, ShmTraits > |
| Queue BasicReader class. More... | |
| class | ipcq::BasicWriter< T, ConditionPolicy, ShmTraits > |
| Queue writer class. More... | |
Macros | |
| #define | IPCQ_VERSION 1200 |
Integer representation of 0.12.0 version tuple. | |
Typedefs | |
| using | ipcq::BoostConditionPolicy = detail::BoostConditionPolicy |
| Uses boost condition policies, not lock-free. | |
| using | ipcq::SpinConditionPolicy = detail::SpinConditionPolicy |
| Lock free condition policy that use spinning. | |
| template<class T> | |
| using | ipcq::Reader = BasicReader<T, detail::BoostConditionPolicy> |
| Convenience alias with reasonable default condition policy. | |
| template<class T> | |
| using | ipcq::Writer = BasicWriter<T, BoostConditionPolicy> |
| Convenience alias with reasonable default condition policy. | |
Enumerations | |
| enum class | ipcq::Error { ipcq::Error::WouldBlock = 1 , ipcq::Error::Closed , ipcq::Error::Timeout , ipcq::Error::InconsistentState , ipcq::Error::TypeMismatch , ipcq::Error::Overflow , ipcq::Error::BadFile , ipcq::Error::BadVersion } |
| ipcq err condition enum. More... | |
| enum class | ipcq::Notify { ipcq::Notify::None , ipcq::Notify::All } |
| Notification policy. More... | |
Functions | |
| template<class Container> | |
| constexpr auto | ipcq::BackInserter (Container &c) -> OutputIteratorAdapter< std::back_insert_iterator< Container > > |
Convenience function that creates an OutputIteratorAdapter with a std::back_insert_iterator for a container. | |
| const std::error_category & | ipcq::GetErrorCategory () |
| ipcq error category. | |
| std::error_code | ipcq::make_error_code (Error e) |
Function overload to create std::error_code from ipcq::Error. | |
Shared memory queue.
| #define IPCQ_VERSION 1200 |
Integer representation of 0.12.0 version tuple.
#include <ipcq/version.hpp>
Definition at line 27 of file version.hpp.
Uses boost condition policies, not lock-free.
Definition at line 22 of file policies.hpp.
| using ipcq::Reader = BasicReader<T, detail::BoostConditionPolicy> |
Convenience alias with reasonable default condition policy.
Definition at line 489 of file reader.hpp.
Lock free condition policy that use spinning.
Definition at line 29 of file policies.hpp.
| using ipcq::Writer = BasicWriter<T, BoostConditionPolicy> |
Convenience alias with reasonable default condition policy.
Definition at line 230 of file writer.hpp.
|
strong |
ipcq err condition enum.
Although the errors are "portable", so considered an error_condition, rather than an error_code, std::error_code can still be created explicitly with ipcq::make_error_ode(Error).
| Enumerator | |
|---|---|
| WouldBlock | Non-blocking operation would block. |
| Closed | Queue is closed or otherwise not available for reading. |
| Timeout | Operation timed out. |
| InconsistentState | Reader is in an inconsistent state w.r.t. shared memory state. The typical scenario for this error is if the writer overtakes the reader, overwriting an element being expecter by the reader. |
| TypeMismatch | Queue type mismatch. |
| Overflow | Value exeeds storage capacity. |
| BadFile | File type is incorrect (not an ipcq shared object). |
| BadVersion | File version mismatch (shared object created by ipcq with different file version). |
|
strong |
Notification policy.
| Enumerator | |
|---|---|
| None | Don't notify. |
| All | Notify all waiting readers. |
Definition at line 23 of file writer.hpp.
|
constexpr |
Convenience function that creates an OutputIteratorAdapter with a std::back_insert_iterator for a container.
Equivalent to:
OutputIteratorAdapter(std::back_insert_iterator(container));
Example:
std::vector<Topic> buffer; buffer.reserve(BATCH_SIZE); reader.Read(ipcq::BackInserter(buffer), BATCH_SIZE, 5s);
Definition at line 90 of file adapter.hpp.
|
inline |
|
inline |
Function overload to create std::error_code from ipcq::Error.