 |
LibraryLink Utilities
3.0.1
Modern C++ wrapper over LibraryLink and WSTP
|
Go to the documentation of this file.
7 #ifndef LLU_CONTAINERS_ITERATORS_DATASTORE_HPP
8 #define LLU_CONTAINERS_ITERATORS_DATASTORE_HPP
42 std::string_view
name() const noexcept;
63 explicit operator
bool() const;
139 return lhs.node == rhs.node;
149 return !(lhs == rhs);
154 #endif // LLU_CONTAINERS_ITERATORS_DATASTORE_HPP
std::variant< std::monostate, Typed::Boolean, Typed::Integer, Typed::Real, Typed::Complex, Typed::Tensor, Typed::SparseArray, Typed::NumericArray, Typed::Image, Typed::UTF8String, Typed::DataStore > TypedArgument
C++ wrapper over LibraryLink's MArgument, which is a plain union.
Definition: TypedMArgument.h:67
Main namespace of LibraryLink Utilities.
Definition: Queue.h:13
friend bool operator!=(const DataStoreIterator &lhs, const DataStoreIterator &rhs)
"Not equal to" operator for DataStoreIterators
Definition: Iterators/DataStore.hpp:148
Proxy input iterator over DataStoreNodes, when dereferenced yields GenericDataNode proxy objects.
Definition: Iterators/DataStore.hpp:75
Basic wrapper over DataStoreNode, provides class-like interface and conversion of the underlying valu...
Definition: Iterators/DataStore.hpp:22
DataStoreIterator & operator++()
Pre-increment operator.
Definition: Iterators/DataStore.hpp:117
std::string_view name() const noexcept
Get node name.
Definition: DataStore.cpp:20
GenericDataNode value_type
This iterator returns proxy objects of type GenericDataNode.
Definition: Iterators/DataStore.hpp:80
reference operator*() const
Get proxy object of the current node.
Definition: Iterators/DataStore.hpp:101
DataStoreNode node
Raw DataStore node.
Definition: Iterators/DataStore.hpp:24
T as() const
Get node value if it is of type T, otherwise throw an exception.
Definition: Generic/DataStore.hpp:233
DataStoreIterator operator++(int)
Post-increment operator.
Definition: Iterators/DataStore.hpp:126
GenericDataNode next() const noexcept
Get GenericDataNode wrapper over the next node.
Definition: DataStore.cpp:12
MArgumentType type() const noexcept
Get type of the node value.
Definition: DataStore.cpp:16
std::input_iterator_tag iterator_category
As with all proxy iterators, DataStoreIterator is only an input iterator.
Definition: Iterators/DataStore.hpp:86
DataStoreIterator(DataStoreNode n)
Create a DataStoreIterator pointing to a given node.
Definition: Iterators/DataStore.hpp:95
MArgumentType
Strongly type enum with possible types of data stored in MArgument.
Definition: MArgument.h:22
mint difference_type
Provide difference_type as required for input iterators.
Definition: Iterators/DataStore.hpp:92
static const st_WolframIOLibrary_Functions * DataStoreAPI()
Get a pointer to structure with function pointers to DataStore API.
Definition: LibraryData.cpp:45
Template class and utilities to work with MArgument in type-safe manner.
Argument::TypedArgument value() const
Get value of the node as the variant type.
Definition: DataStore.cpp:26
pointer operator->() const
Get proxy object of the current node.
Definition: Iterators/DataStore.hpp:109
friend bool operator==(const DataStoreIterator &lhs, const DataStoreIterator &rhs)
"Equal to" operator for DataStoreIterators
Definition: Iterators/DataStore.hpp:138