This class parses text files.
More...
#include "../include/Parse.h"
|
| static bool | compare (const char *header, const char *awip, const char *pattern) |
|
static bool | checkZone (const char *line, const char *str) |
|
|
static const int | START = 0x1 |
|
static const int | SEQ = 0x2 |
|
static const int | HEADER = 0x3 |
|
static const int | AWIP = 0x4 |
|
static const int | SDATA = 0x5 |
|
static const int | DATA = 0x10 |
|
static const int | BLANK = 0x11 |
|
static const int | DOLLAR = 0x12 |
|
static const int | LOCATE = 0x13 |
|
static const int | VTEC = 0x14 |
|
static const int | LATLON = 0x15 |
|
static const int | DESC = 0x16 |
This class parses text files.
- Author
- Dan Vietor
◆ Parse() [1/2]
Constructor. Initializes class values
References init().
◆ Parse() [2/2]
| Parse::Parse |
( |
const char * | str | ) |
|
Constructor
- Parameters
-
| str | The parameters to initialize object |
References init().
◆ close()
◆ compare()
| bool Parse::compare |
( |
const char * | header, |
|
|
const char * | header2, |
|
|
const char * | pattern ) |
|
static |
◆ getAwip()
| const char * Parse::getAwip |
( |
| ) |
|
Gets the latest AWIP header
- Returns
- AWIP header
◆ getHeader()
| const char * Parse::getHeader |
( |
| ) |
|
Gets the latest matching WMO header
- Returns
- WMO header string
◆ getHeaderLoc()
| int Parse::getHeaderLoc |
( |
| ) |
|
Gets the location of the current header line in the file (byte offset)
- Returns
- The byte offset into file
◆ getLine() [1/2]
| int Parse::getLine |
( |
char * | line, |
|
|
int | len ) |
◆ getLine() [2/2]
| int Parse::getLine |
( |
String & | string | ) |
|
Gets the next matching line in the file
- Return values
-
| string | String class to put data |
References getLine().
◆ getLoc()
Gets the location of the current line in the file (byte offset)
- Returns
- The byte offset into file
◆ init()
◆ isData()
Returns if the data output is valid data
- Returns
- True if valid data
◆ isNewProd()
| bool Parse::isNewProd |
( |
| ) |
|
Is data part of a new product.
- Returns
- True if data first part of a new product. Clears after first valid data of new product.
◆ isOpen()
Is file open
- Returns
- True if file open
◆ open()
◆ rewind()
◆ setHeader()
| int Parse::setHeader |
( |
const char * | str | ) |
|
◆ setId()
| int Parse::setId |
( |
const char * | str | ) |
|
Sets the string identifier to search for within product
- Parameters
-
| str | Id string to search for |
References WXP::StrLib::copy().
◆ setLoc()
| int Parse::setLoc |
( |
int | byte | ) |
|
Sets a new location in the file to start searching for data
- Parameters
-
| byte | Byte offset into file |
◆ useHdrFile()
| int WXP::Parse::useHdrFile |
( |
bool | val | ) |
|
|
inline |
Determines if header file is to be used in parsing
- Parameters
-
| val | True if header file is to be used. |
The documentation for this class was generated from the following files: