SourceForge.net Logo
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PmtIoFunctions.h File Reference

Miscellaneous function to support metadata I/O. More...

#include "EkCompiler.h"
#include "EkRational.h"
#include "EkStrings.h"

Include dependency graph for PmtIoFunctions.h:

This graph shows which files directly or indirectly include this file:

Primitive Value Type I/O

Functions to perform I/O of metadata values with primitive types

ostream & PmtPrintValue (ostream &c, const unsigned short &v)
 Write out an unsigned short value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const short &v)
 Write out a short value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const unsigned long &v)
 Write out an unsigned long value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const long &v)
 Write out a long value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const unsigned int &v)
 Write out an unsigned int value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const int &v)
 Write out an int value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const float &v)
 Write out an float value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const double &v)
 Write out an double value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const SPmtString &v)
 Write out an SPmtString value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const unsigned char &uc)
 Write an unsigned char value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const char &uc)
 Write a char value to an output stream. More...

ostream & PmtPrintValue (ostream &stream, const wstring &ws)
 Write a wide SPmtString value to an output stream. More...

ostream & PmtPrintValue (ostream &c, const bool &v)
 Write out a boolean value to an output stream. More...

template<class TYPE> ostream & PmtPrintValue (ostream &c, const EkRational< TYPE > &v)
 Output to a stream a value of type EkRational. More...

template<class TYPE> ostream & PmtPrintValue (ostream &c, const vector< TYPE > &v)
 Output to a stream a vector of values. More...

bool PmtStreamIsNegative (istream &s)
 Write out an unsigned short value to an output stream. More...

istream & PmtReadValue (istream &c, unsigned short &v)
 Read in an unsigned short value from an input stream. More...

istream & PmtReadValue (istream &c, short &v)
 Read in an short value from an input stream. More...

istream & PmtReadValue (istream &c, unsigned long &v)
 Read in an unsigned long value from an input stream. More...

istream & PmtReadValue (istream &c, long &v)
 Read in an long value from an input stream. More...

istream & PmtReadValue (istream &c, unsigned int &v)
 Read in an unsigned int value from an input stream. More...

istream & PmtReadValue (istream &c, int &v)
 Read in an int value from an input stream. More...

istream & PmtReadValue (istream &c, float &v)
 Read in an float value from an input stream. More...

istream & PmtReadValue (istream &c, double &v)
 Read in an double value from an input stream. More...

istream & PmtReadValue (istream &c, unsigned char &uc)
 Read an unsigned char value from an input stream. More...

istream & PmtReadValue (istream &c, char &uc)
 Read a char value from an input stream. More...

istream & PmtReadValue (istream &c, SPmtString &v)
 Read in an SPmtString value from an input stream. More...

istream & PmtReadValue (istream &stream, wstring &ws)
 Read in a wide string value from an input stream. More...

istream & PmtReadValue (istream &c, bool &v)
 Read in a boolean value from an input stream. More...

template<class TYPE> istream & PmtReadValue (istream &c, EkRational< TYPE > &v)
 Input from a stream a value of type EkRational. More...

template<class TYPE> istream & PmtReadValue (istream &c, vector< TYPE > &v)
 Input from a stream a vector of values. More...


Defines

#define PMT_SCHEMA_TRUE   "true"
#define PMT_SCHEMA_FALSE   "false"


Detailed Description

Miscellaneous function to support metadata I/O.


Define Documentation

#define PMT_SCHEMA_FALSE   "false"
 

#define PMT_SCHEMA_TRUE   "true"
 


Function Documentation

template<class TYPE>
ostream& PmtPrintValue ostream &    c,
const vector< TYPE > &    v
[inline]
 

Output to a stream a vector of values.

Parameters:
c  The output stream
v  The vector of values

template<class TYPE>
ostream& PmtPrintValue ostream &    c,
const EkRational< TYPE > &    v
[inline]
 

Output to a stream a value of type EkRational.

Parameters:
c  The output stream
v  The value with type EkRational

ostream& PmtPrintValue ostream &    c,
const bool &    v
[inline]
 

Write out a boolean value to an output stream.

ostream& PmtPrintValue ostream &    stream,
const wstring &    ws
[inline]
 

Write a wide SPmtString value to an output stream.

