TorchCraftAI
A bot for machine learning research on StarCraft: Brood War
Public Types | Public Member Functions | Static Public Attributes | List of all members
common::DataReaderTransform< T, F > Class Template Reference

Wrapper for DataReaderIterator that applies an additional transform to the resulting batches. More...

#include <datareader.h>

Public Types

using Result = typename std::result_of< F(std::vector< T > const &)>::type
 

Public Member Functions

 DataReaderTransform (std::unique_ptr< DataReaderIterator< T >> &&it, F function, DataReaderThreadInitF init)
 
 ~DataReaderTransform ()
 
bool hasNext ()
 
Result next ()
 

Static Public Attributes

static size_t constexpr kMaxResultsInQueue = 4
 

Detailed Description

template<typename T, typename F>
class common::DataReaderTransform< T, F >

Wrapper for DataReaderIterator that applies an additional transform to the resulting batches.

The transform function will be run in a dedicated thread.

Member Typedef Documentation

template<typename T, typename F>
using common::DataReaderTransform< T, F >::Result = typename std::result_of<F(std::vector<T> const&)>::type

Constructor & Destructor Documentation

template<typename T, typename F>
common::DataReaderTransform< T, F >::DataReaderTransform ( std::unique_ptr< DataReaderIterator< T >> &&  it,
function,
DataReaderThreadInitF  init 
)
inline
template<typename T , typename F >
common::DataReaderTransform< T, F >::~DataReaderTransform ( )

Member Function Documentation

template<typename T , typename F >
bool common::DataReaderTransform< T, F >::hasNext ( )
template<typename T , typename F >
DataReaderTransform< T, F >::Result common::DataReaderTransform< T, F >::next ( )

Member Data Documentation

template<typename T, typename F>
size_t constexpr common::DataReaderTransform< T, F >::kMaxResultsInQueue = 4
static

The documentation for this class was generated from the following file: