rtspstack
Class CharDataParser


class CharDataParser


Field Summary
 static u_int8_t []myMaskDigit
           
 static u_int8_t []myMaskEol
           
 static u_int8_t []myMaskEolSpace
           
 static u_int8_t []myMaskNonSpace
           
 static u_int8_t []myMaskNonWord
           

Constructor Summary
CharDataParser(CharData * dataBuf)
           

Destructor Summary
~CharDataParser()
           

Method Summary
 chargetCurChar()
          Get the current char but not advance curPtr
 intgetNextDouble(double & doubleNum)
          Get the double value of the digit and '.' chars
 intgetNextInteger(u_int32_t & num)
          Get the interger value of the digit chars, only support unsigned
 intgetNextLine(CharData * outBuf)
          Get all the chars before \r or \n or \r\n, inclusive
 intgetNextWord(CharData * outBuf)
          Get all the chars before a non-letter
 intgetThruLength(CharData * outBuf, int length)
          Get thru length of chars
 intgetThruSpaces(CharData * outBuf)
          Get all the chars before a non space char
 intparseThru(CharData * outBuf, char stopChar)
          Get all chars and stop after the stopChar
 intparseThru(CharData * outBuf, u_int8_t * stopMask)
          Get all chars if mask[char]=1, and stop otherwise
 intparseUntil(CharData * outBuf, char stopChar)
          Get all chars, and stop before the stopChar
 intparseUntil(CharData * outBuf, u_int8_t * stopMask)
          Get all chars and stop before the char that mask[char]=1

Field Detail

myMaskDigit

public static u_int8_t [] myMaskDigit

myMaskEol

public static u_int8_t [] myMaskEol

myMaskEolSpace

public static u_int8_t [] myMaskEolSpace

myMaskNonSpace

public static u_int8_t [] myMaskNonSpace

myMaskNonWord

public static u_int8_t [] myMaskNonWord
Constructor Detail

CharDataParser

public CharDataParser(CharData * dataBuf)
Method Detail

~CharDataParser

public ~CharDataParser()
Method Detail

getCurChar

public char getCurChar()
Get the current char but not advance curPtr

getNextDouble

public int getNextDouble(double & doubleNum)
Get the double value of the digit and '.' chars

getNextInteger

public int getNextInteger(u_int32_t & num)
Get the interger value of the digit chars, only support unsigned

getNextLine

public int getNextLine(CharData * outBuf)
Get all the chars before \r or \n or \r\n, inclusive

getNextWord

public int getNextWord(CharData * outBuf)
Get all the chars before a non-letter

getThruLength

public int getThruLength(CharData * outBuf, int length)
Get thru length of chars

getThruSpaces

public int getThruSpaces(CharData * outBuf)
Get all the chars before a non space char

parseThru

public int parseThru(CharData * outBuf, char stopChar)
Get all chars and stop after the stopChar

parseThru

public int parseThru(CharData * outBuf, u_int8_t * stopMask)
Get all chars if mask[char]=1, and stop otherwise

parseUntil

public int parseUntil(CharData * outBuf, char stopChar)
Get all chars, and stop before the stopChar

parseUntil

public int parseUntil(CharData * outBuf, u_int8_t * stopMask)
Get all chars and stop before the char that mask[char]=1