DeSR Dependency Parser

Tanl::Text::CharBuffer< CharTraits > Class Template Reference

A text buffer that provides a random access iterator through it. More...

#include <CharBuffer.h>

List of all members.

Classes

class  const_iterator
class  iterator

Public Types

typedef CharTraits::CharType CharType
 type of chars to return
typedef CharTraits::CodeUnit CodeUnit
 type of chars in buffer
typedef CharTypepointer
typedef const CharTypeconst_pointer
typedef CharTypereference
typedef const CharTypeconst_reference
typedef size_t size_type
typedef ptrdiff_t Distance

Public Member Functions

 CharBuffer (CharType *start=0, size_t length=0)
reference operator[] (size_type n)
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
Distance size ()

Protected Attributes

CodeUnit const * start
 start of text
Distance length
 length of text


Detailed Description

template<typename CharTraits>
class Tanl::Text::CharBuffer< CharTraits >

A text buffer that provides a random access iterator through it.

This class can be used with various types of characters.

For instance

CharBuffer<CChar>
is a buffer consisting of C characters, and the iterator *() returns the current C character.

CharBuffer<Char>
is a buffer consisting of Unicode characters, and the iterator *() returns the current Unicode character.

CharBuffer<Utf8>
is a buffer consisting of Utf8 characters, and the iterator *() returns the current character converted to Unicode.

CharTraits is a specifier that must define:

Definition at line 60 of file CharBuffer.h.


The documentation for this class was generated from the following file:
 
Copyright © 2005-2007 G. Attardi. Generated on 13 Aug 2009 by doxygen 1.5.7.1.