\hypertarget{pnmCodec_8cpp}{}\section{pnm\+Codec.\+cpp File Reference}
\label{pnmCodec_8cpp}\index{pnm\+Codec.\+cpp@{pnm\+Codec.\+cpp}}


This file contains a P\+N\+M codec.  


{\ttfamily \#include $<$S\+P\+L/config.\+hpp$>$}\\*
{\ttfamily \#include $<$iostream$>$}\\*
{\ttfamily \#include $<$sstream$>$}\\*
{\ttfamily \#include $<$cassert$>$}\\*
{\ttfamily \#include $<$cstdlib$>$}\\*
{\ttfamily \#include $<$S\+P\+L/pnm\+Codec.\+hpp$>$}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int {\bfseries S\+P\+L\+::pnm\+Put\+Header} (std\+::ostream \&out, Pnm\+Header \&header)
\begin{DoxyCompactList}\small\item\em Write a P\+N\+M header to the specified stream. \end{DoxyCompactList}\item 
int {\bfseries S\+P\+L\+::pnm\+Put\+Bin\+Int} (std\+::ostream \&out, int word\+Size, bool sgnd, long val)
\begin{DoxyCompactList}\small\item\em Write an integer from the specified stream. \end{DoxyCompactList}\item 
int {\bfseries S\+P\+L\+::pnm\+Get\+Header} (std\+::istream \&in, Pnm\+Header \&header)
\begin{DoxyCompactList}\small\item\em Read a P\+N\+M header from the specified stream. \end{DoxyCompactList}\item 
int {\bfseries S\+P\+L\+::pnm\+Get\+Txt\+Bit} (std\+::istream \&in)
\begin{DoxyCompactList}\small\item\em Read a bit from the specified stream. \end{DoxyCompactList}\item 
long {\bfseries S\+P\+L\+::pnm\+Get\+Txt\+Int} (std\+::istream \&in, bool sgnd, int \&status)
\begin{DoxyCompactList}\small\item\em Read an integer from the specified stream. \end{DoxyCompactList}\item 
int {\bfseries S\+P\+L\+::pnm\+Get\+Char} (std\+::istream \&in)
\begin{DoxyCompactList}\small\item\em Read a character from the specified stream. \end{DoxyCompactList}\item 
long {\bfseries S\+P\+L\+::pnm\+Get\+Bin\+Int} (std\+::istream \&in, int word\+Size, bool sgnd, int \&status)
\begin{DoxyCompactList}\small\item\em Read an integer from the specified stream. \end{DoxyCompactList}\item 
Pnm\+Type {\bfseries S\+P\+L\+::pnm\+Get\+Type} (Pnm\+Magic magic)
\begin{DoxyCompactList}\small\item\em Determine the type (i.\+e., P\+G\+M or P\+P\+M) from the magic number. \end{DoxyCompactList}\item 
Pnm\+Fmt {\bfseries S\+P\+L\+::pnm\+Get\+Fmt} (Pnm\+Magic magic)
\begin{DoxyCompactList}\small\item\em Determine the format (i.\+e., text or binary) from magic number. \end{DoxyCompactList}\item 
int {\bfseries S\+P\+L\+::pnm\+Get\+Num\+Comps} (Pnm\+Type type)
\begin{DoxyCompactList}\small\item\em Get the number of components from the P\+N\+M type. \end{DoxyCompactList}\item 
int {\bfseries S\+P\+L\+::pnm\+Max\+Val\+To\+Prec} (int max\+Val)
\begin{DoxyCompactList}\small\item\em Determine the precision from the maximum value. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This file contains a P\+N\+M codec. 

