logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

EMF::DATASTREAM - Support different endian modes when reading and writing the metafile.

Author

       Generated automatically by Doxygen for libemf from the source code.

Version 1.0.9                                Thu Jun 6 2024 23:01:07                          EMF::DATASTREAM(3)

Constructor & Destructor Documentation

EMF::DATASTREAM::DATASTREAM(::FILE*fp=0)[inline]
       Constructor for DATASTREAM.

       Parametersfp optional file pointer (but must be assigned before any output occurs.)

Detailed Description

       Support different endian modes when reading and writing the metafile.

       To support different endian modes, rather than just writing the structures directly to a file via fwrite(
       &emr, ...), we have to write each element of the structure separately, swapping bytes as necessary.
       datastream supports this. Remarkably similar to the QDataStream class from Qt. So, too, for reading.

Member Function Documentation

DATASTREAM&EMF::DATASTREAM::operator<<(const::EMR&emr)[inline]
       Output an Enhanced Metafile Record header.

       Parametersemr Enhanced Metafile Record header to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(const::EMRTEXT&text)[inline]
       Output an Enhanced Metafile Text Record.

       Parameterstext Enhanced Metafile Text Record to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constBYTE&byte)[inline]
       Output a byte to the stream (not swabbed or anything).

       Parametersbyte byte to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constBYTEARRAY&array)[inline]
       Output an array of BYTEs.

       Parametersarray array of BYTEs to output.

       References EMF::BYTEARRAY::array_, and EMF::BYTEARRAY::n_.

   DATASTREAM&EMF::DATASTREAM::operator<<(constCHARSTR&charstr)[inline]
       Output a single byte character string.

       Parameterscharstr structure to output.

       References EMF::CHARSTR::length_, and EMF::CHARSTR::string_.

   DATASTREAM&EMF::DATASTREAM::operator<<(constDWORD&dword)[inline]
       Output a double word (long) to the stream (swabbed).

       Parametersdword double word (long) to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constDWORDARRAY&array)[inline]
       Output an array of double words (longs).

       Parametersarray array of double words (longs) to output.

       References EMF::DWORDARRAY::dwords_, and EMF::DWORDARRAY::n_.

   DATASTREAM&EMF::DATASTREAM::operator<<(constEXTLOGFONTW&font)[inline]
       Output an Extended Logical Font definition (using WCHAR strings).

       Parametersfont Extended Logical Font definition to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constEXTLOGPEN&pen)[inline]
       Output an Extended Logical Pen definition.

       Parameterspen Extended Logical Pen definition to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constFLOAT&float_)[inline]
       Output a single precision float to the stream (swabbed).

       Parametersfloat_ single precision float to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constINT&int_)[inline]
       Output a (long) int to the stream (swabbed).

       Parametersint_ (long) int to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constINT16&word)[inline]
       Output a (short, 16-bit) word to the stream (swabbed).

       Parametersword (short, 16-bit) word to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constINTARRAY&array)[inline]
       Output an array of (long) ints.

       Parametersarray array of (long) ints to output.

       References EMF::INTARRAY::ints_, and EMF::INTARRAY::n_.

   DATASTREAM&EMF::DATASTREAM::operator<<(constLOGBRUSH&brush)[inline]
       Output a Logical Brush definition.

       Parametersbrush Logical Brush definition to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constLOGFONTW&font)[inline]
       Output a Logical Font definition (using WCHAR strings).

       Parametersfont Logical Font definition to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constLOGPALETTE&palette)[inline]
       Output a Logical Palette.

       Parameterspalette Logical Palette to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constLOGPEN&pen)[inline]
       Output a Logical Pen definition.

       Parameterspen Logical Pen definition to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constLONG&long_)[inline]
       Output a long int to the stream (swabbed).

       Parameterslong_ long int to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constPADDING&padding)[inline]
       Output a series of '\0's to pad out a record.

       Parameterspadding simple padding structure (length and number of nulls).

       References EMF::PADDING::padding_, and EMF::PADDING::size_.

   DATASTREAM&EMF::DATASTREAM::operator<<(constPANOSE&panose)[inline]
       Output a Panose structure.

       Parameterspanose Panose structure to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constPOINT&point)[inline]
       Output a POINT structure.

       Parameterspoint POINT to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constPOINT16&point)[inline]
       Output a POINT16 structure.

       Parameterspoint POINT16 to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constPOINT16ARRAY&array)[inline]
       Output an array of POINT16s.

       Parametersarray array of POINT16s to output.

       References EMF::POINT16ARRAY::n_, and EMF::POINT16ARRAY::points_.

   DATASTREAM&EMF::DATASTREAM::operator<<(constPOINTL&pointl)[inline]
       Output a POINTL structure.

       Parameterspointl POINTL to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constPOINTLARRAY&array)[inline]
       Output an array of POINTLs.

       Parametersarray array of POINTLs to output.

       References EMF::POINTLARRAY::n_, and EMF::POINTLARRAY::points_.

   DATASTREAM&EMF::DATASTREAM::operator<<(constRECTL&rectl)[inline]
       Output a RECTL structure.

       Parametersrectl structure to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constSIZEL&sizel)[inline]
       Output a SIZEL structure.

       Parameterssizel structure to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constUINT&uint)[inline]
       Output a (long) unsigned int to the stream (swabbed).

       Parametersuint (long) unsigned int to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constWCHARSTR&wcharstr)[inline]
       Output a WCHAR string (note: the individual characters are swabbed).

       Parameterswcharstr structure to output.

       References EMF::WCHARSTR::length_, and EMF::WCHARSTR::string_.

   DATASTREAM&EMF::DATASTREAM::operator<<(constWORD&word)[inline]
       Output a (short) word to the stream (swabbed).

       Parametersword (short) word to output.

   DATASTREAM&EMF::DATASTREAM::operator<<(constXFORM&xform)[inline]
       Output an XFORM structure.

       Parametersxform XFORM to output.

   DATASTREAM&EMF::DATASTREAM::operator>>(::EMR&emr)[inline]
       Input an Enhanced Metafile Record header.

       Parametersemr destination of Enhanced Metafile Record header.

   DATASTREAM&EMF::DATASTREAM::operator>>(::EMRTEXT&text)[inline]
       Input an Enhanced Metafile Text Record.

       Parameterstext destination of Enhanced Metafile Text Record.

   DATASTREAM&EMF::DATASTREAM::operator>>(BYTE&byte)[inline]
       Input a byte from the stream (not swabbed or anything).

       Parametersbyte destination for input byte.

   DATASTREAM&EMF::DATASTREAM::operator>>(BYTEARRAY&array)[inline]
       Input an array of BYTEs.

       Parametersarray destination of array of input BYTEs.

       References EMF::BYTEARRAY::array_, and EMF::BYTEARRAY::n_.

   DATASTREAM&EMF::DATASTREAM::operator>>(CHARSTR&charstr)[inline]
       Input a single byte character string.

       Parameterscharstr destination of input CHAR string.

       References EMF::CHARSTR::length_, and EMF::CHARSTR::string_.

   DATASTREAM&EMF::DATASTREAM::operator>>(DWORD&dword)[inline]
       Input a double word (long) from the stream (swabbed).

       Parametersdword destination for double word (long).

   DATASTREAM&EMF::DATASTREAM::operator>>(DWORDARRAY&array)[inline]
       Input an array of double words (longs).

       Parametersarray destination of array of input double words (longs).

       References EMF::DWORDARRAY::dwords_, and EMF::DWORDARRAY::n_.

   DATASTREAM&EMF::DATASTREAM::operator>>(EXTLOGFONTW&font)[inline]
       Input an Extended Logical Font definition (using WCHAR strings).

       Parametersfont destination of Extended Logical Font definition.

   DATASTREAM&EMF::DATASTREAM::operator>>(EXTLOGPEN&pen)[inline]
       Input an Extended Logical Pen definition.

       Parameterspen destination of Extended Logical Pen definition.

   DATASTREAM&EMF::DATASTREAM::operator>>(FLOAT&float_)[inline]
       Input a single precision float from the stream (swabbed).

       Parametersfloat_ destination for single precision float.

   DATASTREAM&EMF::DATASTREAM::operator>>(INT&int_)[inline]
       Input a (long) int from the stream (swabbed).

       Parametersint_ destination for (long) int.

   DATASTREAM&EMF::DATASTREAM::operator>>(INT16&word)[inline]
       Input a (short, 16-bit) word from the stream (swabbed).

       Parametersword destination for (short, 16-bit) word.

   DATASTREAM&EMF::DATASTREAM::operator>>(INTARRAY&array)[inline]
       Input an array of (long) ints.

       Parametersarray destination of array of input (long) ints.

       References EMF::INTARRAY::ints_, and EMF::INTARRAY::n_.

   DATASTREAM&EMF::DATASTREAM::operator>>(LOGBRUSH&brush)[inline]
       Input a Logical Brush definition.

       Parametersbrush destination of Logical Brush definition.

   DATASTREAM&EMF::DATASTREAM::operator>>(LOGFONTW&font)[inline]
       Input a Logical Font definition (using WCHAR strings).

       Parametersfont destination of Logical Font definition.

   DATASTREAM&EMF::DATASTREAM::operator>>(LOGPALETTE&palette)[inline]
       Input a Logical Palette.

       Parameterspalette destination of input Logical Palette.

   DATASTREAM&EMF::DATASTREAM::operator>>(LOGPEN&pen)[inline]
       Input a Logical Pen definition.

       Parameterspen destination of Logical Pen definition.

   DATASTREAM&EMF::DATASTREAM::operator>>(LONG&long_)[inline]
       Input a long int from the stream (swabbed).

       Parameterslong_ destination for long int.

   DATASTREAM&EMF::DATASTREAM::operator>>(PANOSE&panose)[inline]
       Input a Panose structure.

       Parameterspanose destinatino of input Panose structure.

   DATASTREAM&EMF::DATASTREAM::operator>>(POINT&point)[inline]
       Input a POINT structure.

       Parameterspoint destination of input POINT.

   DATASTREAM&EMF::DATASTREAM::operator>>(POINT16&point)[inline]
       Input a POINT16 structure.

       Parameterspoint destination of input POINT16.

   DATASTREAM&EMF::DATASTREAM::operator>>(POINT16ARRAY&array)[inline]
       Input an array of POINT16s.

       Parametersarray destination of array of input POINT16s.

       References EMF::POINT16ARRAY::n_, and EMF::POINT16ARRAY::points_.

   DATASTREAM&EMF::DATASTREAM::operator>>(POINTL&pointl)[inline]
       Input a POINTL structure.

       Parameterspointl destination of input POINTL.

   DATASTREAM&EMF::DATASTREAM::operator>>(POINTLARRAY&array)[inline]
       Input an array of POINTLs.

       Parametersarray destination of array of input POINTLs.

       References EMF::POINTLARRAY::n_, and EMF::POINTLARRAY::points_.

   DATASTREAM&EMF::DATASTREAM::operator>>(RECTL&rectl)[inline]
       Input a RECTL structure.

       Parametersrectl destination of input RECTL.

   DATASTREAM&EMF::DATASTREAM::operator>>(SIZEL&sizel)[inline]
       Input a SIZEL structure.

       Parameterssizel destination of input SIZEL.

   DATASTREAM&EMF::DATASTREAM::operator>>(UINT&uint)[inline]
       Input a (long) unsigned int from the stream (swabbed).

       Parametersuint destination for (long) unsigned int.

   DATASTREAM&EMF::DATASTREAM::operator>>(WCHARSTR&wcharstr)[inline]
       Input a WCHAR string (note: the individual characters are swabbed.)

       Parameterswcharstr destination of input WCHAR string.

       References EMF::WCHARSTR::length_, and EMF::WCHARSTR::string_.

   DATASTREAM&EMF::DATASTREAM::operator>>(WORD&word)[inline]
       Input a (short) word from the stream (swabbed).

       Parametersword destination for (short) word.

   DATASTREAM&EMF::DATASTREAM::operator>>(XFORM&xform)[inline]
       Input an XFORM structure.

       Parametersxform destination of input XFORM.

   voidEMF::DATASTREAM::setStream(::FILE*fp)[inline]
       Use the given FILE stream as the input/output destination.

       Parametersfp file point for i/o.

