7#ifndef OPENVDB_IO_QUEUE_HAS_BEEN_INCLUDED
8#define OPENVDB_IO_QUEUE_HAS_BEEN_INCLUDED
113 enum Status { UNKNOWN, PENDING, SUCCEEDED, FAILED };
208 template<
typename Gr
idPtrContainer>
209 Id write(
const GridPtrContainer& grids,
const Archive& archive,
220 std::unique_ptr<Impl> mImpl;
224template<
typename Gr
idPtrContainer>
226Queue::write(
const GridPtrContainer& container,
230 std::copy(container.begin(), container.end(), std::back_inserter(grids));
231 return this->writeGridVec(grids, archive, metadata);
240 return this->writeGridVec(grids, archive, metadata);
SharedPtr< const GridBase > ConstPtr
Definition Grid.h:81
Grid serializer/unserializer.
Definition Archive.h:33
Queue for asynchronous output of grids to files or streams.
Definition Queue.h:101
Index32 capacity() const
Return the maximum number of tasks allowed in the queue.
Id writeGrid(GridBase::ConstPtr grid, const Archive &archive, const MetaMap &fileMetadata=MetaMap())
Queue a single grid for output to a file or stream.
void clearNotifiers()
Deregister all notifiers.
~Queue()
Block until all queued tasks complete (successfully or unsuccessfully).
Index32 size() const
Return the number of tasks currently in the queue.
void setTimeout(Index32 seconds=DEFAULT_TIMEOUT)
Set the maximum number of seconds to wait to queue a task when the queue is full.
void removeNotifier(Id)
Deregister the notifier with the given ID.
Id addNotifier(Notifier)
Register a function that will be called with a task's ID and status when that task completes,...
bool empty() const
Return true if the queue is empty.
Status
Status of a queued task.
Definition Queue.h:113
void setCapacity(Index32)
Set the maximum number of tasks allowed in the queue.
Queue(Index32 capacity=DEFAULT_CAPACITY)
Construct a queue with the given capacity.
Index32 timeout() const
Return the maximum number of seconds to wait to queue a task when the queue is full.
std::function< void(Id, Status)> Notifier
Definition Queue.h:144
Index32 Id
ID number of a queued task or of a registered notification callback.
Definition Queue.h:110
Status status(Id) const
Return the status of the task with the given ID.
uint32_t Index32
Definition Types.h:52
std::vector< GridBase::ConstPtr > GridCPtrVec
Definition Grid.h:513
Definition Exceptions.h:13
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition version.h.in:121
#define OPENVDB_USE_VERSION_NAMESPACE
Definition version.h.in:212