\hypertarget{class_ogre_1_1_data_stream}{}\doxysection{Ogre\+::Data\+Stream Class Reference}
\label{class_ogre_1_1_data_stream}\index{Ogre::DataStream@{Ogre::DataStream}}


General purpose class used for encapsulating the reading and writing of data.  




{\ttfamily \#include $<$Ogre\+Data\+Stream.\+h$>$}



Inheritance diagram for Ogre\+::Data\+Stream\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{class_ogre_1_1_data_stream__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08c}{Access\+Mode}} \{ \mbox{\hyperlink{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08cac5f9d1587e9cc7dd1577af114dcba50e}{R\+E\+AD}} = 1, 
\mbox{\hyperlink{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08ca8e221ca82d405d21d275997fbd3eb900}{W\+R\+I\+TE}} = 2
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_data_stream_a679e39a3ef590e1dc232800c37cfeb8b}{Data\+Stream}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&name, \mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} access\+Mode=\mbox{\hyperlink{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08cac5f9d1587e9cc7dd1577af114dcba50e}{R\+E\+AD}})
\begin{DoxyCompactList}\small\item\em Constructor for creating named streams. \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_ogre_1_1_data_stream_a87d6018d4486304f004782c536a72de5}{Data\+Stream}} (\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} access\+Mode=\mbox{\hyperlink{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08cac5f9d1587e9cc7dd1577af114dcba50e}{R\+E\+AD}})
\begin{DoxyCompactList}\small\item\em Constructor for creating unnamed streams. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_ogre_1_1_data_stream_a9501eeeb1aefc59f4dad05ec0cbdc14e}{$\sim$\+Data\+Stream}} ()
\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_data_stream_ace95bf415101e195a0c79838fdcb7e7d}{close}} (void)=0
\begin{DoxyCompactList}\small\item\em Close the stream; this makes further operations invalid. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_data_stream_a81d740638618913333324663b2edb519}{eof}} (void) const =0
\begin{DoxyCompactList}\small\item\em Returns true if the stream has reached the end. \end{DoxyCompactList}\item 
\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} \mbox{\hyperlink{class_ogre_1_1_data_stream_a560b07ced4d47d31315d8d7f51638a8f}{get\+Access\+Mode}} () const
\begin{DoxyCompactList}\small\item\em Gets the access mode of the stream. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \mbox{\hyperlink{class_ogre_1_1_data_stream_a022f49c9313deffc5da4383d59d1f32d}{get\+As\+String}} (void)
\begin{DoxyCompactList}\small\item\em Returns a String containing the entire stream. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \mbox{\hyperlink{class_ogre_1_1_data_stream_a86d2ff5dff63ce4b689dd1d486d3243f}{get\+Line}} (bool trim\+After=true)
\begin{DoxyCompactList}\small\item\em Returns a String containing the next line of data, optionally trimmed for whitespace. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \& \mbox{\hyperlink{class_ogre_1_1_data_stream_a7ebd86825f86b7114024d168e9751395}{get\+Name}} (void)
\begin{DoxyCompactList}\small\item\em Returns the name of the stream, if it has one. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_data_stream_a3a99b8b9b4ce6cce64322ba89ea45e43}{is\+Readable}} () const
\begin{DoxyCompactList}\small\item\em Reports whether this stream is readable. \end{DoxyCompactList}\item 
virtual bool \mbox{\hyperlink{class_ogre_1_1_data_stream_aff0243c8ad8f5de00bf8e0887d0f034f}{is\+Writeable}} () const
\begin{DoxyCompactList}\small\item\em Reports whether this stream is writeable. \end{DoxyCompactList}\item 
{\footnotesize template$<$typename T $>$ }\\\mbox{\hyperlink{class_ogre_1_1_data_stream}{Data\+Stream}} \& \mbox{\hyperlink{class_ogre_1_1_data_stream_a49bfe5809b50735b5ce49e7df9615e5a}{operator$>$$>$}} (T \&val)
\item 
virtual size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_data_stream_aebedb14c79369be5b8750d834b128b9b}{read}} (void $\ast$buf, size\+\_\+t count)=0
\begin{DoxyCompactList}\small\item\em Read the requisite number of bytes from the stream, stopping at the end of the file. \end{DoxyCompactList}\item 
virtual size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_data_stream_aedc53a8cff5334563283a4557d423b25}{read\+Line}} (char $\ast$buf, size\+\_\+t max\+Count, const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&delim=\char`\"{}\textbackslash{}n\char`\"{})
\begin{DoxyCompactList}\small\item\em Get a single line from the stream. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_data_stream_adc4002e013c279625553ccc3f50ddae1}{seek}} (size\+\_\+t pos)=0
\begin{DoxyCompactList}\small\item\em Repositions the read point to a specified byte. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_data_stream_a9d5b5224e17b9fc9d9756d8156a77a5c}{size}} (void) const
\begin{DoxyCompactList}\small\item\em Returns the total size of the data to be read from the stream, or 0 if this is indeterminate for this stream. \end{DoxyCompactList}\item 
virtual void \mbox{\hyperlink{class_ogre_1_1_data_stream_a776630c409195fdf118a6737571d3d07}{skip}} (long count)=0
\begin{DoxyCompactList}\small\item\em Skip a defined number of bytes. \end{DoxyCompactList}\item 
virtual size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_data_stream_a32966ad5a814f8c72fe0affbefcc6f55}{skip\+Line}} (const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&delim=\char`\"{}\textbackslash{}n\char`\"{})
\begin{DoxyCompactList}\small\item\em Skip a single line from the stream. \end{DoxyCompactList}\item 
virtual size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_data_stream_a2d9100f4e9167116fe280a7e7a1b6219}{tell}} (void) const =0
\begin{DoxyCompactList}\small\item\em Returns the current byte offset from beginning. \end{DoxyCompactList}\item 
virtual size\+\_\+t \mbox{\hyperlink{class_ogre_1_1_data_stream_a68cde598ee9c2694e16931134fe5c136}{write}} (const void $\ast$buf, size\+\_\+t count)
\begin{DoxyCompactList}\small\item\em Write the requisite number of bytes from the stream (only applicable to streams that are not read-\/only) \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
General purpose class used for encapsulating the reading and writing of data. 

