Apache log4cxx  Version 0.11.0
hierarchyeventlistener.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_SPI_HIERARCHY_EVENT_LISTENER_H
19 #define _LOG4CXX_SPI_HIERARCHY_EVENT_LISTENER_H
20 
21 #if defined(_MSC_VER)
22  #pragma warning ( push )
23  #pragma warning ( disable: 4231 4251 4275 4786 )
24 #endif
25 
26 
27 #include <log4cxx/helpers/object.h>
28 #include <log4cxx/helpers/objectptr.h>
29 #include <vector>
30 
31 namespace log4cxx
32 {
33 class Logger;
34 class Appender;
35 
36 
37 namespace spi
38 {
39 
41 class LOG4CXX_EXPORT HierarchyEventListener :
42  public virtual log4cxx::helpers::Object
43 {
44  public:
45  virtual ~HierarchyEventListener() {}
46 
47  virtual void addAppenderEvent(
49  const log4cxx::helpers::ObjectPtrT<Appender>& appender) = 0;
50 
51  virtual void removeAppenderEvent(
53  const log4cxx::helpers::ObjectPtrT<Appender>& appender) = 0;
54 };
55 LOG4CXX_PTR_DEF(HierarchyEventListener);
56 LOG4CXX_LIST_DEF(HierarchyEventListenerList, HierarchyEventListenerPtr);
57 
58 } // namespace spi
59 } // namespace log4cxx
60 
61 #if defined(_MSC_VER)
62  #pragma warning ( pop )
63 #endif
64 
65 #endif //_LOG4CXX_SPI_HIERARCHY_EVENT_LISTENER_H
base class for java-like objects.
Definition: object.h:102
Listen to events occuring within a Hierarchy.
Definition: hierarchyeventlistener.h:41
Definition: appender.h:33