ipe::Stream Class Referenceabstract
Ipe Base

`#include <ipebase.h>`

Inherited by ipe::A85Stream, ipe::Base64Stream, ipe::DeflateStream, and ipe::TellStream.

## Public Member Functions

virtual | ~Stream ()
virtual void | putChar (char ch)=0
virtual void | close ()
virtual void | putString (String s)
virtual void | putCString (const char *s)
virtual void | putRaw (const char *data, int size)
Stream & | operator<< (char ch)
Stream & | operator<< (const String &s)
Stream & | operator<< (const char *s)
Stream & | operator<< (int i)
Stream & | operator<< (double d)
void | putHexByte (char b)
void | putXmlString (String s)

## Detailed Description

Abstract base class for output streams.

## Constructor & Destructor Documentation

## ~Stream()

Stream::~Stream | ( |  | ) |

virtual

Virtual destructor.

## Member Function Documentation

## putChar()

virtual void ipe::Stream::putChar | ( | char | ch | ) |

pure virtual

Output character.

Implemented in ipe::FileStream, ipe::StringStream, ipe::DeflateStream, ipe::Base64Stream, and ipe::A85Stream.

Referenced by ipe::A85Stream::putChar(), ipe::Base64Stream::putChar(), and ipe::PdfWriter::~PdfWriter().

## close()

void Stream::close | ( |  | ) |

virtual

Close the stream. No more writing allowed!

Reimplemented in ipe::DeflateStream, ipe::Base64Stream, and ipe::A85Stream.

Referenced by ipe::A85Stream::close(), ipe::Base64Stream::close(), and ipe::DeflateStream::close().

## putString()

void Stream::putString | ( | String | s | ) |

virtual

Output string.

Default implementation uses PutChar.

Reimplemented in ipe::FileStream, and ipe::StringStream.

References ipe::String::size().

## putCString()

void Stream::putCString | ( | const char * | s | ) |

virtual

Output C string.

Default implementation uses PutChar.

Reimplemented in ipe::FileStream, and ipe::StringStream.

Referenced by ipe::A85Stream::close(), ipe::Base64Stream::close(), ipe::A85Stream::putChar(), and ipe::Base64Stream::putChar().

## putRaw()

void Stream::putRaw | ( | const char * | data,
|  | int | size
| ) |  |

virtual

Output raw character data.

Default implementation uses PutChar.

Reimplemented in ipe::FileStream, and ipe::StringStream.

References ipe::String::size().

Referenced by ipe::DeflateStream::close(), ipe::DeflateStream::putChar(), and ipe::PdfWriter::~PdfWriter().

## operator<<() [1/5]

Stream& ipe::Stream::operator<< | ( | char | ch | ) |

inline

Output character.

## operator<<() [2/5]

Stream& ipe::Stream::operator<< | ( | const String & | s | ) |

inline

Output string.

## operator<<() [3/5]

Stream& ipe::Stream::operator<< | ( | const char * | s | ) |

inline

Output C string.

## operator<<() [4/5]

Stream & Stream::operator<< | ( | int | i | ) |

Output integer.

## operator<<() [5/5]

Stream & Stream::operator<< | ( | double | d | ) |

Output double.

## putHexByte()

void Stream::putHexByte | ( | char | b | ) |

Output byte in hexadecimal.

## putXmlString()

void Stream::putXmlString | ( | String | s | ) |

Save a string with XML escaping of &, >, <, ", '.

References ipe::String::size(), and ipe::StringStream::StringStream().

Referenced by ipe::Page::saveAsXml(), ipe::Text::saveAsXml(), ipe::Group::saveAsXml(), ipe::StyleSheet::saveAsXml(), and ipe::Document::saveAsXml().

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

- ipebase.h
- ipebase.cpp