\begin{DoxyRemark}{Remarks}
This class performs basically the same tasks as std\+::basic\+\_\+istream, except that it does not have any formatting capabilities, and is designed to be subclassed to receive data from multiple sources, including libraries which have no compatibility with the S\+TL\textquotesingle{}s stream interfaces. As such, this is an abstraction of a set of wrapper classes which pretend to be standard stream classes but can actually be implemented quite differently. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
Generally, if a plugin or application provides an \mbox{\hyperlink{class_ogre_1_1_archive_factory}{Archive\+Factory}}, it should also provide a \mbox{\hyperlink{class_ogre_1_1_data_stream}{Data\+Stream}} subclass which will be used to stream data out of that \mbox{\hyperlink{class_ogre_1_1_archive}{Archive}} implementation, unless it can use one of the common implementations included. 
\end{DoxyParagraph}
\begin{DoxyNote}{Note}
\mbox{\hyperlink{namespace_ogre}{Ogre}} makes no guarantees about thread safety, for performance reasons. If you wish to access stream data asynchronously then you should organise your own mutexes to avoid race conditions. 
\end{DoxyNote}


\doxysubsection{Member Enumeration Documentation}
\mbox{\Hypertarget{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08c}\label{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08c}} 
\index{Ogre::DataStream@{Ogre::DataStream}!AccessMode@{AccessMode}}
\index{AccessMode@{AccessMode}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{AccessMode}{AccessMode}}
{\footnotesize\ttfamily enum \mbox{\hyperlink{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08c}{Ogre\+::\+Data\+Stream\+::\+Access\+Mode}}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{READ@{READ}!Ogre::DataStream@{Ogre::DataStream}}\index{Ogre::DataStream@{Ogre::DataStream}!READ@{READ}}}\mbox{\Hypertarget{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08cac5f9d1587e9cc7dd1577af114dcba50e}\label{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08cac5f9d1587e9cc7dd1577af114dcba50e}} 
R\+E\+AD&\\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{WRITE@{WRITE}!Ogre::DataStream@{Ogre::DataStream}}\index{Ogre::DataStream@{Ogre::DataStream}!WRITE@{WRITE}}}\mbox{\Hypertarget{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08ca8e221ca82d405d21d275997fbd3eb900}\label{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08ca8e221ca82d405d21d275997fbd3eb900}} 
W\+R\+I\+TE&\\
\hline

