Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

# ACEXML_FileCharStream Class Reference

`#include <ACEXML/common/FileCharStream.h>`

Inheritance diagram for ACEXML_FileCharStream:

[legend]
Collaboration diagram for ACEXML_FileCharStream:

[legend]
List of all members.

## Public Member Functions
| ACEXML_FileCharStream (void)
| Default constructor.
virtual | ~ACEXML_FileCharStream (void)
| Destructor.
int | open (const ACEXML_Char *name)
| Open a file.
virtual int | available (void)
virtual int | close (void)
virtual int | get (ACEXML_Char &ch)
virtual int | read (ACEXML_Char *str, size_t len)
virtual int | determine_encoding (void)
virtual int | peek (void)
virtual void | rewind (void)
virtual const ACEXML_Char * | getEncoding (void)
virtual const ACEXML_Char * | getSystemId (void)
## Private Member Functions
int | getchar_i (char &ch)
## Private Attributes
ACEXML_Char * | filename_
ACEXML_Char * | encoding_
off_t | size_
FILE * | infile_
ACEXML_Char | peek_

## Detailed Description

An implementation of ACEXML_CharStream for reading input from a file.

## Constructor & Destructor Documentation

ACEXML_FileCharStream::ACEXML_FileCharStream | ( | void |  | ) |

| Default constructor.

ACEXML_FileCharStream::~ACEXML_FileCharStream | ( | void |  | ) | `[virtual]`

| Destructor.

## Member Function Documentation

int ACEXML_FileCharStream::available | ( | void |  | ) | `[virtual]`

| Returns the available ACEXML_Char in the buffer. -1 if the object is not initialized properly. Implements ACEXML_CharStream.

int ACEXML_FileCharStream::close | ( | void |  | ) | `[virtual]`

| Close this stream and release all resources used by it. Implements ACEXML_CharStream.

int ACEXML_FileCharStream::determine_encoding | ( | void |  | ) | `[virtual]`

| Determine the encoding of the file.

int ACEXML_FileCharStream::get | ( | ACEXML_Char & | ch | ) | `[virtual]`

| Read the next ACEXML_Char. Return -1 if we are not able to return an ACEXML_Char, 0 if succees. Implements ACEXML_CharStream.

int ACEXML_FileCharStream::getchar_i | ( | char & | ch | ) | `[private]`

| Read the next character as a normal character. Return -1 if EOF is reached, else return 0.

const ACEXML_Char * ACEXML_FileCharStream::getEncoding | ( | void |  | ) | `[virtual]`

| Implements ACEXML_CharStream.

const ACEXML_Char * ACEXML_FileCharStream::getSystemId | ( | void |  | ) | `[virtual]`

| Implements ACEXML_CharStream.

int ACEXML_FileCharStream::open | ( | const ACEXML_Char * | name | ) |

| Open a file.

int ACEXML_FileCharStream::peek | ( | void |  | ) | `[virtual]`

| Peek the next ACEXML_Char in the CharStream. Return the character if success, -1 if EOF is reached. Implements ACEXML_CharStream.

int ACEXML_FileCharStream::read | ( | ACEXML_Char * | str,
|  | size_t | len
| ) | `[virtual]`

| Read the next batch of ACEXML_Char strings Implements ACEXML_CharStream.

void ACEXML_FileCharStream::rewind | ( | void |  | ) | `[virtual]`

| Resets the file pointer to the beginning of the stream. Implements ACEXML_CharStream.

## Member Data Documentation

ACEXML_Char* ACEXML_FileCharStream::encoding_`[private]`

ACEXML_Char* ACEXML_FileCharStream::filename_`[private]`

FILE* ACEXML_FileCharStream::infile_`[private]`

ACEXML_Char ACEXML_FileCharStream::peek_`[private]`

off_t ACEXML_FileCharStream::size_`[private]`

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

- FileCharStream.h
- FileCharStream.cpp