You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by ca...@apache.org on 2008/01/17 06:27:16 UTC

svn commit: r612715 - in /logging/log4cxx/trunk/src/main: cpp/ include/log4cxx/ include/log4cxx/filter/ include/log4cxx/helpers/ include/log4cxx/net/ include/log4cxx/pattern/ include/log4cxx/spi/

Author: carnold
Date: Wed Jan 16 21:27:12 2008
New Revision: 612715

URL: http://svn.apache.org/viewvc?rev=612715&view=rev
Log:
LOGCXX-219: More C2431 fixes for VC

Modified:
    logging/log4cxx/trunk/src/main/cpp/asyncappender.cpp
    logging/log4cxx/trunk/src/main/cpp/configurator.cpp
    logging/log4cxx/trunk/src/main/cpp/cyclicbuffer.cpp
    logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp
    logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp
    logging/log4cxx/trunk/src/main/cpp/properties.cpp
    logging/log4cxx/trunk/src/main/include/log4cxx/asyncappender.h
    logging/log4cxx/trunk/src/main/include/log4cxx/consoleappender.h
    logging/log4cxx/trunk/src/main/include/log4cxx/dailyrollingfileappender.h
    logging/log4cxx/trunk/src/main/include/log4cxx/filter/propertyfilter.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bufferedoutputstream.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayinputstream.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/charsetdecoder.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/cyclicbuffer.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/dateformat.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/objectoutputstream.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/socketoutputstream.h
    logging/log4cxx/trunk/src/main/include/log4cxx/helpers/timezone.h
    logging/log4cxx/trunk/src/main/include/log4cxx/layout.h
    logging/log4cxx/trunk/src/main/include/log4cxx/net/sockethubappender.h
    logging/log4cxx/trunk/src/main/include/log4cxx/net/telnetappender.h
    logging/log4cxx/trunk/src/main/include/log4cxx/pattern/nameabbreviator.h
    logging/log4cxx/trunk/src/main/include/log4cxx/pattern/patternconverter.h
    logging/log4cxx/trunk/src/main/include/log4cxx/spi/appenderattachable.h
    logging/log4cxx/trunk/src/main/include/log4cxx/spi/configurator.h
    logging/log4cxx/trunk/src/main/include/log4cxx/spi/errorhandler.h
    logging/log4cxx/trunk/src/main/include/log4cxx/spi/loggingevent.h

Modified: logging/log4cxx/trunk/src/main/cpp/asyncappender.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/asyncappender.cpp?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/asyncappender.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/asyncappender.cpp Wed Jan 16 21:27:12 2008
@@ -46,7 +46,7 @@
   bufferMutex(pool),
   bufferNotFull(pool),
   bufferNotEmpty(pool),
-  discardMap(),
+  discardMap(new DiscardMap()),
   bufferSize(DEFAULT_BUFFER_SIZE),
   appenders(new AppenderAttachableImpl(pool)),
   dispatcher(),
@@ -58,6 +58,15 @@
 AsyncAppender::~AsyncAppender()
 {
         finalize();
+        delete discardMap;
+}
+
+void AsyncAppender::addRef() const {
+    ObjectImpl::addRef();
+}
+
+void AsyncAppender::releaseRef() const {
+    ObjectImpl::releaseRef();
 }
 
 void AsyncAppender::addAppender(const AppenderPtr& newAppender)
@@ -144,10 +153,10 @@
                 //
                 if (discard) {
                     LogString loggerName = event->getLoggerName();
-                    DiscardMap::iterator iter = discardMap.find(loggerName);
-                    if (iter == discardMap.end()) {
+                    DiscardMap::iterator iter = discardMap->find(loggerName);
+                    if (iter == discardMap->end()) {
                         DiscardSummary summary(event);
-                        discardMap.insert(DiscardMap::value_type(loggerName, summary));
+                        discardMap->insert(DiscardMap::value_type(loggerName, summary));
                     } else {
                         (*iter).second.add(event);
                     }
@@ -318,13 +327,13 @@
                        eventIter++) {
                        events.push_back(*eventIter);
                    }
-                   for(DiscardMap::iterator discardIter = pThis->discardMap.begin();
-                       discardIter != pThis->discardMap.end();
+                   for(DiscardMap::iterator discardIter = pThis->discardMap->begin();
+                       discardIter != pThis->discardMap->end();
                        discardIter++) {
                        events.push_back(discardIter->second.createEvent(p));
                    }
                    pThis->buffer.clear();
-                   pThis->discardMap.clear();
+                   pThis->discardMap->clear();
                    pThis->bufferNotFull.signalAll();
             }
             

Modified: logging/log4cxx/trunk/src/main/cpp/configurator.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/configurator.cpp?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/configurator.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/configurator.cpp Wed Jan 16 21:27:12 2008
@@ -18,6 +18,7 @@
 #include <log4cxx/logstring.h>
 #include <log4cxx/spi/configurator.h>
 #include <assert.h>
+#include <log4cxx/logger.h>
 
 using namespace log4cxx;
 using namespace log4cxx::spi;

Modified: logging/log4cxx/trunk/src/main/cpp/cyclicbuffer.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/cyclicbuffer.cpp?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/cyclicbuffer.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/cyclicbuffer.cpp Wed Jan 16 21:27:12 2008
@@ -120,7 +120,7 @@
         if(newSize == numElems)
                 return; // nothing to do
 
-        std::vector<LoggingEventPtr> temp(newSize);
+        LoggingEventList temp(newSize);
 
         int loopLen = newSize < numElems ? newSize : numElems;
         int i;

Modified: logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/loggingevent.cpp Wed Jan 16 21:27:12 2008
@@ -35,6 +35,7 @@
 #include <log4cxx/helpers/stringhelper.h>
 #include <log4cxx/helpers/objectoutputstream.h>
 #include <log4cxx/helpers/bytebuffer.h>
+#include <log4cxx/logger.h>
 
 using namespace log4cxx;
 using namespace log4cxx::spi;

Modified: logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/objectoutputstream.cpp Wed Jan 16 21:27:12 2008
@@ -52,7 +52,7 @@
 }
 
 