\end{DoxyEnumFields}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_data_stream_a87d6018d4486304f004782c536a72de5}\label{class_ogre_1_1_data_stream_a87d6018d4486304f004782c536a72de5}} 
\index{Ogre::DataStream@{Ogre::DataStream}!DataStream@{DataStream}}
\index{DataStream@{DataStream}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{DataStream()}{DataStream()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Ogre\+::\+Data\+Stream\+::\+Data\+Stream (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{access\+Mode = {\ttfamily \mbox{\hyperlink{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08cac5f9d1587e9cc7dd1577af114dcba50e}{R\+E\+AD}}} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Constructor for creating unnamed streams. 

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a679e39a3ef590e1dc232800c37cfeb8b}\label{class_ogre_1_1_data_stream_a679e39a3ef590e1dc232800c37cfeb8b}} 
\index{Ogre::DataStream@{Ogre::DataStream}!DataStream@{DataStream}}
\index{DataStream@{DataStream}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{DataStream()}{DataStream()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Ogre\+::\+Data\+Stream\+::\+Data\+Stream (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{name,  }\item[{\mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}}}]{access\+Mode = {\ttfamily \mbox{\hyperlink{class_ogre_1_1_data_stream_a81856582e643b4a560e6c3d3ad05e08cac5f9d1587e9cc7dd1577af114dcba50e}{R\+E\+AD}}} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Constructor for creating named streams. 

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a9501eeeb1aefc59f4dad05ec0cbdc14e}\label{class_ogre_1_1_data_stream_a9501eeeb1aefc59f4dad05ec0cbdc14e}} 
\index{Ogre::DataStream@{Ogre::DataStream}!````~DataStream@{$\sim$DataStream}}
\index{````~DataStream@{$\sim$DataStream}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{$\sim$DataStream()}{~DataStream()}}
{\footnotesize\ttfamily virtual Ogre\+::\+Data\+Stream\+::$\sim$\+Data\+Stream (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_data_stream_a7ebd86825f86b7114024d168e9751395}\label{class_ogre_1_1_data_stream_a7ebd86825f86b7114024d168e9751395}} 
\index{Ogre::DataStream@{Ogre::DataStream}!getName@{getName}}
\index{getName@{getName}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{getName()}{getName()}}
{\footnotesize\ttfamily const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}}\& Ogre\+::\+Data\+Stream\+::get\+Name (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Returns the name of the stream, if it has one. 

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a560b07ced4d47d31315d8d7f51638a8f}\label{class_ogre_1_1_data_stream_a560b07ced4d47d31315d8d7f51638a8f}} 
\index{Ogre::DataStream@{Ogre::DataStream}!getAccessMode@{getAccessMode}}
\index{getAccessMode@{getAccessMode}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{getAccessMode()}{getAccessMode()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa8263b218e7d187ad5ef03a73a6ad7fd}{uint16}} Ogre\+::\+Data\+Stream\+::get\+Access\+Mode (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the access mode of the stream. 

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a3a99b8b9b4ce6cce64322ba89ea45e43}\label{class_ogre_1_1_data_stream_a3a99b8b9b4ce6cce64322ba89ea45e43}} 
\index{Ogre::DataStream@{Ogre::DataStream}!isReadable@{isReadable}}
\index{isReadable@{isReadable}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{isReadable()}{isReadable()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Data\+Stream\+::is\+Readable (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Reports whether this stream is readable. 

\mbox{\Hypertarget{class_ogre_1_1_data_stream_aff0243c8ad8f5de00bf8e0887d0f034f}\label{class_ogre_1_1_data_stream_aff0243c8ad8f5de00bf8e0887d0f034f}} 
\index{Ogre::DataStream@{Ogre::DataStream}!isWriteable@{isWriteable}}
\index{isWriteable@{isWriteable}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{isWriteable()}{isWriteable()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Data\+Stream\+::is\+Writeable (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Reports whether this stream is writeable. 

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a49bfe5809b50735b5ce49e7df9615e5a}\label{class_ogre_1_1_data_stream_a49bfe5809b50735b5ce49e7df9615e5a}} 
\index{Ogre::DataStream@{Ogre::DataStream}!operator$>$$>$@{operator$>$$>$}}
\index{operator$>$$>$@{operator$>$$>$}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{operator$>$$>$()}{operator>>()}}
{\footnotesize\ttfamily template$<$typename T $>$ \\
\mbox{\hyperlink{class_ogre_1_1_data_stream}{Data\+Stream}}\& Ogre\+::\+Data\+Stream\+::operator$>$$>$ (\begin{DoxyParamCaption}\item[{T \&}]{val }\end{DoxyParamCaption})}

\mbox{\Hypertarget{class_ogre_1_1_data_stream_aebedb14c79369be5b8750d834b128b9b}\label{class_ogre_1_1_data_stream_aebedb14c79369be5b8750d834b128b9b}} 
\index{Ogre::DataStream@{Ogre::DataStream}!read@{read}}
\index{read@{read}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{read()}{read()}}
{\footnotesize\ttfamily virtual size\+\_\+t Ogre\+::\+Data\+Stream\+::read (\begin{DoxyParamCaption}\item[{void $\ast$}]{buf,  }\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Read the requisite number of bytes from the stream, stopping at the end of the file. 


\begin{DoxyParams}{Parameters}
{\em buf} & Reference to a buffer pointer \\
\hline
{\em count} & Number of bytes to read \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of bytes read 
\end{DoxyReturn}


Implemented in \mbox{\hyperlink{class_ogre_1_1_file_handle_data_stream_af64e7e826054181f9026e0f71f901c63}{Ogre\+::\+File\+Handle\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_file_stream_data_stream_aa2532ca6886377bea5384e917ee12ebb}{Ogre\+::\+File\+Stream\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_ab3ee46ce477d58f8945340a4e2117820}{Ogre\+::\+Memory\+Data\+Stream}}, and \mbox{\hyperlink{class_ogre_1_1_deflate_stream_a9f6e5c9b9e494733cc80f691de787362}{Ogre\+::\+Deflate\+Stream}}.

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a68cde598ee9c2694e16931134fe5c136}\label{class_ogre_1_1_data_stream_a68cde598ee9c2694e16931134fe5c136}} 
\index{Ogre::DataStream@{Ogre::DataStream}!write@{write}}
\index{write@{write}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{write()}{write()}}
{\footnotesize\ttfamily virtual size\+\_\+t Ogre\+::\+Data\+Stream\+::write (\begin{DoxyParamCaption}\item[{const void $\ast$}]{buf,  }\item[{size\+\_\+t}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Write the requisite number of bytes from the stream (only applicable to streams that are not read-\/only) 


\begin{DoxyParams}{Parameters}
{\em buf} & Pointer to a buffer containing the bytes to write \\
\hline
{\em count} & Number of bytes to write \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of bytes written 
\end{DoxyReturn}


Reimplemented in \mbox{\hyperlink{class_ogre_1_1_file_handle_data_stream_ad061c86660f6415331df5f8560b46a02}{Ogre\+::\+File\+Handle\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_file_stream_data_stream_a7336968b7a08e61d5d7adbd4eb337c48}{Ogre\+::\+File\+Stream\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_accd65733ea1317c49c5fdf7263ff4cc7}{Ogre\+::\+Memory\+Data\+Stream}}, and \mbox{\hyperlink{class_ogre_1_1_deflate_stream_aa0006ee4213a6af6e0aae98f59332d1d}{Ogre\+::\+Deflate\+Stream}}.

\mbox{\Hypertarget{class_ogre_1_1_data_stream_aedc53a8cff5334563283a4557d423b25}\label{class_ogre_1_1_data_stream_aedc53a8cff5334563283a4557d423b25}} 
\index{Ogre::DataStream@{Ogre::DataStream}!readLine@{readLine}}
\index{readLine@{readLine}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{readLine()}{readLine()}}
{\footnotesize\ttfamily virtual size\+\_\+t Ogre\+::\+Data\+Stream\+::read\+Line (\begin{DoxyParamCaption}\item[{char $\ast$}]{buf,  }\item[{size\+\_\+t}]{max\+Count,  }\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{delim = {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Get a single line from the stream. 

\begin{DoxyRemark}{Remarks}
The delimiter character is not included in the data returned, and it is skipped over so the next read will occur after it. The buffer contents will include a terminating character. 
\end{DoxyRemark}
\begin{DoxyNote}{Note}
If you used this function, you {\bfseries{must}} open the stream in {\bfseries{binary mode}}, otherwise, it\textquotesingle{}ll produce unexpected results. 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em buf} & Reference to a buffer pointer \\
\hline
{\em max\+Count} & The maximum length of data to be read, excluding the terminating character \\
\hline
{\em delim} & The delimiter to stop at \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of bytes read, excluding the terminating character 
\end{DoxyReturn}


Reimplemented in \mbox{\hyperlink{class_ogre_1_1_file_stream_data_stream_af09667bef9ac4b514602baca8d08f007}{Ogre\+::\+File\+Stream\+Data\+Stream}}, and \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_a398aa1ba9f58276dc868d2c3968953c4}{Ogre\+::\+Memory\+Data\+Stream}}.

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a86d2ff5dff63ce4b689dd1d486d3243f}\label{class_ogre_1_1_data_stream_a86d2ff5dff63ce4b689dd1d486d3243f}} 
\index{Ogre::DataStream@{Ogre::DataStream}!getLine@{getLine}}
\index{getLine@{getLine}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{getLine()}{getLine()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} Ogre\+::\+Data\+Stream\+::get\+Line (\begin{DoxyParamCaption}\item[{bool}]{trim\+After = {\ttfamily true} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns a String containing the next line of data, optionally trimmed for whitespace. 

\begin{DoxyRemark}{Remarks}
This is a convenience method for text streams only, allowing you to retrieve a String object containing the next line of data. The data is read up to the next newline character and the result trimmed if required. 
\end{DoxyRemark}
\begin{DoxyNote}{Note}
If you used this function, you {\bfseries{must}} open the stream in {\bfseries{binary mode}}, otherwise, it\textquotesingle{}ll produce unexpected results. 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em trim\+After} & If true, the line is trimmed for whitespace (as in String.\+trim(true,true)) \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_data_stream_a022f49c9313deffc5da4383d59d1f32d}\label{class_ogre_1_1_data_stream_a022f49c9313deffc5da4383d59d1f32d}} 
\index{Ogre::DataStream@{Ogre::DataStream}!getAsString@{getAsString}}
\index{getAsString@{getAsString}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{getAsString()}{getAsString()}}
{\footnotesize\ttfamily virtual \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} Ogre\+::\+Data\+Stream\+::get\+As\+String (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Returns a String containing the entire stream. 

\begin{DoxyRemark}{Remarks}
This is a convenience method for text streams only, allowing you to retrieve a String object containing all the data in the stream. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_data_stream_a32966ad5a814f8c72fe0affbefcc6f55}\label{class_ogre_1_1_data_stream_a32966ad5a814f8c72fe0affbefcc6f55}} 
\index{Ogre::DataStream@{Ogre::DataStream}!skipLine@{skipLine}}
\index{skipLine@{skipLine}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{skipLine()}{skipLine()}}
{\footnotesize\ttfamily virtual size\+\_\+t Ogre\+::\+Data\+Stream\+::skip\+Line (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}} \&}]{delim = {\ttfamily \char`\"{}\textbackslash{}n\char`\"{}} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Skip a single line from the stream. 

\begin{DoxyNote}{Note}
If you used this function, you {\bfseries{must}} open the stream in {\bfseries{binary mode}}, otherwise, it\textquotesingle{}ll produce unexpected results. 
\end{DoxyNote}

\begin{DoxyParams}{Parameters}
{\em delim} & The delimiter(s) to stop at \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of bytes skipped 
\end{DoxyReturn}


Reimplemented in \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_a581ccd32944288808f7602b29a0218e9}{Ogre\+::\+Memory\+Data\+Stream}}.

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a776630c409195fdf118a6737571d3d07}\label{class_ogre_1_1_data_stream_a776630c409195fdf118a6737571d3d07}} 
\index{Ogre::DataStream@{Ogre::DataStream}!skip@{skip}}
\index{skip@{skip}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{skip()}{skip()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Data\+Stream\+::skip (\begin{DoxyParamCaption}\item[{long}]{count }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Skip a defined number of bytes. 

This can also be a negative value, in which case the file pointer rewinds a defined number of bytes. 

Implemented in \mbox{\hyperlink{class_ogre_1_1_file_handle_data_stream_a379566f8413d0a525fa7d603af6e33d4}{Ogre\+::\+File\+Handle\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_file_stream_data_stream_a5c9ee831857cb0ea2d51ac6fc1a99d1a}{Ogre\+::\+File\+Stream\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_abc0369bcd83740cf03cb27a11665486f}{Ogre\+::\+Memory\+Data\+Stream}}, and \mbox{\hyperlink{class_ogre_1_1_deflate_stream_af142a9dab933b2ff36a12ae5016d59c8}{Ogre\+::\+Deflate\+Stream}}.

\mbox{\Hypertarget{class_ogre_1_1_data_stream_adc4002e013c279625553ccc3f50ddae1}\label{class_ogre_1_1_data_stream_adc4002e013c279625553ccc3f50ddae1}} 
\index{Ogre::DataStream@{Ogre::DataStream}!seek@{seek}}
\index{seek@{seek}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{seek()}{seek()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Data\+Stream\+::seek (\begin{DoxyParamCaption}\item[{size\+\_\+t}]{pos }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Repositions the read point to a specified byte. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_file_handle_data_stream_af56e7f07f2f13c2b05772db8ad75201a}{Ogre\+::\+File\+Handle\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_file_stream_data_stream_afe6b33013fb5457f4c43a536e3aa059e}{Ogre\+::\+File\+Stream\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_a264956cfd878b1c12f28a37e492fc0bb}{Ogre\+::\+Memory\+Data\+Stream}}, and \mbox{\hyperlink{class_ogre_1_1_deflate_stream_aaf00e810593e4c47647f3565ab06a849}{Ogre\+::\+Deflate\+Stream}}.

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a2d9100f4e9167116fe280a7e7a1b6219}\label{class_ogre_1_1_data_stream_a2d9100f4e9167116fe280a7e7a1b6219}} 
\index{Ogre::DataStream@{Ogre::DataStream}!tell@{tell}}
\index{tell@{tell}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{tell()}{tell()}}
{\footnotesize\ttfamily virtual size\+\_\+t Ogre\+::\+Data\+Stream\+::tell (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns the current byte offset from beginning. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_file_handle_data_stream_a76ed601adac0eeeb84247080bb0338a8}{Ogre\+::\+File\+Handle\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_file_stream_data_stream_ab09b3fc8eaad4c49164b5c41bfdfee44}{Ogre\+::\+File\+Stream\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_ad2d1e981292d50c71b94b4c5fb6b38dd}{Ogre\+::\+Memory\+Data\+Stream}}, and \mbox{\hyperlink{class_ogre_1_1_deflate_stream_a4486e6a49b36dc62ea4a948214e6d6f2}{Ogre\+::\+Deflate\+Stream}}.

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a81d740638618913333324663b2edb519}\label{class_ogre_1_1_data_stream_a81d740638618913333324663b2edb519}} 
\index{Ogre::DataStream@{Ogre::DataStream}!eof@{eof}}
\index{eof@{eof}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{eof()}{eof()}}
{\footnotesize\ttfamily virtual bool Ogre\+::\+Data\+Stream\+::eof (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [pure virtual]}}



Returns true if the stream has reached the end. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_file_handle_data_stream_a63b510c9d467c1883730a0b6b0ff050c}{Ogre\+::\+File\+Handle\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_file_stream_data_stream_a42f65440c95ca7bb3ccc0b06962890c8}{Ogre\+::\+File\+Stream\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_ad913ebc50c943dfe79df79c7be14ba3d}{Ogre\+::\+Memory\+Data\+Stream}}, and \mbox{\hyperlink{class_ogre_1_1_deflate_stream_a76b15d2fcdfe255aefb0c28c444cfde0}{Ogre\+::\+Deflate\+Stream}}.

