35 #ifndef Foam_ensightReadFile_H 36 #define Foam_ensightReadFile_H 60 int64_t timeStepFooterBegin_;
71 void readString(std::string& value);
76 void init(
bool detectFormat);
160 void skip(label
n = 1)
176 return timeStepFooterBegin_;
183 return timeStepOffsets_.
size();
190 return timeStepOffsets_;
void size(const label n)
Older name for setAddressableSize.
static IOstreamOption::streamFormat detectBinaryHeader(const fileName &pathname)
Detect if the file is binary by testing for initial "(C|Fortran) Binary".
virtual Istream & read(char *buf, std::streamsize count) override
Binary read.
A class for handling file names.
bool seekTime(const label timeIndex)
Transient single-file: seek to the file position corresponding to the given time index.
static int debug
Debug switch.
void readPoints(const label nPoints, List< floatVector > &points)
Component-wise reading of points/coordinates. Read all x components, y components and z components...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void skip(label n=1)
Read and discard specified number of elements.
A simple container for options an IOstream can normally have.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
label nTimes() const noexcept
Transient single-file: the number of time steps within the file.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
virtual Istream & read(token &)=0
Return next token from stream.
A variant of IFstream with specialised handling for Ensight reading of strings, integers and floats (...
const UList< int64_t > & timeStepOffets() const noexcept
Transient single-file: the file-offsets for time steps within the file.
static int64_t getTimeStepFooter(IFstream &is, List< int64_t > &offsets)
Extract time step footer information (if any).
Input from file stream as an ISstream, normally using std::ifstream for the actual input...
~ensightReadFile()=default
Destructor.
Istream & readKeyword(string &key)
Read element keyword. Currently the same as read(string)
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
streamFormat
Data format (ascii | binary)
int64_t timeStepFooterBegin() const noexcept
Transient single-file: the position of the FILE_INDEX footer.
streamFormat format() const noexcept
Get the current stream format.