|
NCBI C++ ToolKit
|
Search Toolkit Book for CTimeFormat
CTimeFormat --. More...
#include <ncbitime.hpp>
Public Types | |
| enum | EFlags { fFormat_Simple = (1 << 0), fFormat_Ncbi = (1 << 1), fMatch_Strict = (1 << 5), fMatch_ShortTime = (1 << 6), fMatch_ShortFormat = (1 << 7), fMatch_Weak = fMatch_ShortFormat | fMatch_ShortTime, fDefault = fFormat_Simple | fMatch_Strict, eNcbiSimple = fFormat_Simple, eNcbi = fFormat_Ncbi, eDefault = fDefault } |
| Flags. More... | |
| enum | EPredefined { eISO8601_Year = 0, eISO8601_YearMonth = 1, eISO8601_Date = 2, eISO8601_DateTimeMin = 3, eISO8601_DateTimeSec = 4, eISO8601_DateTimeFrac = 5 } |
| Predefined formats. More... | |
| typedef unsigned int | TFlags |
| Binary OR of "EFlags". | |
Public Member Functions | |
| CTimeFormat (void) | |
| Default constructor. | |
| CTimeFormat (const CTimeFormat &format) | |
| Copy constructor. | |
| CTimeFormat (const char *fmt, TFlags flags=fDefault) | |
| Constructor. | |
| CTimeFormat (const string &fmt, TFlags flags=fDefault) | |
| Constructor. | |
| CTimeFormat & | operator= (const CTimeFormat &format) |
| Assignment operator. | |
| void | SetFormat (const char *fmt, TFlags flags=fDefault) |
| Set the current time format. | |
| void | SetFormat (const string &fmt, TFlags flags=fDefault) |
| Set the current time format. | |
| const string & | GetString (void) const |
| Get format string. | |
| TFlags | GetFlags (void) const |
| Get format flags. | |
| bool | IsEmpty (void) const |
| Check that format string is empty. | |
| NCBI_DEPRECATED | operator string (void) const |
| Return time format as string. | |
Static Public Member Functions | |
| static CTimeFormat | GetPredefined (EPredefined fmt, TFlags flags=fDefault) |
| Get predefined format. | |
Private Attributes | |
| string | m_Str |
| String format. | |
| TFlags | m_Flags |
| Format flags. | |
CTimeFormat --.
Defines a storage class for time format.
See CTime::SetFormat and CTimeSpan::SetFormat for description of format symbols for specific class.
Definition at line 118 of file ncbitime.hpp.
| typedef unsigned int CTimeFormat::TFlags |
Binary OR of "EFlags".
Definition at line 149 of file ncbitime.hpp.
| enum CTimeFormat::EFlags |
Flags.
Definition at line 124 of file ncbitime.hpp.
Predefined formats.
Definition at line 154 of file ncbitime.hpp.
| CTimeFormat::CTimeFormat | ( | void | ) |
| CTimeFormat::CTimeFormat | ( | const CTimeFormat & | format | ) |
| CTimeFormat::CTimeFormat | ( | const char * | fmt, |
| TFlags | flags = fDefault |
||
| ) |
Constructor.
Definition at line 296 of file ncbitime.cpp.
References SetFormat().
| CTimeFormat::CTimeFormat | ( | const string & | fmt, |
| TFlags | flags = fDefault |
||
| ) |
Constructor.
Definition at line 302 of file ncbitime.cpp.
References SetFormat().
| CTimeFormat::TFlags CTimeFormat::GetFlags | ( | void | ) | const [inline] |
Get format flags.
Definition at line 1973 of file ncbitime.hpp.
Referenced by CTime::AsString(), CTimeSpan::AsString(), CTime::x_Init(), and CTimeSpan::x_Init().
| CTimeFormat CTimeFormat::GetPredefined | ( | EPredefined | fmt, |
| TFlags | flags = fDefault |
||
| ) | [static] |
Get predefined format.
| fmt | String of letters describing the time format. |
| fmt_type | Specify type of the format string. |
Definition at line 319 of file ncbitime.cpp.
References CTimeFormat(), and fFormat_Ncbi.
Referenced by FormatTime(), CProjectService::LoadSettings(), CFileLoadManager::LoadSettings(), CProjectService::SaveSettings(), CFileLoadManager::SaveSettings(), and IBISInteraction::ToAlignAnnot().
| const string & CTimeFormat::GetString | ( | void | ) | const [inline] |
Get format string.
Definition at line 1967 of file ncbitime.hpp.
Referenced by CTime::AsString(), CTimeSpan::AsString(), FormatTime(), CTime::x_Init(), and CTimeSpan::x_Init().
| bool CTimeFormat::IsEmpty | ( | void | ) | const [inline] |
Check that format string is empty.
Definition at line 1979 of file ncbitime.hpp.
Referenced by CTime::AsString(), CTimeSpan::AsString(), CStopWatch::AsString(), CTime::CTime(), and CTimeSpan::CTimeSpan().
| CTimeFormat::operator string | ( | void | ) | const [inline] |
Return time format as string.
Note: This method added temporarely, and will be deleted soon.
Definition at line 1985 of file ncbitime.hpp.
| CTimeFormat & CTimeFormat::operator= | ( | const CTimeFormat & | format | ) |
| void CTimeFormat::SetFormat | ( | const char * | fmt, |
| TFlags | flags = fDefault |
||
| ) | [inline] |
Set the current time format.
| fmt | String of letters describing the time format. |
| flags | Flags specifying how to match a time string against format string. |
Definition at line 1960 of file ncbitime.hpp.
Referenced by CEventViewModel::CEventViewModel(), CTaskViewModel::CTaskViewModel(), CTimeFormat(), CTime::GetFormat(), CTimeSpan::GetFormat(), and CStopWatch::GetFormat().
| void CTimeFormat::SetFormat | ( | const string & | fmt, |
| TFlags | flags = fDefault |
||
| ) | [inline] |
Set the current time format.
| fmt | String of letters describing the time format. |
| flags | Flags specifying how to match a time string against format string. |
Definition at line 1953 of file ncbitime.hpp.
TFlags CTimeFormat::m_Flags [private] |
string CTimeFormat::m_Str [private] |
1.7.5.1
Modified on Wed May 23 13:22:41 2012 by modify_doxy.py rev. 337098