* added BTimeZone::Accessor class, which allows other LocaleKit classes to
access a BTimeZone's ICU-timeZone git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38427 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -42,6 +42,8 @@ public:
|
|||||||
|
|
||||||
static const char* kNameOfGmtZone;
|
static const char* kNameOfGmtZone;
|
||||||
|
|
||||||
|
struct Accessor;
|
||||||
|
friend struct BTimeZone::Accessor;
|
||||||
private:
|
private:
|
||||||
icu_44::TimeZone* fIcuTimeZone;
|
icu_44::TimeZone* fIcuTimeZone;
|
||||||
icu_44::Locale* fIcuLocale;
|
icu_44::Locale* fIcuLocale;
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Copyright 2010, Oliver Tappe <[email protected]>
|
||||||
|
* Distributed under the terms of the MIT License.
|
||||||
|
*/
|
||||||
|
#ifndef _TIME_ZONE_ACCESSOR_H
|
||||||
|
#define _TIME_ZONE_ACCESSOR_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <TimeZone.h>
|
||||||
|
|
||||||
|
|
||||||
|
struct BTimeZone::Accessor {
|
||||||
|
Accessor(const BTimeZone* timeZone = NULL)
|
||||||
|
: fTimeZone(timeZone)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void SetTo(const BTimeZone* timeZone)
|
||||||
|
{
|
||||||
|
fTimeZone = timeZone;
|
||||||
|
}
|
||||||
|
|
||||||
|
icu_44::TimeZone* IcuTimeZone()
|
||||||
|
{
|
||||||
|
return fTimeZone->fIcuTimeZone;
|
||||||
|
}
|
||||||
|
|
||||||
|
const BTimeZone* fTimeZone;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // _TIME_ZONE_ACCESSOR_H
|
||||||
Reference in New Issue
Block a user