Apache log4cxx  Version 0.11.0
timezone.h
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _LOG4CXX_HELPERS_TIMEZONE_H
19 #define _LOG4CXX_HELPERS_TIMEZONE_H
20 
21 #include <log4cxx/logstring.h>
22 #include <log4cxx/helpers/objectimpl.h>
23 #include <log4cxx/helpers/objectptr.h>
24 
25 #if defined(_MSC_VER)
26  #pragma warning ( push )
27  #pragma warning ( disable: 4251 )
28 #endif
29 
30 struct apr_time_exp_t;
31 
32 namespace log4cxx
33 {
34 namespace helpers
35 {
36 class TimeZone;
37 LOG4CXX_PTR_DEF(TimeZone);
38 
39 class LOG4CXX_EXPORT TimeZone : public helpers::ObjectImpl
40 {
41  public:
42  DECLARE_ABSTRACT_LOG4CXX_OBJECT(TimeZone)
43  BEGIN_LOG4CXX_CAST_MAP()
44  LOG4CXX_CAST_ENTRY(TimeZone)
45  END_LOG4CXX_CAST_MAP()
46 
47  static const TimeZonePtr& getDefault();
48  static const TimeZonePtr& getGMT();
49  static const TimeZonePtr getTimeZone(const LogString& ID);
50 
51  const LogString getID() const
52  {
53  return id;
54  }
55 
56 
61  virtual log4cxx_status_t explode(apr_time_exp_t* result,
62  log4cxx_time_t input) const = 0;
63 
64 
65  protected:
66  TimeZone(const LogString& ID);
67  virtual ~TimeZone();
68 
69  const LogString id;
70 };
71 
72 
73 }
74 }
75 
76 #if defined(_MSC_VER)
77  #pragma warning (pop)
78 #endif
79 
80 #endif //_LOG4CXX_HELPERS_TIMEZONE_H
Definition: timezone.h:39
Implementation class for Object.
Definition: objectimpl.h:28
Definition: appender.h:33