-void ObjectOutputStream::writeObject(const std::map<LogString, LogString>& val, Pool& p) {
+void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) {
     //
     //  TC_OBJECT and the classDesc for java.util.Hashtable
     //
@@ -81,7 +81,7 @@
     size[0] = (sz >> 24) & 0xFF;
     ByteBuffer sizeBuf(size, sizeof(size));
     os->write(sizeBuf, p);
-    for(std::map<LogString, LogString>::const_iterator iter = val.begin();
+    for(MDC::Map::const_iterator iter = val.begin();
         iter != val.end();
         iter++) {
         writeObject(iter->first, p);

Modified: logging/log4cxx/trunk/src/main/cpp/properties.cpp
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/cpp/properties.cpp?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/cpp/properties.cpp (original)
+++ logging/log4cxx/trunk/src/main/cpp/properties.cpp Wed Jan 16 21:27:12 2008
@@ -339,7 +339,7 @@
 
 LogString Properties::get(const LogString& key) const
 {
-        std::map<LogString, LogString>::const_iterator it = properties->find(key);
+        PropertyMap::const_iterator it = properties->find(key);
         return (it != properties->end()) ? it->second : LogString();
 }
 
@@ -358,7 +358,7 @@
         std::vector<LogString> names;
         names.reserve(properties->size());
 
-        std::map<LogString, LogString>::const_iterator it;
+        PropertyMap::const_iterator it;
         for (it = properties->begin(); it != properties->end(); it++)
         {
                 const LogString& key = it->first;

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/asyncappender.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/asyncappender.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/asyncappender.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/asyncappender.h Wed Jan 16 21:27:12 2008
@@ -18,6 +18,12 @@
 #ifndef _LOG4CXX_ASYNC_APPENDER_H
 #define _LOG4CXX_ASYNC_APPENDER_H
 
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 )
+#endif
+
+
 #include <log4cxx/appenderskeleton.h>
 #include <log4cxx/helpers/appenderattachableimpl.h>
 #include <deque>
@@ -29,8 +35,6 @@
 
 namespace log4cxx
 {
-        class AsyncAppender;
-        typedef helpers::ObjectPtrT<AsyncAppender> AsyncAppenderPtr;
 
         /**
         The AsyncAppender lets users log events asynchronously. It uses a
@@ -68,6 +72,9 @@
                  */
                 virtual ~AsyncAppender();
 
+                void addRef() const;
+                void releaseRef() const;
+
                 /**
                  * Add appender.
                  *
@@ -191,7 +198,7 @@
                 /**
                  * Event buffer.
                 */
-                typedef std::vector<log4cxx::spi::LoggingEventPtr> LoggingEventList;
+                LOG4CXX_LIST_DEF(LoggingEventList, log4cxx::spi::LoggingEventPtr)
                 LoggingEventList buffer;
 
                 /**
@@ -244,7 +251,7 @@
                   * Map of DiscardSummary objects keyed by logger name.
                 */
                 typedef std::map<LogString, DiscardSummary> DiscardMap;
-                DiscardMap discardMap;
+                DiscardMap* discardMap;
                 
                 /**
                  * Buffer size.
@@ -277,8 +284,13 @@
                 static void* LOG4CXX_THREAD_FUNC dispatch(helpers::log4cxx_thread_t* thread, void* data);
 
         }; // class AsyncAppender
-
+        LOG4CXX_PTR_DEF(AsyncAppender)
 }  //  namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
 
 #endif//  _LOG4CXX_ASYNC_APPENDER_H
 

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/consoleappender.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/consoleappender.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/consoleappender.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/consoleappender.h Wed Jan 16 21:27:12 2008
@@ -22,9 +22,7 @@
 
 namespace log4cxx
 {
-        class ConsoleAppender;
-        typedef helpers::ObjectPtrT<ConsoleAppender> ConsoleAppenderPtr;
-
+ 
         /**
         * ConsoleAppender appends log events to <code>stdout</code> or
         * <code>stderr</code> using a layout specified by the user. The
@@ -74,6 +72,7 @@
                 static log4cxx::helpers::WriterPtr createWriter(const LogString& target);
 
         };
+        LOG4CXX_PTR_DEF(ConsoleAppender)
 }  //namespace log4cxx
 
 #endif //_LOG4CXX_CONSOLE_APPENDER_H

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/dailyrollingfileappender.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/dailyrollingfileappender.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/dailyrollingfileappender.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/dailyrollingfileappender.h Wed Jan 16 21:27:12 2008
@@ -275,7 +275,7 @@
 
 };
 
-typedef log4cxx::helpers::ObjectPtrT<DailyRollingFileAppender> DailyRollingFileAppenderPtr;
+LOG4CXX_PTR_DEF(DailyRollingFileAppender)
 
 }
 

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/filter/propertyfilter.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/filter/propertyfilter.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/filter/propertyfilter.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/filter/propertyfilter.h Wed Jan 16 21:27:12 2008
@@ -44,9 +44,10 @@
  *
  * @since 1.3
  */
-        class LOG4CXX_EXPORT PropertyFilter:public log4cxx::spi::Filter
+        class LOG4CXX_EXPORT PropertyFilter : public log4cxx::spi::Filter
         {
-            std::map < LogString, LogString > properties;
+            typedef std::map < LogString, LogString > PropertyMap;
+            PropertyMap* properties;
             PropertyFilter(const PropertyFilter &);
                   PropertyFilter & operator=(const PropertyFilter &);
 
@@ -57,6 +58,7 @@
                   END_LOG4CXX_CAST_MAP()
 
                   PropertyFilter();
+                  ~PropertyFilter();
             void setProperties(const LogString & props);
 
             FilterDecision decide(const spi::LoggingEventPtr & event) const;

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bufferedoutputstream.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bufferedoutputstream.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bufferedoutputstream.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bufferedoutputstream.h Wed Jan 16 21:27:12 2008
@@ -55,7 +55,7 @@
                   BufferedOutputStream& operator=(const BufferedOutputStream&);
           };
 
-          typedef helpers::ObjectPtrT<BufferedOutputStream> BufferedOutputStreamPtr;
+          LOG4CXX_PTR_DEF(BufferedOutputStream)
         } // namespace helpers
 
 }  //namespace log4cxx

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayinputstream.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayinputstream.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayinputstream.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayinputstream.h Wed Jan 16 21:27:12 2008
@@ -34,7 +34,8 @@
           class LOG4CXX_EXPORT ByteArrayInputStream : public InputStream
           {
           private:
-              std::vector<unsigned char> buf;
+              LOG4CXX_LIST_DEF(ByteList, unsigned char)
+              ByteList buf;
               size_t pos;
 
           public:
@@ -49,7 +50,7 @@
                    *
                    * @param bytes array of bytes to copy into stream.
                    */
-                   ByteArrayInputStream(const std::vector<unsigned char>& bytes);
+                   ByteArrayInputStream(const ByteList& bytes);
 
                    virtual ~ByteArrayInputStream();
 
@@ -76,7 +77,7 @@
 
           };
 
-          typedef helpers::ObjectPtrT<ByteArrayInputStream> ByteArrayInputStreamPtr;
+          LOG4CXX_PTR_DEF(ByteArrayInputStream)
         } // namespace helpers
 
 }  //namespace log4cxx

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayoutputstream.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayoutputstream.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayoutputstream.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/bytearrayoutputstream.h Wed Jan 16 21:27:12 2008
@@ -34,7 +34,8 @@
           class LOG4CXX_EXPORT ByteArrayOutputStream : public OutputStream
           {
           private:
-                 std::vector<unsigned char> array;
+                 LOG4CXX_LIST_DEF(ByteList, unsigned char)
+                 ByteList array;
 
           public:
                   DECLARE_ABSTRACT_LOG4CXX_OBJECT(ByteArrayOutputStream)
@@ -49,14 +50,14 @@
                   virtual void close(Pool& p);
                   virtual void flush(Pool& p);
                   virtual void write(ByteBuffer& buf, Pool& p);
-                  std::vector<unsigned char> toByteArray() const;
+                  ByteList toByteArray() const;
 
           private:
                   ByteArrayOutputStream(const ByteArrayOutputStream&);
                   ByteArrayOutputStream& operator=(const ByteArrayOutputStream&);
           };
 
