Grid 0.7.0
Grid::Reader< T > Class Template Reference

#include <BaseIO.h>

Public Member Functions

 Reader (void)
virtual ~Reader (void)=default
bool push (const std::string &s)
void pop (void)
template<typename U>
std::enable_if< std::is_base_of< Serializable, U >::value, void >::type read (const std::string &s, U &output)
template<typename U>
std::enable_if<!std::is_base_of< Serializable, U >::value &&!EigenIO::is_tensor< U >::value, void >::type read (const std::string &s, U &output)
template<typename U>
void read (const std::string &s, iScalar< U > &output)
template<typename U, int N>
void read (const std::string &s, iVector< U, N > &output)
template<typename U, int N>
void read (const std::string &s, iMatrix< U, N > &output)
template<typename ETensor>
std::enable_if< EigenIO::is_tensor< ETensor >::value, void >::type read (const std::string &s, ETensor &output)
template<typename ETensor>
std::enable_if< EigenIO::is_tensor_fixed< ETensor >::value, void >::type Reshape (ETensor &t, const std::array< typename ETensor::Index, ETensor::NumDimensions > &dims)
template<typename ETensor>
std::enable_if< EigenIO::is_tensor_variable< ETensor >::value, void >::type Reshape (ETensor &t, const std::array< typename ETensor::Index, ETensor::NumDimensions > &dims)
template<typename S>
std::enable_if< EigenIO::is_scalar< S >::value, void >::type copyScalars (S &Dest, const S *&pSource)
template<typename S>
std::enable_if< isGridTensor< S >::value, void >::type copyScalars (S &Dest, const typename GridTypeMapper< S >::scalar_type *&pSource)

Protected Member Functions

template<typename U>
void fromString (U &output, const std::string &s)

Private Attributes

T * upcast

Detailed Description

template<typename T>
class Grid::Reader< T >

Definition at line 177 of file BaseIO.h.

Constructor & Destructor Documentation

◆ Reader()

template<typename T>
Reader::Reader ( void )

Definition at line 373 of file BaseIO.h.

References upcast.

◆ ~Reader()

template<typename T>
virtual Grid::Reader< T >::~Reader ( void )
virtualdefault

Member Function Documentation

◆ push()

template<typename T>
bool Reader::push ( const std::string & s)

Definition at line 379 of file BaseIO.h.

References upcast.

Referenced by Grid::push(), and Grid::push().

◆ pop()

template<typename T>
void Reader::pop ( void )

Definition at line 385 of file BaseIO.h.

References upcast.

Referenced by Grid::pop().

◆ read() [1/6]

template<typename T>
template<typename U>
std::enable_if<!std::is_base_of< Serializable, U >::value &&!EigenIO::is_tensor< U >::value, void >::type Reader::read ( const std::string & s,
U & output )

Definition at line 393 of file BaseIO.h.

References U.

Referenced by Grid::read().

◆ read() [2/6]

template<typename T>
template<typename U>
std::enable_if<!std::is_base_of< Serializable, U >::value &&!EigenIO::is_tensor< U >::value, void >::type Grid::Reader< T >::read ( const std::string & s,
U & output )

References U.

◆ read() [3/6]

template<typename T>
template<typename U>
void Reader::read ( const std::string & s,
iScalar< U > & output )

Definition at line 409 of file BaseIO.h.

References upcast, and Grid::vecToTensor().

◆ read() [4/6]

template<typename T>
template<typename U, int N>
void Reader::read ( const std::string & s,
iVector< U, N > & output )

Definition at line 419 of file BaseIO.h.

References upcast, and Grid::vecToTensor().

◆ read() [5/6]

template<typename T>
template<typename U, int N>
void Reader::read ( const std::string & s,
iMatrix< U, N > & output )

Definition at line 429 of file BaseIO.h.

References upcast, and Grid::vecToTensor().

◆ read() [6/6]

template<typename T>
template<typename ETensor>
std::enable_if< EigenIO::is_tensor< ETensor >::value, void >::type Reader::read ( const std::string & s,
ETensor & output )

Definition at line 440 of file BaseIO.h.

References copyScalars(), Reshape(), and upcast.

◆ Reshape() [1/2]

template<typename T>
template<typename ETensor>
std::enable_if< EigenIO::is_tensor_variable< ETensor >::value, void >::type Reader::Reshape ( ETensor & t,
const std::array< typename ETensor::Index, ETensor::NumDimensions > & dims )

Definition at line 496 of file BaseIO.h.

Referenced by read().

◆ Reshape() [2/2]

template<typename T>
template<typename ETensor>
std::enable_if< EigenIO::is_tensor_variable< ETensor >::value, void >::type Grid::Reader< T >::Reshape ( ETensor & t,
const std::array< typename ETensor::Index, ETensor::NumDimensions > & dims )

◆ copyScalars() [1/2]

template<typename T>
template<typename S>
std::enable_if< EigenIO::is_scalar< S >::value, void >::type Grid::Reader< T >::copyScalars ( S & Dest,
const S *& pSource )
inline

Definition at line 210 of file BaseIO.h.

Referenced by read().

◆ copyScalars() [2/2]

template<typename T>
template<typename S>
std::enable_if< isGridTensor< S >::value, void >::type Grid::Reader< T >::copyScalars ( S & Dest,
const typename GridTypeMapper< S >::scalar_type *& pSource )
inline

Definition at line 217 of file BaseIO.h.

◆ fromString()

template<typename T>
template<typename U>
void Reader::fromString ( U & output,
const std::string & s )
protected

Definition at line 518 of file BaseIO.h.

References U.

Field Documentation

◆ upcast

template<typename T>
T* Grid::Reader< T >::upcast
private

Definition at line 227 of file BaseIO.h.

Referenced by pop(), push(), read(), read(), read(), read(), and Reader().


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