Public Member Functions | List of all members
ensightReadFile Class Reference

Ensight output with specialized read() for strings, integers and floats. Correctly handles binary read as well. More...

Inheritance diagram for ensightReadFile:
Inheritance graph
[legend]
Collaboration diagram for ensightReadFile:
Collaboration graph
[legend]

Public Member Functions

 ensightReadFile (const fileName &pathname, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
 
 ~ensightReadFile ()=default
 
virtual Istreamread (char *buf, std::streamsize count)
 
Istreamread (string &value)
 
Istreamread (label &value)
 
Istreamread (scalar &value)
 
virtual IstreamreadKeyword (string &key)
 
IstreamreadBinaryHeader ()
 
virtual Istreamread (token &)=0
 
virtual Istreamread (char &)=0
 
virtual Istreamread (word &)=0
 
virtual Istreamread (string &)=0
 
virtual Istreamread (label &)=0
 
virtual Istreamread (floatScalar &)=0
 
virtual Istreamread (doubleScalar &)=0
 
virtual Istreamread (char *, std::streamsize)=0
 
- Public Member Functions inherited from IFstream
 ClassName ("IFstream")
 
 IFstream (const fileName &pathname, IOstreamOption streamOpt=IOstreamOption())
 
 IFstream (const fileName &pathname, IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion)
 
 ~IFstream ()=default
 
virtual std::istream & stdStream ()
 
virtual const std::istream & stdStream () const
 
virtual void rewind ()
 
virtual void print (Ostream &os) const
 
IFstreamoperator() () const
 
ISstreamget (char &c)
 
virtual const fileNamename () const
 
virtual fileNamename ()
 
- Public Member Functions inherited from ISstream
 ISstream (std::istream &is, const string &streamName, IOstreamOption streamOpt=IOstreamOption())
 
 ISstream (std::istream &is, const string &streamName, IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED)
 
virtual ~ISstream ()=default
 
virtual const fileNamename () const
 
virtual fileNamename ()
 
virtual ios_base::fmtflags flags () const
 
bool seekCommentEnd_Cstyle ()
 
bool continueReadUntilRightBrace (std::string &str, const bool stripComments=true)
 
ISstreamget (char &c)
 
int peek ()
 
ISstreamgetLine (std::string &str, char delim='\n')
 
std::streamsize getLine (std::nullptr_t, char delim='\n')
 
ISstreamputback (const char c)
 
virtual Istreamread (token &t)
 
virtual Istreamread (char &c)
 
virtual Istreamread (word &str)
 
virtual Istreamread (floatScalar &val)
 
virtual Istreamread (doubleScalar &val)
 
virtual IstreamreadRaw (char *data, std::streamsize count)
 
virtual bool beginRawRead ()
 
virtual bool endRawRead ()
 
virtual ios_base::fmtflags flags (const ios_base::fmtflags flags)
 
- Public Member Functions inherited from Istream
 Istream (const Istream &)=default
 
virtual ~Istream ()=default
 
 Istream (IOstreamOption streamOpt=IOstreamOption())
 
 Istream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver=IOstreamOption::currentVersion, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED)
 
const tokenpeekBack () const noexcept
 
bool peekBack (token &tok)
 
void putBack (const token &tok)
 
bool getBack (token &tok)
 
bool readBegin (const char *funcName)
 
bool readEnd (const char *funcName)
 
char readBeginList (const char *funcName)
 
char readEndList (const char *funcName)
 
Istreamoperator() () const
 
- Public Member Functions inherited from IOstream
 IOstream (const IOstream &)=default
 
virtual ~IOstream ()=default
 
 IOstream (IOstreamOption streamOpt=IOstreamOption())
 
 IOstream (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType cmp=IOstreamOption::UNCOMPRESSED)
 
fileName relativeName () const
 
virtual bool check (const char *operation) const
 
bool fatalCheck (const char *operation) const
 
bool opened () const noexcept
 
bool closed () const noexcept
 
bool good () const noexcept
 
bool eof () const noexcept
 
bool fail () const noexcept
 
bool bad () const noexcept
 
 operator bool () const noexcept
 
bool operator! () const noexcept
 
unsigned labelByteSize () const noexcept
 
unsigned scalarByteSize () const noexcept
 
void setLabelByteSize (unsigned nbytes) noexcept
 
void setScalarByteSize (unsigned nbytes) noexcept
 
template<class T = label>
std::enable_if< std::is_integral< T >::value, bool >::type checkLabelSize () const noexcept
 
template<class T = scalar>
std::enable_if< std::is_floating_point< T >::value, bool >::type checkScalarSize () const noexcept
 
label lineNumber () const noexcept
 
label & lineNumber () noexcept
 
label lineNumber (const label num) noexcept
 
void setEof () noexcept
 
void setFail () noexcept
 
void setBad ()
 
ios_base::fmtflags setf (const ios_base::fmtflags f)
 
ios_base::fmtflags setf (const ios_base::fmtflags f, const ios_base::fmtflags mask)
 
void unsetf (const ios_base::fmtflags f)
 
void print (Ostream &os, const int streamState) const
 
InfoProxy< IOstreaminfo () const
 
