Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CFGAS_StringFormatter Class Reference

#include <cfgas_stringformatter.h>

+ Collaboration diagram for CFGAS_StringFormatter:

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< WideStringSplitOnBars (const WideString &wsFormatString)
 

Detailed Description

Definition at line 25 of file cfgas_stringformatter.h.

Member Enumeration Documentation

◆ Category

Enumerator
kUnknown 
kDate 
kTime 
kDateTime 
kNum 
kText 
kZero 
kNull 

Definition at line 27 of file cfgas_stringformatter.h.

◆ DateTimeType

Enumerator
kUnknown 
kDate 
kTime 
kDateTime 
kTimeDate 

Definition at line 38 of file cfgas_stringformatter.h.

Constructor & Destructor Documentation

◆ CFGAS_StringFormatter()

CFGAS_StringFormatter::CFGAS_StringFormatter ( const WideString & wsPattern)
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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~CFGAS_StringFormatter()

CFGAS_StringFormatter::~CFGAS_StringFormatter ( )
default

Member Function Documentation

◆ FormatDateTime()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FormatNull()

bool CFGAS_StringFormatter::FormatNull ( WideString * wsOutput) const

Definition at line 2275 of file cfgas_stringformatter.cpp.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ FormatNum()

◆ FormatText()

bool CFGAS_StringFormatter::FormatText ( const WideString & wsSrcText,
WideString * wsOutput ) const

Definition at line 1796 of file cfgas_stringformatter.cpp.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ FormatZero()

bool CFGAS_StringFormatter::FormatZero ( WideString * wsOutput) const

Definition at line 2259 of file cfgas_stringformatter.cpp.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ GetCategory()

CFGAS_StringFormatter::Category CFGAS_StringFormatter::GetCategory ( ) const

Definition at line 882 of file cfgas_stringformatter.cpp.

References kDate, kDateTime, kNull, kNum, kText, kTime, kUnknown, kZero, and fxcrt::WideString::operator==().

Referenced by TEST_F().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseDateTime()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseNull()

bool CFGAS_StringFormatter::ParseNull ( const WideString & wsSrcText) const

Definition at line 1768 of file cfgas_stringformatter.cpp.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ ParseNum()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseText()

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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ParseZero()

bool CFGAS_StringFormatter::ParseZero ( const WideString & wsSrcText) const

Definition at line 1740 of file cfgas_stringformatter.cpp.

Referenced by TEST_F().

+ Here is the caller graph for this function:

◆ SplitOnBars()

std::vector< WideString > CFGAS_StringFormatter::SplitOnBars ( const WideString & wsFormatString)
static

Definition at line 863 of file cfgas_stringformatter.cpp.


The documentation for this class was generated from the following files: