# gdcm::Parser Class Reference

Parser ala XML_Parser from expat (SAX). More...

`#include <gdcmParser.h>`

Collaboration diagram for gdcm::Parser:
[legend]

List of all members.

## Public Types
typedef void(* | EndElementHandler )(void *userData, const Tag &name)
enum | ErrorType { NoError, NoMemoryError, SyntaxError, NoElementsError, TagMismatchError, DuplicateAttributeError, JunkAfterDocElementError, UndefinedEntityError, UnexpectedStateError }
typedef void(* | StartElementHandler )(void *userData, const Tag &tag, const char *atts[])
## Public Member Functions
| Parser ()
| ~Parser ()
unsigned long | GetCurrentByteIndex () const
ErrorType | GetErrorCode () const
void * | GetUserData () const
bool | Parse (const char *s, int len, bool isFinal)
void | SetElementHandler (StartElementHandler start, EndElementHandler end)
void | SetUserData (void *userData)
## Static Public Member Functions
static const char * | GetErrorString (ErrorType const &err)
## Protected Member Functions
char * | GetBuffer (int len)
bool | ParseBuffer (int len, bool isFinal)
ErrorType | Process ()

## Detailed Description

Parser ala XML_Parser from expat (SAX).

Detailled description here

Note:
  Simple API for DICOM

## Member Typedef Documentation

typedef void(* gdcm::Parser::EndElementHandler)(void *userData, const Tag &name)

typedef void(* gdcm::Parser::StartElementHandler)(void *userData, const Tag &tag, const char *atts[])

## Member Enumeration Documentation

enum gdcm::Parser::ErrorType

Enumerator:

  NoError |
  NoMemoryError |
  SyntaxError |
  NoElementsError |
  TagMismatchError |
  DuplicateAttributeError |
  JunkAfterDocElementError |
  UndefinedEntityError |
  UnexpectedStateError |

## Constructor & Destructor Documentation

gdcm::Parser::Parser | ( |  | ) | `[inline]`

gdcm::Parser::~Parser | ( |  | ) | `[inline]`

## Member Function Documentation

char* gdcm::Parser::GetBuffer | ( | int | len | ) | `[protected]`

unsigned long gdcm::Parser::GetCurrentByteIndex | ( |  | ) | const

ErrorType gdcm::Parser::GetErrorCode | ( |  | ) | const

static const char* gdcm::Parser::GetErrorString | ( | ErrorType const & | err | ) | `[static]`

void* gdcm::Parser::GetUserData | ( |  | ) | const

bool gdcm::Parser::Parse | ( | const char * | s,
|  | int | len,
|  | bool | isFinal |
| ) |  |  |

bool gdcm::Parser::ParseBuffer | ( | int | len,
|  | bool | isFinal |
| ) |  |  | `[protected]`

ErrorType gdcm::Parser::Process | ( |  | ) | `[protected]`

void gdcm::Parser::SetElementHandler | ( | StartElementHandler | start,
|  | EndElementHandler | end |
| ) |  |  |

void gdcm::Parser::SetUserData | ( | void * | userData | ) |

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

- gdcmParser.h