|
WXP C++ Library Version 6.74.9
|
This class parses data given expressions to search for. More...
#include "../include/Scanp.h"
Public Member Functions | |
| int | init () |
| int | scan (const char *pat,...) |
| This routine scans a character string for data and parses information using a pattern description string. | |
| int | set (const char *str) |
| int | getOffset () |
| int | offset (int off) |
| int | inc (int off) |
| int | inc () |
| const char * | string () |
| char | getChar (int off) |
| int | search (const char *str) |
| int | print () |
| int | length () |
| int | matched () |
| int | assigned () |
| bool | finished () |
This class parses data given expressions to search for.
| char Scanp::getChar | ( | int | roff | ) |
Returns character at specific offset
| off | Offset |
Referenced by WXP::RcmFile::decode(), WXP::MetarTool::decode(), and WXP::SaoTool::decode().
| int Scanp::getOffset | ( | ) |
| int Scanp::inc | ( | ) |
Increments offset based on matched length of previous scan (see scan)
| int Scanp::inc | ( | int | roff | ) |
Increments offset into string
| off | Increment value |
Referenced by WXP::ClimatTool::decode(), WXP::RcmFile::decode(), WXP::MetarTool::decode(), WXP::SaoTool::decode(), and WXP::SynopTool::decode().
| int Scanp::init | ( | ) |
Initializes class values
Referenced by scan().
| int Scanp::offset | ( | int | roff | ) |
| int Scanp::scan | ( | const char * | pat, |
| ... | |||
| ) |
This routine scans a character string for data and parses information using a pattern description string.
Scans and decodes data
| pat | Pattern to use |
Formatting similar to scanf except more robust:
%{*}{<}{f}{!m!}t
References init(), WXP::Const::MISS, and WXP::Wxp::outDebug().
Referenced by WXP::ClimatTool::decode(), WXP::RcmFile::decode(), WXP::MetarTool::decode(), WXP::SaoTool::decode(), WXP::SynopTool::decode(), and WXP::MosUFile::decodeETA().
| int Scanp::search | ( | const char * | rstr | ) |
Searches the current string for another string
| rstr | String to search for |
| int Scanp::set | ( | const char * | rstr | ) |
Sets the string to scan
| rstr | Data string |
Referenced by WXP::ClimatTool::decode(), WXP::RcmFile::decode(), WXP::MetarTool::decode(), WXP::SaoTool::decode(), WXP::SynopTool::decode(), and WXP::MosUFile::decodeETA().
| const char * Scanp::string | ( | ) |
Returns string after offset
Referenced by WXP::ClimatTool::decode(), WXP::RcmFile::decode(), WXP::MetarTool::decode(), WXP::SaoTool::decode(), and WXP::SynopTool::decode().