Optimized Time preflet:
* use upon-demand initialization in BTimeZone to avoid unnecessary work * renamed BTimeZone::Code() to BTimeZone::ID() and adjusted all callers * avoid using BCountry in the Time preflet for the time being, this means the icon-flags are gone for now (but they could be re-added if the demand is pressing ;-) * group the timezones by regions and then by country instead The performance improvement is considerable and I personally think the new grouping is an improvement, too. Please share your thoughts! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38322 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -9,12 +9,20 @@
|
||||
#include <String.h>
|
||||
|
||||
|
||||
namespace icu_44 {
|
||||
class TimeZone;
|
||||
}
|
||||
|
||||
|
||||
class BTimeZone {
|
||||
public:
|
||||
BTimeZone(const char* zoneCode = NULL);
|
||||
BTimeZone(const char* zoneID = NULL);
|
||||
BTimeZone(const BTimeZone& other);
|
||||
~BTimeZone();
|
||||
|
||||
const BString& Code() const;
|
||||
BTimeZone& operator=(const BTimeZone& source);
|
||||
|
||||
const BString& ID() const;
|
||||
const BString& Name() const;
|
||||
const BString& DaylightSavingName() const;
|
||||
const BString& ShortName() const;
|
||||
@@ -24,20 +32,22 @@ public:
|
||||
|
||||
status_t InitCheck() const;
|
||||
|
||||
status_t SetTo(const char* zoneCode);
|
||||
status_t SetTo(const char* zoneID);
|
||||
|
||||
static const char* kNameOfGmtZone;
|
||||
|
||||
private:
|
||||
BString fCode;
|
||||
BString fName;
|
||||
BString fDaylightSavingName;
|
||||
BString fShortName;
|
||||
BString fShortDaylightSavingName;
|
||||
int fOffsetFromGMT;
|
||||
bool fSupportsDaylightSaving;
|
||||
|
||||
icu_44::TimeZone* fIcuTimeZone;
|
||||
status_t fInitStatus;
|
||||
|
||||
mutable uint32 fInitializedFields;
|
||||
mutable BString fZoneID;
|
||||
mutable BString fName;
|
||||
mutable BString fDaylightSavingName;
|
||||
mutable BString fShortName;
|
||||
mutable BString fShortDaylightSavingName;
|
||||
mutable int fOffsetFromGMT;
|
||||
mutable bool fSupportsDaylightSaving;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user