Tanl Linguistic Pipeline

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:


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
 
Copyright © 2005-2011 G. Attardi. Generated on 4 Mar 2011 by doxygen 1.6.1.