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);
172 void skip(label
n = 1)
188 return timeStepFooterBegin_;
195 return timeStepOffsets_.
size();
202 return timeStepOffsets_;
void size(const label n)
Older name for setAddressableSize.
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.
ensightReadFile(const ensightReadFile &)=delete
No copy construct.
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.
void operator=(const ensightReadFile &)=delete
No copy assignment.
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)
constexpr auto key(const Type &t) noexcept
Helper function to return the enum value.
streamFormat
Data format (ascii | binary | coherent)
int64_t timeStepFooterBegin() const noexcept
Transient single-file: the position of the FILE_INDEX footer.