Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
model::BinaryFileReader< DataType > Class Template Reference

A class template that reads generic binary files containing arrays of DataType elements. More...

#include <BinaryFileReader.h>

Inheritance diagram for model::BinaryFileReader< DataType >:
Collaboration diagram for model::BinaryFileReader< DataType >:

Public Member Functions

 BinaryFileReader (const std::string &filename)
size_t bytes () const
const bool & success () const

Detailed Description

template<typename DataType>
class model::BinaryFileReader< DataType >

A class template that reads generic binary files containing arrays of DataType elements.

remember that there are 8 bytes in a double so, for example, if double fnum[4] = {9.5, -3.4, 1.0, 2.1}; then sizeof(fnum) is 32

Definition at line 29 of file BinaryFileReader.h.

Constructor & Destructor Documentation

◆ BinaryFileReader()

template<typename DataType>
model::BinaryFileReader< DataType >::BinaryFileReader ( const std::string & filename)
inline
Parameters
[in]filenameThe name of the file to be read The constructor reads the file filename and stores DataType elements in its internal array.

Definition at line 40 of file BinaryFileReader.h.

Member Function Documentation

◆ bytes()

template<typename DataType>
size_t model::BinaryFileReader< DataType >::bytes ( ) const
inline

The number of bytes in the file read

Definition at line 86 of file BinaryFileReader.h.

◆ success()

template<typename DataType>
const bool & model::BinaryFileReader< DataType >::success ( ) const
inline

The number of bytes in the file read

Definition at line 92 of file BinaryFileReader.h.


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