-          typedef helpers::ObjectPtrT<ByteArrayOutputStream> ByteArrayOutputStreamPtr;
+          LOG4CXX_PTR_DEF(ByteArrayOutputStream)
         } // namespace helpers
 
 }  //namespace log4cxx

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/charsetdecoder.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/charsetdecoder.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/charsetdecoder.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/charsetdecoder.h Wed Jan 16 21:27:12 2008
@@ -24,7 +24,7 @@
 {
         namespace helpers {
           class CharsetDecoder;
-          typedef helpers::ObjectPtrT<CharsetDecoder> CharsetDecoderPtr;
+          LOG4CXX_PTR_DEF(CharsetDecoder)
           class ByteBuffer;
 
 
@@ -108,7 +108,6 @@
 		  };
 
         } // namespace helpers
-
 }  //namespace log4cxx
 
 #endif //_LOG4CXX_HELPERS_CHARSETENCODER_H

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/cyclicbuffer.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/cyclicbuffer.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/cyclicbuffer.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/cyclicbuffer.h Wed Jan 16 21:27:12 2008
@@ -19,7 +19,6 @@
 #define _LOG4CXX_HELPERS_CYCLICBUFFER_H
 
 #include <log4cxx/spi/loggingevent.h>
-#include <vector>
 
 namespace log4cxx
 {
@@ -33,7 +32,7 @@
                 */
                 class LOG4CXX_EXPORT CyclicBuffer
                 {
-                        std::vector<spi::LoggingEventPtr> ea;
+                        log4cxx::spi::LoggingEventList ea;
                         int first;
                         int last;
                         int numElems;

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/dateformat.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/dateformat.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/dateformat.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/dateformat.h Wed Jan 16 21:27:12 2008
@@ -25,8 +25,6 @@
 {
         namespace helpers
         {
-                class DateFormat;
-                typedef helpers::ObjectPtrT<DateFormat> DateFormatPtr;
 
                 /**
                 *  DateFormat is an abstract class for date/time formatting
@@ -85,7 +83,7 @@
                    */
                    DateFormat& operator=(const DateFormat&);
                 };
-
+                LOG4CXX_PTR_DEF(DateFormat)
 
 
         }  // namespace helpers

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/objectoutputstream.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/objectoutputstream.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/objectoutputstream.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/objectoutputstream.h Wed Jan 16 21:27:12 2008
@@ -19,16 +19,14 @@
 #define _LOG4CXX_HELPERS_OBJECTOUTPUTSTREAM_H
 
 #include <log4cxx/helpers/objectimpl.h>
-#include <map>
+#include <log4cxx/mdc.h>
+#include <log4cxx/helpers/outputstream.h>
+#include <log4cxx/helpers/charsetencoder.h>
 
 namespace log4cxx
 {
 
         namespace helpers {
-          class OutputStream;
-          typedef helpers::ObjectPtrT<OutputStream> OutputStreamPtr;
-          class CharsetEncoder;
-          typedef helpers::ObjectPtrT<CharsetEncoder> CharsetEncoderPtr;
 
           /**
           *  Emulates java serialization.
@@ -48,7 +46,7 @@
                   void flush(Pool& p);
                   void writeUTF(const LogString&, Pool& p);
                   void writeObject(const LogString&, Pool& p);
-                  void writeObject(const std::map<LogString, LogString>& mdc, Pool& p);
+                  void writeObject(const MDC::Map& mdc, Pool& p);
                   void writeInt(int val, Pool& p);
                   void writeLong(log4cxx_time_t val, Pool& p);
                   void writeByte(char val, Pool& p);
@@ -77,7 +75,7 @@
                   log4cxx::helpers::CharsetEncoderPtr utf8Encoder;
           };
           
-          typedef helpers::ObjectPtrT<ObjectOutputStream> ObjectOutputStreamPtr;          
+          LOG4CXX_PTR_DEF(ObjectOutputStream)          
 
         } // namespace helpers
 

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/simpledateformat.h Wed Jan 16 21:27:12 2008
@@ -68,7 +68,7 @@
                   /**
                    * List of tokens.
                    */
-                  typedef std::vector<log4cxx::helpers::SimpleDateFormatImpl::PatternToken*> PatternTokenList;
+                  LOG4CXX_LIST_DEF(PatternTokenList, log4cxx::helpers::SimpleDateFormatImpl::PatternToken*)
 
                   PatternTokenList pattern;
                   

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/socketoutputstream.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/socketoutputstream.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/socketoutputstream.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/socketoutputstream.h Wed Jan 16 21:27:12 2008
@@ -20,15 +20,12 @@
 
 #include <log4cxx/logstring.h>
 #include <log4cxx/helpers/outputstream.h>
-#include <vector>
+#include <log4cxx/helpers/socket.h>
 
 namespace log4cxx
 {
         namespace helpers
         {
-                class Socket;
-                typedef ObjectPtrT<Socket> SocketPtr;
-
 
                 class LOG4CXX_EXPORT SocketOutputStream : public OutputStream
                 {
@@ -47,7 +44,8 @@
                         virtual void write(ByteBuffer& buf, Pool& p);
 
                 protected:
-                        std::vector<unsigned char> array;
+                        LOG4CXX_LIST_DEF(ByteList, unsigned char)
+                        ByteList array;
                         SocketPtr socket;
 
                 private:
@@ -58,7 +56,7 @@
 
                 };
                 
-                typedef ObjectPtrT<SocketOutputStream> SocketOutputStreamPtr;
+                LOG4CXX_PTR_DEF(SocketOutputStream)
                 
         }  // namespace helpers
 } // namespace log4cxx

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/helpers/timezone.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/helpers/timezone.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/helpers/timezone.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/helpers/timezone.h Wed Jan 16 21:27:12 2008
@@ -29,7 +29,7 @@
    namespace helpers
    {
       class TimeZone;
-      typedef helpers::ObjectPtrT<TimeZone> TimeZonePtr;
+      LOG4CXX_PTR_DEF(TimeZone)
 
       class LOG4CXX_EXPORT TimeZone : public helpers::ObjectImpl
       {

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/layout.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/layout.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/layout.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/layout.h Wed Jan 16 21:27:12 2008
@@ -18,6 +18,12 @@
 #ifndef _LOG4CXX_LAYOUT_H
 #define _LOG4CXX_LAYOUT_H
 
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 )
+#endif
+
+
 #include <log4cxx/helpers/objectimpl.h>
 #include <log4cxx/helpers/objectptr.h>
 #include <log4cxx/spi/optionhandler.h>
@@ -83,5 +89,9 @@
         };
         LOG4CXX_PTR_DEF(Layout)
 }
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
 
 #endif // _LOG4CXX_LAYOUT_H

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/net/sockethubappender.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/net/sockethubappender.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/net/sockethubappender.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/net/sockethubappender.h Wed Jan 16 21:27:12 2008
@@ -21,6 +21,7 @@
 #include <log4cxx/appenderskeleton.h>
 #include <vector>
 #include <log4cxx/helpers/thread.h>
+#include <log4cxx/helpers/objectoutputstream.h>
 
 
 namespace log4cxx
@@ -105,7 +106,8 @@
                         static int DEFAULT_PORT;
 
                         int port;
-                        std::vector<helpers::ObjectOutputStreamPtr> streams;
+                        LOG4CXX_LIST_DEF(ObjectOutputStreamList, log4cxx::helpers::ObjectOutputStreamPtr)
+                        ObjectOutputStreamList streams;
                         bool locationInfo;
 
                 public:

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/net/telnetappender.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/net/telnetappender.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/net/telnetappender.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/net/telnetappender.h Wed Jan 16 21:27:12 2008
@@ -23,13 +23,11 @@
 #include <log4cxx/helpers/serversocket.h>
 #include <log4cxx/helpers/thread.h>
 #include <vector>
-
+#include <log4cxx/helpers/charsetencoder.h>
 
 namespace log4cxx
 {
         namespace helpers {
-             class CharsetEncoder;
-             typedef helpers::ObjectPtrT<CharsetEncoder> CharsetEncoderPtr;
              class ByteBuffer;
         }
         namespace net
@@ -127,7 +125,7 @@
                         TelnetAppender& operator=(const TelnetAppender&);
 
                         typedef log4cxx::helpers::SocketPtr Connection;
-                        typedef std::vector<Connection> ConnectionList;
+                        LOG4CXX_LIST_DEF(ConnectionList, Connection)
                         
                         void write(log4cxx::helpers::ByteBuffer&);
                         void writeStatus(const log4cxx::helpers::SocketPtr& socket, const LogString& msg, log4cxx::helpers::Pool& p);

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/pattern/nameabbreviator.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/pattern/nameabbreviator.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/pattern/nameabbreviator.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/pattern/nameabbreviator.h Wed Jan 16 21:27:12 2008
@@ -26,7 +26,7 @@
   namespace pattern {
 
     class NameAbbreviator;
-    typedef helpers::ObjectPtrT<NameAbbreviator> NameAbbreviatorPtr;
+    LOG4CXX_PTR_DEF(NameAbbreviator)
 
 /**
  * NameAbbreviator generates abbreviated logger and class names.

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/pattern/patternconverter.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/pattern/patternconverter.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/pattern/patternconverter.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/pattern/patternconverter.h Wed Jan 16 21:27:12 2008
@@ -122,7 +122,7 @@
 };
 
 
-typedef helpers::ObjectPtrT<PatternConverter> PatternConverterPtr;
+LOG4CXX_PTR_DEF(PatternConverter)
 
   }
 }

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/spi/appenderattachable.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/spi/appenderattachable.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/spi/appenderattachable.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/spi/appenderattachable.h Wed Jan 16 21:27:12 2008
@@ -29,8 +29,6 @@
 
     namespace spi
     {
-      class AppenderAttachable;
-      typedef helpers::ObjectPtrT<AppenderAttachable> AppenderAttachablePtr;
 
         /**
          * This Interface is for attaching Appenders to objects.
@@ -82,7 +80,7 @@
         };
 
 
-        typedef helpers::ObjectPtrT<AppenderAttachable> AppenderAttachablePtr;
+        LOG4CXX_PTR_DEF(AppenderAttachable)
         
     }
 }

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/spi/configurator.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/spi/configurator.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/spi/configurator.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/spi/configurator.h Wed Jan 16 21:27:12 2008
@@ -18,8 +18,7 @@
 #ifndef _LOG4CXX_SPI_CONFIGURATOR_H
 #define _LOG4CXX_SPI_CONFIGURATOR_H
 
-#include <log4cxx/helpers/object.h>
-#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/spi/loggerrepository.h>
 
 namespace log4cxx
 {
@@ -27,10 +26,6 @@
 
    namespace spi
    {
-      class LoggerRepository;
-        typedef helpers::ObjectPtrT<LoggerRepository> LoggerRepositoryPtr;
-
-
       /**
       Implemented by classes capable of configuring log4j using a URL.
       */
@@ -59,7 +54,7 @@
          bool initialized;
       };
 
-      typedef helpers::ObjectPtrT<Configurator> ConfiguratorPtr;
+      LOG4CXX_PTR_DEF(Configurator)
    }
 }
 

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/spi/errorhandler.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/spi/errorhandler.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/spi/errorhandler.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/spi/errorhandler.h Wed Jan 16 21:27:12 2008
@@ -18,6 +18,12 @@
 #ifndef _LOG4CXX_SPI_ERROR_HANDLER_H
 #define _LOG4CXX_SPI_ERROR_HANDLER_H
 
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 )
+#endif
+
+
 #include <log4cxx/spi/optionhandler.h>
 #include <log4cxx/helpers/exception.h>
 #include <log4cxx/appender.h>
@@ -113,5 +119,9 @@
                 LOG4CXX_PTR_DEF(ErrorHandler)
         }  //namespace spi
 } //namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
 
 #endif //_LOG4CXX_SPI_ERROR_HANDLER_H

