![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cTimeUnits.h>
Public Member Functions | |
int | FindType (TIMEUNIT_TYPE t) const |
void | SetUnitFormats (const GChar_t *pszFormat) |
StrLen_t | ParseNamedUnit (const GChar_t *pszName) |
HRESULT | ParseString (const GChar_t *pszTimeString, const GChar_t *pszSeparators=nullptr) |
bool | isMatched () const |
StrLen_t | GetMatchedLength () const |
bool | TestMatchFormat (const cTimeParser &parserFormat, bool bTrimJunk=false) |
bool | TestMatch (const GChar_t *pszFormat) |
bool | TestMatches (const GChar_t **ppStrFormats=nullptr) |
HRESULT | GetTimeUnits (OUT cTimeUnits &tu) const |
cTimeParser () | |
cTimeParser (const GChar_t *pszTimeString) | |
cTimeParser (const GChar_t *pszTimeString, const GChar_t **ppStrFormats) | |
Static Public Member Functions | |
static bool __stdcall | TestMatchUnit (const cTimeParserUnit &u, TIMEUNIT_TYPE t) |
static TIMEUNIT_TYPE __stdcall | GetTypeFromFormatCode (GChar_t ch) |
Public Attributes | |
cTimeParserUnit | m_Unit [TIMEUNIT_QTY2] |
space for parsed results. More... | |
int | m_iUnitsParsed |
m_Unit used. <TIMEUNIT_QTY2 More... | |
int | m_iUnitsMatched |
m_iUnitsMatched <= m_iUnitsParsed and all m_Type are set. No use of TIMEUNIT_Numeric More... | |
Try to interpret/parse a string as a date/time. Hold result of the first parsing pass to (perhaps) process the time string as cTimeUnits.
|
inline |
|
inline |
|
inline |
int Gray::cTimeParser::FindType | ( | TIMEUNIT_TYPE | t | ) | const |
|
inline |
How much of the parsed string was consumed by the match?
HRESULT Gray::cTimeParser::GetTimeUnits | ( | OUT cTimeUnits & | tu | ) | const |
Make a valid cTimeUnits class from what we already parsed. If i can.
|
static |
|
inline |
void Gray::cTimeParser::SetUnitFormats | ( | const GChar_t * | pszFormat | ) |
Similar to ParseString but assumes we just want to set units from a format string.
Does pszFormat fit with data in m_Units ?
Try standard k_StrFormats to match.
bool Gray::cTimeParser::TestMatchFormat | ( | const cTimeParser & | parserFormat, |
bool | bTrimJunk = false |
||
) |
Does parserFormat fit with data in m_Units ? Does this contain compatible units with parserFormat? if so fix m_Unit types!
|
static |
int Gray::cTimeParser::m_iUnitsMatched |
m_iUnitsMatched <= m_iUnitsParsed and all m_Type are set. No use of TIMEUNIT_Numeric
int Gray::cTimeParser::m_iUnitsParsed |
m_Unit used. <TIMEUNIT_QTY2
cTimeParserUnit Gray::cTimeParser::m_Unit[TIMEUNIT_QTY2] |
space for parsed results.