Name

       EMF::DATASTREAM - Support different endian modes when reading and writing the metafile.

Synopsis

       #include <libemf.h>

   PublicMemberFunctionsDATASTREAM (::FILE *fp=0)
       void setStream (::FILE *fp)
       DATASTREAM & operator<< (const BYTE &byte)
       DATASTREAM & operator>> (BYTE &byte)
       DATASTREAM & operator<< (const WORD &word)
       DATASTREAM & operator>> (WORD &word)
       DATASTREAM & operator<< (const INT16 &word)
       DATASTREAM & operator>> (INT16 &word)
       DATASTREAM & operator<< (const DWORD &dword)
       DATASTREAM & operator>> (DWORD &dword)
       DATASTREAM & operator<< (const LONG &long_)
       DATASTREAM & operator>> (LONG &long_)
       DATASTREAM & operator<< (const INT &int_)
       DATASTREAM & operator>> (INT &int_)
       DATASTREAM & operator<< (const UINT &uint)
       DATASTREAM & operator>> (UINT &uint)
       DATASTREAM & operator<< (const FLOAT &float_)
       DATASTREAM & operator>> (FLOAT &float_)
       DATASTREAM & operator<< (const PADDING &padding)
       DATASTREAM & operator<< (const RECTL &rectl)
       DATASTREAM & operator>> (RECTL &rectl)
       DATASTREAM & operator<< (const SIZEL &sizel)
       DATASTREAM & operator>> (SIZEL &sizel)
       DATASTREAM & operator<< (const WCHARSTR &wcharstr)
       DATASTREAM & operator>> (WCHARSTR &wcharstr)
       DATASTREAM & operator<< (const CHARSTR &charstr)
       DATASTREAM & operator>> (CHARSTR &charstr)
       DATASTREAM & operator<< (const ::EMR &emr)
       DATASTREAM & operator>> (::EMR &emr)
       DATASTREAM & operator<< (const POINT &point)
       DATASTREAM & operator>> (POINT &point)
       DATASTREAM & operator<< (const POINTL &pointl)
       DATASTREAM & operator>> (POINTL &pointl)
       DATASTREAM & operator<< (const POINT16 &point)
       DATASTREAM & operator>> (POINT16 &point)
       DATASTREAM & operator<< (const XFORM &xform)
       DATASTREAM & operator>> (XFORM &xform)
       DATASTREAM & operator<< (const BYTEARRAY &array)
       DATASTREAM & operator>> (BYTEARRAY &array)
       DATASTREAM & operator<< (const POINTLARRAY &array)
       DATASTREAM & operator>> (POINTLARRAY &array)
       DATASTREAM & operator<< (const POINT16ARRAY &array)
       DATASTREAM & operator>> (POINT16ARRAY &array)
       DATASTREAM & operator<< (const INTARRAY &array)
       DATASTREAM & operator>> (INTARRAY &array)
       DATASTREAM & operator<< (const DWORDARRAY &array)
       DATASTREAM & operator>> (DWORDARRAY &array)
       DATASTREAM & operator<< (const ::EMRTEXT &text)
       DATASTREAM & operator>> (::EMRTEXT &text)
       DATASTREAM & operator<< (const LOGPEN &pen)
       DATASTREAM & operator>> (LOGPEN &pen)
       DATASTREAM & operator<< (const EXTLOGPEN &pen)
       DATASTREAM & operator>> (EXTLOGPEN &pen)
       DATASTREAM & operator<< (const LOGBRUSH &brush)
       DATASTREAM & operator>> (LOGBRUSH &brush)
       DATASTREAM & operator<< (const LOGFONTW &font)
       DATASTREAM & operator>> (LOGFONTW &font)
       DATASTREAM & operator<< (const PANOSE &panose)
       DATASTREAM & operator>> (PANOSE &panose)
       DATASTREAM & operator<< (const EXTLOGFONTW &font)
       DATASTREAM & operator>> (EXTLOGFONTW &font)
       DATASTREAM & operator<< (const LOGPALETTE &palette)
       DATASTREAM & operator>> (LOGPALETTE &palette)

See Also