Modified: logging/log4cxx/trunk/src/main/include/log4cxx/spi/loggingevent.h
URL: http://svn.apache.org/viewvc/logging/log4cxx/trunk/src/main/include/log4cxx/spi/loggingevent.h?rev=612715&r1=612714&r2=612715&view=diff
==============================================================================
--- logging/log4cxx/trunk/src/main/include/log4cxx/spi/loggingevent.h (original)
+++ logging/log4cxx/trunk/src/main/include/log4cxx/spi/loggingevent.h Wed Jan 16 21:27:12 2008
@@ -25,6 +25,7 @@
 #include <log4cxx/mdc.h>
 #include <set>
 #include <log4cxx/spi/location/locationinfo.h>
+#include <vector>
 
 
 namespace log4cxx
@@ -33,6 +34,7 @@
         typedef helpers::ObjectPtrT<Logger> LoggerPtr;
 
         class Level;
+        typedef helpers::ObjectPtrT<Level> LevelPtr;
 
         namespace helpers
         {
@@ -41,9 +43,6 @@
 
         namespace spi
         {
-                class LoggingEvent;
-                /** smart pointer to a LoggingEvent class */
-                typedef helpers::ObjectPtrT<LoggingEvent> LoggingEventPtr;
 
                 /**
                 The internal representation of logging events. When an affirmative
@@ -259,6 +258,9 @@
                        static void writeClassDesc(log4cxx::helpers::ObjectOutputStream& os, log4cxx::helpers::Pool& p);
                        
                 };
+
+                LOG4CXX_PTR_DEF(LoggingEvent)
+                LOG4CXX_LIST_DEF(LoggingEventList, LoggingEventPtr)
         }
 }