\mbox{\Hypertarget{class_ogre_1_1_data_stream_a9d5b5224e17b9fc9d9756d8156a77a5c}\label{class_ogre_1_1_data_stream_a9d5b5224e17b9fc9d9756d8156a77a5c}} 
\index{Ogre::DataStream@{Ogre::DataStream}!size@{size}}
\index{size@{size}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{size()}{size()}}
{\footnotesize\ttfamily size\+\_\+t Ogre\+::\+Data\+Stream\+::size (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns the total size of the data to be read from the stream, or 0 if this is indeterminate for this stream. 

\mbox{\Hypertarget{class_ogre_1_1_data_stream_ace95bf415101e195a0c79838fdcb7e7d}\label{class_ogre_1_1_data_stream_ace95bf415101e195a0c79838fdcb7e7d}} 
\index{Ogre::DataStream@{Ogre::DataStream}!close@{close}}
\index{close@{close}!Ogre::DataStream@{Ogre::DataStream}}
\doxysubsubsection{\texorpdfstring{close()}{close()}}
{\footnotesize\ttfamily virtual void Ogre\+::\+Data\+Stream\+::close (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Close the stream; this makes further operations invalid. 



Implemented in \mbox{\hyperlink{class_ogre_1_1_file_handle_data_stream_ac6f1032583209f59b503e7f29946230e}{Ogre\+::\+File\+Handle\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_file_stream_data_stream_af54511846463e10fe14a1addb40ada81}{Ogre\+::\+File\+Stream\+Data\+Stream}}, \mbox{\hyperlink{class_ogre_1_1_memory_data_stream_a47ba6c03cb7bf3182b31c63753729be3}{Ogre\+::\+Memory\+Data\+Stream}}, and \mbox{\hyperlink{class_ogre_1_1_deflate_stream_afd205aacbca957108898ce799603bf3f}{Ogre\+::\+Deflate\+Stream}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_data_stream_8h}{Ogre\+Data\+Stream.\+h}}\end{DoxyCompactItemize}
