Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ndk::mask Class Reference

List of all members.

Public Member Functions

 mask (const std::string &str)
unsigned int size () const
char space () const
bool validate (unsigned int n, char sym) const
std::string apply (const std::string &str) const
unsigned int real_pos (unsigned int n) const

Private Types

typedef std::vector< std::string::size_type > pos_vector

Private Member Functions

void init_mapping ()
unsigned int real_len () const

Private Attributes

std::string pattern_
pos_vector mapping_

Detailed Description

Edit mask, usefull for special '#' - any digit

Member Typedef Documentation

typedef std::vector<std::string::size_type> ndk::mask::pos_vector [private]

map position in the text() to position on the pattern

Constructor & Destructor Documentation

mask::mask const std::string &  str  ) 

Member Function Documentation

std::string mask::apply const std::string &  str  )  const

apply text to the mask

void mask::init_mapping  )  [private]

unsigned int mask::real_len  )  const [private]

real pattern length without ';r'

unsigned int mask::real_pos unsigned int  n  )  const

real cursor position

unsigned int mask::size  )  const

size of the real symbols + 1

char mask::space  )  const

default space symbol

bool mask::validate unsigned int  n,
char  sym

check are symbol at possition valid

Member Data Documentation

pos_vector ndk::mask::mapping_ [private]

mapping between text and position in the pattern

std::string ndk::mask::pattern_ [private]

mask pattern

The documentation for this class was generated from the following files:
Generated on Fri Jun 4 16:20:55 2004 for NDK++ by doxygen 1.3.6