- Public Member Functions inherited from IOstreamOption
constexpr IOstreamOption (streamFormat fmt=streamFormat::ASCII, compressionType comp=compressionType::UNCOMPRESSED) noexcept
 
constexpr IOstreamOption (streamFormat fmt, compressionType comp, versionNumber ver) noexcept
 
constexpr IOstreamOption (streamFormat fmt, versionNumber ver, compressionType comp=compressionType::UNCOMPRESSED) noexcept
 
 IOstreamOption (const IOstreamOption &opt, streamFormat fmt) noexcept
 
streamFormat format () const noexcept
 
streamFormat format (const streamFormat fmt) noexcept
 
streamFormat format (const word &formatName)
 
compressionType compression () const noexcept
 
compressionType compression (const compressionType comp) noexcept
 
compressionType compression (const word &compName)
 
versionNumber version () const noexcept
 
versionNumber version (const versionNumber ver) noexcept
 
versionNumber version (const token &tok)
 

Additional Inherited Members

- Public Types inherited from IOstream
enum  streamAccess : char { CLOSED = 0, OPENED }
 
- Public Types inherited from IOstreamOption
enum  streamFormat : char { ASCII = 0, BINARY }
 
enum  compressionType : char { UNCOMPRESSED = 0, COMPRESSED }
 
- Static Public Member Functions inherited from IOstream
static unsigned int defaultPrecision () noexcept
 
static unsigned int defaultPrecision (unsigned int prec) noexcept
 
- Static Public Member Functions inherited from IOstreamOption
static streamFormat formatEnum (const word &formatName, const streamFormat deflt=streamFormat::ASCII)
 
static streamFormat formatEnum (const word &key, const dictionary &dict, const streamFormat deflt=streamFormat::ASCII)
 
static compressionType compressionEnum (const word &compName, const compressionType deflt=compressionType::UNCOMPRESSED)
 
static compressionType compressionEnum (const word &key, const dictionary &dict, const compressionType deflt=compressionType::UNCOMPRESSED)
 
- Static Public Attributes inherited from IOstream
static unsigned int precision_
 
- Static Public Attributes inherited from IOstreamOption
static const Enum< streamFormatformatNames
 
static const versionNumber currentVersion
 
- Protected Member Functions inherited from Istream
bool hasPutback () const noexcept
 
- Protected Member Functions inherited from IOstream
void setOpened () noexcept
 
void setClosed () noexcept
 
void setState (std::ios_base::iostate state) noexcept
 
void setGood () noexcept
 
- Protected Attributes inherited from IOstream
std::ios_base::iostate ioState_
 
streamAccess openClosed_
 
unsigned char sizeofLabel_
 
unsigned char sizeofScalar_
 
label lineNumber_
 
- Static Protected Attributes inherited from IOstream
static fileName staticName_
 

Detailed Description

Ensight output with specialized read() for strings, integers and floats. Correctly handles binary read as well.

Definition at line 43 of file ensightReadFile.H.

Constructor & Destructor Documentation

◆ ensightReadFile()

Definition at line 26 of file ensightReadFile.C.

◆ ~ensightReadFile()

~ensightReadFile ( )
default

Member Function Documentation

◆ read() [1/12]

Foam::Istream & read ( char *  buf,
std::streamsize  count 
)
virtual

Reimplemented from ISstream.

Definition at line 38 of file ensightReadFile.C.

References Foam::BitOps::count(), and Istream::read().

Referenced by Foam::discard(), ensightSurfaceReader::geometry(), ensightSurfaceReader::readField(), and ensightSurfaceReader::readGeometryHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read() [2/12]

Foam::Istream & read ( string value)
virtual

Reimplemented from ISstream.

Definition at line 48 of file ensightReadFile.C.

References IOstreamOption::BINARY, IOstream::eof(), IOstreamOption::format(), ISstream::getLine(), and IFstream::stdStream().

Here is the call graph for this function:

◆ read() [3/12]

Foam::Istream & read ( label &  value)
virtual

Reimplemented from ISstream.

Definition at line 93 of file ensightReadFile.C.

References IOstreamOption::BINARY, format(), and Foam::read().

Here is the call graph for this function:

◆ read() [4/12]

Foam::Istream & read ( scalar &  value)

Definition at line 115 of file ensightReadFile.C.

References IOstreamOption::BINARY, format(), and Foam::read().

Here is the call graph for this function:

◆ readKeyword()

Foam::Istream & readKeyword ( string key)
virtual

Definition at line 138 of file ensightReadFile.C.

References Foam::glTF::key(), and Foam::read().

Here is the call graph for this function:

◆ readBinaryHeader()

Foam::Istream & readBinaryHeader ( )

Definition at line 145 of file ensightReadFile.C.

References IOstreamOption::BINARY, format(), and Foam::read().

Referenced by ensightSurfaceReader::readGeometryHeader().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read() [5/12]

virtual Istream& read

◆ read() [6/12]

virtual Istream& read

◆ read() [7/12]

virtual Istream& read

◆ read() [8/12]

virtual Istream& read

◆ read() [9/12]

virtual Istream& read

◆ read() [10/12]

virtual Istream& read

◆ read() [11/12]

virtual Istream& read

◆ read() [12/12]

virtual Istream& read

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