This code must be enhanced, non-ascii characters are not handled properly.

  • PmtPrintValue -- currently writes non-ascii chars as '?'
  • PmtReadValue -- will need to be modified as per any changes to PmtPrintValue

ostream& PmtPrintValue ostream &    c,
const char &    uc
[inline]
 

Write a char value to an output stream.

Override iostream implementation for unsigned char and char. Read/write as numbers rather than letters (e.g. '65' rather than 'A').

ostream& PmtPrintValue ostream &    c,
const unsigned char &    uc
[inline]
 

Write an unsigned char value to an output stream.

Override iostream implementation for unsigned char and char. Read/write as numbers rather than letters (e.g. '65' rather than 'A').

ostream& PmtPrintValue ostream &    c,
const SPmtString   v
[inline]
 

Write out an SPmtString value to an output stream.

ostream& PmtPrintValue ostream &    c,
const double &    v
[inline]
 

Write out an double value to an output stream.

ostream& PmtPrintValue ostream &    c,
const float &    v
[inline]
 

Write out an float value to an output stream.

ostream& PmtPrintValue ostream &    c,
const int &    v
[inline]
 

Write out an int value to an output stream.

ostream& PmtPrintValue ostream &    c,
const unsigned int &    v
[inline]
 

Write out an unsigned int value to an output stream.

ostream& PmtPrintValue ostream &    c,
const long &    v
[inline]
 

Write out a long value to an output stream.

ostream& PmtPrintValue ostream &    c,
const unsigned long &    v
[inline]
 

Write out an unsigned long value to an output stream.

ostream& PmtPrintValue ostream &    c,
const short &    v
[inline]
 

Write out a short value to an output stream.

ostream& PmtPrintValue ostream &    c,
const unsigned short &    v
[inline]
 

Write out an unsigned short value to an output stream.

template<class TYPE>
istream& PmtReadValue istream &    c,
vector< TYPE > &    v
[inline]
 

Input from a stream a vector of values.

Parameters:
c  The input stream
v  The vector of values

template<class TYPE>
istream& PmtReadValue istream &    c,
EkRational< TYPE > &    v
[inline]
 

Input from a stream a value of type EkRational.

Parameters:
c  The input stream
v  The value with type EkRational

istream& PmtReadValue istream &    c,
bool &    v
[inline]
 

Read in a boolean value from an input stream.

istream& PmtReadValue istream &    stream,
wstring &    ws
[inline]
 

Read in a wide string value from an input stream.

istream& PmtReadValue istream &    c,
SPmtString   v
[inline]
 

Read in an SPmtString value from an input stream.

istream& PmtReadValue istream &    c,
char &    uc
[inline]
 

Read a char value from an input stream.

Override iostream implementation for unsigned char and char. Read/write as numbers rather than letters (e.g. '65' rather than 'A').

istream& PmtReadValue istream &    c,
unsigned char &    uc
[inline]
 

Read an unsigned char value from an input stream.

Override iostream implementation for unsigned char and char. Read/write as numbers rather than letters (e.g. '65' rather than 'A').

istream& PmtReadValue istream &    c,
double &    v
[inline]
 

Read in an double value from an input stream.

istream& PmtReadValue istream &    c,
float &    v
[inline]
 

Read in an float value from an input stream.

istream& PmtReadValue istream &    c,
int &    v
[inline]
 

Read in an int value from an input stream.

istream& PmtReadValue istream &    c,
unsigned int &    v
[inline]
 

Read in an unsigned int value from an input stream.

istream& PmtReadValue istream &    c,
long &    v
[inline]
 

Read in an long value from an input stream.

istream& PmtReadValue istream &    c,
unsigned long &    v
[inline]
 

Read in an unsigned long value from an input stream.

istream& PmtReadValue istream &    c,
short &    v
[inline]
 

Read in an short value from an input stream.

istream& PmtReadValue istream &    c,
unsigned short &    v
[inline]
 

Read in an unsigned short value from an input stream.

bool PmtStreamIsNegative istream &    s [inline]
 

Write out an unsigned short value to an output stream.

Last Updated: March 12, 2003 (rlr)
Copyright © 2003 Eastman Kodak Company All Rights Reserved.