Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cfgas_stringformatter.h>
Public Types | |
enum class | Category { kUnknown , kDate , kTime , kDateTime , kNum , kText , kZero , kNull } |
enum class | DateTimeType { kUnknown , kDate , kTime , kDateTime , kTimeDate } |
Public Member Functions | |
CFGAS_StringFormatter (const WideString &wsPattern) | |
~CFGAS_StringFormatter () | |
Category | GetCategory () const |
bool | ParseText (const WideString &wsSrcText, WideString *wsValue) const |
bool | ParseNum (LocaleMgrIface *pLocaleMgr, const WideString &wsSrcNum, WideString *wsValue) const |
bool | ParseDateTime (LocaleMgrIface *pLocaleMgr, const WideString &wsSrcDateTime, DateTimeType eDateTimeType, CFX_DateTime *dtValue) const |
bool | ParseZero (const WideString &wsSrcText) const |
bool | ParseNull (const WideString &wsSrcText) const |
bool | FormatText (const WideString &wsSrcText, WideString *wsOutput) const |
bool | FormatNum (LocaleMgrIface *pLocaleMgr, const WideString &wsSrcNum, WideString *wsOutput) const |
bool | FormatDateTime (LocaleMgrIface *pLocaleMgr, const WideString &wsSrcDateTime, DateTimeType eDateTimeType, WideString *wsOutput) const |
bool | FormatZero (WideString *wsOutput) const |
bool | FormatNull (WideString *wsOutput) const |
Static Public Member Functions | |
static std::vector< WideString > | SplitOnBars (const WideString &wsFormatString) |
Definition at line 25 of file cfgas_stringformatter.h.
|
strong |
Enumerator | |
---|---|
kUnknown | |
kDate | |
kTime | |
kDateTime | |
kNum | |
kText | |
kZero | |
kNull |
Definition at line 27 of file cfgas_stringformatter.h.
|
strong |
Enumerator | |
---|---|
kUnknown | |
kDate | |
kTime | |
kDateTime | |
kTimeDate |
Definition at line 38 of file cfgas_stringformatter.h.
|
explicit |
Definition at line 857 of file cfgas_stringformatter.cpp.
References CFGAS_StringFormatter().
Referenced by CFGAS_StringFormatter(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
default |
bool CFGAS_StringFormatter::FormatDateTime | ( | LocaleMgrIface * | pLocaleMgr, |
const WideString & | wsSrcDateTime, | ||
DateTimeType | eDateTimeType, | ||
WideString * | wsOutput ) const |
Definition at line 2200 of file cfgas_stringformatter.cpp.
References fxcrt::WideString::WideString(), kDate, kTime, kTimeDate, kUnknown, and fxcrt::WideString::operator=().
Referenced by TEST_F(), TEST_F(), TEST_F(), and TEST_F().
bool CFGAS_StringFormatter::FormatNull | ( | WideString * | wsOutput | ) | const |
Definition at line 2275 of file cfgas_stringformatter.cpp.
Referenced by TEST_F().
bool CFGAS_StringFormatter::FormatNum | ( | LocaleMgrIface * | pLocaleMgr, |
const WideString & | wsSrcNum, | ||
WideString * | wsOutput ) const |
Definition at line 1854 of file cfgas_stringformatter.cpp.
References CFGAS_Decimal::CFGAS_Decimal(), fxcrt::WideString::clear(), fxcrt::WideString::Format(), LocaleIface::GetCurrencySymbol(), LocaleIface::GetDecimalSymbol(), LocaleIface::GetGroupingSymbol(), LocaleIface::GetMinusSymbol(), LocaleIface::GetPercentSymbol(), CFGAS_Decimal::GetScale(), fxcrt::WideString::IsEmpty(), CFGAS_Decimal::IsNotZero(), CFGAS_Decimal::operator*(), fxcrt::operator+(), fxcrt::operator+(), fxcrt::WideString::operator+=(), fxcrt::WideString::operator+=(), fxcrt::WideString::operator+=(), CFGAS_Decimal::operator/(), fxcrt::WideString::operator=(), fxcrt::WideString::operator[](), CFGAS_Decimal::SetScale(), CFGAS_Decimal::ToDouble(), CFGAS_Decimal::ToWideString(), and fxcrt::WideString::TrimLeft().
Referenced by TEST_F().
bool CFGAS_StringFormatter::FormatText | ( | const WideString & | wsSrcText, |
WideString * | wsOutput ) const |
Definition at line 1796 of file cfgas_stringformatter.cpp.
Referenced by TEST_F().
bool CFGAS_StringFormatter::FormatZero | ( | WideString * | wsOutput | ) | const |
Definition at line 2259 of file cfgas_stringformatter.cpp.
Referenced by TEST_F().
CFGAS_StringFormatter::Category CFGAS_StringFormatter::GetCategory | ( | ) | const |
bool CFGAS_StringFormatter::ParseDateTime | ( | LocaleMgrIface * | pLocaleMgr, |
const WideString & | wsSrcDateTime, | ||
DateTimeType | eDateTimeType, | ||
CFX_DateTime * | dtValue ) const |
Definition at line 1698 of file cfgas_stringformatter.cpp.
References kUnknown, and CFX_DateTime::Reset().
Referenced by TEST_F().
bool CFGAS_StringFormatter::ParseNull | ( | const WideString & | wsSrcText | ) | const |
Definition at line 1768 of file cfgas_stringformatter.cpp.
Referenced by TEST_F().
bool CFGAS_StringFormatter::ParseNum | ( | LocaleMgrIface * | pLocaleMgr, |
const WideString & | wsSrcNum, | ||
WideString * | wsValue ) const |
Definition at line 1150 of file cfgas_stringformatter.cpp.
References CFGAS_Decimal::CFGAS_Decimal(), CFGAS_Decimal::CFGAS_Decimal(), fxcrt::WideString::clear(), LocaleIface::GetCurrencySymbol(), LocaleIface::GetDecimalSymbol(), LocaleIface::GetGroupingSymbol(), LocaleIface::GetMinusSymbol(), LocaleIface::GetPercentSymbol(), fxcrt::WideString::IsEmpty(), CFGAS_Decimal::operator*(), fxcrt::WideString::operator+=(), CFGAS_Decimal::operator/(), fxcrt::WideString::operator=(), and CFGAS_Decimal::ToWideString().
Referenced by TEST_F().
bool CFGAS_StringFormatter::ParseText | ( | const WideString & | wsSrcText, |
WideString * | wsValue ) const |
Definition at line 1079 of file cfgas_stringformatter.cpp.
References fxcrt::WideString::clear(), fxcrt::WideString::IsEmpty(), and fxcrt::WideString::operator=().
Referenced by TEST_F(), and TEST_F().
bool CFGAS_StringFormatter::ParseZero | ( | const WideString & | wsSrcText | ) | const |
Definition at line 1740 of file cfgas_stringformatter.cpp.
Referenced by TEST_F().
|
static |
Definition at line 863 of file cfgas_stringformatter.cpp.