Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/appender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/appender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/appender.h	(revision 257)
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_APPENDER_H
+#define _LOG4CXX_APPENDER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/optionhandler.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/object.h>
+#include <vector>
+
+
+namespace log4cxx
+{
+    // Forward declarations
+    namespace spi
+        {
+        class LoggingEvent;
+        typedef helpers::ObjectPtrT<LoggingEvent> LoggingEventPtr;
+
+        class Filter;
+        typedef helpers::ObjectPtrT<Filter> FilterPtr;
+
+        class ErrorHandler;
+                typedef log4cxx::helpers::ObjectPtrT<ErrorHandler> ErrorHandlerPtr;
+    }
+
+    class Layout;
+    typedef log4cxx::helpers::ObjectPtrT<Layout> LayoutPtr;
+
+
+        /**
+        Implement this interface for your own strategies for outputting log
+        statements.
+        */
+    class LOG4CXX_EXPORT Appender :
+                public virtual spi::OptionHandler
+    {
+    public:
+        DECLARE_ABSTRACT_LOG4CXX_OBJECT(Appender)
+
+        virtual ~Appender() {}
+
+        /**
+         Add a filter to the end of the filter list.
+        */
+        virtual void addFilter(const spi::FilterPtr& newFilter) = 0;
+
+        /**
+         Returns the head Filter. The Filters are organized in a linked list
+         and so all Filters on this Appender are available through the result.
+
+         @return the head Filter or null, if no Filters are present
+         */
+        virtual spi::FilterPtr getFilter() const = 0;
+
+        /**
+         Clear the list of filters by removing all the filters in it.
+        */
+        virtual void clearFilters() = 0;
+
+        /**
+         Release any resources allocated within the appender such as file
+         handles, network connections, etc.
+         <p>It is a programming error to append to a closed appender.
+        */
+        virtual void close() = 0;
+
+        /**
+         Log in <code>Appender</code> specific way. When appropriate,
+         Loggers will call the <code>doAppend</code> method of appender
+         implementations in order to log.
+        */
+        virtual void doAppend(const spi::LoggingEventPtr& event,
+              log4cxx::helpers::Pool& pool) = 0;
+
+
+        /**
+         Get the name of this appender. The name uniquely identifies the
+         appender.
+        */
+        virtual LogString getName() const = 0;
+
+
+       /**
+        Set the Layout for this appender.
+       */
+       virtual void setLayout(const LayoutPtr& layout) = 0;
+
+       /**
+        Returns this appenders layout.
+       */
+       virtual LayoutPtr getLayout() const = 0;
+
+
+       /**
+        Set the name of this appender. The name is used by other
+        components to identify this appender.
+       */
+       virtual void setName(const LogString& name) = 0;
+
+       /**
+        Configurators call this method to determine if the appender
+        requires a layout. If this method returns <code>true</code>,
+        meaning that layout is required, then the configurator will
+        configure an layout using the configuration information at its
+        disposal.  If this method returns <code>false</code>, meaning that
+        a layout is not required, then layout configuration will be
+        skipped even if there is available layout configuration
+        information at the disposal of the configurator..
+
+        <p>In the rather exceptional case, where the appender
+        implementation admits a layout but can also work without it, then
+        the appender should return <code>true</code>.
+       */
+       virtual bool requiresLayout() const = 0;
+   };
+
+    LOG4CXX_PTR_DEF(Appender);
+    LOG4CXX_LIST_DEF(AppenderList, AppenderPtr);
+
+}
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif //_LOG4CXX_APPENDER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/appenderskeleton.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/appenderskeleton.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/appenderskeleton.h	(revision 257)
@@ -0,0 +1,213 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_APPENDER_SKELETON_H
+#define _LOG4CXX_APPENDER_SKELETON_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/appender.h>
+#include <log4cxx/layout.h>
+#include <log4cxx/spi/errorhandler.h>
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/mutex.h>
+#include <log4cxx/helpers/pool.h>
+#include <log4cxx/level.h>
+
+
+namespace log4cxx
+{
+        /**
+        *  Implementation base class for all appenders.
+        *
+        *  This class provides the code for common functionality, such as
+        *  support for threshold filtering and support for general filters.
+        * */
+        class LOG4CXX_EXPORT AppenderSkeleton :
+                public virtual Appender,
+                public virtual helpers::ObjectImpl
+        {
+        protected:
+                /** The layout variable does not need to be set if the appender
+                implementation has its own layout. */
+                LayoutPtr layout;
+
+                /** Appenders are named. */
+                LogString name;
+
+                /**
+                There is no level threshold filtering by default.  */
+                LevelPtr threshold;
+
+                /**
+                It is assumed and enforced that errorHandler is never null.
+                */
+                spi::ErrorHandlerPtr errorHandler;
+
+                /** The first filter in the filter chain. Set to <code>null</code>
+                initially. */
+                spi::FilterPtr headFilter;
+
+                /** The last filter in the filter chain. */
+                spi::FilterPtr tailFilter;
+
+                /**
+                Is this appender closed?
+                */
+                bool closed;
+
+                log4cxx::helpers::Pool pool;
+                log4cxx::helpers::Mutex mutex;
+
+        public:
+                DECLARE_ABSTRACT_LOG4CXX_OBJECT(AppenderSkeleton)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(Appender)
+                        LOG4CXX_CAST_ENTRY(spi::OptionHandler)
+                END_LOG4CXX_CAST_MAP()
+
+                AppenderSkeleton();
+                AppenderSkeleton(const LayoutPtr& layout);
+
+                void addRef() const;
+                void releaseRef() const;
+
+                /**
+                Finalize this appender by calling the derived class'
+                <code>close</code> method.
+                */
+                void finalize();
+
+                /**
+                Derived appenders should override this method if option structure
+                requires it.
+                */
+                virtual void activateOptions(log4cxx::helpers::Pool& /* pool */) {}
+                virtual void setOption(const LogString& option, const LogString& value);
+
+                /**
+                Add a filter to end of the filter list.
+                */
+                void addFilter(const spi::FilterPtr& newFilter) ;
+
+                /**
+                Subclasses of <code>AppenderSkeleton</code> should implement this
+                method to perform actual logging. See also AppenderSkeleton::doAppend
+                method.
+                */
+        protected:
+                virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) = 0;
+
+                /**
+                Clear the filters chain.
+                */
+        public:
+                void clearFilters();
+
+                /**
+                Return the currently set spi::ErrorHandler for this
+                Appender.
+                */
+                const spi::ErrorHandlerPtr& getErrorHandler() const { return errorHandler; }
+
+                /**
+                Returns the head Filter.
+                */
+                spi::FilterPtr getFilter() const { return headFilter; }
+
+                /**
+                Return the first filter in the filter chain for this
+                Appender. The return value may be <code>0</code> if no is
+                filter is set.
+                */
+                const spi::FilterPtr& getFirstFilter() const { return headFilter; }
+
+                /**
+                Returns the layout of this appender. The value may be 0.
+                */
+                LayoutPtr getLayout() const { return layout; }
+
+
+                /**
+                Returns the name of this Appender.
+                */
+                LogString getName() const { return name; }
+
+                /**
+                Returns this appenders threshold level. See the #setThreshold
+                method for the meaning of this option.
+                */
+                const LevelPtr& getThreshold() { return threshold; }
+
+                /**
+                Check whether the message level is below the appender's
+                threshold. If there is no threshold set, then the return value is
+                always <code>true</code>.
+                */
+                bool isAsSevereAsThreshold(const LevelPtr& level) const;
+
+
+                /**
+                * This method performs threshold checks and invokes filters before
+                * delegating actual logging to the subclasses specific
+                * AppenderSkeleton#append method.
+                * */
+                void doAppend(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool);
+
+                /**
+                Set the {@link spi::ErrorHandler ErrorHandler} for this Appender.
+                */
+                void setErrorHandler(const spi::ErrorHandlerPtr& eh);
+
+                /**
+                Set the layout for this appender. Note that some appenders have
+                their own (fixed) layouts or do not use one. For example, the
+                {@link net::SocketAppender SocketAppender} ignores the layout set
+                here.
+                */
+                void setLayout(const LayoutPtr& layout1) { this->layout = layout1; }
+
+                /**
+                Set the name of this Appender.
+                */
+                void setName(const LogString& name1) { this->name.assign(name1); }
+
+
+                /**
+                Set the threshold level. All log events with lower level
+                than the threshold level are ignored by the appender.
+
+                <p>In configuration files this option is specified by setting the
+                value of the <b>Threshold</b> option to a level
+                string, such as "DEBUG", "INFO" and so on.
+                */
+                void setThreshold(const LevelPtr& threshold);
+
+        }; // class AppenderSkeleton
+}  // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif //_LOG4CXX_APPENDER_SKELETON_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/asyncappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/asyncappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/asyncappender.h	(revision 257)
@@ -0,0 +1,292 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_ASYNC_APPENDER_H
+#define _LOG4CXX_ASYNC_APPENDER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/appenderskeleton.h>
+#include <log4cxx/helpers/appenderattachableimpl.h>
+#include <deque>
+#include <log4cxx/spi/loggingevent.h>
+#include <log4cxx/helpers/thread.h>
+#include <log4cxx/helpers/mutex.h>
+#include <log4cxx/helpers/condition.h>
+
+
+namespace log4cxx
+{
+    LOG4CXX_LIST_DEF(LoggingEventList, log4cxx::spi::LoggingEventPtr);
+                
+        /**
+        The AsyncAppender lets users log events asynchronously. It uses a
+        bounded buffer to store logging events.
+
+        <p>The AsyncAppender will collect the events sent to it and then
+        dispatch them to all the appenders that are attached to it. You can
+        attach multiple appenders to an AsyncAppender.
+
+        <p>The AsyncAppender uses a separate thread to serve the events in
+        its bounded buffer.
+
+        <p><b>Important note:</b> The <code>AsyncAppender</code> can only
+        be script configured using the {@link xml::DOMConfigurator DOMConfigurator}.
+        */
+        class LOG4CXX_EXPORT AsyncAppender :
+                public virtual spi::AppenderAttachable,
+                public virtual AppenderSkeleton
+        {
+        public:
+                DECLARE_LOG4CXX_OBJECT(AsyncAppender)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(AsyncAppender)
+                        LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                        LOG4CXX_CAST_ENTRY(spi::AppenderAttachable)
+                END_LOG4CXX_CAST_MAP()
+
+                /**
+                 * Create new instance.
+                */
+                AsyncAppender();
+                
+                /**
+                 *  Destructor.
+                 */
+                virtual ~AsyncAppender();
+
+                void addRef() const;
+                void releaseRef() const;
+
+                /**
+                 * Add appender.
+                 *
+                 * @param newAppender appender to add, may not be null.
+                */
+                void addAppender(const AppenderPtr& newAppender);
+
+                void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+
+                /**
+                Close this <code>AsyncAppender</code> by interrupting the
+                dispatcher thread which will process all pending events before
+                exiting.
+                */
+                void close();
+
+                /**
+                 * Get iterator over attached appenders.
+                 * @return list of all attached appenders.
+                */
+                AppenderList getAllAppenders() const;
+                
+                /**
+                 * Get appender by name.
+                 *
+                 * @param name name, may not be null.
+                 * @return matching appender or null.
+                */
+                AppenderPtr getAppender(const LogString& name) const;
+
+                /**
+                 * Gets whether the location of the logging request call
+                 * should be captured.
+                 *
+                 * @return the current value of the <b>LocationInfo</b> option.
+                */
+                bool getLocationInfo() const;
+                /**
+                * Determines if specified appender is attached.
+                * @param appender appender.
+                * @return true if attached.
+                */
+                bool isAttached(const AppenderPtr& appender) const;
+
+                virtual bool requiresLayout() const;
+                    
+                /**
+                 * Removes and closes all attached appenders.
+                */
+                void removeAllAppenders();
+
+                /**
+                 * Removes an appender.
+                 * @param appender appender to remove.
+                */
+                void removeAppender(const AppenderPtr& appender);
+                /**
+                * Remove appender by name.
+                * @param name name.
+                */
+                void removeAppender(const LogString& name);                        
+
+                /**
+                * The <b>LocationInfo</b> attribute is provided for compatibility
+                * with log4j and has no effect on the log output.
+                * @param flag new value.
+                */
+                void setLocationInfo(bool flag);
+
+                /**
+                * The <b>BufferSize</b> option takes a non-negative integer value.
+                * This integer value determines the maximum size of the bounded
+                * buffer.
+                * */
+                void setBufferSize(int size);
+
+                /**
+                 * Gets the current buffer size.
+                 * @return the current value of the <b>BufferSize</b> option.
+                */
+                int getBufferSize() const;
+
+                /**
+                 * Sets whether appender should wait if there is no
+                 * space available in the event buffer or immediately return.
+                 *
+                 * @param value true if appender should wait until available space in buffer.
+                 */
+                 void setBlocking(bool value);
+
+                /**
+                 * Gets whether appender should block calling thread when buffer is full.
+                 * If false, messages will be counted by logger and a summary
+                 * message appended after the contents of the buffer have been appended.
+                 *
+                 * @return true if calling thread will be blocked when buffer is full.
+                 */
+                 bool getBlocking() const;
+                 
+                 
+                 /**
+                  * Set appender properties by name.
+                  * @param option property name.
+                  * @param value property value.
+                  */
+                 void setOption(const LogString& option, const LogString& value);
+
+
+        private:
+                AsyncAppender(const AsyncAppender&);
+                AsyncAppender& operator=(const AsyncAppender&);
+                /**
+                 * The default buffer size is set to 128 events.
+                */
+                enum { DEFAULT_BUFFER_SIZE = 128 };
+
+                /**
+                 * Event buffer.
+                */
+                LoggingEventList buffer;
+
+                /**
+                 *  Mutex used to guard access to buffer and discardMap.
+                 */
+                ::log4cxx::helpers::Mutex bufferMutex;
+                ::log4cxx::helpers::Condition bufferNotFull;
+                ::log4cxx::helpers::Condition bufferNotEmpty;
+    
+                class DiscardSummary {
+                private:
+                    /**
+                     * First event of the highest severity.
+                    */
+                    ::log4cxx::spi::LoggingEventPtr maxEvent;
+                    
+                    /**
+                    * Total count of messages discarded.
+                    */
+                    int count;
+                    
+                public:
+                    /**
+                     * Create new instance.
+                     *
+                     * @param event event, may not be null.
+                    */
+                    DiscardSummary(const ::log4cxx::spi::LoggingEventPtr& event);
+                    /** Copy constructor.  */
+                    DiscardSummary(const DiscardSummary& src);
+                    /** Assignment operator. */
+                    DiscardSummary& operator=(const DiscardSummary& src);
+                    
+                    /**
+                     * Add discarded event to summary.
+                     *
+                     * @param event event, may not be null.
+                    */
+                    void add(const ::log4cxx::spi::LoggingEventPtr& event);
+                    
+                    /**
+                     * Create event with summary information.
+                     *
+                     * @return new event.
+                     */
+                     ::log4cxx::spi::LoggingEventPtr createEvent(::log4cxx::helpers::Pool& p);
+                };
+
+                /**
+                  * Map of DiscardSummary objects keyed by logger name.
+                */
+                typedef std::map<LogString, DiscardSummary> DiscardMap;
+                DiscardMap* discardMap;
+                
+                /**
+                 * Buffer size.
+                */
+                int bufferSize;
+
+                /**
+                 * Nested appenders.
+                */
+                helpers::AppenderAttachableImplPtr appenders;
+
+                /**
+                 *  Dispatcher.
+                 */
+                helpers::Thread dispatcher;
+
+                /**
+                 * Should location info be included in dispatched messages.
+                */
+                bool locationInfo;
+
+                /**
+                 * Does appender block when buffer is full.
+                */
+                bool blocking;
+
+                /**
+                 *  Dispatch routine.
+                 */
+                static void* LOG4CXX_THREAD_FUNC dispatch(apr_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
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/basicconfigurator.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/basicconfigurator.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/basicconfigurator.h	(revision 257)
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_BASIC_CONFIGURATOR_H
+#define _LOG4CXX_BASIC_CONFIGURATOR_H
+
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/logstring.h>
+#include <log4cxx/spi/configurator.h>
+
+namespace log4cxx
+{
+   class Appender;
+   typedef helpers::ObjectPtrT<Appender> AppenderPtr;
+
+   /**
+   Use this class to quickly configure the package.
+   <p>For file based configuration see
+   PropertyConfigurator. For XML based configuration see
+   DOMConfigurator.
+   */
+   class LOG4CXX_EXPORT BasicConfigurator
+   {
+   protected:
+      BasicConfigurator() {}
+
+   public:
+      /**
+      Add a ConsoleAppender that uses PatternLayout
+      using the PatternLayout#TTCC_CONVERSION_PATTERN and
+      prints to <code>stdout</code> to the root logger.*/
+      static void configure();
+
+      /**
+      Add <code>appender</code> to the root logger.
+      @param appender The appender to add to the root logger.
+      */
+      static void configure(const AppenderPtr& appender);
+
+      /**
+      Reset the default hierarchy to its defaut. It is equivalent to
+      calling
+      <code>Logger::getDefaultHierarchy()->resetConfiguration()</code>.
+      See Hierarchy#resetConfiguration() for more details.  */
+      static void resetConfiguration();
+   }; // class BasicConfigurator
+}  // namespace log4cxx
+
+#endif //_LOG4CXX_BASIC_CONFIGURATOR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/config/propertysetter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/config/propertysetter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/config/propertysetter.h	(revision 257)
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_CONFIG_PROPERTYSETTER_H
+#define _LOG4CXX_CONFIG_PROPERTYSETTER_H
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/objectptr.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class Object;
+                typedef ObjectPtrT<Object> ObjectPtr;
+
+                class Properties;
+                class Pool;
+        }
+
+        namespace config
+        {
+                /**
+                General purpose Object property setter. Clients repeatedly invokes
+                {@link #setProperty setProperty(name,value)} in order to invoke setters
+                on the Object specified in the constructor.
+
+                <p>Usage:
+                <pre>
+                PropertySetter ps(anObject);
+                ps.set("name", "Joe");
+                ps.set("age", "32");
+                ps.set("isMale", "true");
+                </pre>
+                will cause the invocations anObject->setOption("name", "Joe"),
+                anObject->setOption("age", "32") and anObject->setOption("isMale", "true")
+                if the spi::OptionHandler interface is supported by anObject.
+                */
+                class LOG4CXX_EXPORT PropertySetter
+                {
+                protected:
+                        helpers::ObjectPtr obj;
+
+                public:
+                        /**
+                        Create a new PropertySetter for the specified Object. This is done
+                        in prepartion for invoking #setProperty one or more times.
+
+                        @param obj  the object for which to set properties
+                        */
+                        PropertySetter(const helpers::ObjectPtr& obj);
+
+                        /**
+                        Set the properties of an object passed as a parameter in one
+                        go. The <code>properties</code> are parsed relative to a
+                        <code>prefix</code>.
+
+                        @param obj The object to configure.
+                        @param properties A java.util.Properties containing keys and values.
+                        @param prefix Only keys having the specified prefix will be set.
+                        @param p pool to use for any allocations required during call.
+                        */
+                        static void setProperties(const helpers::ObjectPtr& obj,
+                                helpers::Properties& properties,
+                                const LogString& prefix,
+                                log4cxx::helpers::Pool& p);
+
+                        /**
+                        Set the properites for the object that match the
+                        <code>prefix</code> passed as parameter.
+                        */
+                        void setProperties(helpers::Properties& properties,
+                            const LogString& prefix,
+                            log4cxx::helpers::Pool& p);
+
+                        /**
+                        Set a property on this PropertySetter's Object. If the underlying
+                        Object supports the spi::OptionHandler interface, the
+                        {@link spi::OptionHandler#setOption setOption} method is called.
+
+                        @param option   name of the property
+                        @param value   String value of the property
+                        @param p pool to use for any allocations required during call.
+                        */
+                        void setProperty(const LogString& option,
+                            const LogString& value,
+                            log4cxx::helpers::Pool& p);
+
+                        void activate(log4cxx::helpers::Pool& p);
+                }; // class PropertySetter
+        }  // namespace config;
+} // namespace log4cxx
+
+#endif //_LOG4CXX_CONFIG_PROPERTYSETTER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/consoleappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/consoleappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/consoleappender.h	(revision 257)
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_CONSOLE_APPENDER_H
+#define _LOG4CXX_CONSOLE_APPENDER_H
+
+#include <log4cxx/writerappender.h>
+
+namespace log4cxx
+{
+ 
+        /**
+        * ConsoleAppender appends log events to <code>stdout</code> or
+        * <code>stderr</code> using a layout specified by the user. The
+        * default target is <code>stdout</code>.
+        */
+        class LOG4CXX_EXPORT ConsoleAppender : public WriterAppender
+        {
+        private:
+                LogString target;
+
+        public:
+                DECLARE_LOG4CXX_OBJECT(ConsoleAppender)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(ConsoleAppender)
+                        LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                END_LOG4CXX_CAST_MAP()
+
+                ConsoleAppender();
+                ConsoleAppender(const LayoutPtr& layout);
+                ConsoleAppender(const LayoutPtr& layout, const LogString& target);
+                ~ConsoleAppender();
+
+
+                /**
+                *  Sets the value of the <b>target</b> property. Recognized values
+                *  are "System.out" and "System.err". Any other value will be
+                *  ignored.
+                * */
+                void setTarget(const LogString& value);
+
+                /**
+                * Returns the current value of the <b>target</b> property. The
+                * default value of the option is "System.out".
+                *
+                * See also #setTarget.
+                * */
+                LogString getTarget() const;
+
+                void activateOptions(log4cxx::helpers::Pool& p);
+                void setOption(const LogString& option, const LogString& value);
+                static const LogString& getSystemOut();
+                static const LogString& getSystemErr();
+
+
+        private:
+                void targetWarn(const LogString& val);
+                static log4cxx::helpers::WriterPtr createWriter(const LogString& target);
+
+        };
+        LOG4CXX_PTR_DEF(ConsoleAppender);
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_CONSOLE_APPENDER_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/dailyrollingfileappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/dailyrollingfileappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/dailyrollingfileappender.h	(revision 257)
@@ -0,0 +1,203 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_DAILYROLLINGFILEAPPENDER_H
+#define _LOG4CXX_DAILYROLLINGFILEAPPENDER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/appender.h>
+#include <log4cxx/fileappender.h>
+#include <log4cxx/spi/optionhandler.h>
+#include <log4cxx/rolling/rollingfileappenderskeleton.h>
+
+namespace log4cxx {
+  namespace helpers {
+    class Pool;
+  }
+
+  namespace spi {
+    class ErrorHandler;
+    typedef log4cxx::helpers::ObjectPtrT<ErrorHandler> ErrorHandlerPtr;
+  }
+
+
+/**
+   DailyRollingFileAppender extends {@link log4cxx::FileAppender FileAppender} so that the
+   underlying file is rolled over at a user chosen frequency.
+
+   <p>The rolling schedule is specified by the <b>DatePattern</b>
+   option. This pattern should follow the 
+   {@link log4cxx::helpers::SimpleDateFormat SimpleDateFormat}
+   conventions. In particular, you <em>must</em> escape literal text
+   within a pair of single quotes. A formatted version of the date
+   pattern is used as the suffix for the rolled file name.
+
+   <p>For example, if the <b>File</b> option is set to
+   <code>/foo/bar.log</code> and the <b>DatePattern</b> set to
+   <code>'.'yyyy-MM-dd</code>, on 2001-02-16 at midnight, the logging
+   file <code>/foo/bar.log</code> will be copied to
+   <code>/foo/bar.log.2001-02-16</code> and logging for 2001-02-17
+   will continue in <code>/foo/bar.log</code> until it rolls over
+   the next day.
+
+   <p>Is is possible to specify monthly, weekly, half-daily, daily,
+   hourly, or minutely rollover schedules.
+
+   <p><table border="1" cellpadding="2">
+   <tr>
+   <th>DatePattern</th>
+   <th>Rollover schedule</th>
+   <th>Example</th>
+
+   <tr>
+   <td><code>'.'yyyy-MM</code>
+   <td>Rollover at the beginning of each month</td>
+
+   <td>At midnight of May 31st, 2002 <code>/foo/bar.log</code> will be
+   copied to <code>/foo/bar.log.2002-05</code>. Logging for the month
+   of June will be output to <code>/foo/bar.log</code> until it is
+   also rolled over the next month.
+
+   <tr>
+   <td><code>'.'yyyy-ww</code>
+
+   <td>Rollover at the first day of each week. The first day of the
+   week depends on the locale.</td>
+
+   <td>Assuming the first day of the week is Sunday, on Saturday
+   midnight, June 9th 2002, the file <i>/foo/bar.log</i> will be
+   copied to <i>/foo/bar.log.2002-23</i>.  Logging for the 24th week
+   of 2002 will be output to <code>/foo/bar.log</code> until it is
+   rolled over the next week.
+
+   <tr>
+   <td><code>'.'yyyy-MM-dd</code>
+
+   <td>Rollover at midnight each day.</td>
+
+   <td>At midnight, on March 8th, 2002, <code>/foo/bar.log</code> will
+   be copied to <code>/foo/bar.log.2002-03-08</code>. Logging for the
+   9th day of March will be output to <code>/foo/bar.log</code> until
+   it is rolled over the next day.
+
+   <tr>
+   <td><code>'.'yyyy-MM-dd-a</code>
+
+   <td>Rollover at midnight and midday of each day.</td>
+
+   <td>At noon, on March 9th, 2002, <code>/foo/bar.log</code> will be
+   copied to <code>/foo/bar.log.2002-03-09-AM</code>. Logging for the
+   afternoon of the 9th will be output to <code>/foo/bar.log</code>
+   until it is rolled over at midnight.
+
+   <tr>
+   <td><code>'.'yyyy-MM-dd-HH</code>
+
+   <td>Rollover at the top of every hour.</td>
+
+   <td>At approximately 11:00.000 o'clock on March 9th, 2002,
+   <code>/foo/bar.log</code> will be copied to
+   <code>/foo/bar.log.2002-03-09-10</code>. Logging for the 11th hour
+   of the 9th of March will be output to <code>/foo/bar.log</code>
+   until it is rolled over at the beginning of the next hour.
+
+
+   <tr>
+   <td><code>'.'yyyy-MM-dd-HH-mm</code>
+
+   <td>Rollover at the beginning of every minute.</td>
+
+   <td>At approximately 11:23,000, on March 9th, 2001,
+   <code>/foo/bar.log</code> will be copied to
+   <code>/foo/bar.log.2001-03-09-10-22</code>. Logging for the minute
+   of 11:23 (9th of March) will be output to
+   <code>/foo/bar.log</code> until it is rolled over the next minute.
+
+   </table>
+
+   <p>Do not use the colon ":" character in anywhere in the
+   <b>DatePattern</b> option. The text before the colon is interpeted
+   as the protocol specificaion of a URL which is probably not what
+   you want.
+*/
+
+  class LOG4CXX_EXPORT DailyRollingFileAppender : public log4cxx::rolling::RollingFileAppenderSkeleton {
+  DECLARE_LOG4CXX_OBJECT(DailyRollingFileAppender)
+  BEGIN_LOG4CXX_CAST_MAP()
+          LOG4CXX_CAST_ENTRY(DailyRollingFileAppender)
+          LOG4CXX_CAST_ENTRY_CHAIN(FileAppender)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+     The date pattern used to initiate rollover.
+  */
+  LogString datePattern;
+
+
+public:
+  /**
+     The default constructor simply calls its {@link
+     FileAppender#FileAppender parents constructor}.  */
+  DailyRollingFileAppender();
+
+  /**
+    Instantiate a DailyRollingFileAppender and open the file designated by
+    <code>filename</code>. The opened filename will become the ouput
+    destination for this appender.
+
+  */
+  DailyRollingFileAppender(
+    const LayoutPtr& layout,
+    const LogString& filename,
+    const LogString& datePattern);
+
+
+  /**
+     The <b>DatePattern</b> takes a string in the same format as
+     expected by {@link log4cxx::helpers::SimpleDateFormat SimpleDateFormat}. This options determines the
+     rollover schedule.
+   */
+  void setDatePattern(const LogString& pattern);
+
+  /** Returns the value of the <b>DatePattern</b> option. */
+  LogString getDatePattern();
+
+  void setOption(const LogString& option,
+   const LogString& value);
+
+  /**
+   * Prepares DailyRollingFileAppender for use.
+   */
+  void activateOptions(log4cxx::helpers::Pool&);
+
+};
+
+LOG4CXX_PTR_DEF(DailyRollingFileAppender);
+
+}
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/db/odbcappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/db/odbcappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/db/odbcappender.h	(revision 257)
@@ -0,0 +1,292 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_DB_ODBC_APPENDER_H
+#define _LOG4CXX_DB_ODBC_APPENDER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/log4cxx.h>
+
+#include <log4cxx/helpers/exception.h>
+#include <log4cxx/appenderskeleton.h>
+#include <log4cxx/spi/loggingevent.h>
+#include <list>
+
+namespace log4cxx
+{
+        namespace db
+        {
+            class LOG4CXX_EXPORT SQLException : public log4cxx::helpers::Exception {
+            public:
+                SQLException(short fHandleType, 
+                            void* hInput, const char* prolog,
+                            log4cxx::helpers::Pool& p);
+                SQLException(const char* msg);
+                SQLException(const SQLException& src);
+            private:
+                const char* formatMessage(short fHandleType,
+                    void* hInput, const char* prolog,
+                    log4cxx::helpers::Pool& p);
+            };
+
+                /**
+                <p><b>WARNING: This version of ODBCAppender
+                is very likely to be completely replaced in the future. Moreoever,
+                it does not log exceptions.</b> </p>
+
+                The ODBCAppender provides for sending log events to a database.
+
+
+                <p>Each append call adds to an <code>ArrayList</code> buffer.  When
+                the buffer is filled each log event is placed in a sql statement
+                (configurable) and executed.
+
+                <b>BufferSize</b>, <b>db URL</b>, <b>User</b>, & <b>Password</b> are
+                configurable options in the standard log4j ways.
+
+                <p>The <code>setSql(String sql)</code> sets the SQL statement to be
+                used for logging -- this statement is sent to a
+                <code>PatternLayout</code> (either created automaticly by the
+                appender or added by the user).  Therefore by default all the
+                conversion patterns in <code>PatternLayout</code> can be used
+                inside of the statement.  (see the test cases for examples)
+
+                <p>Overriding the {@link #getLogStatement} method allows more
+                explicit control of the statement used for logging.
+
+                <p>For use as a base class:
+
+                <ul>
+
+                <li>Override getConnection() to pass any connection
+                you want.  Typically this is used to enable application wide
+                connection pooling.
+
+                <li>Override closeConnection -- if
+                you override getConnection make sure to implement
+                <code>closeConnection</code> to handle the connection you
+                generated.  Typically this would return the connection to the
+                pool it came from.
+
+                <li>Override getLogStatement to
+                produce specialized or dynamic statements. The default uses the
+                sql option value.
+
+                </ul>
+                */
+
+                class LOG4CXX_EXPORT ODBCAppender : public AppenderSkeleton
+                {
+                protected:
+                        /**
+                        * URL of the DB for default connection handling
+                        */
+                        LogString databaseURL;
+
+                        /**
+                        * User to connect as for default connection handling
+                        */
+                        LogString databaseUser;
+
+                        /**
+                        * User to use for default connection handling
+                        */
+                        LogString databasePassword;
+
+                        typedef void* SQLHDBC;
+                        typedef void* SQLHENV;
+                        typedef void* SQLHANDLE;
+                        typedef short SQLSMALLINT;
+
+                        /**
+                        * Connection used by default.  The connection is opened the first time it
+                        * is needed and then held open until the appender is closed (usually at
+                        * garbage collection).  This behavior is best modified by creating a
+                        * sub-class and overriding the <code>getConnection</code> and
+                        * <code>closeConnection</code> methods.
+                        */
+                        SQLHDBC connection;
+                        SQLHENV env;
+
+                        /**
+                        * Stores the string given to the pattern layout for conversion into a SQL
+                        * statement, eg: insert into LogTable (Thread, File, Message) values
+                        * ("%t", "%F", "%m")
+                        *
+                        * Be careful of quotes in your messages!
+                        *
+                        * Also see PatternLayout.
+                        */
+                        LogString sqlStatement;
+
+                        /**
+                        * size of LoggingEvent buffer before writing to the database.
+                        * Default is 1.
+                        */
+                        size_t bufferSize;
+
+                        /**
+                        * ArrayList holding the buffer of Logging Events.
+                        */
+                        std::list<spi::LoggingEventPtr> buffer;
+
+                public:
+                        DECLARE_LOG4CXX_OBJECT(ODBCAppender)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(ODBCAppender)
+                                LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                        END_LOG4CXX_CAST_MAP()
+
+                        ODBCAppender();
+                        virtual ~ODBCAppender();
+
+                    /**
+                    Set options
+                    */
+                        virtual void setOption(const LogString& option, const LogString& value);
+
+                        /**
+                        Activate the specified options.
+                        */
+                        virtual void activateOptions(log4cxx::helpers::Pool& p);
+
+                        /**
+                        * Adds the event to the buffer.  When full the buffer is flushed.
+                        */
+                  void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool&);
+
+                        /**
+                        * By default getLogStatement sends the event to the required Layout object.
+                        * The layout will format the given pattern into a workable SQL string.
+                        *
+                        * Overriding this provides direct access to the LoggingEvent
+                        * when constructing the logging statement.
+                        *
+                        */
+                protected:
+                        LogString getLogStatement(const spi::LoggingEventPtr& event,
+                     helpers::Pool& p) const;
+
+                        /**
+                        *
+                        * Override this to provide an alertnate method of getting
+                        * connections (such as caching).  One method to fix this is to open
+                        * connections at the start of flushBuffer() and close them at the
+                        * end.  I use a connection pool outside of ODBCAppender which is
+                        * accessed in an override of this method.
+                        * */
+                        virtual void execute(const LogString& sql,
+                            log4cxx::helpers::Pool& p) /*throw(SQLException)*/;
+
+                        /**
+                        * Override this to return the connection to a pool, or to clean up the
+                        * resource.
+                        *
+                        * The default behavior holds a single connection open until the appender
+                        * is closed (typically when garbage collected).
+                        */
+                        virtual void closeConnection(SQLHDBC con);
+
+                        /**
+                        * Override this to link with your connection pooling system.
+                        *
+                        * By default this creates a single connection which is held open
+                        * until the object is garbage collected.
+                        */
+                        virtual SQLHDBC getConnection(log4cxx::helpers::Pool& p) /*throw(SQLException)*/;
+
+                        /**
+                        * Closes the appender, flushing the buffer first then closing the default
+                        * connection if it is open.
+                        */
+                public:
+                        virtual void close();
+
+                        /**
+                        * loops through the buffer of LoggingEvents, gets a
+                        * sql string from getLogStatement() and sends it to execute().
+                        * Errors are sent to the errorHandler.
+                        *
+                        * If a statement fails the LoggingEvent stays in the buffer!
+                        */
+                        virtual void flushBuffer(log4cxx::helpers::Pool& p);
+
+                        /**
+                        * ODBCAppender requires a layout.
+                        * */
+                        virtual bool requiresLayout() const
+                                { return true; }
+
+                        /**
+                        * Set pre-formated statement eg: insert into LogTable (msg) values ("%m")
+                        */
+                        void setSql(const LogString& s);
+
+                        /**
+                        * Returns pre-formated statement eg: insert into LogTable (msg) values ("%m")
+                        */
+                        inline const LogString& getSql() const
+                                { return sqlStatement; }
+
+
+                        inline void setUser(const LogString& user)
+                                { databaseUser = user; }
+
+
+                        inline void setURL(const LogString& url)
+                                { databaseURL = url; }
+
+
+                        inline void setPassword(const LogString& password)
+                                { databasePassword = password; }
+
+
+                        inline void setBufferSize(size_t newBufferSize)
+                                { bufferSize = newBufferSize; }
+
+                        inline const LogString& getUser() const
+                                { return databaseUser; }
+
+
+                        inline const LogString& getURL() const
+                                { return databaseURL; }
+
+
+                        inline const LogString& getPassword() const
+                                { return databasePassword; }
+
+                        inline size_t getBufferSize() const
+                                { return bufferSize; }
+                private:
+                        ODBCAppender(const ODBCAppender&);
+                        ODBCAppender& operator=(const ODBCAppender&);
+                }; // class ODBCAppender
+                LOG4CXX_PTR_DEF(ODBCAppender);
+                
+    } // namespace db
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif // _LOG4CXX_DB_ODBC_APPENDER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/defaultconfigurator.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/defaultconfigurator.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/defaultconfigurator.h	(revision 257)
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_DEFAULT_CONFIGURATOR_H
+#define _LOG4CXX_DEFAULT_CONFIGURATOR_H
+
+#include <log4cxx/spi/configurator.h>
+
+namespace log4cxx
+{
+   namespace spi {
+       class LoggerRepository;
+       typedef helpers::ObjectPtrT<LoggerRepository> LoggerRepositoryPtr;
+   }
+
+   /**
+    *   Configures the repository from environmental settings and files.
+   *
+   */
+   class LOG4CXX_EXPORT DefaultConfigurator
+   {
+   private:
+      DefaultConfigurator() {}
+
+   public:
+      /**
+      Add a ConsoleAppender that uses PatternLayout
+      using the PatternLayout#TTCC_CONVERSION_PATTERN and
+      prints to <code>stdout</code> to the root logger.*/
+     static void configure(log4cxx::spi::LoggerRepository*);
+
+   private:
+            static const LogString getConfigurationFileName();
+            static const LogString getConfiguratorClass();
+
+
+
+   }; // class DefaultConfigurator
+}  // namespace log4cxx
+
+#endif //_LOG4CXX_DEFAULT_CONFIGURATOR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/defaultloggerfactory.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/defaultloggerfactory.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/defaultloggerfactory.h	(revision 257)
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_DEFAULT_LOGGER_FACTORY_H
+#define _LOG4CXX_DEFAULT_LOGGER_FACTORY_H
+
+#include <log4cxx/spi/loggerfactory.h>
+#include <log4cxx/helpers/objectimpl.h>
+
+namespace log4cxx
+{
+        class Logger;
+        typedef helpers::ObjectPtrT<Logger> LoggerPtr;
+
+        class LOG4CXX_EXPORT DefaultLoggerFactory :
+                public virtual spi::LoggerFactory,
+                public virtual helpers::ObjectImpl
+        {
+        public:
+                DECLARE_ABSTRACT_LOG4CXX_OBJECT(DefaultLoggerFactory)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(spi::LoggerFactory)
+                END_LOG4CXX_CAST_MAP()
+
+                virtual LoggerPtr makeNewLoggerInstance(
+                    log4cxx::helpers::Pool& pool, 
+                    const LogString& name) const;
+        };
+}  // namespace log4cxx
+
+#endif //_LOG4CXX_DEFAULT_LOGGER_FACTORY_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/file.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/file.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/file.h	(revision 257)
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILE_H
+#define _LOG4CXX_FILE_H
+
+#include <log4cxx/logger.h>
+#include <log4cxx/logstring.h>
+
+extern "C" {
+struct apr_file_t;
+struct apr_finfo_t;
+}
+
+namespace log4cxx
+{
+                namespace helpers {
+                  class Transcoder;
+                  class Pool;
+                }
+
+                /**
+                * An abstract representation of file and directory path names.
+                */
+                class LOG4CXX_EXPORT File
+                {
+                public:
+                    /**
+                    *   Construct a new instance.
+                    */
+                    File();
+                    /**
+                    *   Construct a new instance.  Use setPath to specify path using a LogString.
+                    * @param path file path in local encoding.
+                    */
+                    File(const char* path);
+                    /**
+                    *   Construct a new instance.  Use setPath to specify path using a LogString.
+                    * @param path file path in current encoding.
+                    */
+                    File(const std::string& path);
+#if LOG4CXX_WCHAR_T_API
+                    /**
+                    *   Construct a new instance.  Use setPath to specify path using a LogString.
+                    * @param path file path.
+                    */
+                    File(const wchar_t* path);
+                    /**
+                    *   Construct a new instance.  Use setPath to specify path using a LogString.
+                    * @param path file path.
+                    */
+                    File(const std::wstring& path);
+#endif
+#if LOG4CXX_UNICHAR_API
+                    /**
+                    *   Construct a new instance.  Use setPath to specify path using a LogString.
+                    * @param path file path.
+                    */
+                    File(const UniChar* path);
+                    /**
+                    *   Construct a new instance.  Use setPath to specify path using a LogString.
+                    * @param path file path.
+                    */
+                    File(const std::basic_string<UniChar>& path);
+#endif
+#if LOG4CXX_CFSTRING_API
+                    /**
+                    *   Construct a new instance.  Use setPath to specify path using a LogString.
+                    * @param path file path.
+                    */
+                    File(const CFStringRef& path);
+#endif
+                    /**
+                     *  Copy constructor.
+                     */
+                    File(const File& src);
+                    /**
+                     *  Assignment operator.
+                     */ 
+                    File& operator=(const File& src);
+                    /**
+                     *  Destructor.
+                     */
+                    ~File();
+                    
+                    /**
+                     *  Determines if file exists.
+                     *  @param p pool.
+                     *  @return true if file exists.
+                     */
+                    bool exists(log4cxx::helpers::Pool& p) const;
+                    /**
+                     *  Determines length of file.  May not be accurate if file is current open.
+                     *  @param p pool.
+                     *  @return length of file.
+                     */
+                    size_t length(log4cxx::helpers::Pool& p) const;
+                    /**
+                     *  Determines last modification date.
+                     *  @param p pool.
+                     *  @return length of file.
+                     */
+                    log4cxx_time_t lastModified(log4cxx::helpers::Pool& p) const;
+                    /**
+                     *  Get final portion of file path.
+                     *  @return file name.
+                     */
+                    LogString getName() const;
+                    /**
+                     *  Get file path.
+                     *  @return file path.
+                     */
+                    LogString getPath() const;
+                    /**
+                     *  Set file path
+                     */
+                    File& setPath(const LogString&);
+
+                    /**
+                     *  Open file.  See apr_file_open for details.
+                     *  @param file APR file handle.
+                     *  @param flags flags.
+                     *  @param perm permissions.
+                     *  @param p pool.
+                     *  @return APR_SUCCESS if successful.
+                     */
+                    log4cxx_status_t open(apr_file_t** file, int flags,
+                          int perm, log4cxx::helpers::Pool& p) const;
+
+                    /**
+                     *   List files if current file is a directory.
+                     *   @param p pool.
+                     *   @return list of files in this directory, operation of non-directory returns empty list.
+                     */
+                    std::vector<LogString> list(log4cxx::helpers::Pool& p) const;
+
+                    /**
+                     *   Delete file.
+                     *   @param p pool.
+                     *   @return true if file successfully deleted.
+                     */
+                    bool deleteFile(log4cxx::helpers::Pool& p) const;
+                    /**
+                     *   Rename file.
+                     *   @param dest new path for file.
+                     *   @param p pool.
+                     *   @return true if file successfully renamed.
+                     */
+                    bool renameTo(const File& dest, log4cxx::helpers::Pool& p) const;
+                    
+                    /**
+                     *   Get path of parent directory.
+                     *   @param p pool.
+                     *   @return path of parent directory.
+                     */
+                    LogString getParent(log4cxx::helpers::Pool& p) const;
+                    /**
+                     *  Make directories recursively.
+                     *  @param p pool.
+                     *  @return true if all requested directories existed or have been created.
+                     */
+                    bool mkdirs(log4cxx::helpers::Pool& p) const;
+
+                private:
+                    LogString path;
+                    static char* convertBackSlashes(char*);
+                    char* getPath(log4cxx::helpers::Pool& p) const;
+                };
+} // namespace log4cxx
+
+
+#define LOG4CXX_FILE(name) log4cxx::File(name)
+
+#endif // _LOG4CXX_FILE_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/fileappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/fileappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/fileappender.h	(revision 257)
@@ -0,0 +1,223 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILE_APPENDER_H
+#define _LOG4CXX_FILE_APPENDER_H
+
+#include <log4cxx/logger.h>
+#include <log4cxx/logstring.h>
+#include <log4cxx/writerappender.h>
+#include <log4cxx/file.h>
+#include <log4cxx/helpers/pool.h>
+
+namespace log4cxx
+{
+        namespace helpers {
+            class Pool;
+        }
+
+        /**
+        *  FileAppender appends log events to a file.
+        *
+        *  <p>Support for <code>java.io.Writer</code> and console appending
+        *  has been deprecated and then removed. See the replacement
+        *  solutions: WriterAppender and ConsoleAppender.
+        */
+        class LOG4CXX_EXPORT FileAppender : public WriterAppender
+        {
+        protected:
+                /** Append to or truncate the file? The default value for this
+                variable is <code>true</code>, meaning that by default a
+                <code>FileAppender</code> will append to an existing file and
+                not truncate it.
+                <p>This option is meaningful only if the FileAppender opens the
+                file.
+                */
+                bool fileAppend;
+
+                /**
+                The name of the log file. */
+                LogString fileName;
+
+                /**
+                Do we do bufferedIO? */
+                bool bufferedIO;
+
+                /**
+                How big should the IO buffer be? Default is 8K. */
+                int bufferSize;
+
+        public:
+                DECLARE_LOG4CXX_OBJECT(FileAppender)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(FileAppender)
+                        LOG4CXX_CAST_ENTRY_CHAIN(WriterAppender)
+                END_LOG4CXX_CAST_MAP()
+
+                /**
+                The default constructor does not do anything.
+                */
+                FileAppender();
+
+                /**
+                Instantiate a <code>FileAppender</code> and open the file
+                designated by <code>filename</code>. The opened filename will
+                become the output destination for this appender.
+
+                <p>If the <code>append</code> parameter is true, the file will be
+                appended to. Otherwise, the file designated by
+                <code>filename</code> will be truncated before being opened.
+
+                <p>If the <code>bufferedIO</code> parameter is <code>true</code>,
+                then buffered IO will be used to write to the output file.
+
+                */
+                FileAppender(const LayoutPtr& layout, const LogString& filename, bool append,
+                        bool bufferedIO, int bufferSize);
+
+                /**
+                Instantiate a FileAppender and open the file designated by
+                <code>filename</code>. The opened filename will become the output
+                destination for this appender.
+
+                <p>If the <code>append</code> parameter is true, the file will be
+                appended to. Otherwise, the file designated by
+                <code>filename</code> will be truncated before being opened.
+                */
+                FileAppender(const LayoutPtr& layout, const LogString& filename, bool append);
+
+                /**
+                Instantiate a FileAppender and open the file designated by
+                <code>filename</code>. The opened filename will become the output
+                destination for this appender.
+
+                <p>The file will be appended to.  */
+                FileAppender(const LayoutPtr& layout, const LogString& filename);
+
+                ~FileAppender();
+
+                /**
+                The <b>File</b> property takes a string value which should be the
+                name of the file to append to.
+
+                <p><b>Note that the special values
+                "System.out" or "System.err" are no longer honored.</b>
+
+                <p>Note: Actual opening of the file is made when
+                #activateOptions is called, not when the options are set.  */
+                virtual void setFile(const LogString& file);
+
+                /**
+                Sets and <i>opens</i> the file where the log output will
+                go. The specified file must be writable.
+
+                <p>If there was already an opened file, then the previous file
+                is closed first.
+
+                <p><b>Do not use this method directly. To configure a FileAppender
+                or one of its subclasses, set its properties one by one and then
+                call activateOptions.</b>
+
+                @param file The path to the log file.
+                @param append If true will append to fileName. Otherwise will
+                truncate fileName.
+                @param bufferedIO Do we do bufferedIO?
+                @param bufferSize How big should the IO buffer be?
+                @param p memory pool for operation.
+                */
+                virtual void setFile(const LogString& file, bool append,
+                        bool bufferedIO, size_t bufferSize,
+                        log4cxx::helpers::Pool& p);
+
+                /**
+                Returns the value of the <b>Append</b> option.
+                */
+                inline bool getAppend() const { return fileAppend; }
+
+                /** Returns the value of the <b>File</b> option. */
+                inline LogString getFile() const { return fileName; }
+
+                /**
+                <p>Sets and <i>opens</i> the file where the log output will
+                go. The specified file must be writable.
+
+                <p>If there was already an opened file, then the previous file
+                is closed first.*/
+                void activateOptions(log4cxx::helpers::Pool& p);
+                void setOption(const LogString& option,
+                        const LogString& value);
+
+                /**
+                Get the value of the <b>BufferedIO</b> option.
+
+                <p>BufferedIO will significatnly increase performance on heavily
+                loaded systems.
+
+                */
+                inline bool getBufferedIO() const { return bufferedIO; }
+
+                /**
+                Get the size of the IO buffer.
+                */
+               inline  int getBufferSize() const { return bufferSize; }
+
+                /**
+                The <b>Append</b> option takes a boolean value. It is set to
+                <code>true</code> by default. If true, then <code>File</code>
+                will be opened in append mode by #setFile (see
+                above). Otherwise, setFile will open
+                <code>File</code> in truncate mode.
+
+                <p>Note: Actual opening of the file is made when
+                #activateOptions is called, not when the options are set.
+                */
+                void setAppend(bool fileAppend1);
+
+                /**
+                The <b>BufferedIO</b> option takes a boolean value. It is set to
+                <code>false</code> by default. If true, then <code>File</code>
+                will be opened in buffered mode.
+
+                BufferedIO will significantly increase performance on heavily
+                loaded systems.
+
+                */
+                void setBufferedIO(bool bufferedIO);
+
+                /**
+                Set the size of the IO buffer.
+                */
+                void setBufferSize(int bufferSize1) { this->bufferSize = bufferSize1; }
+
+                /**
+                 *   Replaces double backslashes with single backslashes
+                 *   for compatibility with paths from earlier XML configurations files.
+                 *   @param name file name
+                 *   @return corrected file name
+                 */
+                static LogString stripDuplicateBackslashes(const LogString& name);
+
+                private:
+                FileAppender(const FileAppender&);
+                FileAppender& operator=(const FileAppender&);
+
+        }; // class FileAppender
+        LOG4CXX_PTR_DEF(FileAppender);
+
+}  // namespace log4cxx
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/andfilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/andfilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/andfilter.h	(revision 257)
@@ -0,0 +1,109 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILTER_ANDFILTER_H
+#define _LOG4CXX_FILTER_ANDFILTER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/filter.h>
+
+namespace log4cxx
+{
+    namespace filter
+    {
+
+/**
+ * A filter that 'and's the results of any number of contained filters together.
+ *
+ * For the filter to process events, all contained filters must return Filter::ACCEPT.
+ *
+ * If the contained filters do not return Filter::ACCEPT, Filter::NEUTRAL is returned.
+ *
+ * If acceptOnMatch is set to true, Filter::ACCEPT is returned.
+ * If acceptOnMatch is set to false, Filter::DENY is returned.
+ *
+ * Here is an example config that will accept only events that contain BOTH
+ * a DEBUG level AND 'test' in the message:
+ *
+ *&lt;appender name="STDOUT" class="org.apache.log4j.ConsoleAppender"&gt;
+ * &lt;filter class="org.apache.log4j.filter.AndFilter"&gt;
+ *  &lt;filter class="org.apache.log4j.filter.LevelMatchFilter"&gt;
+ *        &lt;param name="levelToMatch" value="DEBUG" /&gt;
+ *        &lt;param name="acceptOnMatch" value="true" /&gt;
+ *  &lt;/filter>
+ *  &lt;filter class="org.apache.log4j.filter.StringMatchFilter"&gt;
+ *        &lt;param name="stringToMatch" value="test" /&gt;
+ *        &lt;param name="acceptOnMatch" value="true" /&gt;
+ *  &lt;/filter>
+ *  &lt;param name="acceptOnMatch" value="false"/&gt;
+ * &lt;/filter&gt;
+ * &lt;filter class="org.apache.log4j.filter.DenyAllFilter"/&gt;
+ *&lt;layout class="org.apache.log4j.SimpleLayout"/&gt;
+ *&lt;/appender&gt;
+ *
+ * To accept all events EXCEPT those events that contain a
+ * DEBUG level and 'test' in the message:
+ * change the AndFilter's acceptOnMatch param to false and remove the DenyAllFilter
+ *
+ * NOTE: If you are defining a filter that is only relying on logging event content
+ * (no external or filter-managed state), you could opt instead
+ * to use an ExpressionFilter with one of the following expressions:
+ *
+ * LEVEL == DEBUG && MSG ~= 'test'
+ * or
+ * ! ( LEVEL == DEBUG && MSG ~= 'test' )
+ *
+ * 
+ */
+        class LOG4CXX_EXPORT AndFilter:public log4cxx::spi::Filter
+        {
+          private:
+            log4cxx::spi::FilterPtr headFilter;
+            log4cxx::spi::FilterPtr tailFilter;
+            bool acceptOnMatch;
+                 AndFilter(const AndFilter &);
+                  AndFilter & operator=(const AndFilter &);
+
+
+          public:
+                  DECLARE_LOG4CXX_OBJECT(AndFilter)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(log4cxx::spi::Filter)
+                  END_LOG4CXX_CAST_MAP()
+
+                  AndFilter();
+
+            void addFilter(const log4cxx::spi::FilterPtr & filter);
+
+            void setAcceptOnMatch(bool acceptOnMatch);
+
+            FilterDecision decide(const spi::LoggingEventPtr & event) const;
+        };
+
+    }
+}
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/denyallfilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/denyallfilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/denyallfilter.h	(revision 257)
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILTER_DENY_ALL_FILTER_H
+#define _LOG4CXX_FILTER_DENY_ALL_FILTER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/filter.h>
+
+namespace log4cxx
+{
+        namespace filter
+        {
+                /**
+                This filter drops all logging events.
+                <p>You can add this filter to the end of a filter chain to
+                switch from the default "accept all unless instructed otherwise"
+                filtering behaviour to a "deny all unless instructed otherwise"
+                behaviour.
+                */
+
+                class LOG4CXX_EXPORT DenyAllFilter : public spi::Filter
+                {
+                public:
+                        DenyAllFilter() : spi::Filter() {
+                        }
+
+                        typedef spi::Filter BASE_CLASS;
+                        DECLARE_LOG4CXX_OBJECT(DenyAllFilter)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(DenyAllFilter)
+                                LOG4CXX_CAST_ENTRY_CHAIN(BASE_CLASS)
+                        END_LOG4CXX_CAST_MAP()
+
+                        /**
+                        Always returns the integer constant {@link spi::Filter#DENY DENY}
+                        regardless of the {@link spi::LoggingEvent LoggingEvent} parameter.
+                        @param event The LoggingEvent to filter.
+                        @return Always returns {@link spi::Filter#DENY DENY}.
+                        */
+                        FilterDecision decide(const spi::LoggingEventPtr& /* event */) const
+                                { return spi::Filter::DENY; }
+                }; // class DenyAllFilter
+
+                LOG4CXX_PTR_DEF(DenyAllFilter);
+        }  // namespace filter
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif // _LOG4CXX_FILTER_DENY_ALL_FILTER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/expressionfilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/expressionfilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/expressionfilter.h	(revision 257)
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILTER_EXPRESSIONFILTER_H
+#define _LOG4CXX_FILTER_EXPRESSIONFILTER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/filter.h>
+
+namespace log4cxx
+{
+    namespace rule
+    {
+        class Rule;
+        typedef helpers::ObjectPtrT < Rule > RulePtr;
+    }
+
+
+    namespace filter
+    {
+
+
+/**
+ *A filter supporting complex expressions - supports both infix and postfix
+ * expressions (infix expressions must first be converted to postfix prior
+ * to processing).
+ *
+ * <p>See <code>org.apache.log4j.chainsaw.LoggingEventFieldResolver.java</code>
+ * for the correct names for logging event fields used when building expressions.
+ *
+ * <p>See <code>org.apache.log4j.chainsaw.rule</code> package for a list of available
+ * rules which can be applied using the expression syntax.
+ *
+ * <p>See <code>org.apache.log4j.chainsaw.RuleFactory</code> for the symbols
+ * used to activate the corresponding rules.
+ *
+ *NOTE:  Grouping using parentheses is supported - all tokens must be separated by spaces, and
+ *operands which contain spaces are not yet supported.
+ *
+ *Example:
+ *
+ *In order to build a filter that displays all messages with infomsg-45 or infomsg-44 in the message,
+ *as well as all messages with a level of WARN or higher, build an expression using
+ *the LikeRule (supports ORO-based regular expressions) and the InequalityRule.
+ * <b> ( MSG LIKE infomsg-4[4,5] ) && ( LEVEL >= WARN ) </b>
+ *
+ *Three options are required:
+ *  <b>Expression</b> - the expression to match
+ *  <b>ConvertInFixToPostFix</b> - convert from infix to posfix (default true)
+ *  <b>AcceptOnMatch</b> - true or false (default true)
+ *
+ * Meaning of <b>AcceptToMatch</b>:
+ * If there is a match between the value of the
+ * Expression option and the {@link log4cxx::spi::LoggingEvent} and AcceptOnMatch is true,
+ * the {@link #decide} method returns {@link log4cxx::spi::Filter#ACCEPT}.
+ *
+ * If there is a match between the value of the
+ * Expression option and the {@link log4cxx::spi::LoggingEvent} and AcceptOnMatch is false,
+ * {@link log4cxx::spi::Filter#DENY} is returned.
+ *
+ * If there is no match, {@link log4cxx::spi::Filter#NEUTRAL} is returned.
+ *
+ * 
+ */
+        class LOG4CXX_EXPORT ExpressionFilter:public log4cxx::spi::Filter
+        {
+          private:
+            bool acceptOnMatch;
+            bool convertInFixToPostFix;
+            LogString expression;
+                      log4cxx::rule::RulePtr expressionRule;
+                      ExpressionFilter(const ExpressionFilter &);
+                  ExpressionFilter & operator=(const ExpressionFilter &);
+
+          public:
+                  DECLARE_LOG4CXX_OBJECT(ExpressionFilter)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(log4cxx::spi::Filter)
+                  END_LOG4CXX_CAST_MAP()
+
+
+                  ExpressionFilter();
+
+            void activateOptions(log4cxx::helpers::Pool & p);
+
+            void setExpression(const LogString & expression);
+
+            LogString getExpression() const;
+
+            void setConvertInFixToPostFix(bool convertInFixToPostFix);
+
+            bool getConvertInFixToPostFix() const;
+
+            void setAcceptOnMatch(bool acceptOnMatch);
+
+            bool getAcceptOnMatch() const;
+
+  /**
+     Returns {@link log4cxx::spi::Filter#NEUTRAL} is there is no string match.
+   */
+            FilterDecision decide(const spi::LoggingEventPtr & event) const;
+        };
+    }
+}
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/levelmatchfilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/levelmatchfilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/levelmatchfilter.h	(revision 257)
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILTER_LEVEL_MATCH_FILTER_H
+#define _LOG4CXX_FILTER_LEVEL_MATCH_FILTER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/level.h>
+
+namespace log4cxx
+{
+        class Level;
+
+        namespace filter
+        {
+                /**
+                This is a very simple filter based on level matching.
+
+                <p>The filter admits two options <b>LevelToMatch</b> and
+                <b>AcceptOnMatch</b>. If there is an exact match between the value
+                of the <b>LevelToMatch</b> option and the level of the {@link
+                spi::LoggingEvent LoggingEvent}, then the #decide method returns {@link
+                spi::Filter#ACCEPT ACCEPT} in case the <b>AcceptOnMatch</b>
+                option value is set to <code>true</code>, if it is <code>false</code>
+                then {@link spi::Filter#DENY DENY} is returned. If there is no match,
+                {@link spi::Filter#NEUTRAL NEUTRAL} is returned.
+                */
+
+                class LOG4CXX_EXPORT LevelMatchFilter : public spi::Filter
+                {
+                private:
+                        bool acceptOnMatch;
+                        LevelPtr levelToMatch;
+
+                public:
+                        typedef spi::Filter BASE_CLASS;
+                        DECLARE_LOG4CXX_OBJECT(LevelMatchFilter)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(LevelMatchFilter)
+                                LOG4CXX_CAST_ENTRY_CHAIN(BASE_CLASS)
+                        END_LOG4CXX_CAST_MAP()
+
+                        LevelMatchFilter();
+
+                        /**
+                        Set options
+                        */
+                        virtual void setOption(const LogString& option,
+                                const LogString& value);
+
+                        void setLevelToMatch(const LogString& levelToMatch);
+
+                        LogString getLevelToMatch() const;
+
+                        inline void setAcceptOnMatch(bool acceptOnMatch1)
+                                { this->acceptOnMatch = acceptOnMatch1; }
+
+                        inline bool getAcceptOnMatch() const
+                                { return acceptOnMatch; }
+
+                        /**
+                        Return the decision of this filter.
+
+                        Returns {@link spi::Filter#NEUTRAL NEUTRAL} if the
+                        <b>LevelToMatch</b> option is not set or if there is not match.
+                        Otherwise, if there is a match, then the returned decision is
+                        {@link spi::Filter#ACCEPT ACCEPT} if the <b>AcceptOnMatch</b>
+                        property is set to <code>true</code>. The returned decision is
+                        {@link spi::Filter#DENY DENY} if the
+                        <b>AcceptOnMatch</b> property is set to false.
+                        */
+                        FilterDecision decide(const spi::LoggingEventPtr& event) const;
+                }; // class LevelMatchFilter
+            LOG4CXX_PTR_DEF(LevelMatchFilter);
+        }  // namespace filter
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif // _LOG4CXX_FILTER_STRING_MATCH_FILTER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/levelrangefilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/levelrangefilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/levelrangefilter.h	(revision 257)
@@ -0,0 +1,137 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILTER_LEVEL_RANGE_FILTER_H
+#define _LOG4CXX_FILTER_LEVEL_RANGE_FILTER_H
+
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/level.h>
+
+namespace log4cxx
+{
+        namespace filter
+        {
+                /**
+                This is a very simple filter based on level matching, which can be
+                used to reject messages with priorities outside a certain range.
+
+                <p>The filter admits three options <b>LevelMin</b>, <b>LevelMax</b>
+                and <b>AcceptOnMatch</b>.
+
+                <p>If the level of the {@link spi::LoggingEvent LoggingEvent} is not
+                between Min and Max (inclusive), then {@link spi::Filter#DENY DENY}
+                is returned.
+
+                <p> If the Logging event level is within the specified range, then if
+                <b>AcceptOnMatch</b> is true, {@link spi::Filter#ACCEPT ACCEPT} is
+                returned, and if <b>AcceptOnMatch</b> is false,
+                {@link spi::Filter#NEUTRAL NEUTRAL} is returned.
+
+                <p>If <code>LevelMin</code>w is not defined, then there is no
+                minimum acceptable level (ie a level is never rejected for
+                being too "low"/unimportant).  If <code>LevelMax</code> is not
+                defined, then there is no maximum acceptable level (ie a
+                level is never rejected for beeing too "high"/important).
+
+                <p>Refer to the {@link
+                AppenderSkeleton#setThreshold setThreshold} method
+                available to <code>all</code> appenders extending
+                AppenderSkeleton for a more convenient way to
+                filter out events by level.
+                */
+
+                class LOG4CXX_EXPORT LevelRangeFilter : public spi::Filter
+                {
+                private:
+                        /**
+                        Do we return ACCEPT when a match occurs. Default is
+                        <code>false</code>, so that later filters get run by default
+                        */
+                        bool acceptOnMatch;
+                        LevelPtr levelMin;
+                        LevelPtr levelMax;
+
+                public:
+                        typedef spi::Filter BASE_CLASS;
+                        DECLARE_LOG4CXX_OBJECT(LevelRangeFilter)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(LevelRangeFilter)
+                                LOG4CXX_CAST_ENTRY_CHAIN(BASE_CLASS)
+                        END_LOG4CXX_CAST_MAP()
+
+                        LevelRangeFilter();
+
+                        /**
+                        Set options
+                        */
+                        virtual void setOption(const LogString& option,
+                                const LogString& value);
+
+                        /**
+                        Set the <code>LevelMin</code> option.
+                        */
+                        void setLevelMin(const LevelPtr& levelMin1)
+                                { this->levelMin = levelMin1; }
+
+                        /**
+                        Get the value of the <code>LevelMin</code> option.
+                        */
+                        const LevelPtr& getLevelMin() const
+                                { return levelMin; }
+
+                        /**
+                        Set the <code>LevelMax</code> option.
+                        */
+                        void setLevelMax(const LevelPtr& levelMax1)
+                                { this->levelMax = levelMax1; }
+
+                        /**
+                        Get the value of the <code>LevelMax</code> option.
+                        */
+                        const LevelPtr& getLevelMax() const
+                                { return levelMax; }
+
+                        /**
+                        Set the <code>AcceptOnMatch</code> option.
+                        */
+                        inline void setAcceptOnMatch(bool acceptOnMatch1)
+                                { this->acceptOnMatch = acceptOnMatch1; }
+
+                        /**
+                        Get the value of the <code>AcceptOnMatch</code> option.
+                        */
+                        inline bool getAcceptOnMatch() const
+                                { return acceptOnMatch; }
+
+                        /**
+                        Return the decision of this filter.
+
+                        Returns {@link spi::Filter#NEUTRAL NEUTRAL} if the
+                        <b>LevelToMatch</b> option is not set or if there is not match.
+                        Otherwise, if there is a match, then the returned decision is
+                        {@link spi::Filter#ACCEPT ACCEPT} if the
+                        <b>AcceptOnMatch</b> property is set to <code>true</code>. The
+                        returned decision is {@link spi::Filter#DENY DENY} if the
+                        <b>AcceptOnMatch</b> property is set to false.
+                        */
+                        FilterDecision decide(const spi::LoggingEventPtr& event) const;
+                }; // class LevelRangeFilter
+            LOG4CXX_PTR_DEF(LevelRangeFilter);
+        }  // namespace filter
+} // namespace log4cxx
+
+#endif // _LOG4CXX_FILTER_LEVEL_RANGE_FILTER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/locationinfofilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/locationinfofilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/locationinfofilter.h	(revision 257)
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _LOG4CXX_FILTER_LOCATIONINFOFILTER_H
+#define _LOG4CXX_FILTER_LOCATIONINFOFILTER_H
+
+#include <log4cxx/spi/filter.h>
+
+namespace log4cxx
+{
+    namespace rule
+    {
+        class ExpressionRule;
+        class Rule;
+        typedef helpers::ObjectPtrT < Rule > RulePtr;
+        typedef helpers::ObjectPtrT < ExpressionRule > ExpressionRulePtr;
+    }
+
+    namespace filter
+    {
+/**
+ * Location information is usually specified at the appender level - all events associated
+ * with an appender either create and parse stack traces or they do not.  This is
+ * an expensive operation and in some cases not needed for all events associated with
+ * an appender.
+ *
+ * This filter creates event-level location information only if the provided expression evaluates to true.
+ *
+ * For information on expression syntax, see org.apache.log4j.rule.ExpressionRule
+ *
+ * 
+ */
+        class LOG4CXX_EXPORT LocationInfoFilter:public log4cxx::spi::Filter
+        {
+            bool convertInFixToPostFix;
+            LogString expression;
+                      log4cxx::rule::RulePtr expressionRule;
+            //HACK: Category is the last of the internal layers - pass this in as the class name
+            //in order for parsing to work correctly
+            LogString className;
+
+          public:
+                      DECLARE_LOG4CXX_OBJECT(LocationInfoFilter)
+                      BEGIN_LOG4CXX_CAST_MAP()
+                      LOG4CXX_CAST_ENTRY(log4cxx::spi::Filter)
+                      END_LOG4CXX_CAST_MAP()
+
+                      LocationInfoFilter();
+
+            void activateOptions(log4cxx::helpers::Pool &);
+
+            void setExpression(const LogString & expression);
+
+            LogString getExpression() const;
+
+            void setConvertInFixToPostFix(bool convertInFixToPostFix);
+
+            bool getConvertInFixToPostFix() const;
+
+  /**
+   * If this event does not already contain location information,
+   * evaluate the event against the expression.
+   *
+   * If the expression evaluates to true, generate a LocationInfo instance
+   * by creating an exception and set this LocationInfo on the event.
+   *
+   * Returns {@link log4cxx::spi::Filter#NEUTRAL}
+   */
+            FilterDecision decide(const spi::LoggingEventPtr & event) const;
+
+        };
+    }
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/mapfilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/mapfilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/mapfilter.h	(revision 257)
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _LOG4CXX_FILTER_MAPFILTER_H
+#define _LOG4CXX_FILTER_MAPFILTER_H
+
+#include <log4cxx/spi/filter.h>
+
+namespace log4cxx
+{
+    namespace filter
+    {
+
+
+        class LOG4CXX_EXPORT MapFilter:public log4cxx::spi::Filter
+        {
+          public:
+            DECLARE_LOG4CXX_OBJECT(MapFilter)
+            BEGIN_LOG4CXX_CAST_MAP()
+            LOG4CXX_CAST_ENTRY(log4cxx::spi::Filter)
+            END_LOG4CXX_CAST_MAP()
+
+            MapFilter();
+
+
+            FilterDecision decide(const spi::LoggingEventPtr & event) const;
+
+        };
+    }
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/propertyfilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/propertyfilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/propertyfilter.h	(revision 257)
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _LOG4CXX_FILTER_PROPERTYFILTER_H
+#define _LOG4CXX_FILTER_PROPERTYFILTER_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/filter.h>
+#include <map>
+
+namespace log4cxx
+{
+    namespace filter
+    {
+
+/**
+ * NOTE: This filter modifies logging events by adding properties to the event.
+ *
+ * The 'properties' param is converted to event properties, which are
+ * set on every event processed by the filter.
+ *
+ * Individual properties are only set if they do not already exist on the
+ * logging event (will not override existing properties).
+ *
+ * This class relies on the convention that property name/value pairs are
+ * equals-symbol delimited, and each name/value pair is comma-delimited
+ *
+ * Example properties param:
+ * somename=somevalue,anothername=anothervalue,thirdname=third value
+ *
+ * 
+ */
+        class LOG4CXX_EXPORT PropertyFilter : public log4cxx::spi::Filter
+        {
+            typedef std::map < LogString, LogString > PropertyMap;
+            PropertyMap* properties;
+            PropertyFilter(const PropertyFilter &);
+                  PropertyFilter & operator=(const PropertyFilter &);
+
+          public:
+                  DECLARE_LOG4CXX_OBJECT(PropertyFilter)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(log4cxx::spi::Filter)
+                  END_LOG4CXX_CAST_MAP()
+
+                  PropertyFilter();
+                  ~PropertyFilter();
+            void setProperties(const LogString & props);
+
+            FilterDecision decide(const spi::LoggingEventPtr & event) const;
+
+        };
+
+    }
+}
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/stringmatchfilter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/stringmatchfilter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/filter/stringmatchfilter.h	(revision 257)
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_FILTER_STRING_MATCH_FILTER_H
+#define _LOG4CXX_FILTER_STRING_MATCH_FILTER_H
+
+#include <log4cxx/spi/filter.h>
+
+namespace log4cxx
+{
+        namespace filter
+        {
+                /**
+                This is a very simple filter based on string matching.
+
+                <p>The filter admits two options <b>StringToMatch</b> and
+                <b>AcceptOnMatch</b>. If there is a match between the value of the
+                StringToMatch option and the message of the {@link spi::LoggingEvent
+                LoggingEvent}, then the #decide method returns
+                {@link log4cxx::spi::Filter#ACCEPT ACCEPT} if the <b>AcceptOnMatch</b> option
+                value is true, if it is false then {@link log4cxx::spi::Filter#DENY DENY} is
+                returned. If there is no match, {@link log4cxx::spi::Filter#NEUTRAL NEUTRAL}
+                is returned.
+
+                <p>See configuration files <a
+                href="../xml/doc-files/test6.xml">test6.xml</a>, <a
+                href="../xml/doc-files/test7.xml">test7.xml</a>, <a
+                href="../xml/doc-files/test8.xml">test8.xml</a>, <a
+                href="../xml/doc-files/test9.xml">test9.xml</a>, and <a
+                href="../xml/doc-files/test10.xml">test10.xml</a> for examples of
+                seeting up a <code>StringMatchFilter</code>.
+                */
+
+                class LOG4CXX_EXPORT StringMatchFilter : public spi::Filter
+                {
+                private:
+                        bool acceptOnMatch;
+                        LogString stringToMatch;
+
+                public:
+                        typedef spi::Filter BASE_CLASS;
+                        DECLARE_LOG4CXX_OBJECT(StringMatchFilter)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(StringMatchFilter)
+                                LOG4CXX_CAST_ENTRY_CHAIN(BASE_CLASS)
+                        END_LOG4CXX_CAST_MAP()
+
+                        StringMatchFilter();
+
+                        /**
+                        Set options
+                        */
+                        virtual void setOption(const LogString& option,
+                                const LogString& value);
+
+                        inline void setStringToMatch(const LogString& stringToMatch1)
+                                { this->stringToMatch.assign(stringToMatch1); }
+
+                        inline const LogString& getStringToMatch() const
+                                { return stringToMatch; }
+
+                        inline void setAcceptOnMatch(bool acceptOnMatch1)
+                                { this->acceptOnMatch = acceptOnMatch1; }
+
+                        inline bool getAcceptOnMatch() const
+                                { return acceptOnMatch; }
+
+                        /**
+                        Returns {@link log4cxx::spi::Filter#NEUTRAL NEUTRAL}
+                        is there is no string match.
+                        */
+                        FilterDecision decide(const spi::LoggingEventPtr& event) const;
+               }; // class StringMatchFilter
+            LOG4CXX_PTR_DEF(StringMatchFilter);
+        }  // namespace filter
+} // namespace log4cxx
+
+#endif // _LOG4CXX_FILTER_STRING_MATCH_FILTER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/absolutetimedateformat.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/absolutetimedateformat.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/absolutetimedateformat.h	(revision 257)
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_ABSOLUTE_TIME_DATE_FORMAT_H
+#define _LOG4CXX_HELPERS_ABSOLUTE_TIME_DATE_FORMAT_H
+
+#include <log4cxx/helpers/simpledateformat.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                Formats a date in the format <b>HH:mm:ss,SSS</b> for example,
+                "15:49:37,459".
+                */
+                class LOG4CXX_EXPORT AbsoluteTimeDateFormat : public SimpleDateFormat
+                {
+                public:
+                        AbsoluteTimeDateFormat()
+                        : SimpleDateFormat(LOG4CXX_STR("HH:mm:ss,SSS")) {}
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_ABSOLUTE_TIME_DATE_FORMAT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/appenderattachableimpl.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/appenderattachableimpl.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/appenderattachableimpl.h	(revision 257)
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_APPENDER_ATTACHABLE_IMPL_H
+#define _LOG4CXX_HELPERS_APPENDER_ATTACHABLE_IMPL_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/appenderattachable.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/mutex.h>
+#include <log4cxx/helpers/pool.h>
+
+namespace log4cxx
+{
+    namespace spi
+    {
+        class LoggingEvent;
+        typedef helpers::ObjectPtrT<LoggingEvent> LoggingEventPtr;
+    }
+
+    namespace helpers
+    {
+
+        class LOG4CXX_EXPORT AppenderAttachableImpl :
+            public virtual spi::AppenderAttachable,
+            public virtual helpers::ObjectImpl
+        {
+        protected:
+            /** Array of appenders. */
+            AppenderList  appenderList;
+
+        public:            
+            /**
+             *   Create new instance.
+             *   @param pool pool, must be longer-lived than instance. 
+             */
+            AppenderAttachableImpl(Pool& pool);
+
+            DECLARE_ABSTRACT_LOG4CXX_OBJECT(AppenderAttachableImpl)
+            BEGIN_LOG4CXX_CAST_MAP()
+                LOG4CXX_CAST_ENTRY(AppenderAttachableImpl)
+                LOG4CXX_CAST_ENTRY(spi::AppenderAttachable)
+            END_LOG4CXX_CAST_MAP()
+
+            void addRef() const;
+            void releaseRef() const;
+
+                  // Methods
+            /**
+             * Add an appender.
+             */
+            virtual void addAppender(const AppenderPtr& newAppender);
+
+            /**
+             Call the <code>doAppend</code> method on all attached appenders.
+            */
+            int appendLoopOnAppenders(const spi::LoggingEventPtr& event,
+                log4cxx::helpers::Pool& p);
+
+            /**
+             * Get all previously added appenders as an Enumeration.
+             */
+            virtual AppenderList getAllAppenders() const;
+
+            /**
+             * Get an appender by name.
+             */
+            virtual AppenderPtr getAppender(const LogString& name) const;
+
+            /**
+             Returns <code>true</code> if the specified appender is in the
+             list of attached appenders, <code>false</code> otherwise.
+            */
+            virtual bool isAttached(const AppenderPtr& appender) const;
+
+            /**
+             * Remove all previously added appenders.
+             */
+            virtual void removeAllAppenders();
+
+            /**
+             * Remove the appender passed as parameter from the list of appenders.
+             */
+            virtual void removeAppender(const AppenderPtr& appender);
+
+            /**
+             * Remove the appender with the name passed as parameter from the
+             * list of appenders.
+             */
+            virtual void removeAppender(const LogString& name);
+
+            inline const log4cxx::helpers::Mutex& getMutex() const { return mutex; }
+
+        private:
+            log4cxx::helpers::Mutex mutex;
+            AppenderAttachableImpl(const AppenderAttachableImpl&);
+            AppenderAttachableImpl& operator=(const AppenderAttachableImpl&);
+        };
+
+        LOG4CXX_PTR_DEF(AppenderAttachableImpl);
+
+    }
+}
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif //_LOG4CXX_HELPERS_APPENDER_ATTACHABLE_IMPL_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/aprinitializer.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/aprinitializer.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/aprinitializer.h	(revision 257)
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_APRINITIALIZER_H
+#define _LOG4CXX_HELPERS_APRINITIALIZER_H
+
+#ifndef LOG4CXX
+#error "aprinitializer.h should only be included by log4cxx implementation"
+#endif
+
+#include <log4cxx/helpers/pool.h>
+#include <apr_pools.h>
+#include <apr_thread_proc.h>
+
+namespace log4cxx
+{
+  namespace helpers
+  {
+    class APRInitializer
+    {
+    public:
+    static log4cxx_time_t initialize();
+    static apr_pool_t* getRootPool();
+    static apr_threadkey_t* getTlsKey();
+    static bool isDestructed;
+
+    private:
+      APRInitializer();
+      APRInitializer(const APRInitializer&);
+      APRInitializer& operator=(const APRInitializer&);
+      apr_pool_t* p;
+      log4cxx_time_t startTime;
+      apr_threadkey_t* tlsKey;
+      static APRInitializer& getInstance();
+      static void tlsDestruct(void*);
+
+    public:
+      ~APRInitializer();
+    };
+  } // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_APRINITIALIZER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bufferedoutputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bufferedoutputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bufferedoutputstream.h	(revision 257)
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_BUFFEREDOUTPUTSTREAM_H
+#define _LOG4CXX_HELPERS_BUFFEREDOUTPUTSTREAM_H
+
+#include <log4cxx/helpers/outputstream.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+          *   Abstract class for writing to character streams.
+          */
+          class LOG4CXX_EXPORT BufferedOutputStream : public OutputStream
+          {
+          private:
+                  size_t count;
+                  LogString buf;
+
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(BufferedOutputStream)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(BufferedOutputStream)
+                          LOG4CXX_CAST_ENTRY_CHAIN(OutputStream)
+                  END_LOG4CXX_CAST_MAP()
+
+          protected:
+                  BufferedOutputStream(OutputStreamPtr& out, size_t size = 4096);
+                  ~BufferedOutputStream();
+
+          public:
+                  void close(Pool& p);
+                  void flush(Pool& p);
+                  void write(ByteBuffer& buf, Pool& p);
+
+          private:
+                  BufferedOutputStream(const BufferedOutputStream&);
+                  BufferedOutputStream& operator=(const BufferedOutputStream&);
+          };
+
+          LOG4CXX_PTR_DEF(BufferedOutputStream);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_BUFFEREDOUTPUTSTREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bufferedwriter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bufferedwriter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bufferedwriter.h	(revision 257)
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_BUFFEREDWRITER_H
+#define _LOG4CXX_HELPERS_BUFFEREDWRITER_H
+
+#include <log4cxx/helpers/writer.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+          *   Writes text to a character-output stream buffering
+          *       requests to increase efficiency.
+          */
+          class LOG4CXX_EXPORT BufferedWriter : public Writer
+          {
+          private:
+                  WriterPtr out;
+                  size_t sz;
+                  LogString buf;
+
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(BufferedWriter)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(BufferedWriter)
+                          LOG4CXX_CAST_ENTRY_CHAIN(Writer)
+                  END_LOG4CXX_CAST_MAP()
+
+                  BufferedWriter(WriterPtr& out);
+                  BufferedWriter(WriterPtr& out, size_t sz);
+                  virtual ~BufferedWriter();
+
+                  virtual void close(Pool& p);
+                  virtual void flush(Pool& p);
+                  virtual void write(const LogString& str, Pool& p);
+
+          private:
+                  BufferedWriter(const BufferedWriter&);
+                  BufferedWriter& operator=(const BufferedWriter&);
+          };
+
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_BUFFEREDWRITER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytearrayinputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytearrayinputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytearrayinputstream.h	(revision 257)
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_BYTEARRAYINPUTSTREAM_H
+#define _LOG4CXX_HELPERS_BYTEARRAYINPUTSTREAM_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <vector>
+#include <log4cxx/helpers/inputstream.h>
+
+
+namespace log4cxx
+{
+
+        namespace helpers {
+LOG4CXX_LIST_DEF(ByteList, unsigned char);
+              
+          /**
+           * InputStream implemented on top of a byte array.
+           */
+          class LOG4CXX_EXPORT ByteArrayInputStream : public InputStream
+          {
+          private:
+              ByteList buf;
+              size_t pos;
+
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(ByteArrayInputStream)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(ByteArrayInputStream)
+                          LOG4CXX_CAST_ENTRY_CHAIN(InputStream)
+                  END_LOG4CXX_CAST_MAP()
+
+                  /**
+                   * Creates a ByteArrayInputStream.
+                   *
+                   * @param bytes array of bytes to copy into stream.
+                   */
+                   ByteArrayInputStream(const ByteList& bytes);
+
+                   virtual ~ByteArrayInputStream();
+
+                  /**
+                   * Closes this file input stream and releases any system 
+                   * resources associated with the stream.
+                   */
+                  virtual void close();
+
+                  /**
+                   * Reads a sequence of bytes into the given buffer.
+                   *
+                   * @param buf The buffer into which bytes are to be transferred.
+                   * @return the total number of bytes read into the buffer, or -1 if there
+                   *         is no more data because the end of the stream has been reached.
+                   */
+                  virtual int read(ByteBuffer& buf);
+
+          private:
+
+                  ByteArrayInputStream(const ByteArrayInputStream&);
+
+                  ByteArrayInputStream& operator=(const ByteArrayInputStream&);
+
+          };
+
+          LOG4CXX_PTR_DEF(ByteArrayInputStream);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif //_LOG4CXX_HELPERS_BYTEARRAYINPUTSTREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytearrayoutputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytearrayoutputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytearrayoutputstream.h	(revision 257)
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_BYTEARRAYOUTPUTSTREAM_H
+#define _LOG4CXX_HELPERS_BYTEARRAYOUTPUTSTREAM_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+
+#include <log4cxx/helpers/outputstream.h>
+#include <vector>
+
+
+namespace log4cxx
+{
+
+        namespace helpers {
+          class Pool;
+          LOG4CXX_LIST_DEF(ByteList, unsigned char);
+                 
+          /**
+          *   OutputStream implemented on top of std::vector
+          */
+          class LOG4CXX_EXPORT ByteArrayOutputStream : public OutputStream
+          {
+          private:
+                 ByteList array;
+
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(ByteArrayOutputStream)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(ByteArrayOutputStream)
+                          LOG4CXX_CAST_ENTRY_CHAIN(OutputStream)
+                  END_LOG4CXX_CAST_MAP()
+
+                  ByteArrayOutputStream();
+                  virtual ~ByteArrayOutputStream();
+
+                  virtual void close(Pool& p);
+                  virtual void flush(Pool& p);
+                  virtual void write(ByteBuffer& buf, Pool& p);
+                  ByteList toByteArray() const;
+
+          private:
+                  ByteArrayOutputStream(const ByteArrayOutputStream&);
+                  ByteArrayOutputStream& operator=(const ByteArrayOutputStream&);
+          };
+
+          LOG4CXX_PTR_DEF(ByteArrayOutputStream);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif //_LOG4CXX_HELPERS_BYTEARRAYOUTPUTSTREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytebuffer.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytebuffer.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/bytebuffer.h	(revision 257)
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_BYTEBUFFER_H
+#define _LOG4CXX_HELPERS_BYTEBUFFER_H
+
+#include <log4cxx/log4cxx.h>
+#include <stdio.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+          * A byte buffer.
+          */
+          class LOG4CXX_EXPORT ByteBuffer
+          {
+          private:
+                  char* base;
+                  size_t pos;
+                  size_t lim;
+                  size_t cap;
+
+          public:
+                  ByteBuffer(char* data, size_t capacity);
+                  ~ByteBuffer();
+
+                  void clear();
+                  void flip();
+
+                  inline char* data() { return base; }
+                  inline const char* data() const { return base; }
+                  inline char* current() { return base + pos; }
+                  inline const char* current() const { return base + pos; }
+                  inline size_t limit() const { return lim; }
+                  void limit(size_t newLimit);
+                  inline size_t position() const { return pos; }
+                  inline size_t remaining() const { return lim - pos; }
+                  void position(size_t newPosition);
+
+                  bool put(char byte);
+
+
+          private:
+                  ByteBuffer(const ByteBuffer&);
+                  ByteBuffer& operator=(const ByteBuffer&);
+          };
+
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_BYTEBUFFER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/cacheddateformat.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/cacheddateformat.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/cacheddateformat.h	(revision 257)
@@ -0,0 +1,220 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_CACHED_DATE_FORMAT_H
+#define _LOG4CXX_HELPERS_CACHED_DATE_FORMAT_H
+
+#include <log4cxx/helpers/dateformat.h>
+
+namespace log4cxx
+{
+        namespace pattern
+        {
+          class LOG4CXX_EXPORT CachedDateFormat : public log4cxx::helpers::DateFormat {
+          public:
+              enum {
+                /*
+                 *  Constant used to represent that there was no change
+                 *  observed when changing the millisecond count.
+                 */
+                 NO_MILLISECONDS = -2,
+                 /*
+                  *  Constant used to represent that there was an
+                  *  observed change, but was an expected change.
+                  */
+                 UNRECOGNIZED_MILLISECONDS = -1
+              };
+
+          private:
+             /**
+              *  Supported digit set.  If the wrapped DateFormat uses
+              *  a different unit set, the millisecond pattern
+              *  will not be recognized and duplicate requests
+              *  will use the cache.
+              */
+               static const logchar digits[];
+
+              enum {
+               /**
+                *  First magic number used to detect the millisecond position.
+                */
+               magic1 = 654000,
+               /**
+                *  Second magic number used to detect the millisecond position.
+                */
+               magic2 = 987000
+              };
+
+              /**
+               *  Expected representation of first magic number.
+               */
+              static const logchar magicString1[];
+
+
+              /**
+               *  Expected representation of second magic number.
+               */
+              static const logchar magicString2[];
+
+
+              /**
+               *  Expected representation of 0 milliseconds.
+               */
+             static const logchar zeroString[];
+
+            /**
+             *   Wrapped formatter.
+             */
+            log4cxx::helpers::DateFormatPtr formatter;
+
+            /**
+             *  Index of initial digit of millisecond pattern or
+             *   UNRECOGNIZED_MILLISECONDS or NO_MILLISECONDS.
+             */
+            mutable int millisecondStart;
+
+            /**
+             *  Integral second preceding the previous convered Date.
+             */
+            mutable log4cxx_time_t slotBegin;
+
+
+            /**
+             *  Cache of previous conversion.
+             */
+            mutable LogString cache;
+
+
+            /**
+             *  Maximum validity period for the cache.
+             *  Typically 1, use cache for duplicate requests only, or
+             *  1000000, use cache for requests within the same integral second.
+             */
+            const int expiration;
+
+            /**
+             *  Date requested in previous conversion.
+             */
+            mutable log4cxx_time_t previousTime;
+
+       public:
+          /**
+           *  Creates a new CachedDateFormat object.
+           *  @param dateFormat Date format, may not be null.
+           *  @param expiration maximum cached range in microseconds.
+           *    If the dateFormat is known to be incompatible with the
+           *      caching algorithm, use a value of 0 to totally disable
+           *      caching or 1 to only use cache for duplicate requests.
+           */
+            CachedDateFormat(const log4cxx::helpers::DateFormatPtr& dateFormat, int expiration);
+
+            /**
+             * Finds start of millisecond field in formatted time.
+             * @param time long time, must be integral number of seconds
+             * @param formatted String corresponding formatted string
+             * @param formatter DateFormat date format
+             * @param pool pool.
+             * @return int position in string of first digit of milliseconds,
+             *    -1 indicates no millisecond field, -2 indicates unrecognized
+             *    field (likely RelativeTimeDateFormat)
+             */
+            static int findMillisecondStart(
+              log4cxx_time_t time, const LogString& formatted,
+                  const log4cxx::helpers::DateFormatPtr& formatter,
+                  log4cxx::helpers::Pool& pool);
+
+            /**
+             * Formats a Date into a date/time string.
+             *
+             *  @param date the date to format.
+             *  @param sbuf the string buffer to write to.
+             *  @param p memory pool.
+             */
+               virtual void format(LogString &sbuf,
+                   log4cxx_time_t date,
+                   log4cxx::helpers::Pool& p) const;
+
+           private:
+               /**
+                *   Formats a count of milliseconds (0-999) into a numeric representation.
+                *   @param millis Millisecond coun between 0 and 999.
+                *   @buf String buffer, may not be null.
+                *   @offset Starting position in buffer, the length of the
+                *       buffer must be at least offset + 3.
+                */
+                static void millisecondFormat(int millis,
+                    LogString& buf,
+                    int offset);
+
+
+           public:
+               /**
+                * Set timezone.
+                *
+                * @remarks Setting the timezone using getCalendar().setTimeZone()
+                * will likely cause caching to misbehave.
+                * @param zone TimeZone new timezone
+                */
+               virtual void setTimeZone(const log4cxx::helpers::TimeZonePtr& zone);
+
+                /**
+                * Format an integer consistent with the format method.
+                * @param s string to which the numeric string is appended.
+                * @param n integer value.
+                * @param p memory pool used during formatting.
+                */
+               virtual void numberFormat(LogString& s,
+                                         int n,
+                                         log4cxx::helpers::Pool& p) const;
+
+              /**
+               * Gets maximum cache validity for the specified SimpleDateTime
+               *    conversion pattern.
+               *  @param pattern conversion pattern, may not be null.
+               *  @returns Duration in microseconds from an integral second
+               *      that the cache will return consistent results.
+               */
+               static int getMaximumCacheValidity(const LogString& pattern);
+
+          private:
+               CachedDateFormat(const CachedDateFormat&);
+               CachedDateFormat& operator=(const CachedDateFormat&);
+
+               /**
+               * Tests if two string regions are equal.
+               * @param target target string.
+               * @param toffset character position in target to start comparison.
+               * @param other other string.
+               * @param ooffset character position in other to start comparison.
+               * @param len length of region.
+               * @return true if regions are equal.
+               */
+               static bool regionMatches(
+                   const LogString& target,
+                   size_t toffset,
+                   const LogString& other,
+                   size_t ooffset,
+                   size_t len);
+
+          };
+
+
+
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_SIMPLE_DATE_FORMAT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/charsetdecoder.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/charsetdecoder.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/charsetdecoder.h	(revision 257)
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_CHARSETDECODER_H
+#define _LOG4CXX_HELPERS_CHARSETDECODER_H
+
+#include <log4cxx/helpers/objectimpl.h>
+
+namespace log4cxx
+{
+        namespace helpers {
+          class CharsetDecoder;
+          LOG4CXX_PTR_DEF(CharsetDecoder);
+          class ByteBuffer;
+
+
+          /**
+          *   An abstract engine to transform a sequences of bytes in a specific charset
+        *   into a LogString.
+          */
+          class LOG4CXX_EXPORT CharsetDecoder : public ObjectImpl
+          {
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(CharsetDecoder)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(CharsetDecoder)
+                  END_LOG4CXX_CAST_MAP()
+          protected:
+               /**
+               *  Protected constructor.
+               */
+                  CharsetDecoder();
+          public:
+               /**
+               *  Destructor.
+               */
+                  virtual ~CharsetDecoder();
+
+              /**
+               *   Get decoder for default charset.
+               */
+                  static CharsetDecoderPtr getDefaultDecoder();
+              /**
+               *  Get decoder for specified character set.
+               *  @param charset the following values should be recognized:
+               *     "US-ASCII", "ISO-8859-1", "UTF-8",
+               *     "UTF-16BE", "UTF-16LE".
+               *  @return decoder
+               *  @throws IllegalArgumentException if charset is not recognized.
+               */
+              static CharsetDecoderPtr getDecoder(const LogString& charset);
+
+              /**
+               *   Get decoder for UTF-8.
+               */
+                  static CharsetDecoderPtr getUTF8Decoder();
+              /**
+               *   Get decoder for ISO-8859-1.
+               */
+                  static CharsetDecoderPtr getISOLatinDecoder();
+                  
+                  
+
+              /**
+               *  Decodes as many bytes as possible from the given
+               *   input buffer, writing the results to the given output string.
+               *  @param in input buffer.
+               *  @param out output string.
+               *  @return APR_SUCCESS if not encoding errors were found.
+               */
+                  virtual log4cxx_status_t decode(ByteBuffer& in,
+                        LogString& out) = 0;
+
+              /**
+               *  Determins if status value indicates an invalid byte sequence.
+               */
+                  inline static bool isError(log4cxx_status_t stat) {
+                     return (stat != 0);
+                  }
+
+          private:
+               /**
+               *  Private copy constructor.
+               */
+                  CharsetDecoder(const CharsetDecoder&);
+               /**
+               *  Private assignment operator.
+               */
+                  CharsetDecoder& operator=(const CharsetDecoder&);
+              /**
+               *  Creates a new decoder for the default charset.
+               */
+                  static CharsetDecoder* createDefaultDecoder();
+        };
+
+        } // namespace helpers
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_CHARSETENCODER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/charsetencoder.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/charsetencoder.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/charsetencoder.h	(revision 257)
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_CHARSETENCODER_H
+#define _LOG4CXX_HELPERS_CHARSETENCODER_H
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/pool.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+          class ByteBuffer;
+          class CharsetEncoder;
+          LOG4CXX_PTR_DEF(CharsetEncoder);
+
+          /**
+          *   An engine to transform LogStrings into bytes
+          *     for the specific character set.
+          */
+          class LOG4CXX_EXPORT CharsetEncoder : public ObjectImpl
+          {
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(CharsetEncoder)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(CharsetEncoder)
+                  END_LOG4CXX_CAST_MAP()
+
+          protected:
+               /**
+               *  Protected constructor.
+               */
+                  CharsetEncoder();
+
+          public:
+               /**
+               * Destructor.
+               */
+                  virtual ~CharsetEncoder();
+              /**
+               *  Get encoder for default charset.
+               */
+                  static CharsetEncoderPtr getDefaultEncoder();
+
+              /**
+               *  Get encoder for specified character set.
+               *  @param charset the following values should be recognized:
+               *     "US-ASCII", "ISO-8859-1", "UTF-8",
+               *     "UTF-16BE", "UTF-16LE".
+               *  @return encoder.
+               *  @throws IllegalArgumentException if encoding is not recognized.
+               */
+                static CharsetEncoderPtr getEncoder(const LogString& charset);
+
+
+              /**
+               *   Get encoder for UTF-8.
+               */
+                  static CharsetEncoderPtr getUTF8Encoder();
+
+                  /**
+                  * Encodes a string replacing unmappable
+                  * characters with escape sequences.
+                  *
+                  */
+                  static void encode(CharsetEncoderPtr& enc,
+                      const LogString& src,
+                      LogString::const_iterator& iter,
+                      ByteBuffer& dst);
+
+              /**
+               * Encodes as many characters from the input string as possible
+               *   to the output buffer.
+                   *  @param in input string
+               *  @param iter position in string to start.
+               *  @param out output buffer.
+               *  @return APR_SUCCESS unless a character can not be represented in
+               *    the encoding.
+               */
+                  virtual log4cxx_status_t encode(const LogString& in,
+                        LogString::const_iterator& iter,
+                        ByteBuffer& out) = 0;
+
+              /**
+               *   Resets any internal state.
+               */
+                  virtual void reset();
+
+              /**
+               *   Flushes the encoder.
+               */
+                  virtual void flush(ByteBuffer& out);
+
+              /**
+               *   Determines if the return value from encode indicates
+               *     an unconvertable character.
+               */
+                  inline static bool isError(log4cxx_status_t stat) {
+                     return (stat != 0);
+                  }
+
+
+          private:
+               /**
+               *   Private copy constructor.
+               */
+                  CharsetEncoder(const CharsetEncoder&);
+              /**
+               *   Private assignment operator.
+               */
+                  CharsetEncoder& operator=(const CharsetEncoder&);
+
+              static CharsetEncoder* createDefaultEncoder();
+        };
+
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_CHARSETENCODER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/class.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/class.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/class.h	(revision 257)
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_CLASS_H
+#define _LOG4CXX_HELPERS_CLASS_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <map>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class Object;
+                typedef ObjectPtrT<Object> ObjectPtr;
+
+
+                class LOG4CXX_EXPORT Class
+                {
+                public:
+                        virtual ~Class();
+                        virtual ObjectPtr newInstance() const;
+                        LogString toString() const;
+                        virtual LogString getName() const = 0;
+                        static const Class& forName(const LogString& className);
+                        static bool registerClass(const Class& newClass);
+
+                protected:
+                        Class();
+
+                private:
+                        Class(const Class&);
+                        Class& operator=(const Class&);
+                        typedef std::map<LogString, const Class *> ClassMap;
+                        static ClassMap& getRegistry();
+                        static void registerClasses();
+                };
+        }  // namespace log4cxx
+} // namespace helper
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+
+#endif //_LOG4CXX_HELPERS_CLASS_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/classregistration.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/classregistration.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/classregistration.h	(revision 257)
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_CLASSREGISTRATION_H
+#define _LOG4CXX_HELPERS_CLASSREGISTRATION_H
+
+#include <log4cxx/log4cxx.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class Class;
+                class LOG4CXX_EXPORT ClassRegistration
+                {
+                public:
+                        typedef const Class& (*ClassAccessor)();
+                        ClassRegistration(ClassAccessor classAccessor);
+
+                private:
+                        ClassRegistration(const ClassRegistration&);
+                        ClassRegistration& operator=(const ClassRegistration&);
+                };
+        }  // namespace log4cxx
+} // namespace helper
+
+#endif //_LOG4CXX_HELPERS_CLASSREGISTRATION_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/condition.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/condition.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/condition.h	(revision 257)
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_CONDITION_H
+#define _LOG4CXX_HELPERS_CONDITION_H
+
+#include <log4cxx/log4cxx.h>
+#include <log4cxx/helpers/mutex.h>
+
+extern "C" {
+   struct apr_thread_cond_t;
+}
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class Pool;
+
+                /**
+                 *   This class provides a means for one thread to suspend exception until
+                 *   notified by another thread to resume.  This class should have 
+                 *   similar semantics to java.util.concurrent.locks.Condition.
+                 */
+                class LOG4CXX_EXPORT Condition
+                {
+                public:
+                        /**
+                         *  Create new instance.
+                         *  @param p pool on which condition will be created.  Needs to be
+                         *  longer-lived than created instance.
+                         */
+                        Condition(log4cxx::helpers::Pool& p);
+                        /**
+                         *  Destructor.
+                         */
+                        ~Condition();
+                        /**
+                         *   Signal all waiting threads.
+                         */
+                        log4cxx_status_t signalAll();
+                        /**
+                         *  Await signaling of condition.
+                         *  @param lock lock associated with condition, calling thread must
+                         *  own lock.  Lock will be released while waiting and reacquired
+                         *  before returning from wait.
+                         *  @throws InterruptedException if thread is interrupted.
+                         */
+                        void await(Mutex& lock);
+
+                private:
+                        apr_thread_cond_t* condition;
+                        Condition(const Condition&);
+                        Condition& operator=(const Condition&);
+                };
+        } // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_CONDITION_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/cyclicbuffer.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/cyclicbuffer.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/cyclicbuffer.h	(revision 257)
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_CYCLICBUFFER_H
+#define _LOG4CXX_HELPERS_CYCLICBUFFER_H
+
+#include <log4cxx/spi/loggingevent.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                CyclicBuffer is used by other appenders to hold instances of
+                {@link log4cxx::spi::LoggingEvent LoggingEvent} for immediate 
+                or deferred display.
+                <p>This buffer gives read access to any element in the buffer not
+                just the first or last element.
+                */
+                class LOG4CXX_EXPORT CyclicBuffer
+                {
+                        log4cxx::spi::LoggingEventList ea;
+                        int first;
+                        int last;
+                        int numElems;
+                        int maxSize;
+
+                public:
+                        /**
+                        Instantiate a new CyclicBuffer of at most <code>maxSize</code>
+                        events.
+                        The <code>maxSize</code> argument must a positive integer.
+                        @param maxSize The maximum number of elements in the buffer.
+                        @throws IllegalArgumentException if <code>maxSize</code>
+                        is negative.
+                        */
+                        CyclicBuffer(int maxSize);
+                        ~CyclicBuffer();
+
+                        /**
+                        Add an <code>event</code> as the last event in the buffer.
+                        */
+                        void add(const spi::LoggingEventPtr& event);
+
+                        /**
+                        Get the <i>i</i>th oldest event currently in the buffer. If
+                        <em>i</em> is outside the range 0 to the number of elements
+                        currently in the buffer, then <code>null</code> is returned.
+                        */
+                        spi::LoggingEventPtr get(int i);
+
+                        int getMaxSize() const
+                                { return maxSize; }
+
+                        /**
+                        Get the oldest (first) element in the buffer. The oldest element
+                        is removed from the buffer.
+                        */
+                        spi::LoggingEventPtr get();
+
+                        /**
+                        Get the number of elements in the buffer. This number is
+                        guaranteed to be in the range 0 to <code>maxSize</code>
+                        (inclusive).
+                        */
+                        int length() const
+                                { return numElems; }
+
+                        /**
+                        Resize the cyclic buffer to <code>newSize</code>.
+                        @throws IllegalArgumentException if <code>newSize</code> is negative.
+                        */
+                        void resize(int newSize);
+                }; // class CyclicBuffer
+        }  //namespace helpers
+} //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_CYCLICBUFFER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datagrampacket.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datagrampacket.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datagrampacket.h	(revision 257)
@@ -0,0 +1,135 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_DATAGRAM_PACKET
+#define _LOG4CXX_HELPERS_DATAGRAM_PACKET
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/inetaddress.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+
+                /** This class represents a datagram packet.
+                <p>Datagram packets are used to implement a connectionless packet
+                delivery service. Each message is routed from one machine to another
+                based solely on information contained within that packet. Multiple
+                packets sent from one machine to another might be routed differently,
+                and might arrive in any order.
+                */
+                class LOG4CXX_EXPORT DatagramPacket : public helpers::ObjectImpl
+                {
+                protected:
+                        /** the data for this packet. */
+                        void * buf;
+
+                        /** The offset of the data for this packet. */
+                        int offset;
+
+                        /** The length of the data for this packet. */
+                        int length;
+
+                        /** The IP address for this packet. */
+                        InetAddressPtr address;
+
+                        /** The UDP port number of the remote host. */
+                        int port;
+
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(DatagramPacket)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(DatagramPacket)
+                        END_LOG4CXX_CAST_MAP()
+
+                        /** Constructs a DatagramPacket for receiving packets of length
+                        <code>length</code>. */
+                        DatagramPacket(void * buf, int length);
+
+                        /** Constructs a datagram packet for sending packets of length
+                        <code>length</code> to the specified port number on the specified
+                        host. */
+                        DatagramPacket(void * buf, int length, InetAddressPtr address, int port);
+
+                        /** Constructs a DatagramPacket for receiving packets of length
+                        <code>length</code>, specifying an offset into the buffer. */
+                        DatagramPacket(void * buf, int offset, int length);
+
+                        /** Constructs a datagram packet for sending packets of length
+                        <code>length</code> with offset <code>offset</code> to the
+                        specified port number on the specified host. */
+                        DatagramPacket(void * buf, int offset, int length, InetAddressPtr address,
+                                int port);
+
+                        ~DatagramPacket();
+
+                        /** Returns the IP address of the machine to which this datagram
+                        is being sent or from which the datagram was received. */
+                        inline InetAddressPtr getAddress() const
+                                { return address; }
+
+                        /** Returns the data received or the data to be sent. */
+                        inline void * getData() const
+                                { return buf; }
+
+                        /** Returns the length of the data to be sent or the length of the
+                        data received. */
+                        inline int getLength() const
+                                { return length; }
+
+                        /** Returns the offset of the data to be sent or the offset of the
+                        data received. */
+                        inline int getOffset() const
+                                { return offset; }
+
+                        /** Returns the port number on the remote host to which this
+                         datagram is being sent or from which the datagram was received. */
+                        inline int getPort() const
+                                { return port; }
+
+                        inline void setAddress(InetAddressPtr address1)
+                                { this->address = address1; }
+
+                        /** Set the data buffer for this packet. */
+                        inline void setData(void * buf1)
+                                { this->buf = buf1; }
+
+                        /** Set the data buffer for this packet. */
+                        inline void setData(void * buf1, int offset1, int length1)
+                                { this->buf = buf1; this->offset = offset1; this->length = length1; }
+
+                        /** Set the length for this packet. */
+                        inline void setLength(int length1)
+                                { this->length = length1; }
+
+                        inline void setPort(int port1)
+                                { this->port = port1; }
+
+                private:
+                        //
+                        //  prevent copy and assignment statements
+                        DatagramPacket(const DatagramPacket&);
+                        DatagramPacket& operator=(const DatagramPacket&);
+
+                }; // class DatagramPacket
+            LOG4CXX_PTR_DEF(DatagramPacket);
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_DATAGRAM_PACKET
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datagramsocket.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datagramsocket.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datagramsocket.h	(revision 257)
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_DATAGRAM_SOCKET_H
+#define _LOG4CXX_HELPERS_DATAGRAM_SOCKET_H
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/inetaddress.h>
+#include <log4cxx/helpers/pool.h>
+#include <log4cxx/helpers/datagrampacket.h>
+
+extern "C" { struct apr_socket_t; }
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /** This class represents a socket for sending and receiving
+                datagram packets.*/
+                class LOG4CXX_EXPORT DatagramSocket : public helpers::ObjectImpl
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(DatagramSocket)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(DatagramSocket)
+                        END_LOG4CXX_CAST_MAP()
+
+                        /** Constructs a datagram socket and binds it to any available port
+                        on the local host machine.*/
+                        DatagramSocket();
+
+                        /** Constructs a datagram socket and binds it to the specified
+                        port on the local host machine. */
+                        DatagramSocket(int port);
+
+                        /**  Creates a datagram socket, bound to the specified local
+                        address. */
+                        DatagramSocket(int port, InetAddressPtr laddr);
+
+                        /** ensure the socket is closed. */
+                        ~DatagramSocket();
+
+                        /**  Binds a datagram socket to a local port and address.*/
+                        void bind(int lport, InetAddressPtr laddress);
+
+                        /** Creates a datagram socket.*/
+                        void create();
+
+                        /** Closes this datagram socket */
+                        void close();
+
+                        /** Connects the socket to a remote address for this socket. */
+                        void connect(InetAddressPtr address, int port);
+
+                        /** Returns the address to which this socket is connected. */
+                        inline InetAddressPtr getInetAddress() const
+                                { return address; }
+
+                        /** Gets the local address to which the socket is bound. */
+                        inline InetAddressPtr getLocalAddress() const
+                                { return localAddress; }
+
+                        /**  Returns the port number on the local host to which this
+                        socket is bound. */
+                        inline int getLocalPort() const
+                                { return localPort; }
+
+                        /** Returns the port for this socket */
+                        inline int getPort() const
+                                { return port; }
+
+                        /** Returns the binding state of the socket. **/
+                        inline bool isBound() const
+                                { return localPort != 0; }
+
+                        /** Returns wether the socket is closed or not. */
+                        inline bool isClosed() const
+                                { return socket != 0; }
+
+                        /** Returns the connection state of the socket. */
+                        inline bool isConnected() const
+                                { return port != 0; }
+
+                        /**  Receives a datagram packet from this socket. */
+                        void receive(DatagramPacketPtr& p);
+
+                        /** Sends a datagram packet from this socket. */
+                        void  send(DatagramPacketPtr& p);
+
+                private:
+                        DatagramSocket(const DatagramSocket&);
+                        DatagramSocket& operator=(const DatagramSocket&);
+                        /** The APR socket */
+                        apr_socket_t *socket;
+
+                        /** The memory pool for the socket */
+                        Pool socketPool;
+
+                        InetAddressPtr address;
+
+                        InetAddressPtr localAddress;
+
+                        int port;
+
+                        /** The local port number to which this socket is connected. */
+                        int localPort;
+
+                };
+            LOG4CXX_PTR_DEF(DatagramSocket);
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_DATAGRAM_SOCKET_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/date.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/date.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/date.h	(revision 257)
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_DATE_H
+#define _LOG4CXX_HELPERS_DATE_H
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/log4cxx.h>
+
+
+namespace log4cxx {
+   namespace helpers {
+     /**
+     *    Simple transcoder for converting between
+     *      external char and wchar_t strings and
+     *      internal strings.
+     *
+     */
+      class LOG4CXX_EXPORT Date : public ObjectImpl {
+      const log4cxx_time_t time;
+
+      public:
+      DECLARE_LOG4CXX_OBJECT(Date)
+      BEGIN_LOG4CXX_CAST_MAP()
+              LOG4CXX_CAST_ENTRY(Date)
+      END_LOG4CXX_CAST_MAP()
+
+      Date();
+      Date(log4cxx_time_t time);
+      virtual ~Date();
+
+      inline log4cxx_time_t getTime() const {
+        return time;
+      }
+
+      /**
+       *   Get start of next second
+       */
+      log4cxx_time_t getNextSecond() const;
+
+
+      static log4cxx_time_t getMicrosecondsPerDay();
+      static log4cxx_time_t getMicrosecondsPerSecond();
+
+      };
+
+      LOG4CXX_PTR_DEF(Date);
+
+   }
+}
+
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/dateformat.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/dateformat.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/dateformat.h	(revision 257)
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_DATE_FORMAT_H
+#define _LOG4CXX_HELPERS_DATE_FORMAT_H
+
+#include <log4cxx/helpers/timezone.h>
+
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+
+                /**
+                *  DateFormat is an abstract class for date/time formatting
+                * patterned after java.text.DateFormat.
+                */
+                class LOG4CXX_EXPORT DateFormat : public ObjectImpl {
+                   public:
+                   DECLARE_ABSTRACT_LOG4CXX_OBJECT(DateFormat)
+                   BEGIN_LOG4CXX_CAST_MAP()
+                           LOG4CXX_CAST_ENTRY(DateFormat)
+                   END_LOG4CXX_CAST_MAP()
+
+                  /**
+                  *  Destructor
+                  */
+                   virtual ~DateFormat();
+
+                   /**
+                   * Formats an log4cxx_time_t into a date/time string.
+                   * @param s string to which the date/time string is appended.
+                   * @param tm date to be formatted.
+                   * @param p memory pool used during formatting.
+                   */
+                   virtual void format(LogString &s, log4cxx_time_t tm, log4cxx::helpers::Pool& p) const = 0;
+
+                   /**
+                   * Sets the time zone.
+                   * @param zone the given new time zone.
+                   */
+                   virtual void setTimeZone(const TimeZonePtr& zone);
+
+                   /**
+                   * Format an integer consistent with the format method.
+                   * @param s string to which the numeric string is appended.
+                   * @param n integer value.
+                   * @param p memory pool used during formatting.
+                   * @remarks This method is used by CachedDateFormat to
+                   * format the milliseconds.
+                   */
+                   virtual void numberFormat(LogString& s, int n, log4cxx::helpers::Pool& p) const;
+
+
+                   protected:
+                   /**
+                   * Constructor.
+                   */
+                   DateFormat();
+
+                   private:
+                   /**
+                   *  Copy constructor definition to prevent copying.
+                   */
+                   DateFormat(const DateFormat&);
+                   /**
+                   *  Assignment definition to prevent assignment.
+                   */
+                   DateFormat& operator=(const DateFormat&);
+                };
+                LOG4CXX_PTR_DEF(DateFormat);
+
+
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_DATE_FORMAT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datelayout.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datelayout.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datelayout.h	(revision 257)
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_DATE_LAYOUT_H
+#define _LOG4CXX_HELPERS_DATE_LAYOUT_H
+
+#include <log4cxx/layout.h>
+#include <log4cxx/helpers/dateformat.h>
+#include <log4cxx/helpers/timezone.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                This abstract layout takes care of all the date related options and
+                formatting work.
+                */
+                class LOG4CXX_EXPORT DateLayout : public Layout
+                {
+                private:
+                        LogString timeZoneID;
+                        LogString dateFormatOption;
+
+                protected:
+                        DateFormatPtr dateFormat;
+
+                public:
+                        DateLayout(const LogString& dateLayoutOption);
+                        virtual ~DateLayout();
+
+                        virtual void activateOptions(log4cxx::helpers::Pool& p);
+                        virtual void setOption(const LogString& option, const LogString& value);
+
+                        /**
+                        The value of the <b>DateFormat</b> option should be either an
+                        argument to the constructor of helpers::DateFormat or one of
+                        the strings <b>"NULL"</b>, <b>"RELATIVE"</b>, <b>"ABSOLUTE"</b>,
+                        <b>"DATE"</b> or <b>"ISO8601</b>.
+                        */
+                        inline void setDateFormat(const LogString& dateFormat1)
+                          { this->dateFormatOption.assign(dateFormat1); }
+
+                        /**
+                        Returns value of the <b>DateFormat</b> option.
+                        */
+                        inline const LogString& getDateFormat() const
+                                { return dateFormatOption; }
+
+                        /**
+                        The <b>TimeZoneID</b> option is a time zone ID string in the format
+                        expected by the <code>locale</code> C++ standard class.
+                        */
+                        inline void setTimeZone(const LogString& timeZone)
+                                { this->timeZoneID.assign(timeZone); }
+
+                        /**
+                        Returns value of the <b>TimeZone</b> option.
+                        */
+                        inline const LogString& getTimeZone() const
+                                { return timeZoneID; }
+
+                        void formatDate(LogString &s,
+                                        const spi::LoggingEventPtr& event,
+                                        log4cxx::helpers::Pool& p) const;
+
+                private:
+                       //
+                       //  prevent copy and assignment
+                       DateLayout(const DateLayout&);
+                       DateLayout& operator=(const DateLayout&);
+
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_DATE_LAYOUT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datetimedateformat.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datetimedateformat.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/datetimedateformat.h	(revision 257)
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_DATE_TIME_DATE_FORMAT_H
+#define _LOG4CXX_HELPERS_DATE_TIME_DATE_FORMAT_H
+
+#include <log4cxx/helpers/simpledateformat.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                Formats a date in the format <b>dd MMM yyyy HH:mm:ss,SSS</b> for example,
+           "06 Nov 1994 15:49:37,459".
+                */
+                class LOG4CXX_EXPORT DateTimeDateFormat : public SimpleDateFormat
+                {
+                public:
+                        DateTimeDateFormat()
+                         : SimpleDateFormat(LOG4CXX_STR("dd MMM yyyy HH:mm:ss,SSS")) {}
+                         DateTimeDateFormat(const std::locale* locale)
+                          : SimpleDateFormat(LOG4CXX_STR("dd MMM yyyy HH:mm:ss,SSS"), locale) {}
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_DATE_TIME_DATE_FORMAT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/exception.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/exception.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/exception.h	(revision 257)
@@ -0,0 +1,287 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_EXCEPTION_H
+#define _LOG4CXX_HELPERS_EXCEPTION_H
+
+#include <exception>
+#include <log4cxx/log4cxx.h>
+#include <log4cxx/logstring.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /** The class Exception and its subclasses indicate conditions that a
+                reasonable application might want to catch.
+                */
+                class LOG4CXX_EXPORT Exception : public ::std::exception
+                {
+                public:
+                        Exception(const char* msg);
+                        Exception(const LogString& msg);
+                        Exception(const Exception& src);
+                        Exception& operator=(const Exception& src);
+                        const char* what() const throw();
+                private:
+                        enum { MSG_SIZE = 128 };
+                        char msg[MSG_SIZE + 1];
+                }; // class Exception
+
+                /** RuntimeException is the parent class of those exceptions that can be
+                thrown during the normal operation of the process.
+                */
+                class LOG4CXX_EXPORT RuntimeException : public Exception
+                {
+                public:
+                        RuntimeException(log4cxx_status_t stat);
+                        RuntimeException(const LogString& msg);
+                        RuntimeException(const RuntimeException& msg);
+                        RuntimeException& operator=(const RuntimeException& src);
+                private:
+                        static LogString formatMessage(log4cxx_status_t stat);
+                }; // class RuntimeException
+
+                /** Thrown when an application attempts to use null in a case where an
+                object is required.
+                */
+                class LOG4CXX_EXPORT  NullPointerException : public RuntimeException
+                {
+                public:
+                        NullPointerException(const LogString& msg);
+                        NullPointerException(const NullPointerException& msg);
+                        NullPointerException& operator=(const NullPointerException& src);
+                }; // class NullPointerException
+
+                /** Thrown to indicate that a method has been passed
+                an illegal or inappropriate argument.*/
+                class LOG4CXX_EXPORT IllegalArgumentException : public RuntimeException
+                {
+                public:
+                   IllegalArgumentException(const LogString& msg);
+                   IllegalArgumentException(const IllegalArgumentException&);
+                   IllegalArgumentException& operator=(const IllegalArgumentException&);
+                }; // class IllegalArgumentException
+
+                /** Signals that an I/O exception of some sort has occurred. This class
+                is the general class of exceptions produced by failed or interrupted
+                I/O operations.
+                */
+                class LOG4CXX_EXPORT IOException : public Exception
+                {
+                public:
+                    IOException();
+                    IOException(log4cxx_status_t stat);
+                    IOException(const LogString& msg);
+                    IOException(const IOException &src);
+                    IOException& operator=(const IOException&);
+                private:
+                    static LogString formatMessage(log4cxx_status_t stat);
+                };
+
+                class LOG4CXX_EXPORT MissingResourceException : public Exception
+                {
+                    public:
+                    MissingResourceException(const LogString& key);
+                    MissingResourceException(const MissingResourceException &src);
+                    MissingResourceException& operator=(const MissingResourceException&);
+                private:
+                    static LogString formatMessage(const LogString& key);
+                };
+
+                class LOG4CXX_EXPORT PoolException : public Exception
+                {
+                public:
+                      PoolException(log4cxx_status_t stat);
+                      PoolException(const PoolException &src);
+                      PoolException& operator=(const PoolException&);
+                private:
+                      static LogString formatMessage(log4cxx_status_t stat);
+                };
+
+
+                class LOG4CXX_EXPORT MutexException : public Exception
+                {
+                public:
+                      MutexException(log4cxx_status_t stat);
+                      MutexException(const MutexException &src);
+                      MutexException& operator=(const MutexException&);
+                private:
+                      static LogString formatMessage(log4cxx_status_t stat);
+                };
+
+                class LOG4CXX_EXPORT InterruptedException : public Exception
+                {
+                public:
+                      InterruptedException();
+                      InterruptedException(log4cxx_status_t stat);
+                      InterruptedException(const InterruptedException &src);
+                      InterruptedException& operator=(const InterruptedException&);
+                private:
+                      static LogString formatMessage(log4cxx_status_t stat);
+                };
+
+                class LOG4CXX_EXPORT ThreadException
+                      : public Exception {
+                public:
+                      ThreadException(log4cxx_status_t stat);
+                      ThreadException(const LogString& msg);
+                      ThreadException(const ThreadException &src);
+                      ThreadException& operator=(const ThreadException&);
+                private:
+                      static LogString formatMessage(log4cxx_status_t stat);
+                };
+
+                class LOG4CXX_EXPORT TranscoderException : public Exception
+                {
+                public:
+                      TranscoderException(log4cxx_status_t stat);
+                      TranscoderException(const TranscoderException &src);
+                      TranscoderException& operator=(const TranscoderException&);
+                private:
+                      static LogString formatMessage(log4cxx_status_t stat);
+                };
+
+                class LOG4CXX_EXPORT IllegalMonitorStateException
+                      : public Exception {
+                public:
+                      IllegalMonitorStateException(const LogString& msg);
+                      IllegalMonitorStateException(const IllegalMonitorStateException& msg);
+                      IllegalMonitorStateException& operator=(const IllegalMonitorStateException& msg);
+                };
+
+                /**
+                Thrown when an application tries to create an instance of a class using
+                the newInstance method in class Class, but the specified class object
+                cannot be instantiated because it is an interface or is an abstract class.
+                */
+                class LOG4CXX_EXPORT InstantiationException : public Exception
+                {
+                public:
+                        InstantiationException(const LogString& msg);
+                        InstantiationException(const InstantiationException& msg);
+                        InstantiationException& operator=(const InstantiationException& msg);
+                };
+
+                /**
+                Thrown when an application tries to load in a class through its
+                string name but no definition for the class with the specified name
+                could be found.
+                */
+                class LOG4CXX_EXPORT ClassNotFoundException : public Exception
+                {
+                public:
+                    ClassNotFoundException(const LogString& className);
+                    ClassNotFoundException(const ClassNotFoundException& msg);
+                    ClassNotFoundException& operator=(const ClassNotFoundException& msg);
+                private:
+                    static LogString formatMessage(const LogString& className);
+                };
+
+
+                class NoSuchElementException : public Exception {
+                public:
+                      NoSuchElementException();
+                      NoSuchElementException(const NoSuchElementException&);
+                      NoSuchElementException& operator=(const NoSuchElementException&);
+                };
+
+                class IllegalStateException : public Exception {
+                public:
+                      IllegalStateException();
+                      IllegalStateException(const IllegalStateException&);
+                      IllegalStateException& operator=(const IllegalStateException&);
+                };
+
+                /** Thrown to indicate that there is an error in the underlying
+                protocol, such as a TCP error.
+                */
+                class LOG4CXX_EXPORT SocketException : public IOException
+                {
+                public:
+                        SocketException(const LogString& msg);
+                        SocketException(log4cxx_status_t status);
+                        SocketException(const SocketException&);
+                        SocketException& operator=(const SocketException&);
+                };
+
+                /** Signals that an error occurred while attempting to connect a socket
+                to a remote address and port. Typically, the connection was refused
+                remotely (e.g., no process is listening on the remote address/port).
+                */
+                class LOG4CXX_EXPORT ConnectException : public SocketException
+                {
+                public:
+                    ConnectException(log4cxx_status_t status);
+                    ConnectException(const ConnectException& src);
+                   ConnectException& operator=(const ConnectException&);
+                };
+
+                class LOG4CXX_EXPORT ClosedChannelException : public SocketException
+                {
+                public:
+                    ClosedChannelException();
+                    ClosedChannelException(const ClosedChannelException& src);
+                    ClosedChannelException& operator=(const ClosedChannelException&);
+                };
+
+                /** Signals that an error occurred while attempting to bind a socket to
+                a local address and port. Typically, the port is in use, or the
+                requested local address could not be assigned.
+                */
+                class LOG4CXX_EXPORT BindException : public SocketException
+                {
+                public:
+                      BindException(log4cxx_status_t status);
+                      BindException(const BindException&);
+                      BindException& operator=(const BindException&);
+                };
+               
+                /** Signals that an I/O operation has been interrupted. An
+                InterruptedIOException is thrown to indicate that an input or output
+                transfer has been terminated because the thread performing it was
+                interrupted. The field bytesTransferred  indicates how many bytes were
+                successfully transferred before the interruption occurred.
+                */
+                class LOG4CXX_EXPORT InterruptedIOException : public IOException
+                {
+                public:
+                     InterruptedIOException(const LogString& msg);
+                     InterruptedIOException(const InterruptedIOException&);
+                     InterruptedIOException& operator=(const InterruptedIOException&);
+                };
+
+               
+                /** Signals that an I/O operation has been interrupted. An
+                InterruptedIOException is thrown to indicate that an input or output
+                transfer has been terminated because the thread performing it was
+                interrupted. The field bytesTransferred  indicates how many bytes were
+                successfully transferred before the interruption occurred.
+                */
+                class LOG4CXX_EXPORT SocketTimeoutException : public InterruptedIOException
+                {
+                public:
+                     SocketTimeoutException();
+                     SocketTimeoutException(const SocketTimeoutException&);
+                     SocketTimeoutException& operator=(const SocketTimeoutException&);
+                };
+                 
+
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_EXCEPTION_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/fileinputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/fileinputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/fileinputstream.h	(revision 257)
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_FILEINPUTSTREAM_H
+#define _LOG4CXX_HELPERS_FILEINPUTSTREAM_H
+
+#include <log4cxx/helpers/inputstream.h>
+#include <log4cxx/file.h>
+#include <log4cxx/helpers/pool.h>
+
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+           * InputStream implemented on top of APR file IO.
+           * 
+           */
+          class LOG4CXX_EXPORT FileInputStream : public InputStream
+          {
+          private:
+                  Pool pool;
+                  apr_file_t* fileptr;
+
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(FileInputStream)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(FileInputStream)
+                          LOG4CXX_CAST_ENTRY_CHAIN(InputStream)
+                  END_LOG4CXX_CAST_MAP()
+
+                  /**
+                   * Creates a FileInputStream by opening a connection to an actual
+                   * file, the file named by the path name name in the file system.
+                   *
+                   * @param filename The system-dependent file name.
+                   */
+                  FileInputStream(const LogString& filename);
+                  FileInputStream(const logchar* filename);
+
+                  /**
+                   * Creates a FileInputStream by opening a connection to an actual 
+                   * file, the file named by the File object file in the file system.
+                   *
+                   * @param aFile The file to be opened for reading.
+                   */
+                  FileInputStream(const File& aFile);
+
+                  virtual ~FileInputStream();
+
+                  /**
+                   * Closes this file input stream and releases any system 
+                   * resources associated with the stream.
+                   */
+                  virtual void close();
+
+                  /**
+                   * Reads a sequence of bytes into the given buffer.
+                   *
+                   * @param buf The buffer into which bytes are to be transferred.
+                   * @return the total number of bytes read into the buffer, or -1 if there
+                   *         is no more data because the end of the stream has been reached.
+                   */
+                  virtual int read(ByteBuffer& buf);
+
+          private:
+
+                  FileInputStream(const FileInputStream&);
+
+                  FileInputStream& operator=(const FileInputStream&);
+                  void open(const LogString&);
+
+          };
+
+          LOG4CXX_PTR_DEF(FileInputStream);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_FILEINPUTSTREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/fileoutputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/fileoutputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/fileoutputstream.h	(revision 257)
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_FILEOUTPUTSTREAM_H
+#define _LOG4CXX_HELPERS_FILEOUTPUTSTREAM_H
+
+#include <log4cxx/helpers/outputstream.h>
+#include <log4cxx/file.h>
+#include <log4cxx/helpers/pool.h>
+
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+          *   OutputStream implemented on top of APR file IO.
+          */
+          class LOG4CXX_EXPORT FileOutputStream : public OutputStream
+          {
+          private:
+                  Pool pool;
+                  apr_file_t* fileptr;
+
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(FileOutputStream)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(FileOutputStream)
+                          LOG4CXX_CAST_ENTRY_CHAIN(OutputStream)
+                  END_LOG4CXX_CAST_MAP()
+
+                  FileOutputStream(const LogString& filename, bool append = false);
+                  FileOutputStream(const logchar* filename, bool append = false);
+                  virtual ~FileOutputStream();
+
+                  virtual void close(Pool& p);
+                  virtual void flush(Pool& p);
+                  virtual void write(ByteBuffer& buf, Pool& p);
+
+          private:
+                  FileOutputStream(const FileOutputStream&);
+                  FileOutputStream& operator=(const FileOutputStream&);
+                  static apr_file_t* open(const LogString& fn, bool append, 
+         log4cxx::helpers::Pool& p);
+          };
+
+          LOG4CXX_PTR_DEF(FileOutputStream);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_FILEOUTPUTSTREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/filewatchdog.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/filewatchdog.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/filewatchdog.h	(revision 257)
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_FILEWATCHDOG_H
+#define _LOG4CXX_HELPERS_FILEWATCHDOG_H
+
+#include <log4cxx/logstring.h>
+#include <time.h>
+#include <log4cxx/helpers/pool.h>
+#include <log4cxx/helpers/thread.h>
+#include <log4cxx/file.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+
+                /**
+                Check every now and then that a certain file has not changed. If it
+                has, then call the #doOnChange method.
+                */
+                class LOG4CXX_EXPORT FileWatchdog
+                {
+                public:
+                        virtual ~FileWatchdog();
+                        /**
+                        The default delay between every file modification check, set to 60
+                        seconds.  */
+                        static long DEFAULT_DELAY /*= 60000*/;
+
+                protected:
+                        /**
+                        The name of the file to observe  for changes.
+                        */
+                        File file;
+
+                        /**
+                        The delay to observe between every check.
+                        By default set DEFAULT_DELAY.*/
+                        long delay;
+                        log4cxx_time_t lastModif;
+                        bool warnedAlready;
+                        volatile unsigned int interrupted;
+
+                protected:
+                        FileWatchdog(const File& filename);
+                        virtual void doOnChange() = 0;
+                        void checkAndConfigure();
+
+                public:
+                        /**
+                        Set the delay to observe between each check of the file changes.
+                        */
+                        void setDelay(long delay1)
+                                { this->delay = delay1; }
+
+                        void start();
+
+                private:
+                    static void* LOG4CXX_THREAD_FUNC run(apr_thread_t* thread, void* data);
+                        Pool pool;
+                        Thread thread;
+
+                        FileWatchdog(const FileWatchdog&);
+                        FileWatchdog& operator=(const FileWatchdog&);
+
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+
+#endif // _LOG4CXX_HELPERS_FILEWATCHDOG_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inetaddress.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inetaddress.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inetaddress.h	(revision 257)
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPER_INETADDRESS_H
+#define _LOG4CXX_HELPER_INETADDRESS_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/logstring.h>
+#include <vector>
+#include <log4cxx/helpers/exception.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class LOG4CXX_EXPORT UnknownHostException : public Exception
+                {
+                public:
+                      UnknownHostException(const LogString& msg);
+                      UnknownHostException(const UnknownHostException& src);
+                      UnknownHostException& operator=(const UnknownHostException& src);
+                };
+
+
+                class InetAddress;
+                LOG4CXX_PTR_DEF(InetAddress);
+                LOG4CXX_LIST_DEF(InetAddressList, InetAddressPtr);
+
+                class LOG4CXX_EXPORT InetAddress : public ObjectImpl
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(InetAddress)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(InetAddress)
+                        END_LOG4CXX_CAST_MAP()
+
+                        InetAddress(const LogString& hostName, const LogString& hostAddr);
+
+                        /** Determines all the IP addresses of a host, given the host's name.
+                        */
+                        static InetAddressList getAllByName(const LogString& host);
+
+                        /** Determines the IP address of a host, given the host's name.
+                        */
+                        static InetAddressPtr getByName(const LogString& host);
+
+                        /** Returns the IP address string "%d.%d.%d.%d".
+                        */
+                        LogString getHostAddress() const;
+
+                        /** Gets the host name for this IP address.
+                        */
+                        LogString getHostName() const;
+
+                        /** Returns the local host.
+                        */
+                        static InetAddressPtr  getLocalHost();
+
+                        /** Returns an InetAddress which can be used as any
+                         *  address, for example when listening on a port from any
+                         *  remote addresss.
+                         */
+                        static InetAddressPtr anyAddress();
+
+                        /** Converts this IP address to a String.
+                        */
+                        LogString toString() const;
+
+                private:
+                        LogString ipAddrString;
+
+                        LogString hostNameString;
+
+                }; // class InetAddress
+        }  // namespace helpers
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif // _LOG4CXX_HELPER_INETADDRESS_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inputstream.h	(revision 257)
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_INPUTSTREAM_H
+#define _LOG4CXX_HELPERS_INPUTSTREAM_H
+
+#include <log4cxx/helpers/objectimpl.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+          class ByteBuffer;
+
+          /**
+           * Abstract class for reading from character streams.
+           * 
+           */
+          class LOG4CXX_EXPORT InputStream : public ObjectImpl
+          {
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(InputStream)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(InputStream)
+                  END_LOG4CXX_CAST_MAP()
+
+          protected:
+                  InputStream();
+
+                  virtual ~InputStream();
+
+          public:
+                  /**
+                   * Reads a sequence of bytes into the given buffer.
+                   *
+                   * @param dst The buffer into which bytes are to be transferred.
+                   * @return the total number of bytes read into the buffer, or -1 if there
+                   *         is no more data because the end of the stream has been reached.
+                   */
+                  virtual int read(ByteBuffer& dst) = 0;
+
+                  /**
+                   * Closes this input stream and releases any system 
+                   * resources associated with the stream.
+                   */
+                  virtual void close() = 0;
+
+          private:
+                  InputStream(const InputStream&);
+                  InputStream& operator=(const InputStream&);
+          };
+
+          LOG4CXX_PTR_DEF(InputStream);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_INPUTSTREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inputstreamreader.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inputstreamreader.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/inputstreamreader.h	(revision 257)
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_INPUTSTREAMREADER_H
+#define _LOG4CXX_HELPERS_INPUTSTREAMREADER_H
+
+#include <log4cxx/helpers/reader.h>
+#include <log4cxx/helpers/inputstream.h>
+#include <log4cxx/helpers/charsetdecoder.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+           * Class for reading from character streams.
+           * Decorates a byte based InputStream and provides appropriate 
+           * conversion to characters.
+           */
+          class LOG4CXX_EXPORT InputStreamReader : public Reader
+          {
+          private:
+                  InputStreamPtr in;
+                  CharsetDecoderPtr dec;
+
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(InputStreamReader)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(InputStreamReader)
+                          LOG4CXX_CAST_ENTRY_CHAIN(Reader)
+                  END_LOG4CXX_CAST_MAP()
+
+                  /**
+                   * Creates an InputStreamReader that uses the default charset.
+                   *
+                   * @param in The input stream to decorate.
+                   */
+                  InputStreamReader(const InputStreamPtr& in);
+
+                  /**
+                   * Creates an InputStreamReader that uses the given charset decoder.
+                   *
+                   * @param in The input stream to decorate.
+                   * @param enc The charset decoder to use for the conversion.
+                   */
+                  InputStreamReader(const InputStreamPtr& in, const CharsetDecoderPtr &enc);
+
+                  ~InputStreamReader();
+
+                  /**
+                   * Closes the stream.
+                   *
+                   * @param p The memory pool associated with the reader.
+                   */
+                  virtual void close(Pool& p);
+
+                  /**
+                   * @return The complete stream contents as a LogString.
+                   * @param p The memory pool associated with the reader.
+                   */
+                  virtual LogString read(Pool& p);
+
+                  /**
+                   * @return The name of the character encoding being used by this stream.
+                   */
+                  LogString getEncoding() const;
+
+          private:
+                  InputStreamReader(const InputStreamReader&);
+
+                  InputStreamReader& operator=(const InputStreamReader&);
+          };
+
+          LOG4CXX_PTR_DEF(InputStreamReader);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_INPUTSTREAMREADER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/integer.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/integer.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/integer.h	(revision 257)
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_INTEGER_H
+#define _LOG4CXX_HELPERS_INTEGER_H
+
+#include <log4cxx/helpers/objectimpl.h>
+
+
+namespace log4cxx {
+   namespace helpers {
+      class LOG4CXX_EXPORT Integer : public ObjectImpl {
+          const int val;
+      public:
+      DECLARE_LOG4CXX_OBJECT(Integer)
+      BEGIN_LOG4CXX_CAST_MAP()
+              LOG4CXX_CAST_ENTRY(Integer)
+      END_LOG4CXX_CAST_MAP()
+
+      Integer();
+      Integer(int i);
+      virtual ~Integer();
+
+      inline int intValue() const {
+        return val;
+      }
+
+      };
+
+      LOG4CXX_PTR_DEF(Integer);
+
+   }
+}
+
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/iso8601dateformat.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/iso8601dateformat.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/iso8601dateformat.h	(revision 257)
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_ISO_8601_DATE_FORMAT_H
+#define _LOG4CXX_HELPERS_ISO_8601_DATE_FORMAT_H
+
+#include <log4cxx/helpers/simpledateformat.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                Formats a date in the format <b>yyyy-MM-dd HH:mm:ss,SSS</b> for example
+                "1999-11-27 15:49:37,459".
+
+                <p>Refer to the
+                <a href=http://www.cl.cam.ac.uk/~mgk25/iso-time.html>summary of the
+                International Standard Date and Time Notation</a> for more
+                information on this format.
+                */
+                class LOG4CXX_EXPORT ISO8601DateFormat : public SimpleDateFormat
+                {
+                public:
+                        ISO8601DateFormat()
+                         : SimpleDateFormat(LOG4CXX_STR("yyyy-MM-dd HH:mm:ss,SSS")) {}
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_ISO_8601_DATE_FORMAT_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/loader.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/loader.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/loader.h	(revision 257)
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_LOADER_H
+#define _LOG4CXX_HELPERS_LOADER_H
+
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/exception.h>
+#include <log4cxx/helpers/inputstream.h>
+
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class Class;
+
+                class LOG4CXX_EXPORT Loader
+                {
+                public:
+                        static const Class& loadClass(const LogString& clazz);
+
+                        static InputStreamPtr getResourceAsStream(
+                                                         const LogString& name);
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+#endif //_LOG4CXX_HELPERS_LOADER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/locale.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/locale.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/locale.h	(revision 257)
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_LOCALE_H
+#define _LOG4CXX_HELPERS_LOCALE_H
+
+#include <log4cxx/logstring.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class LOG4CXX_EXPORT Locale
+                {
+                public:
+                        Locale(const LogString& language);
+                        Locale(const LogString& language, const LogString& country);
+                        Locale(const LogString& language, const LogString& country,
+                                const LogString& variant);
+
+                        const LogString& getLanguage() const;
+                        const LogString& getCountry() const;
+                        const LogString& getVariant() const;
+
+                protected:
+                        Locale(const Locale&);
+                        Locale& operator=(const Locale&);
+                        const LogString language;
+                        const LogString country;
+                        const LogString variant;
+                }; // class Locale
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_LOCALE_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/loglog.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/loglog.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/loglog.h	(revision 257)
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_LOG_LOG_H
+#define _LOG4CXX_HELPERS_LOG_LOG_H
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/mutex.h>
+#include <exception>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                This class used to output log statements from within the log4cxx package.
+
+                <p>Log4cxx components cannot make log4cxx logging calls. However, it is
+                sometimes useful for the user to learn about what log4cxx is
+                doing. You can enable log4cxx internal logging by calling the
+                <b>#setInternalDebugging</b> method.
+
+                <p>All log4cxx internal debug calls go to standard output
+                where as internal error messages are sent to
+                standard error output. All internal messages are prepended with
+                the string "log4cxx: ".
+                */
+                class LOG4CXX_EXPORT LogLog
+                {
+                private:
+                        bool debugEnabled;
+
+                  /**
+                         In quietMode not even errors generate any output.
+                   */
+                        bool quietMode;
+                        Mutex mutex;
+                        LogLog();
+                        LogLog(const LogLog&);
+                        LogLog& operator=(const LogLog&);
+                        static LogLog& getInstance();
+ 
+
+                public:
+                        /**
+                        Allows to enable/disable log4cxx internal logging.
+                        */
+                        static void setInternalDebugging(bool enabled);
+
+                        /**
+                        This method is used to output log4cxx internal debug
+                        statements. Output goes to the standard output.
+                        */
+                        static void debug(const LogString& msg);
+                        static void debug(const LogString& msg, const std::exception& e);
+
+
+                        /**
+                        This method is used to output log4cxx internal error
+                        statements. There is no way to disable error statements.
+                        Output goes to stderr.
+                        */
+                        static void error(const LogString& msg);
+                        static void error(const LogString& msg, const std::exception& e);
+
+
+                        /**
+                        In quiet mode LogLog generates strictly no output, not even
+                        for errors.
+
+                        @param quietMode <code>true</code> for no output.
+                        */
+                        static void setQuietMode(bool quietMode);     
+
+                        /**
+                        This method is used to output log4cxx internal warning
+                        statements. There is no way to disable warning statements.
+                        Output goes to stderr.
+                        */
+                        static void warn(const LogString&  msg);
+                        static void warn(const LogString&  msg, const std::exception& e);
+
+                        private:
+                        static void emit(const LogString& msg);
+                        static void emit(const std::exception& ex);
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#define LOGLOG_DEBUG(log) { \
+        log4cxx::helpers::LogLog::debug(log) ; }
+
+#define LOGLOG_WARN(log) { \
+        log4cxx::helpers::LogLog::warn(log) ; }
+
+#define LOGLOG_ERROR(log) { \
+        log4cxx::helpers::LogLog::warn(log); }
+
+#endif //_LOG4CXX_HELPERS_LOG_LOG_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/messagebuffer.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/messagebuffer.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/messagebuffer.h	(revision 257)
@@ -0,0 +1,828 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_MESSAGE_BUFFER_H
+#define _LOG4CXX_MESSAGE_BUFFER_H
+
+#include <log4cxx/log4cxx.h>
+#include <log4cxx/logstring.h>
+#include <sstream>
+
+namespace log4cxx {
+
+
+   namespace helpers {
+   
+   typedef std::ios_base& (*ios_base_manip)(std::ios_base&);
+
+   /**
+    *   This class is used by the LOG4CXX_INFO and similar
+    *   macros to support insertion operators in the message parameter.
+    *   The class is not intended for use outside of that context.
+    */
+   class LOG4CXX_EXPORT CharMessageBuffer {
+   public:
+        /**
+         *  Creates a new instance.
+         */
+       CharMessageBuffer();
+        /**
+         *  Destructor.
+         */
+        ~CharMessageBuffer();
+
+        
+        /**
+         *   Appends string to buffer.
+         *   @param msg string append.
+         *   @return this buffer.
+         */
+        CharMessageBuffer& operator<<(const std::basic_string<char>& msg);
+        /**
+         *   Appends string to buffer.
+         *   @param msg string to append.
+         *   @return this buffer.
+         */
+        CharMessageBuffer& operator<<(const char* msg);
+        /**
+         *   Appends string to buffer.
+         *   @param msg string to append.
+         *   @return this buffer.
+         */
+        CharMessageBuffer& operator<<(char* msg);
+
+        /**
+         *   Appends character to buffer.
+         *   @param msg character to append.
+         *   @return this buffer.
+         */
+        CharMessageBuffer& operator<<(const char msg);
+
+        /**
+         *   Insertion operator for STL manipulators such as std::fixed.
+         *   @param manip manipulator.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(ios_base_manip manip);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(bool val);
+
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(short val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(int val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(unsigned int val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(long val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(unsigned long val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(float val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(double val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(long double val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(void* val);
+
+      /**
+       *  Cast to ostream.
+       */
+      operator std::basic_ostream<char>&();
+
+      /**
+       *   Get content of buffer.
+       *   @param os used only to signal that
+       *       the embedded stream was used.
+       */
+      const std::basic_string<char>& str(std::basic_ostream<char>& os);
+
+      /**
+       *   Get content of buffer.
+       *   @param buf used only to signal that
+       *       the embedded stream was not used.
+       */
+      const std::basic_string<char>& str(CharMessageBuffer& buf);
+
+        /**
+         *  Returns true if buffer has an encapsulated STL stream.
+         *  @return true if STL stream was created.
+         */
+        bool hasStream() const;
+
+   private:
+        /**
+         * Prevent use of default copy constructor.
+         */
+      CharMessageBuffer(const CharMessageBuffer&);
+        /**
+         *   Prevent use of default assignment operator.  
+         */
+      CharMessageBuffer& operator=(const CharMessageBuffer&);
+
+      /**
+         * Encapsulated std::string.
+         */
+        std::basic_string<char> buf;
+        /**
+         *  Encapsulated stream, created on demand.
+         */
+        std::basic_ostringstream<char>* stream;
+   };
+
+template<class V>
+std::basic_ostream<char>& operator<<(CharMessageBuffer& os, const V& val) {
+   return ((std::basic_ostream<char>&) os) << val;
+}
+
+#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API || LOG4CXX_LOGCHAR_IS_UNICHAR
+   /**
+    *   This class is designed to support insertion operations
+   *   in the message argument to the LOG4CXX_INFO and similar
+   *   macros and is not designed for general purpose use.
+   */
+   class LOG4CXX_EXPORT UniCharMessageBuffer {
+   public:
+        /**
+         *  Creates a new instance.
+         */
+       UniCharMessageBuffer();
+        /**
+         *  Destructor.
+         */
+        ~UniCharMessageBuffer();
+        
+        typedef std::basic_ostream<UniChar> uostream;
+
+        
+        /**
+         *   Appends string to buffer.
+         *   @param msg string append.
+         *   @return this buffer.
+         */
+        UniCharMessageBuffer& operator<<(const std::basic_string<UniChar>& msg);
+        /**
+         *   Appends string to buffer.
+         *   @param msg string to append.
+         *   @return this buffer.
+         */
+        UniCharMessageBuffer& operator<<(const UniChar* msg);
+        /**
+         *   Appends string to buffer.
+         *   @param msg string to append.
+         *   @return this buffer.
+         */
+        UniCharMessageBuffer& operator<<(UniChar* msg);
+
+        /**
+         *   Appends character to buffer.
+         *   @param msg character to append.
+         *   @return this buffer.
+         */
+        UniCharMessageBuffer& operator<<(const UniChar msg);
+        
+#if LOG4CXX_CFSTRING_API
+      /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        UniCharMessageBuffer& operator<<(const CFStringRef& msg);
+#endif        
+
+        /**
+         *   Insertion operator for STL manipulators such as std::fixed.
+         *   @param manip manipulator.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(ios_base_manip manip);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(bool val);
+
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(short val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(int val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(unsigned int val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(long val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(unsigned long val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(float val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(double val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(long double val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        uostream& operator<<(void* val);
+
+
+        /**
+       *  Cast to ostream.
+       */
+      operator uostream&();
+
+      /**
+       *   Get content of buffer.
+       *   @param os used only to signal that
+       *       the embedded stream was used.
+       */
+      const std::basic_string<UniChar>& str(uostream& os);
+
+      /**
+       *   Get content of buffer.
+       *   @param buf used only to signal that
+       *       the embedded stream was not used.
+       */
+      const std::basic_string<UniChar>& str(UniCharMessageBuffer& buf);
+
+        /**
+         *  Returns true if buffer has an encapsulated STL stream.
+         *  @return true if STL stream was created.
+         */
+        bool hasStream() const;
+
+   private:
+        /**
+         * Prevent use of default copy constructor.
+         */
+      UniCharMessageBuffer(const UniCharMessageBuffer&);
+        /**
+         *   Prevent use of default assignment operator.  
+         */
+      UniCharMessageBuffer& operator=(const UniCharMessageBuffer&);
+
+      /**
+         * Encapsulated std::string.
+         */
+        std::basic_string<UniChar> buf;
+        /**
+         *  Encapsulated stream, created on demand.
+         */
+        std::basic_ostringstream<UniChar>* stream;
+   };
+
+template<class V>
+UniCharMessageBuffer::uostream& operator<<(UniCharMessageBuffer& os, const V& val) {
+   return ((UniCharMessageBuffer::uostream&) os) << val;
+}
+#endif
+
+#if LOG4CXX_WCHAR_T_API
+   /**
+    *   This class is designed to support insertion operations
+   *   in the message argument to the LOG4CXX_INFO and similar
+   *   macros and is not designed for general purpose use.
+   */
+   class LOG4CXX_EXPORT WideMessageBuffer {
+   public:
+        /**
+         *  Creates a new instance.
+         */
+       WideMessageBuffer();
+        /**
+         *  Destructor.
+         */
+        ~WideMessageBuffer();
+
+        
+        /**
+         *   Appends string to buffer.
+         *   @param msg string append.
+         *   @return this buffer.
+         */
+        WideMessageBuffer& operator<<(const std::basic_string<wchar_t>& msg);
+        /**
+         *   Appends string to buffer.
+         *   @param msg string to append.
+         *   @return this buffer.
+         */
+        WideMessageBuffer& operator<<(const wchar_t* msg);
+        /**
+         *   Appends string to buffer.
+         *   @param msg string to append.
+         *   @return this buffer.
+         */
+        WideMessageBuffer& operator<<(wchar_t* msg);
+
+        /**
+         *   Appends character to buffer.
+         *   @param msg character to append.
+         *   @return this buffer.
+         */
+        WideMessageBuffer& operator<<(const wchar_t msg);
+
+        /**
+         *   Insertion operator for STL manipulators such as std::fixed.
+         *   @param manip manipulator.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(ios_base_manip manip);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(bool val);
+
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(short val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(int val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(unsigned int val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(long val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(unsigned long val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(float val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(double val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(long double val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::basic_ostream<wchar_t>& operator<<(void* val);
+
+
+        /**
+       *  Cast to ostream.
+       */
+      operator std::basic_ostream<wchar_t>&();
+
+      /**
+       *   Get content of buffer.
+       *   @param os used only to signal that
+       *       the embedded stream was used.
+       */
+      const std::basic_string<wchar_t>& str(std::basic_ostream<wchar_t>& os);
+
+      /**
+       *   Get content of buffer.
+       *   @param buf used only to signal that
+       *       the embedded stream was not used.
+       */
+      const std::basic_string<wchar_t>& str(WideMessageBuffer& buf);
+
+        /**
+         *  Returns true if buffer has an encapsulated STL stream.
+         *  @return true if STL stream was created.
+         */
+        bool hasStream() const;
+
+   private:
+        /**
+         * Prevent use of default copy constructor.
+         */
+      WideMessageBuffer(const WideMessageBuffer&);
+        /**
+         *   Prevent use of default assignment operator.  
+         */
+      WideMessageBuffer& operator=(const WideMessageBuffer&);
+
+      /**
+         * Encapsulated std::string.
+         */
+        std::basic_string<wchar_t> buf;
+        /**
+         *  Encapsulated stream, created on demand.
+         */
+        std::basic_ostringstream<wchar_t>* stream;
+   };
+
+template<class V>
+std::basic_ostream<wchar_t>& operator<<(WideMessageBuffer& os, const V& val) {
+   return ((std::basic_ostream<wchar_t>&) os) << val;
+}
+
+   /**
+    *   This class is used by the LOG4CXX_INFO and similar
+    *   macros to support insertion operators in the message parameter.
+    *   The class is not intended for use outside of that context.
+    */
+   class LOG4CXX_EXPORT MessageBuffer {
+   public:
+        /**
+         *  Creates a new instance.
+         */
+      MessageBuffer();
+      /**
+         * Destructor.
+         */
+      ~MessageBuffer();
+
+      /**
+       *  Cast to ostream.
+       */
+      operator std::ostream&();
+
+      /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        CharMessageBuffer& operator<<(const std::string& msg);
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        CharMessageBuffer& operator<<(const char* msg);
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        CharMessageBuffer& operator<<(char* msg);
+
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        CharMessageBuffer& operator<<(const char msg);
+
+      /**
+       *   Get content of buffer.
+       *   @param buf used only to signal
+       *       the character type and that
+       *       the embedded stream was not used.
+       */
+      const std::string& str(CharMessageBuffer& buf);
+
+      /**
+       *   Get content of buffer.
+       *   @param os used only to signal 
+       *       the character type and that
+       *       the embedded stream was used.
+       */
+      const std::string& str(std::ostream& os);
+
+      /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        WideMessageBuffer& operator<<(const std::wstring& msg);
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        WideMessageBuffer& operator<<(const wchar_t* msg);
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        WideMessageBuffer& operator<<(wchar_t* msg);
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        WideMessageBuffer& operator<<(const wchar_t msg);
+
+#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
+      /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        UniCharMessageBuffer& operator<<(const std::basic_string<UniChar>& msg);
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        UniCharMessageBuffer& operator<<(const UniChar* msg);
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        UniCharMessageBuffer& operator<<(UniChar* msg);
+        /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        UniCharMessageBuffer& operator<<(const UniChar msg);
+#endif
+
+#if LOG4CXX_CFSTRING_API
+      /**
+         *   Appends a string into the buffer and
+         *   fixes the buffer to use char characters.
+         *   @param msg message to append.
+         *   @return encapsulated CharMessageBuffer.
+         */
+        UniCharMessageBuffer& operator<<(const CFStringRef& msg);
+#endif
+
+        /**
+         *   Insertion operator for STL manipulators such as std::fixed.
+         *   @param manip manipulator.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(ios_base_manip manip);
+
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(bool val);
+
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(short val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(int val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(unsigned int val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(long val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(unsigned long val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(float val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(double val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(long double val);
+        /**
+         *   Insertion operator for built-in type.
+         *   @param val build in type.
+         *   @return encapsulated STL stream.
+         */
+        std::ostream& operator<<(void* val);
+      /**
+       *   Get content of buffer.
+       *   @param buf used only to signal
+       *       the character type and that
+       *       the embedded stream was not used.
+       */
+      const std::wstring& str(WideMessageBuffer& buf);
+
+      /**
+       *   Get content of buffer.
+       *   @param os used only to signal 
+       *       the character type and that
+       *       the embedded stream was used.
+       */
+      const std::wstring& str(std::basic_ostream<wchar_t>& os);
+        
+#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
+      /**
+       *   Get content of buffer.
+       *   @param buf used only to signal
+       *       the character type and that
+       *       the embedded stream was not used.
+       */
+      const std::basic_string<UniChar>& str(UniCharMessageBuffer& buf);
+
+      /**
+       *   Get content of buffer.
+       *   @param os used only to signal 
+       *       the character type and that
+       *       the embedded stream was used.
+       */
+      const std::basic_string<UniChar>& str(UniCharMessageBuffer::uostream& os);
+#endif        
+
+        /**
+         *  Returns true if buffer has an encapsulated STL stream.
+         *  @return true if STL stream was created.
+         */
+        bool hasStream() const;
+
+   private:
+        /**
+         * Prevent use of default copy constructor.
+         */
+        MessageBuffer(const MessageBuffer&);
+        /**
+         *   Prevent use of default assignment operator.  
+         */
+        MessageBuffer& operator=(const MessageBuffer&);
+
+        /**
+         *  Character message buffer.
+         */
+        CharMessageBuffer cbuf;
+
+        /**
+         * Encapsulated wide message buffer, created on demand.
+         */
+        WideMessageBuffer* wbuf;        
+#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
+        /**
+         * Encapsulated wide message buffer, created on demand.
+         */
+        UniCharMessageBuffer* ubuf;        
+#endif        
+   };
+
+template<class V>
+std::ostream& operator<<(MessageBuffer& os, const V& val) {
+   return ((std::ostream&) os) << val;
+}
+
+#if LOG4CXX_LOGCHAR_IS_UTF8
+typedef CharMessageBuffer LogCharMessageBuffer;
+#endif
+
+#if LOG4CXX_LOGCHAR_IS_WCHAR
+typedef WideMessageBuffer LogCharMessageBuffer;
+#endif
+
+#if LOG4CXX_LOGCHAR_IS_UNICHAR
+typedef UniCharMessageBuffer LogCharMessageBuffer;
+#endif
+
+#else
+typedef CharMessageBuffer MessageBuffer;
+typedef CharMessageBuffer LogCharMessageBuffer;
+#endif
+
+}}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/mutex.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/mutex.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/mutex.h	(revision 257)
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_MUTEX_H
+#define _LOG4CXX_HELPERS_MUTEX_H
+
+#include <log4cxx/log4cxx.h>
+
+extern "C" {
+   struct apr_thread_mutex_t;
+   struct apr_pool_t;
+}
+
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class Pool;
+
+                class LOG4CXX_EXPORT Mutex
+                {
+                public:
+                        Mutex(log4cxx::helpers::Pool& p);
+                        Mutex(apr_pool_t* p);
+                        ~Mutex();
+                        apr_thread_mutex_t* getAPRMutex() const;
+
+                private:
+                        Mutex(const Mutex&);
+                        Mutex& operator=(const Mutex&);
+                        apr_thread_mutex_t* mutex;
+                };
+        } // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_MUTEX_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/object.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/object.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/object.h	(revision 257)
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_OBJECT_H
+#define _LOG4CXX_HELPERS_OBJECT_H
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/class.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/classregistration.h>
+
+
+#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)\
+public:\
+class Clazz##object : public helpers::Class\
+{\
+public:\
+        Clazz##object() : helpers::Class() {}\
+        virtual ~Clazz##object() {}\
+        virtual log4cxx::LogString getName() const { return LOG4CXX_STR(#object); } \
+};\
+virtual const helpers::Class& getClass() const;\
+static const helpers::Class& getStaticClass(); \
+static const log4cxx::helpers::ClassRegistration& registerClass();
+
+#define DECLARE_LOG4CXX_OBJECT(object)\
+public:\
+class Clazz##object : public helpers::Class\
+{\
+public:\
+        Clazz##object() : helpers::Class() {}\
+        virtual ~Clazz##object() {}\
+        virtual log4cxx::LogString getName() const { return LOG4CXX_STR(#object); } \
+        virtual helpers::ObjectPtr newInstance() const\
+        {\
+                return new object();\
+        }\
+};\
+virtual const helpers::Class& getClass() const;\
+static const helpers::Class& getStaticClass(); \
+static const log4cxx::helpers::ClassRegistration& registerClass();
+
+#define DECLARE_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(object, class)\
+public:\
+virtual const helpers::Class& getClass() const;\
+static const helpers::Class& getStaticClass();\
+static const log4cxx::helpers::ClassRegistration&  registerClass();
+
+#define IMPLEMENT_LOG4CXX_OBJECT(object)\
+const log4cxx::helpers::Class& object::getClass() const { return getStaticClass(); }\
+const log4cxx::helpers::Class& object::getStaticClass() { \
+   static Clazz##object theClass;                         \
+   return theClass;                                       \
+}                                                                      \
+const log4cxx::helpers::ClassRegistration& object::registerClass() {   \
+    static log4cxx::helpers::ClassRegistration classReg(object::getStaticClass); \
+    return classReg; \
+}\
+namespace log4cxx { namespace classes { \
+const log4cxx::helpers::ClassRegistration& object##Registration = object::registerClass(); \
+} }
+
+
+#define IMPLEMENT_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(object, class)\
+const log4cxx::helpers::Class& object::getClass() const { return getStaticClass(); }\
+const log4cxx::helpers::Class& object::getStaticClass() { \
+   static class theClass;                                 \
+   return theClass;                                       \
+}                                                         \
+const log4cxx::helpers::ClassRegistration& object::registerClass() {   \
+    static log4cxx::helpers::ClassRegistration classReg(object::getStaticClass); \
+    return classReg; \
+}\
+namespace log4cxx { namespace classes { \
+const log4cxx::helpers::ClassRegistration& object##Registration = object::registerClass(); \
+} }
+
+namespace log4cxx
+{
+        class AppenderSkeleton;
+        class Logger;
+
+        namespace helpers
+        {
+            class Pool;
+
+                /** base class for java-like objects.*/
+                class LOG4CXX_EXPORT Object
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(Object)
+                        virtual ~Object() {}
+                        virtual void addRef() const = 0;
+                        virtual void releaseRef() const = 0;
+                        virtual bool instanceof(const Class& clazz) const = 0;
+                        virtual const void * cast(const Class& clazz) const = 0;
+                };
+            LOG4CXX_PTR_DEF(Object);
+        }
+}
+
+#define BEGIN_LOG4CXX_CAST_MAP()\
+const void * cast(const helpers::Class& clazz) const\
+{\
+        const void * object = 0;\
+        if (&clazz == &helpers::Object::getStaticClass()) return (const helpers::Object *)this;
+
+#define END_LOG4CXX_CAST_MAP()\
+        return object;\
+}\
+bool instanceof(const helpers::Class& clazz) const\
+{ return cast(clazz) != 0; }
+
+#define LOG4CXX_CAST_ENTRY(Interface)\
+if (&clazz == &Interface::getStaticClass()) return (const Interface *)this;
+
+#define LOG4CXX_CAST_ENTRY2(Interface, interface2)\
+if (&clazz == &Interface::getStaticClass()) return (Interface *)(interface2 *)this;
+
+#define LOG4CXX_CAST_ENTRY_CHAIN(Interface)\
+object = Interface::cast(clazz);\
+if (object != 0) return object;
+
+#endif //_LOG4CXX_HELPERS_OBJECT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectimpl.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectimpl.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectimpl.h	(revision 257)
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_OBJECT_IMPL_H
+#define _LOG4CXX_HELPERS_OBJECT_IMPL_H
+
+#include <log4cxx/helpers/object.h>
+
+namespace log4cxx
+{
+   namespace helpers
+   {
+      /** Implementation class for Object.*/
+      class LOG4CXX_EXPORT ObjectImpl : public virtual Object
+      {
+      public:
+         ObjectImpl();
+         virtual ~ObjectImpl();
+         void addRef() const;
+         void releaseRef() const;
+
+      protected:
+         mutable unsigned int volatile ref;
+
+        private:
+                        //
+            //   prevent object copy and assignment
+            //
+            ObjectImpl(const ObjectImpl&);
+            ObjectImpl& operator=(const ObjectImpl&);
+      };
+   }
+}
+
+#endif //_LOG4CXX_HELPERS_OBJECT_IMPL_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectoutputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectoutputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectoutputstream.h	(revision 257)
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_OBJECTOUTPUTSTREAM_H
+#define _LOG4CXX_HELPERS_OBJECTOUTPUTSTREAM_H
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/mdc.h>
+#include <log4cxx/helpers/outputstream.h>
+#include <log4cxx/helpers/charsetencoder.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+          *  Emulates java serialization.
+          */
+          class LOG4CXX_EXPORT ObjectOutputStream : public ObjectImpl
+          {
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(ObjectOutputStream)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(ObjectOutputStream)
+                  END_LOG4CXX_CAST_MAP()
+
+                  ObjectOutputStream(OutputStreamPtr os, Pool& p);
+                  virtual ~ObjectOutputStream();
+
+                  void close(Pool& p);
+                  void flush(Pool& p);
+                  void writeObject(const LogString&, Pool& p);
+                  void writeUTFString(const std::string&, 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 writeProlog(const char* className,
+                        int classDescIncrement,
+                        char* bytes,
+                        size_t len,
+                        Pool& p);
+                  void writeNull(Pool& p);
+
+                  enum { STREAM_MAGIC = 0xACED };
+                  enum { STREAM_VERSION = 5 };
+                  enum { TC_NULL = 0x70,
+                         TC_REFERENCE = 0x71,
+                         TC_CLASSDESC = 0x72,
+                         TC_OBJECT = 0x73,
+                         TC_STRING = 0x74,
+                         TC_ARRAY = 0x75,
+                         TC_CLASS = 0x76,
+                         TC_BLOCKDATA = 0x77,
+                         TC_ENDBLOCKDATA = 0x78 };
+                 enum {
+                     SC_WRITE_METHOD = 0x01,
+                     SC_SERIALIZABLE = 0x02 };
+
+                  void writeByte(char val, Pool& p);
+                  void writeBytes(const char* bytes, size_t len, Pool& p);
+
+          private:
+                  ObjectOutputStream(const ObjectOutputStream&);
+                  ObjectOutputStream& operator=(const ObjectOutputStream&);
+                     
+                  OutputStreamPtr os;
+                  log4cxx::helpers::CharsetEncoderPtr utf8Encoder;
+                  unsigned int objectHandle;
+                  typedef std::map<std::string, unsigned int> ClassDescriptionMap;
+                  ClassDescriptionMap* classDescriptions;
+          };
+          
+          LOG4CXX_PTR_DEF(ObjectOutputStream);          
+
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_OUTPUTSTREAM_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectptr.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectptr.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/objectptr.h	(revision 257)
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_OBJECT_PTR_H
+#define _LOG4CXX_HELPERS_OBJECT_PTR_H
+
+#include <log4cxx/log4cxx.h>
+
+//
+//   Helgrind (race detection tool for Valgrind) will complain if pointer
+//   is not initialized in an atomic operation.  Static analysis tools
+//   (gcc's -Weffc++, for example) will complain if pointer is not initialized
+//   in member initialization list.  The use of a macro allows quick
+//   switching between the initialization styles.
+//
+#if LOG4CXX_HELGRIND
+#define _LOG4CXX_OBJECTPTR_INIT(x) { exchange(x); 
+#else
+#define _LOG4CXX_OBJECTPTR_INIT(x) : p(x) {
+#endif
+
+namespace log4cxx
+{
+    namespace helpers
+    {
+      class Class;
+
+        class LOG4CXX_EXPORT ObjectPtrBase {
+        public:
+         ObjectPtrBase();
+         virtual ~ObjectPtrBase();
+            static void checkNull(const int& null);
+            static void* exchange(void** destination, void* newValue);
+         virtual void* cast(const Class& cls) const = 0;
+        };
+
+
+      /** smart pointer to a Object descendant */
+        template<typename T> class ObjectPtrT : public ObjectPtrBase
+        {
+        public:
+         ObjectPtrT(const int& null) 
+                _LOG4CXX_OBJECTPTR_INIT(0)
+                ObjectPtrBase::checkNull(null);
+         }
+
+         ObjectPtrT()
+                _LOG4CXX_OBJECTPTR_INIT(0)
+         }
+
+         ObjectPtrT(T * p1)
+                _LOG4CXX_OBJECTPTR_INIT(p1)
+                if (this->p != 0)
+                {
+                    this->p->addRef();
+                }
+            }
+
+
+         ObjectPtrT(const ObjectPtrT& p1)
+                _LOG4CXX_OBJECTPTR_INIT(p1.p)
+                if (this->p != 0)
+                {
+                    this->p->addRef();
+                }
+            }
+
+       ObjectPtrT(const ObjectPtrBase& p1) 
+          _LOG4CXX_OBJECTPTR_INIT(reinterpret_cast<T*>(p1.cast(T::getStaticClass())))
+             if (this->p != 0) {
+                    this->p->addRef();
+             }
+       }
+
+       ObjectPtrT(ObjectPtrBase& p1) 
+          _LOG4CXX_OBJECTPTR_INIT(reinterpret_cast<T*>(p1.cast(T::getStaticClass())))
+             if (this->p != 0) {
+                    this->p->addRef();
+             }
+       }
+
+
+            ~ObjectPtrT()
+            {
+              if (p != 0) {
+                  p->releaseRef();
+              }
+            }
+
+         ObjectPtrT& operator=(const ObjectPtrT& p1) {
+             T* newPtr = p1.p;
+             if (newPtr != 0) {
+                 newPtr->addRef();
+             }
+             T* oldPtr = exchange(newPtr);
+             if (oldPtr != 0) {
+                 oldPtr->releaseRef();
+             }
+            return *this;
+         }
+
+         ObjectPtrT& operator=(const int& null) //throw(IllegalArgumentException)
+         {
+                //
+                //   throws IllegalArgumentException if null != 0
+                //
+                ObjectPtrBase::checkNull(null);
+                T* oldPtr = exchange(0);
+                if (oldPtr != 0) {
+                   oldPtr->releaseRef();
+                }
+                return *this;
+         }
+
+         ObjectPtrT& operator=(T* p1) {
+              if (p1 != 0) {
+                p1->addRef();
+              }
+              T* oldPtr = exchange(p1);
+              if (oldPtr != 0) {
+                 oldPtr->releaseRef();
+              }
+              return *this;
+            }
+
+
+      ObjectPtrT& operator=(ObjectPtrBase& p1) {
+         T* newPtr = reinterpret_cast<T*>(p1.cast(T::getStaticClass()));
+         return operator=(newPtr);
+      }
+
+      ObjectPtrT& operator=(const ObjectPtrBase& p1) {
+         T* newPtr = reinterpret_cast<T*>(p1.cast(T::getStaticClass()));
+         return operator=(newPtr);
+      }
+
+            bool operator==(const ObjectPtrT& p1) const { return (this->p == p1.p); }
+            bool operator!=(const ObjectPtrT& p1) const { return (this->p != p1.p); }
+         bool operator<(const ObjectPtrT& p1) const { return (this->p < p1.p); } 
+            bool operator==(const T* p1) const { return (this->p == p1); }
+            bool operator!=(const T* p1) const { return (this->p != p1); }
+         bool operator<(const T* p1) const { return (this->p < p1); } 
+            T* operator->() const {return p; }
+            T& operator*() const {return *p; }
+            operator T*() const {return p; }
+
+
+
+        private:
+            T * p;
+         virtual void* cast(const Class& cls) const {
+            if (p != 0) {
+               return const_cast<void*>(p->cast(cls));
+            }
+            return 0;
+         }
+       T* exchange(const T* newValue) {
+             return static_cast<T*>(ObjectPtrBase::exchange(
+                 reinterpret_cast<void**>(&p), 
+                 const_cast<T*>(newValue)));
+       }
+
+        };
+
+
+    }
+}
+
+#endif //_LOG4CXX_HELPERS_OBJECT_PTR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/onlyonceerrorhandler.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/onlyonceerrorhandler.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/onlyonceerrorhandler.h	(revision 257)
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_ONLY_ONCE_ERROR_HANDLER_H
+#define _LOG4CXX_HELPERS_ONLY_ONCE_ERROR_HANDLER_H
+
+#include <log4cxx/spi/errorhandler.h>
+#include <log4cxx/helpers/objectimpl.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                The <code>OnlyOnceErrorHandler</code> implements log4cxx's default
+                error handling policy which consists of emitting a message for the
+                first error in an appender and ignoring all following errors.
+
+                <p>The error message is printed on <code>System.err</code>.
+
+                <p>This policy aims at protecting an otherwise working application
+                from being flooded with error messages when logging fails
+                */
+                class LOG4CXX_EXPORT OnlyOnceErrorHandler :
+                        public virtual spi::ErrorHandler,
+                        public virtual ObjectImpl
+                {
+                private:
+                        LogString WARN_PREFIX;
+                        LogString ERROR_PREFIX;
+                        mutable bool firstTime;
+
+                public:
+                        DECLARE_LOG4CXX_OBJECT(OnlyOnceErrorHandler)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(spi::OptionHandler)
+                                LOG4CXX_CAST_ENTRY(spi::ErrorHandler)
+                        END_LOG4CXX_CAST_MAP()
+
+                        OnlyOnceErrorHandler();
+                        void addRef() const;
+                        void releaseRef() const;
+
+                        /**
+                         Does not do anything.
+                         */
+                        void setLogger(const LoggerPtr& logger);
+
+
+            /**
+            No options to activate.
+            */
+            void activateOptions(log4cxx::helpers::Pool& p);
+            void setOption(const LogString& option, const LogString& value);
+
+
+            /**
+            Prints the message and the stack trace of the exception on
+            <code>System.err</code>.  */
+            void error(const LogString& message, const std::exception& e,
+                                int errorCode) const;
+            /**
+            Prints the message and the stack trace of the exception on
+            <code>System.err</code>.
+            */
+            void error(const LogString& message, const std::exception& e,
+                                int errorCode, const spi::LoggingEventPtr& event) const;
+
+            /**
+            Print a the error message passed as parameter on
+            <code>System.err</code>.
+            */
+             void error(const LogString& message) const;
+
+            /**
+            Does not do anything.
+            */
+            void setAppender(const AppenderPtr& appender);
+
+            /**
+            Does not do anything.
+            */
+            void setBackupAppender(const AppenderPtr& appender);
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_ONLY_ONCE_ERROR_HANDLER_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/optionconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/optionconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/optionconverter.h	(revision 257)
@@ -0,0 +1,164 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPER_OPTION_CONVERTER_H
+#define _LOG4CXX_HELPER_OPTION_CONVERTER_H
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/objectptr.h>
+
+namespace log4cxx
+{
+        class Level;
+        class File;
+        typedef helpers::ObjectPtrT<Level> LevelPtr;
+
+        namespace spi
+        {
+                class LoggerRepository;
+                typedef helpers::ObjectPtrT<LoggerRepository> LoggerRepositoryPtr;
+        }
+
+        namespace helpers
+        {
+                class Properties;
+
+                class Object;
+                typedef ObjectPtrT<Object> ObjectPtr;
+
+                class Class;
+
+                /** A convenience class to convert property values to specific types.*/
+                class LOG4CXX_EXPORT OptionConverter
+                {
+                /** OptionConverter is a static class. */
+                private:
+                        OptionConverter() {}
+
+                public:
+                        static LogString convertSpecialChars(const LogString& s);
+
+                        /**
+                        If <code>value</code> is "true", then <code>true</code> is
+                        returned. If <code>value</code> is "false", then
+                        <code>true</code> is returned. Otherwise, <code>default</code> is
+                        returned.
+
+                        <p>Case of value is unimportant.
+                        */
+                        static bool toBoolean(const LogString& value, bool dEfault);
+                        static int toInt(const LogString& value, int dEfault);
+                        static long toFileSize(const LogString& value, long dEfault);
+                        static LevelPtr toLevel(const LogString& value,
+                                const LevelPtr& defaultValue);
+
+                        /**
+                Find the value corresponding to <code>key</code> in
+                <code>props</code>. Then perform variable substitution on the
+                found value.
+                        */
+                        static LogString findAndSubst(const LogString& key, Properties& props);
+
+/**
+Perform variable substitution in string <code>val</code> from the
+values of keys found in the system propeties.
+
+<p>The variable substitution delimeters are <b>${</b> and <b>}</b>.
+
+<p>For example, if the System properties contains "key=value", then
+the call
+<pre>
+String s = OptionConverter.substituteVars("Value of key is ${key}.");
+</pre>
+
+will set the variable <code>s</code> to "Value of key is value.".
+
+<p>If no value could be found for the specified key, then the
+<code>props</code> parameter is searched, if the value could not
+be found there, then substitution defaults to the empty string.
+
+<p>For example, if system propeties contains no value for the key
+"inexistentKey", then the call
+
+<pre>
+String s = OptionConverter.subsVars("Value of inexistentKey is [${inexistentKey}]");
+</pre>
+will set <code>s</code> to "Value of inexistentKey is []"
+
+<p>An IllegalArgumentException is thrown if
+<code>val</code> contains a start delimeter "${" which is not
+balanced by a stop delimeter "}". </p>
+
+@param val The string on which variable substitution is performed.
+@param props The properties from which variable substitution is performed.
+@throws IllegalArgumentException if <code>val</code> is malformed.
+*/
+                        static LogString substVars(const LogString& val, Properties& props);
+
+                        /**
+                         *  Gets the specified system property.  
+                        @param key The key to search for.
+                        @param def The default value to return.
+                        @return the string value of the system property, or the default
+                        value if there is no property with that key.
+                        */
+                        static LogString getSystemProperty(const LogString& key, const LogString& def);
+
+                        /**
+                        Instantiate an object given a class name. Check that the
+                        <code>className</code> is a subclass of
+                        <code>superClass</code>. If that test fails or the object could
+                        not be instantiated, then <code>defaultValue</code> is returned.
+
+                        @param className The fully qualified class name of the object to instantiate.
+                        @param superClass The class to which the new object should belong.
+                        @param defaultValue The object to return in case of non-fulfillment
+                        */
+                        static ObjectPtr instantiateByClassName(const LogString& className,
+                                const Class& superClass, const ObjectPtr& defaultValue);
+
+                        static ObjectPtr instantiateByKey(Properties& props,
+                                const LogString& key, const Class& superClass,
+                                const ObjectPtr& defaultValue);
+
+                        /**
+                        Configure log4cxx given a configFileName.
+
+                        <p>The configFileName must point to a file which will be
+                        interpreted by a new instance of a log4cxx configurator.
+
+                        <p>All configurations steps are taken on the
+                        <code>hierarchy</code> passed as a parameter.
+
+                        <p>
+                        @param configFileName The location of the configuration file.
+                        @param clazz The classname, of the log4cxx configurator which
+                        will parse the file <code>configFileName</code>. This must be
+                        a subclass of Configurator, or null. If this value is null then
+                        a default configurator of PropertyConfigurator is used, unless the
+                        filename pointed to by <code>configFileName</code> ends in '.xml',
+                        in which case DOMConfigurator is used.
+                        @param hierarchy The Hierarchy to act on.
+                        */
+                        static void selectAndConfigure(const File& configFileName,
+                                const LogString& clazz, spi::LoggerRepositoryPtr& hierarchy);
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPER_OPTION_CONVERTER_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/outputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/outputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/outputstream.h	(revision 257)
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_OUTPUTSTREAM_H
+#define _LOG4CXX_HELPERS_OUTPUTSTREAM_H
+
+#include <log4cxx/helpers/objectimpl.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+          class ByteBuffer;
+
+          /**
+          *   Abstract class for writing to character streams.
+          */
+          class LOG4CXX_EXPORT OutputStream : public ObjectImpl
+          {
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(OutputStream)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(OutputStream)
+                  END_LOG4CXX_CAST_MAP()
+
+          protected:
+                  OutputStream();
+                  virtual ~OutputStream();
+
+          public:
+                  virtual void close(Pool& p) = 0;
+                  virtual void flush(Pool& p) = 0;
+                  virtual void write(ByteBuffer& buf, Pool& p) = 0;
+
+          private:
+                  OutputStream(const OutputStream&);
+                  OutputStream& operator=(const OutputStream&);
+          };
+
+          LOG4CXX_PTR_DEF(OutputStream);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_OUTPUTSTREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/outputstreamwriter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/outputstreamwriter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/outputstreamwriter.h	(revision 257)
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_OUTPUTSTREAMWRITER_H
+#define _LOG4CXX_HELPERS_OUTPUTSTREAMWRITER_H
+
+#include <log4cxx/helpers/writer.h>
+#include <log4cxx/helpers/outputstream.h>
+#include <log4cxx/helpers/charsetencoder.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+          *   Abstract class for writing to character streams.
+          */
+          class LOG4CXX_EXPORT OutputStreamWriter : public Writer
+          {
+          private:
+                  OutputStreamPtr out;
+                  CharsetEncoderPtr enc;
+
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(OutputStreamWriter)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(OutputStreamWriter)
+                          LOG4CXX_CAST_ENTRY_CHAIN(Writer)
+                  END_LOG4CXX_CAST_MAP()
+
+                  OutputStreamWriter(OutputStreamPtr& out);
+                  OutputStreamWriter(OutputStreamPtr& out, CharsetEncoderPtr &enc);
+                  ~OutputStreamWriter();
+
+                  virtual void close(Pool& p);
+                  virtual void flush(Pool& p);
+                  virtual void write(const LogString& str, Pool& p);
+                  LogString getEncoding() const;
+
+          private:
+                  OutputStreamWriter(const OutputStreamWriter&);
+                  OutputStreamWriter& operator=(const OutputStreamWriter&);
+          };
+
+          LOG4CXX_PTR_DEF(OutputStreamWriter);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_OUTPUTSTREAMWRITER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/pool.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/pool.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/pool.h	(revision 257)
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_POOL_H
+#define _LOG4CXX_HELPERS_POOL_H
+
+#include <log4cxx/log4cxx.h>
+#include <string>
+
+extern "C" {
+   struct apr_pool_t;
+}
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class LOG4CXX_EXPORT Pool
+                {
+                public:
+                        Pool();
+                        Pool(apr_pool_t* pool, bool release);
+                        ~Pool();
+
+                        apr_pool_t* getAPRPool();
+                        apr_pool_t* create();
+                        void* palloc(size_t length);
+                        char* pstralloc(size_t length);
+                        char* itoa(int n);
+                        char* pstrndup(const char* s, size_t len);
+                        char* pstrdup(const char*s);
+                        char* pstrdup(const std::string&);
+
+                protected:
+                        apr_pool_t* pool;
+                        const bool release;
+
+                private:
+                        Pool(const log4cxx::helpers::Pool&);
+                        Pool& operator=(const Pool&);
+                };
+        } // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_POOL_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/properties.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/properties.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/properties.h	(revision 257)
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPER_PROPERTIES_H
+#define _LOG4CXX_HELPER_PROPERTIES_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/inputstream.h>
+#include <map>
+#include <vector>
+#include <istream>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class LOG4CXX_EXPORT Properties
+                {
+                private:
+                        typedef std::map<LogString, LogString> PropertyMap;
+                        PropertyMap* properties;
+                        Properties(const Properties&);
+                        Properties& operator=(const Properties&);
+
+                public:
+                        /**
+                         *  Create new instance.
+                         */
+                        Properties();
+                        /**
+                         * Destructor.
+                         */
+                        ~Properties();
+                        /**
+                        Reads a property list (key and element pairs) from the input stream.
+                        The stream is assumed to be using the ISO 8859-1 character encoding.
+
+                        <p>Every property occupies one line of the input stream.
+                        Each line is terminated by a line terminator (<code>\\n</code> or
+                        <code>\\r</code> or <code>\\r\\n</code>).
+                        Lines from the input stream are processed until end of file is reached
+                        on the input stream.
+
+                        <p>A line that contains only whitespace or whose first non-whitespace
+                        character is an ASCII <code>#</code> or <code>!</code> is ignored
+                        (thus, <code>#</code> or <code>!</code> indicate comment lines).
+
+                        <p>Every line other than a blank line or a comment line describes one
+                        property to be added to the table (except that if a line ends with \,
+                        then the following line, if it exists, is treated as a continuation
+                        line, as described below). The key consists of all the characters in
+                        the line starting with the first non-whitespace character and up to,
+                        but   not including, the first ASCII <code>=</code>, <code>:</code>,
+                        or whitespace character. All of the
+                        key termination characters may be included in the key by preceding them
+                        with a <code>\\</code>. Any whitespace after the key is skipped;
+                        if the first
+                        non-whitespace character after the key is <code>=</code> or
+                        <code>:</code>, then it is ignored
+                        and any whitespace characters after it are also skipped. All remaining
+                        characters on the line become part of the associated element string.
+                        Within the element string, the ASCII escape sequences <code>\\t</code>,
+                        <code>\\n</code>, <code>\\r</code>, <code>\\</code>, <code>\\"</code>,
+                        <code>\\'</code>, <code>\\</code> (a backslash and a space), and
+                        <code>\\uxxxx</code> are recognized
+                        and converted to single characters. Moreover, if the last character on
+                        the line is <code>\\</code>, then the next line is treated as a
+                        continuation of the
+                        current line; the <code>\\</code> and line terminator are simply
+                        discarded, and any
+                        leading whitespace characters on the continuation line are also
+                        discarded and are not part of the element string.
+
+                        <p>As an example, each of the following four lines specifies the key
+                        "Truth" and the associated element value "Beauty":
+
+                        <pre>
+ Truth = Beauty
+        Truth:Beauty
+ Truth         :Beauty
+                        </pre>
+
+                As another example, the following three lines specify a single
+                        property:
+                        <pre>
+ fruits           apple, banana, pear, \
+                                  cantaloupe, watermelon, \
+                                  kiwi, mango
+                        </pre>
+                        The key is "<code>fruits</code>" and the associated element is:
+                        <pre>
+"apple, banana, pear, cantaloupe, watermelon, kiwi, mango"
+                        </pre>
+                        Note that a space appears before each \ so that a space will appear
+                        after each comma in the final result; the \, line terminator, and
+                        leading whitespace on the continuation line are merely discarded and are
+                        not replaced by one or more other characters.
+
+                <p>As a third example, the line:
+                        <pre>
+cheeses
+                        </pre>
+                        specifies that the key is "<code>cheeses</code>" and the associated
+                        element is the empty string.
+
+                    @param inStream the input stream.
+
+                        @throw IOException if an error occurred when reading from the input
+                        stream.
+                        */
+                        void load(InputStreamPtr inStream);
+
+                        /**
+                         *  Calls Properties::put.
+                         *   @param key the key to be placed into this property list.
+                         *   @param value the value corresponding to key.
+                         *   @return the previous value of the specified key in this
+                         *   property list, or an empty string if it did not have one.
+                        */
+                        LogString setProperty(const LogString& key, const LogString& value);
+                        /**
+                         *  Puts a property value into the collection.
+                         *   @param key the key to be placed into this property list.
+                         *   @param value the value corresponding to key.
+                         *   @return the previous value of the specified key in this
+                         *   property list, or an empty string if it did not have one.
+                        */
+                        LogString put(const LogString& key, const LogString& value);
+
+
+                        /**
+                         * Calls Properties::get.
+                         * @param key the property key.
+                         * @return the value in this property list with the specified
+                         *   key value or empty string.
+                        */
+                        LogString getProperty(const LogString& key) const;
+                        /**
+                         * Gets a property value.
+                         * @param key the property key.
+                         * @return the value in this property list with the specified
+                         *   key value or empty string.
+                        */
+                        LogString get(const LogString& key) const;
+
+                        /**
+                        Returns an enumeration of all the keys in this property list,
+                        including distinct keys in the default property list if a key
+                        of the same name has not already been found from the main
+                        properties list.
+                        @return an array of all the keys in this
+                        property list, including the keys in the default property list.
+                        */
+                        std::vector<LogString> propertyNames() const;
+                }; // class Properties
+        }  // namespace helpers
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+
+#endif //_LOG4CXX_HELPER_PROPERTIES_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/propertyresourcebundle.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/propertyresourcebundle.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/propertyresourcebundle.h	(revision 257)
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_PROPERTY_RESOURCE_BUNDLE_H
+#define _LOG4CXX_HELPERS_PROPERTY_RESOURCE_BUNDLE_H
+
+#include <log4cxx/helpers/resourcebundle.h>
+#include <log4cxx/helpers/properties.h>
+#include <log4cxx/helpers/inputstream.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+
+                /**
+                PropertyResourceBundle is a concrete subclass of ResourceBundle that
+                manages resources for a locale using a set of static strings from a
+                property file.
+                */
+                class LOG4CXX_EXPORT PropertyResourceBundle : public ResourceBundle
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(PropertyResourceBundle)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(PropertyResourceBundle)
+                                LOG4CXX_CAST_ENTRY_CHAIN(ResourceBundle)
+                        END_LOG4CXX_CAST_MAP()
+
+                        /**
+                        Creates a property resource bundle.
+                        @param inStream property file to read from.
+                        @throw IOException if an error occurred when reading from the
+                        input stream.
+                        */
+                        PropertyResourceBundle(InputStreamPtr inStream);
+
+                        virtual LogString getString(const LogString& key) const;
+
+                protected:
+                        Properties properties;
+                }; // class PropertyResourceBundle
+            LOG4CXX_PTR_DEF(PropertyResourceBundle);
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_PROPERTY_RESOURCE_BUNDLE_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/reader.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/reader.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/reader.h	(revision 257)
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_READER_H
+#define _LOG4CXX_HELPERS_READER_H
+
+#include <log4cxx/helpers/objectimpl.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+           * Abstract class for reading from character streams.
+           * 
+           */
+          class LOG4CXX_EXPORT Reader : public ObjectImpl
+          {
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(Reader)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(Reader)
+                  END_LOG4CXX_CAST_MAP()
+
+          protected:
+                  /**
+                   * Creates a new character-stream reader.
+                   */
+                  Reader();
+
+                  virtual ~Reader();
+
+          public:
+                  /**
+                   * Closes the stream.
+                   * @param p The memory pool associated with the reader.
+                   */
+                  virtual void close(Pool& p) = 0;
+
+                  /**
+                   * @return The complete stream contents as a LogString.
+                   * @param p The memory pool associated with the reader.
+                   */
+                  virtual LogString read(Pool& p) = 0;
+
+          private:
+                  Reader(const Reader&);
+
+                  Reader& operator=(const Reader&);
+          };
+
+          LOG4CXX_PTR_DEF(Reader);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_READER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/relativetimedateformat.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/relativetimedateformat.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/relativetimedateformat.h	(revision 257)
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_RELATIVE_TIME_DATE_FORMAT_H
+#define _LOG4CXX_HELPERS_RELATIVE_TIME_DATE_FORMAT_H
+
+#include <log4cxx/helpers/dateformat.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                Formats a date by printing the number of seconds
+                elapsed since the start of the application. This is the fastest
+                printing DateFormat in the package.
+                */
+                class LOG4CXX_EXPORT RelativeTimeDateFormat : public DateFormat
+                {
+                public:
+                        RelativeTimeDateFormat();
+                        virtual void format(LogString &s,
+                                        log4cxx_time_t tm,
+                                        log4cxx::helpers::Pool& p) const;
+
+                private:
+                        log4cxx_time_t startTime;
+
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_RELATIVE_TIME_DATE_FORMAT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/resourcebundle.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/resourcebundle.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/resourcebundle.h	(revision 257)
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_RESOURCE_BUNDLE_H
+#define _LOG4CXX_HELPERS_RESOURCE_BUNDLE_H
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/objectptr.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class Locale;
+
+                class ResourceBundle;
+                LOG4CXX_PTR_DEF(ResourceBundle);
+
+                /**
+                Resource bundles contain locale-specific objects
+                */
+                class LOG4CXX_EXPORT ResourceBundle : public ObjectImpl
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(ResourceBundle)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(ResourceBundle)
+                        END_LOG4CXX_CAST_MAP()
+
+                        /**
+                        Gets a string for the given key from this resource bundle or one of
+                        its parents. Calling this method is equivalent to calling
+
+                        @param key the key for the desired string
+                        @return the string for the given key
+                        @throw MissingResourceException - if no object for the given key
+                        can be found
+                        */
+                        virtual LogString getString(const LogString& key) const = 0;
+
+                        /**
+                        Gets a resource bundle using the specified base name and locale
+
+                        @param baseName the base name of the resource bundle, a fully
+                        qualified class name or property filename
+                        @param locale the locale for which a resource bundle is desired
+                        */
+                        static ResourceBundlePtr getBundle(const LogString& baseName,
+                                const Locale& locale);
+
+                protected:
+                        /*
+                        Sets the parent bundle of this bundle. The parent bundle is
+                        searched by #getString when this bundle does not contain a particular
+                        resource.
+
+                        Parameters:
+                        parent - this bundle's parent bundle.
+                        */
+                        inline void setParent(const ResourceBundlePtr& parent1)
+                                { this->parent = parent1; }
+
+                        /**
+                        The parent bundle of this bundle.
+
+                        The parent bundle is searched by #getString when this bundle does
+                        not contain a particular resource.
+                        */
+                        ResourceBundlePtr parent;
+                }; // class ResourceBundle
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/serversocket.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/serversocket.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/serversocket.h	(revision 257)
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_SERVER_SOCKET_H
+#define _LOG4CXX_HELPERS_SERVER_SOCKET_H
+
+#include <log4cxx/helpers/socket.h>
+#include <log4cxx/helpers/mutex.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class LOG4CXX_EXPORT ServerSocket
+                {
+                public:
+                        /**  Creates a server socket on a specified port.
+                        */
+                        ServerSocket(int port);
+
+                        virtual ~ServerSocket();
+
+                        /** Listens for a connection to be made to this socket and
+                        accepts it
+                        */
+                        SocketPtr accept();
+
+                        /** Closes this socket.
+                        */
+                        void close();
+
+                        /** Retrive setting for SO_TIMEOUT.
+                        */
+                        int getSoTimeout() const;
+
+                        /** Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.
+                        */
+                        void setSoTimeout(int timeout);
+                        
+                private:
+                        Pool pool;
+                        Mutex mutex;
+                        apr_socket_t* socket;
+                        int timeout;
+                        
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_SERVER_SOCKET_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/simpledateformat.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/simpledateformat.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/simpledateformat.h	(revision 257)
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_SIMPLE_DATE_FORMAT_H
+#define _LOG4CXX_HELPERS_SIMPLE_DATE_FORMAT_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+
+#include <log4cxx/helpers/dateformat.h>
+#include <vector>
+#include <time.h>
+
+namespace std { class locale; }
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+          namespace SimpleDateFormatImpl {
+            class PatternToken;
+        }
+          LOG4CXX_LIST_DEF(PatternTokenList, log4cxx::helpers::SimpleDateFormatImpl::PatternToken*);
+
+          /**
+           * Concrete class for formatting and parsing dates in a
+           * locale-sensitive manner.
+           */
+          class LOG4CXX_EXPORT SimpleDateFormat : public DateFormat
+          {
+          public:
+                  /**
+                   * Constructs a DateFormat using the given pattern and the default
+                   * time zone.
+                   *
+                   * @param pattern the pattern describing the date and time format
+                   */
+                  SimpleDateFormat(const LogString& pattern);
+                  SimpleDateFormat(const LogString& pattern, const std::locale* locale);
+                  ~SimpleDateFormat();
+
+                  virtual void format(LogString& s,
+                                      log4cxx_time_t tm,
+                                      log4cxx::helpers::Pool& p) const;
+
+                  /**
+                   * Set time zone.
+                   * @param zone new time zone.
+                   */
+                  void setTimeZone(const TimeZonePtr& zone);
+
+          private:
+                  /**
+                   * Time zone.
+                   */
+                  TimeZonePtr timeZone;
+
+                  /**
+                   * List of tokens.
+                   */
+                  
+                  PatternTokenList pattern;
+                  
+                  static void addToken(const logchar spec, const int repeat, const std::locale* locale, PatternTokenList& pattern);
+                  static void parsePattern(const LogString& spec, const std::locale* locale, PatternTokenList& pattern);
+          };
+
+
+        }  // namespace helpers
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+
+#endif // _LOG4CXX_HELPERS_SIMPLE_DATE_FORMAT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/socket.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/socket.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/socket.h	(revision 257)
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_SOCKET_H
+#define _LOG4CXX_HELPERS_SOCKET_H
+
+extern "C" {
+   struct apr_socket_t;
+}
+
+
+#include <log4cxx/helpers/inetaddress.h>
+#include <log4cxx/helpers/pool.h>
+
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class ByteBuffer;                
+                /**
+                <p>This class implements client sockets (also called just "sockets"). A socket
+                is an endpoint for communication between two machines.
+                <p>The actual work of the socket is performed by an instance of the SocketImpl
+                class. An application, by changing the socket factory that creates the socket
+                implementation, can configure itself to create sockets appropriate to the
+                local firewall.
+                */
+                class LOG4CXX_EXPORT Socket : public helpers::ObjectImpl
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(Socket)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(Socket)
+                        END_LOG4CXX_CAST_MAP()
+
+                        /** Creates a stream socket and connects it to the specified port
+                        number at the specified IP address.
+                        */
+                        Socket(InetAddressPtr& address, int port);
+                        Socket(apr_socket_t* socket, apr_pool_t* pool);
+                        ~Socket();
+
+                        size_t write(ByteBuffer&);
+
+                        /** Closes this socket. */
+                        void close();
+                                
+                        /** Returns the value of this socket's address field. */
+                        InetAddressPtr getInetAddress() const;
+
+                        /** Returns the value of this socket's port field. */
+                        int getPort() const;
+                private:
+                        Socket(const Socket&);
+                        Socket& operator=(const Socket&);
+                        
+                        Pool pool;
+                        
+                        apr_socket_t* socket;
+
+
+                       /** The IP address of the remote end of this socket. */
+                        InetAddressPtr address;
+
+                        /** The port number on the remote host to which
+                        this socket is connected. */
+                        int port;
+                };
+                
+                LOG4CXX_PTR_DEF(Socket);
+                
+        } // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_SOCKET_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/socketoutputstream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/socketoutputstream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/socketoutputstream.h	(revision 257)
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H
+#define _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/outputstream.h>
+#include <log4cxx/helpers/socket.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+            LOG4CXX_LIST_DEF(ByteList, unsigned char);
+                        
+                class LOG4CXX_EXPORT SocketOutputStream : public OutputStream
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(SocketOutputStream)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(SocketOutputStream)
+                                LOG4CXX_CAST_ENTRY_CHAIN(OutputStream)
+                        END_LOG4CXX_CAST_MAP()
+
+                        SocketOutputStream(const SocketPtr& socket);
+                        ~SocketOutputStream();
+
+                        virtual void close(Pool& p);
+                        virtual void flush(Pool& p);
+                        virtual void write(ByteBuffer& buf, Pool& p);
+
+                private:
+                        ByteList array;
+                        SocketPtr socket;
+                       //
+                       //   prevent copy and assignment statements
+                       SocketOutputStream(const SocketOutputStream&);
+                       SocketOutputStream& operator=(const SocketOutputStream&);
+
+                };
+                
+                LOG4CXX_PTR_DEF(SocketOutputStream);
+                
+        }  // namespace helpers
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+
+#endif // _LOG4CXX_HELPERS_SOCKET_OUTPUT_STREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/strftimedateformat.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/strftimedateformat.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/strftimedateformat.h	(revision 257)
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_STRFTIME_DATE_FORMAT_H
+#define _LOG4CXX_HELPERS_STRFTIME_DATE_FORMAT_H
+
+#include <log4cxx/helpers/dateformat.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+
+          /**
+          Concrete class for formatting and parsing dates in a
+          locale-sensitive manner.
+
+          */
+          class LOG4CXX_EXPORT StrftimeDateFormat : public DateFormat
+          {
+          public:
+                  /**
+                  Constructs a DateFormat using the given pattern and the default
+                  time zone.
+
+                  @param pattern the pattern describing the date and time format
+                  */
+                  StrftimeDateFormat(const LogString& pattern);
+                  ~StrftimeDateFormat();
+
+                  virtual void format(LogString& s,
+                                      log4cxx_time_t tm,
+                                      log4cxx::helpers::Pool& p) const;
+
+                  /**
+                  *    Set time zone.
+                  * @param zone new time zone.
+                  */
+                  void setTimeZone(const TimeZonePtr& zone);
+
+
+          private:
+                  /**
+                  *    Time zone.
+                  */
+                  TimeZonePtr timeZone;
+                  std::string pattern;
+          };
+
+
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_STRFTIME_DATE_FORMAT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/strictmath.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/strictmath.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/strictmath.h	(revision 257)
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_STRICTMATH_H
+#define _LOG4CXX_HELPERS_STRICTMATH_H
+
+#include <log4cxx/log4cxx.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                The class StrictMath contains methods for performing basic numeric
+                operations
+                */
+                class StrictMath
+                {
+                public:
+                        template<typename _type> static inline const _type&
+                                minimum(const _type& a, const _type& b)
+                        {
+                                return (a < b) ? a : b;
+                        }
+
+                        template<typename _type> static inline const _type&
+                                maximum(const _type& a, const _type& b)
+                        {
+                                return (a > b) ? a : b;
+                        }
+                }; // class StrictMath
+        }  // namespace helpers
+} // namespace log4cx
+
+#endif //_LOG4CXX_HELPERS_STRICTMATH_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/stringhelper.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/stringhelper.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/stringhelper.h	(revision 257)
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_STRING_HELPER_H
+#define _LOG4CXX_HELPERS_STRING_HELPER_H
+
+#include <log4cxx/logstring.h>
+#include <vector>
+
+
+namespace log4cxx
+{
+    namespace helpers
+    {
+        class Pool;
+                /**
+                String manipulation routines
+                */
+        class LOG4CXX_EXPORT StringHelper
+        {
+           public:
+            static LogString trim(const LogString& s);
+            static bool startsWith(const LogString& s, const LogString& suffix);
+            static bool endsWith(const LogString& s, const LogString& suffix);
+            static bool equalsIgnoreCase(const LogString& s1,
+                 const logchar* upper, const logchar* lower);
+            static bool equalsIgnoreCase(const LogString& s1,
+                 const LogString& upper, const LogString& lower);
+
+
+            static int toInt(const LogString& s);
+            static log4cxx_int64_t toInt64(const LogString& s);
+
+            static void toString(int i, log4cxx::helpers::Pool& pool, LogString& dst);
+            static void toString(log4cxx_int64_t i, log4cxx::helpers::Pool& pool, LogString& dst);
+            static void toString(size_t i, log4cxx::helpers::Pool& pool, LogString& dst);
+
+            static void toString(bool val, LogString& dst);
+
+            static LogString toLowerCase(const LogString& s);
+
+            static LogString format(const LogString& pattern, const std::vector<LogString>& params);
+        };
+    }
+}
+
+#endif //_LOG4CXX_HELPERS_STRING_HELPER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/stringtokenizer.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/stringtokenizer.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/stringtokenizer.h	(revision 257)
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_STRING_TOKENIZER_H
+#define _LOG4CXX_HELPERS_STRING_TOKENIZER_H
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/exception.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class LOG4CXX_EXPORT StringTokenizer
+                {
+                public:
+                        StringTokenizer(const LogString& str, const LogString& delim);
+                        ~StringTokenizer();
+                        bool hasMoreTokens() const;
+                        LogString nextToken();
+
+                protected:
+                        LogString src;
+                        LogString delim;
+                        size_t pos;
+
+                private:
+                        //   prevent copy and assignment statements
+                        StringTokenizer(const StringTokenizer&);
+                        StringTokenizer& operator=(const StringTokenizer&);
+                }; // class StringTokenizer
+        }  // namespace helpers;
+} // namespace log4cxx;
+
+#endif //_LOG4CXX_HELPERS_STRING_TOKENIZER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/synchronized.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/synchronized.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/synchronized.h	(revision 257)
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_SYNCHRONIZED_H
+#define _LOG4CXX_HELPERS_SYNCHRONIZED_H
+#include <log4cxx/log4cxx.h>
+
+namespace log4cxx
+{
+        namespace helpers {
+                class Mutex;
+
+                /** utility class for objects multi-thread synchronization.*/
+                class LOG4CXX_EXPORT synchronized
+                {
+                public:
+                synchronized(const Mutex& mutex);
+                ~synchronized();
+
+
+                private:
+                void* mutex;
+                //  prevent use of copy and assignment
+                synchronized(const synchronized&);
+                synchronized& operator=(const synchronized&);
+                };
+        }
+}
+
+#endif //_LOG4CXX_HELPERS_SYNCHRONIZED_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/syslogwriter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/syslogwriter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/syslogwriter.h	(revision 257)
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SYSLOG_WRITER_H
+#define _LOG4CXX_SYSLOG_WRITER_H
+
+
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/inetaddress.h>
+#include <log4cxx/helpers/datagramsocket.h>
+
+ namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                SyslogWriter is a wrapper around the DatagramSocket class
+                it writes text to the specified host on the port 514 (UNIX syslog)
+                */
+                class LOG4CXX_EXPORT SyslogWriter
+                {
+                public:
+                        SyslogWriter(const LogString& syslogHost);
+                        void write(const LogString& string);
+
+                private:
+                        LogString syslogHost;
+                        InetAddressPtr address;
+                        DatagramSocketPtr ds;
+                };
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/system.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/system.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/system.h	(revision 257)
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ #ifndef _LOG4CXX_HELPERS_SYSTEM_H
+ #define _LOG4CXX_HELPERS_SYSTEM_H
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/exception.h>
+
+ namespace log4cxx
+ {
+        namespace helpers
+        {
+                class Properties;
+
+                /** The System class contains several useful class fields and methods.
+                It cannot be instantiated.
+                */
+                class LOG4CXX_EXPORT System
+                {
+                public:
+
+                /**
+                Gets the system property indicated by the specified key.
+
+                @param key the name of the system property.
+
+                @return the string value of the system property, or the default value if
+                there is no property with that key.
+
+                @throws IllegalArgumentException if key is empty.
+                */
+                static LogString getProperty(const LogString& key);
+
+                };
+        } // namespace helpers
+ } //  namespace log4cxx
+
+ #endif //_LOG4CXX_HELPERS_SYSTEM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/systemerrwriter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/systemerrwriter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/systemerrwriter.h	(revision 257)
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_SYSTEMERRWRITER_H
+#define _LOG4CXX_HELPERS_SYSTEMERRWRITER_H
+
+#include <log4cxx/helpers/writer.h>
+
+namespace log4cxx
+{
+        namespace helpers {
+
+          /**
+          *   Abstract class for writing to character streams.
+          */
+          class LOG4CXX_EXPORT SystemErrWriter : public Writer
+          {
+          public:
+                  DECLARE_LOG4CXX_OBJECT(SystemErrWriter)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(SystemErrWriter)
+                          LOG4CXX_CAST_ENTRY_CHAIN(Writer)
+                  END_LOG4CXX_CAST_MAP()
+
+                  SystemErrWriter();
+                  virtual ~SystemErrWriter();
+
+                  virtual void close(Pool& p);
+                  virtual void flush(Pool& p);
+                  virtual void write(const LogString& str, Pool& p);
+
+                  static void write(const LogString& str);
+                  static void flush();
+
+          private:
+                  SystemErrWriter(const SystemErrWriter&);
+                  SystemErrWriter& operator=(const SystemErrWriter&);
+              static bool isWide();
+          };
+
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_SYSTEMERRWRITER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/systemoutwriter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/systemoutwriter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/systemoutwriter.h	(revision 257)
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_SYSTEMOUTWRITER_H
+#define _LOG4CXX_HELPERS_SYSTEMOUTWRITER_H
+
+#include <log4cxx/helpers/writer.h>
+
+namespace log4cxx
+{
+        namespace helpers {
+
+          /**
+          *   Abstract class for writing to character streams.
+          */
+          class LOG4CXX_EXPORT SystemOutWriter : public Writer
+          {
+          public:
+                  DECLARE_LOG4CXX_OBJECT(SystemOutWriter)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(SystemOutWriter)
+                          LOG4CXX_CAST_ENTRY_CHAIN(Writer)
+                  END_LOG4CXX_CAST_MAP()
+
+                  SystemOutWriter();
+                  ~SystemOutWriter();
+                  
+                  virtual void close(Pool& p);
+                  virtual void flush(Pool& p);
+                  virtual void write(const LogString& str, Pool& p);
+                  
+                  static void write(const LogString& str);
+                  static void flush();
+        private:
+                  SystemOutWriter(const SystemOutWriter&);
+                  SystemOutWriter& operator=(const SystemOutWriter&);
+              static bool isWide();
+          };
+
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_SYSTEMOUTWRITER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/tchar.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/tchar.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/tchar.h	(revision 257)
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_TCHAR_H
+#define _LOG4CXX_HELPERS_TCHAR_H
+
+#error log4cxx/helpers/tchar.h is obsolete, see details following this line.
+
+/**
+* A short history of log4cxx's tchar.h
+*
+* The previous log4cxx/helpers/tchar.h contained macros that
+* attempted to replicate macros and functions defined by
+* the Microsoft SDK's tchar.h and related header files
+* such as _T() and TCHAR.
+*
+* When building apps using both log4cxx and Microsoft SDK's tchar.h,
+* these definitions could conflict and, for example, the code generated
+* by _T("Foo") would depend on the include order of the two
+* tchar.h's.
+*
+* The motivation of tchar.h in the Microsoft SDK was to
+* support presenting either a wide-char or multi-byte char
+* facade to a C API depending on the presence of
+* the _UNICODE or _MBCS preprocessor macros.  When _UNICODE
+* was set then tchar was typedef'd as wchar_t and, for example,
+* the CreateProcess macro was defined to be CreateProcessW,  If
+* _MBCS was defined, then tchar was typedef'd as char
+* and CreateProcess macro was defined to be CreateProcessA.
+*
+* In either case, the setting of _UNICODE or _MBCS
+* didn't affect the implementation of the operating system.
+* If you were running the Windows NT family, all the multi-byte
+* methods delegated to a wide-char implementation.
+* In the Windows 9x family, most wide-char methods delegated
+* to a multi-byte implementation.
+*
+* In practice, most Microsoft Windows executables were either
+* wide-char or multi-byte centric.  However, they did not
+* have to be exclusively so.  An application built with
+* _UNICODE, could still call multi-byte API functions,
+* they would just need to explicitly call CreateProcessA
+* instead of using the facade macro.  An executable could
+* also use both a multi-byte centric and wide-char centric
+* DLL's since all the calls eventually hit the same
+* underlying implementation be it a wide-char on in
+* Windows NT or multi-char in Windows 9x.
+*
+* The use of log4cxx/helpers/tchar.h in log4cxx 0.9.7 was
+* undesirable because it made log4cxx either exclusively
+* wide-char or exclusively multi-byte and had to be consistant
+* with the character model of the calling executable.
+* This would make it extremely difficult to use
+* log4cxx when DLL's with different character models
+* where called by the same application.  Since log4cxx
+* was C++, not C, function overloading could be
+* used instead of the CreateProcess et al macros
+* used in the Windows headers.
+*
+* In the rework before the 0.9.8, the following changes
+* were made to log4cxx:
+*
+* 1. All inclusions of log4cxx/helpers/tchar.h
+*       and use of TCHAR, log4cxx::String and _T
+*       were removed from log4cxx.
+* 2. log4cxx/logstring.h was added to define the
+*     implementation character model using the log4cxx::logchar
+*     and log4cxx::LogString typedefs and LOG4CXX_STR macro.
+* 3. Methods commonly used by calling applications were defined
+*    in both wide-char and multi-byte and both pointer and string
+*    forms with conversion to the implementation character
+*    model delayed as long as possible.
+* 4. Use of Standard Template Library streams within
+*    log4cxx was substantially reduced (but not totally
+*    elminated).
+* 5. The LOG4CXX_DEBUG and similar macros were simplified
+*    and now only take arguments that evaluate to
+*    character pointers or strings and no longer take
+*    the right hand side of an insertion operation:
+*
+*    //   This used to work, but no longer
+*    LOG4CXX_DEBUG(logger, "foo" << i);
+*
+*    If you extensively used this idiom, please consider
+*    migrating to stream-like API defined in log4cxx/stream.h.
+*
+* 6. The LOG4CXX_DEBUG and similar use the LOG4CXX_LOCATION
+*    macro to define the log statement location instead of
+*    using __FILE__ and __LINE__.  Logger::debug and
+*    similar now take const LocationInfo& instead of
+*    separate const char* and int arguments.  This allows
+*    class and method names to appear in location info.
+* 7. log4cxx include files no longer include config.h
+*    or related files.  config.h and related files
+*    may be used by log4cxx implementation, but have
+*    no effect on the exposed API.
+*
+* It is expected that the default implementation character
+* model will be wchar_t.  However this may vary by platform
+* and may be changed based on feedback.
+*
+* Developers using log4cxx should seldom be concerned
+* with the internal character model of log4cxx unless
+* writing custom appenders or layouts.  An application
+* should not be using log4cxx::logchar, log4cxx::LogString
+* or LOG4CXX_STR unless dealing with something that is
+* clearly a log4cxx internal.  If you find something
+* defined as using or returning LogString that you
+* don't consider a log4cxx internal, please file a
+* bug report or post a message to one of the mailing lists.
+*
+* wchar_t literals should be preferred in log requests since
+* since they eliminate potential encoding confusion
+* when the development and deployment encodings are different.
+*
+* Migration strategies:
+*
+* If you followed the examples in the previous log4cxx versions,
+* you may have _T() macros littered through your code
+* and inclusions of this file.  If you are on the Microsoft
+* platform, the simplest solution is to just include
+* the Platform SDK's tchar.h which would result your log
+* statements matching the character model of your application.
+*
+* If you targetting another platform and your only use of
+* _T() in related to log4cxx, then I would recommend replacing
+*  all _T() with another macro (say MYAPP_LOGSTR())
+* and defining that macro in a commonly included header file
+* or defining _T() in a commonly included header file.
+*
+* I would first try defining these macros as
+*
+* #define _T(str) L ## str
+*
+* If that results in too many compilation errors, then try:
+*
+* #define _T(str) str
+*
+* Using the first form will result in wchar_t literals which
+* will avoid potential encoding confusion and is expected
+* to result in slightly better performance when logging.
+*
+*  Since the best choice for _T() depends on the application,
+*  there is not a definition within log4cxx.
+*
+* Use encoding conversion macros A2T, W2T, et al should
+* not longer be necessary.  If you are doing a lot of
+* work converting between encodings, you might consider
+* using the stream-like interface in log4cxx/stream.h
+* which defines insertion operators for multi-byte
+* strings in addition to exposing all the
+* insertion operations defined for
+* std::basic_ostream<wchar_t>.
+*
+*/
+
+#endif //_LOG4CXX_HELPERS_TCHAR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/thread.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/thread.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/thread.h	(revision 257)
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_THREAD_H
+#define _LOG4CXX_HELPERS_THREAD_H
+
+#include <log4cxx/log4cxx.h>
+#include <log4cxx/helpers/pool.h>
+
+#if !defined(LOG4CXX_THREAD_FUNC)
+#if defined(_WIN32)
+#define LOG4CXX_THREAD_FUNC __stdcall
+#else
+#define LOG4CXX_THREAD_FUNC
+#endif
+#endif
+
+extern "C" {
+    typedef struct apr_thread_t apr_thread_t;
+}
+
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class Pool;
+                class ThreadLocal;
+
+            typedef void* (LOG4CXX_THREAD_FUNC *Runnable)(apr_thread_t* thread, void* data);
+                /**
+                 *  This class implements an approximation of java.util.Thread.
+                 */
+                class LOG4CXX_EXPORT Thread
+                {
+                public:
+                        /**
+                         *  Create new instance.
+                         */
+                        Thread();
+                        /**
+                         *  Destructor.
+                         */
+                        ~Thread();
+
+                        /**
+                         *  Runs the specified method on a newly created thread.
+                         */
+                        void run(Runnable start, void* data);
+                        void join();
+
+                        inline bool isActive() { return thread != 0; }
+
+                        /**
+                         * Causes the currently executing thread to sleep for the
+                         * specified number of milliseconds.
+                         * @param millis milliseconds.
+                         * @throws Interrupted Exception if the thread is interrupted.
+                         */
+                        static void sleep(int millis);
+                        /**
+                         *  Sets interrupted status for current thread to true.  
+                         */
+                        static void currentThreadInterrupt();
+                        /**
+                         *  Sets interrupted status to true.  
+                         */
+                        void interrupt();
+                        /**
+                         *  Tests if the current thread has been interrupted and
+                         *  sets the interrupted status to false.
+                         */
+                        static bool interrupted();
+                        
+                        bool isAlive();
+                        bool isCurrentThread() const;
+                        void ending();
+                        
+
+                private:
+                        Pool p;
+                        apr_thread_t* thread;
+                        volatile unsigned int alive;
+                        volatile unsigned int interruptedStatus;
+                        Thread(const Thread&);
+                        Thread& operator=(const Thread&);
+                        
+                        /**
+                         *   This class is used to encapsulate the parameters to
+                         *   Thread::run when they are passed to Thread::launcher.
+                         *
+                         */
+                        class LaunchPackage {
+                        public:
+                            /**
+                             *  Placement new to create LaunchPackage in specified pool.
+                             *  LaunchPackage needs to be dynamically allocated since
+                             *  since a stack allocated instance may go out of scope
+                             *  before thread is launched.
+                             */
+                            static void* operator new(size_t, Pool& p);
+                            /**
+                            *  operator delete would be called if exception during construction.
+                     */
+                            static void operator delete(void*, Pool& p);
+                            /**
+                             *  Create new instance.
+                             */
+                            LaunchPackage(Thread* thread, Runnable runnable, void* data);
+                            /**
+                             * Gets thread parameter.
+                             * @return thread.
+                             */
+                            Thread* getThread() const;
+                            /**
+                             *  Gets runnable parameter.
+                             *  @return runnable.
+                             */
+                            Runnable getRunnable() const;
+                            /**
+                             *  gets data parameter.
+                             *  @return thread.
+                             */
+                            void* getData() const;
+                        private:
+                            LaunchPackage(const LaunchPackage&);
+                            LaunchPackage& operator=(const LaunchPackage&);
+                            Thread* thread;
+                            Runnable runnable; 
+                            void* data;
+                        };
+                        
+                        /**
+                         *  This object atomically sets the specified memory location
+                         *  to non-zero on construction and to zero on destruction.  
+                         *  Used to maintain Thread.alive.
+                         */
+                        class LaunchStatus {
+                        public:
+                            /*
+                             *  Construct new instance.
+                             *  @param p address of memory to set to non-zero on construction, zero on destruction.
+                             */
+                            LaunchStatus(volatile unsigned int* p);
+                            /**
+                             *  Destructor.
+                             */
+                            ~LaunchStatus();
+                        private:
+                            LaunchStatus(const LaunchStatus&);
+                            LaunchStatus& operator=(const LaunchStatus&);
+                            volatile unsigned int* alive;
+                        };
+                        
+                        /**
+                         *  This method runs on the created thread and sets up thread-local storage
+                         *  used to keep the reference to the corresponding Thread object and
+                         *  is responsible for maintaining Thread.alive.
+                         */
+                        static void* LOG4CXX_THREAD_FUNC launcher(apr_thread_t* thread, void* data);
+                        /**
+                         *   Get a key to the thread local storage used to hold the reference to
+                         *   the corresponding Thread object.
+                         */                        
+                        static ThreadLocal& getThreadLocal();
+                };
+        } // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_THREAD_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/threadlocal.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/threadlocal.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/threadlocal.h	(revision 257)
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_THREAD_LOCAL_H
+#define _LOG4CXX_HELPERS_THREAD_LOCAL_H
+
+#include <log4cxx/log4cxx.h>
+#include <log4cxx/helpers/pool.h>
+
+#if !defined(LOG4CXX_THREAD_FUNC)
+#if defined(_WIN32)
+#define LOG4CXX_THREAD_FUNC __stdcall
+#else
+#define LOG4CXX_THREAD_FUNC
+#endif
+#endif
+
+
+extern "C" {
+    struct apr_threadkey_t;
+}
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+
+                /**
+                 *  This class provides thread-local variables.  This class is similar in function
+                 *  to java.lang.ThreadLocal.
+                 */
+                class LOG4CXX_EXPORT ThreadLocal {
+                public:
+                    /**
+                     *   Create new instance.
+                     */
+                    ThreadLocal();
+                    /**
+                     *    Destructor.
+                     */
+                    ~ThreadLocal();
+                    /**
+                     *  Sets the value in the current thread's copy of this thread-local variable.
+                     *  @param priv new value.
+                     */
+                    void set(void* priv);                    
+                    /**
+                     *  Returns the value in the current thread's copy of this thread-local variable.
+                     *  @return value of thread-local variable for the current thread.
+                     */
+                    void* get();
+               
+                private:
+                    /**
+                     * Prevent use of default copy constructor.
+                     */
+                     ThreadLocal(const ThreadLocal&);
+                    /**
+                     *   Prevent use of default assignment operator.  
+                     */
+                     ThreadLocal& operator=(const ThreadLocal&);
+                     
+                     static apr_threadkey_t* create(Pool& p);
+
+                Pool p;
+                     apr_threadkey_t* key;
+                };
+        } // namespace helpers
+} // namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_THREAD_LOCAL_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/threadspecificdata.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/threadspecificdata.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/threadspecificdata.h	(revision 257)
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_THREAD_SPECIFIC_DATA_H
+#define _LOG4CXX_HELPERS_THREAD_SPECIFIC_DATA_H
+
+#include <log4cxx/ndc.h>
+#include <log4cxx/mdc.h>
+
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                  *   This class contains all the thread-specific
+                  *   data in use by log4cxx.
+                  */
+                class LOG4CXX_EXPORT ThreadSpecificData
+                {
+                public:
+                        ThreadSpecificData();
+                        ~ThreadSpecificData();
+
+                        /**
+                         *  Gets current thread specific data.
+                         *  @return thread specific data, may be null.
+                         */
+                        static ThreadSpecificData* getCurrentData();
+                        /**
+                         *  Release this ThreadSpecficData if empty.
+                         */
+                        void recycle();
+                        
+                        static void put(const LogString& key, const LogString& val);
+                        static void push(const LogString& val);
+                        static void inherit(const log4cxx::NDC::Stack& stack);
+                        
+                        log4cxx::NDC::Stack& getStack();
+                        log4cxx::MDC::Map& getMap();
+                        
+
+                private:
+                        static ThreadSpecificData& getDataNoThreads();
+                        static ThreadSpecificData* createCurrentData();
+                        log4cxx::NDC::Stack ndcStack;
+                        log4cxx::MDC::Map mdcMap;
+                };
+
+        }  // namespace helpers
+} // namespace log4cxx
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/timezone.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/timezone.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/timezone.h	(revision 257)
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_TIMEZONE_H
+#define _LOG4CXX_HELPERS_TIMEZONE_H
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/objectptr.h>
+
+struct apr_time_exp_t;
+
+namespace log4cxx
+{
+   namespace helpers
+   {
+      class TimeZone;
+      LOG4CXX_PTR_DEF(TimeZone);
+
+      class LOG4CXX_EXPORT TimeZone : public helpers::ObjectImpl
+      {
+      public:
+         DECLARE_ABSTRACT_LOG4CXX_OBJECT(TimeZone)
+         BEGIN_LOG4CXX_CAST_MAP()
+            LOG4CXX_CAST_ENTRY(TimeZone)
+         END_LOG4CXX_CAST_MAP()
+
+         static const TimeZonePtr& getDefault();
+            static const TimeZonePtr& getGMT();
+         static const TimeZonePtr getTimeZone(const LogString& ID);
+
+            const LogString getID() const {
+                   return id;
+            }
+
+
+            /**
+             *   Expand an APR time into the human readable
+             *      components for this timezone.
+             */
+            virtual log4cxx_status_t explode(apr_time_exp_t* result,
+                    log4cxx_time_t input) const = 0;
+
+
+      protected:
+            TimeZone(const LogString& ID);
+            virtual ~TimeZone();
+
+            const LogString id;
+      };
+
+
+   }
+}
+
+#endif //_LOG4CXX_HELPERS_TIMEZONE_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/transcoder.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/transcoder.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/transcoder.h	(revision 257)
@@ -0,0 +1,256 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_TRANSCODER_H
+#define _LOG4CXX_HELPERS_TRANSCODER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/logstring.h>
+
+
+namespace log4cxx {
+   namespace helpers {
+     class ByteBuffer;
+     class Pool;
+     /**
+     *    Simple transcoder for converting between
+     *      external char and wchar_t strings and
+     *      internal strings.
+     *
+     */
+      class LOG4CXX_EXPORT Transcoder {
+      public:
+
+      
+      /**
+       *   Appends this specified string of UTF-8 characters to LogString.
+       */
+      static void decodeUTF8(const std::string& src, LogString& dst);
+      /**
+       *    Converts the LogString to a UTF-8 string.
+       */
+      static void encodeUTF8(const LogString& src, std::string& dst);
+      /**
+       *    Converts the LogString to a UTF-8 string.
+       */
+      static char* encodeUTF8(const LogString& src, log4cxx::helpers::Pool& p);
+      /**
+       *    Append UCS-4 code point to a byte buffer as UTF-8.
+       */
+      static void encodeUTF8(unsigned int sv, ByteBuffer& dst);
+      /**
+       *    Append UCS-4 code point to a byte buffer as UTF-16LE.
+       */
+      static void encodeUTF16LE(unsigned int sv, ByteBuffer& dst);
+      /**
+       *    Append UCS-4 code point to a byte buffer as UTF-16BE.
+       */
+      static void encodeUTF16BE(unsigned int sv, ByteBuffer& dst);
+      
+
+      /**
+       *   Decodes next character from a UTF-8 string.
+       *   @param in string from which the character is extracted.
+       *   @param iter iterator addressing start of character, will be
+       *   advanced to next character if successful.
+       *   @return scalar value (UCS-4) or 0xFFFF if invalid sequence.
+       */
+      static unsigned int decode(const std::string& in,
+           std::string::const_iterator& iter);
+
+      /**
+        *   Appends UCS-4 value to a UTF-8 string.
+        *   @param ch UCS-4 value.
+        *   @param dst destination.
+        */
+      static void encode(unsigned int ch, std::string& dst);
+
+      /**
+       *    Appends string in the current code-page
+       *       to a LogString.
+       */
+      static void decode(const std::string& src, LogString& dst);
+      /**
+       *     Appends a LogString to a string in the current
+       *        code-page.  Unrepresentable characters may be 
+       *        replaced with loss characters.
+      */
+      static void encode(const LogString& src, std::string& dst);
+
+      /**
+        *     Encodes the specified LogString to the current
+        *       character set. 
+        *      @param src string to encode.
+        *      @param p pool from which to allocate return value.
+        *      @return pool allocated string.
+        */
+      static char* encode(const LogString& src, log4cxx::helpers::Pool& p);
+
+
+
+#if LOG4CXX_WCHAR_T_API || LOG4CXX_LOGCHAR_IS_WCHAR_T || defined(WIN32) || defined(_WIN32)
+      static void decode(const std::wstring& src, LogString& dst);
+      static void encode(const LogString& src, std::wstring& dst);
+      static wchar_t* wencode(const LogString& src, log4cxx::helpers::Pool& p);
+
+      /**
+       *   Decodes next character from a wstring.
+       *   @param in string from which the character is extracted.
+       *   @param iter iterator addressing start of character, will be
+       *   advanced to next character if successful.
+       *   @return scalar value (UCS-4) or 0xFFFF if invalid sequence.
+       */
+      static unsigned int decode(const std::wstring& in,
+           std::wstring::const_iterator& iter);
+
+      /**
+        *   Appends UCS-4 value to a UTF-8 string.
+        *   @param ch UCS-4 value.
+        *   @param dst destination.
+        */
+      static void encode(unsigned int ch, std::wstring& dst);
+
+#endif
+
+
+#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API || LOG4CXX_LOGCHAR_IS_UNICHAR
+      static void decode(const std::basic_string<UniChar>& src, LogString& dst);
+      static void encode(const LogString& src, std::basic_string<UniChar>& dst);
+      
+      /**
+       *   Decodes next character from a UniChar string.
+       *   @param in string from which the character is extracted.
+       *   @param iter iterator addressing start of character, will be
+       *   advanced to next character if successful.
+       *   @return scalar value (UCS-4) or 0xFFFF if invalid sequence.
+       */
+      static unsigned int decode(const std::basic_string<UniChar>& in,
+           std::basic_string<UniChar>::const_iterator& iter);
+
+      /**
+        *   Appends UCS-4 value to a UTF-8 string.
+        *   @param ch UCS-4 value.
+        *   @param dst destination.
+        */
+      static void encode(unsigned int ch, std::basic_string<UniChar>& dst);
+
+#endif
+
+#if LOG4CXX_CFSTRING_API
+      static void decode(const CFStringRef& src, LogString& dst);
+      static CFStringRef encode(const LogString& src);
+#endif
+
+      enum { LOSSCHAR = 0x3F };
+      
+      /**
+       *   Returns a logchar value given a character literal in the ASCII charset.
+       *   Used to implement the LOG4CXX_STR macro for EBCDIC and UNICHAR.
+       */
+      static logchar decode(char v);
+      /**
+       *   Returns a LogString given a string literal in the ASCII charset.
+       *   Used to implement the LOG4CXX_STR macro for EBCDIC and UNICHAR.
+       */
+      static LogString decode(const char* v);
+
+      /**
+       *   Encodes a charset name in the default encoding 
+       *      without using a CharsetEncoder (which could trigger recursion).
+       */
+      static std::string encodeCharsetName(const LogString& charsetName);
+
+      private:
+
+      private:
+      Transcoder();
+      Transcoder(const Transcoder&);
+      Transcoder& operator=(const Transcoder&);
+      enum { BUFSIZE = 256 };
+      static size_t encodeUTF8(unsigned int ch, char* dst);
+      static size_t encodeUTF16BE(unsigned int ch, char* dst);
+      static size_t encodeUTF16LE(unsigned int ch, char* dst);
+      
+      };
+   }
+}
+
+#define LOG4CXX_ENCODE_CHAR(var, src) \
+std::string var;                      \
+log4cxx::helpers::Transcoder::encode(src, var)
+
+#define LOG4CXX_DECODE_CHAR(var, src) \
+log4cxx::LogString var;                      \
+log4cxx::helpers::Transcoder::decode(src, var)
+
+#define LOG4CXX_DECODE_CFSTRING(var, src) \
+log4cxx::LogString var;                      \
+log4cxx::helpers::Transcoder::decode(src, var)
+
+#define LOG4CXX_ENCODE_CFSTRING(var, src) \
+CFStringRef var = log4cxx::helpers::Transcoder::encode(src)
+
+
+#if LOG4CXX_LOGCHAR_IS_WCHAR
+
+#define LOG4CXX_ENCODE_WCHAR(var, src) \
+const std::wstring& var = src
+
+#define LOG4CXX_DECODE_WCHAR(var, src) \
+const log4cxx::LogString& var = src
+
+#else
+
+#define LOG4CXX_ENCODE_WCHAR(var, src) \
+std::wstring var;                      \
+log4cxx::helpers::Transcoder::encode(src, var)
+
+#define LOG4CXX_DECODE_WCHAR(var, src) \
+log4cxx::LogString var;                      \
+log4cxx::helpers::Transcoder::decode(src, var)
+
+#endif
+
+#if LOG4CXX_LOGCHAR_IS_UNICHAR
+
+#define LOG4CXX_ENCODE_UNICHAR(var, src) \
+const std::basic_string<UniChar>& var = src
+
+#define LOG4CXX_DECODE_UNICHAR(var, src) \
+const log4cxx::LogString& var = src
+
+#else
+
+#define LOG4CXX_ENCODE_UNICHAR(var, src) \
+std::basic_string<UniChar> var;          \
+log4cxx::helpers::Transcoder::encode(src, var)
+
+#define LOG4CXX_DECODE_UNICHAR(var, src) \
+log4cxx::LogString var;                      \
+log4cxx::helpers::Transcoder::decode(src, var)
+
+#endif
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+#endif //_LOG4CXX_HELPERS_TRANSCODER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/transform.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/transform.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/transform.h	(revision 257)
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_TRANSFORM_H
+#define _LOG4CXX_HELPERS_TRANSFORM_H
+
+#include <log4cxx/logstring.h>
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                /**
+                Utility class for transforming strings.
+                */
+                class LOG4CXX_EXPORT Transform
+                {
+                public:
+                        /**
+                        * This method takes a string which may contain HTML tags (ie,
+                        * &lt;b&gt;, &lt;table&gt;, etc) and replaces any '<' and '>'
+                        * characters with respective predefined entity references.
+                        *
+                        * @param buf output stream where to write the modified string.
+                        * @param input The text to be converted.
+                        * @return The input string with the characters '<' and '>' replaced with
+                        *  &amp;lt; and &amp;gt; respectively.
+                        * */
+                        static void appendEscapingTags(
+                                LogString& buf, const LogString& input);
+
+                        /**
+                        * Ensures that embeded CDEnd strings (]]>) are handled properly
+                        * within message, NDC and throwable tag text.
+                        *
+                        * @param buf output stream holding the XML data to this point.  The
+                        * initial CDStart (<![CDATA[) and final CDEnd (]]>) of the CDATA
+                        * section are the responsibility of the calling method.
+                        * @param input The String that is inserted into an existing CDATA
+                        * Section within buf.
+                        */
+                        static void appendEscapingCDATA(
+                                LogString& buf, const LogString& input);
+                }; // class Transform
+        }  // namespace helpers
+} //namespace log4cxx
+
+#endif // _LOG4CXX_HELPERS_TRANSFORM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/writer.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/writer.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/writer.h	(revision 257)
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_WRITER_H
+#define _LOG4CXX_HELPERS_WRITER_H
+
+#include <log4cxx/helpers/objectimpl.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+
+          /**
+          *   Abstract class for writing to character streams.
+          */
+          class LOG4CXX_EXPORT Writer : public ObjectImpl
+          {
+          public:
+                  DECLARE_ABSTRACT_LOG4CXX_OBJECT(Writer)
+                  BEGIN_LOG4CXX_CAST_MAP()
+                          LOG4CXX_CAST_ENTRY(Writer)
+                  END_LOG4CXX_CAST_MAP()
+
+          protected:
+                  Writer();
+                  virtual ~Writer();
+
+          public:
+                  virtual void close(Pool& p) = 0;
+                  virtual void flush(Pool& p) = 0;
+                  virtual void write(const LogString& str, Pool& p) = 0;
+
+          private:
+                  Writer(const Writer&);
+                  Writer& operator=(const Writer&);
+          };
+
+          LOG4CXX_PTR_DEF(Writer);
+        } // namespace helpers
+
+}  //namespace log4cxx
+
+#endif //_LOG4CXX_HELPERS_WRITER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/xml.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/xml.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/helpers/xml.h	(revision 257)
@@ -0,0 +1,131 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPERS_XML_H
+#define _LOG4CXX_HELPERS_XML_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/object.h>
+#include <log4cxx/helpers/exception.h>
+
+namespace log4cxx
+{
+        class File;
+        namespace helpers
+        {
+                class XMLDOMNode;
+                typedef helpers::ObjectPtrT<XMLDOMNode> XMLDOMNodePtr;
+
+                class XMLDOMDocument;
+                typedef helpers::ObjectPtrT<XMLDOMDocument> XMLDOMDocumentPtr;
+
+                class XMLDOMNodeList;
+                typedef helpers::ObjectPtrT<XMLDOMNodeList> XMLDOMNodeListPtr;
+
+                class LOG4CXX_EXPORT DOMException : public RuntimeException
+                {
+                public:
+                    DOMException() : RuntimeException(LOG4CXX_STR("DOM exception")) {}
+                };
+
+
+                /**
+                The XMLDOMNode interface is the primary datatype for the entire Document
+                Object Model.
+                */
+                class LOG4CXX_EXPORT XMLDOMNode : virtual public Object
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(XMLDOMNode)
+                        enum XMLDOMNodeType
+                        {
+                                NOT_IMPLEMENTED_NODE = 0,
+                                ELEMENT_NODE = 1,
+                                DOCUMENT_NODE = 9
+                        };
+
+                        virtual XMLDOMNodeListPtr getChildNodes() = 0;
+                        virtual XMLDOMNodeType getNodeType() = 0;
+                        virtual XMLDOMDocumentPtr getOwnerDocument() = 0;
+                };
+            LOG4CXX_PTR_DEF(XMLDOMNode);
+
+
+                /**
+                The XMLDOMElement interface represents an element in an XML document
+                */
+                class LOG4CXX_EXPORT XMLDOMElement : virtual public XMLDOMNode
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(XMLDOMElement)
+                        virtual LogString getTagName() = 0;
+                        virtual LogString getAttribute(const LogString& name) = 0;
+                };
+            LOG4CXX_PTR_DEF(XMLDOMElement);
+
+                /**
+                The XMLDOMDocument interface represents an entire XML document.
+
+                Conceptually, it is the root of the document tree, and provides the
+                primary access to the document's data.
+                */
+                class LOG4CXX_EXPORT XMLDOMDocument : virtual public XMLDOMNode
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(XMLDOMDocument)
+                        virtual void load(const File& fileName) = 0;
+                        virtual XMLDOMElementPtr getDocumentElement() = 0;
+                        virtual XMLDOMElementPtr getElementById(const LogString& tagName,
+                                const LogString& elementId) = 0;
+                };
+            LOG4CXX_PTR_DEF(XMLDOMDocument);
+
+                /**
+                The XMLDOMNodeList interface provides the abstraction of an ordered
+                collection of nodes, without defining or constraining how this
+                collection is implemented.
+
+                XMLDOMNodeList objects in the DOM are live.
+
+                The items in the XMLDOMNodeList are accessible via an integral index,
+                starting from 0.
+                */
+                class LOG4CXX_EXPORT XMLDOMNodeList : virtual public Object
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(XMLDOMNodeList)
+                        virtual int getLength() = 0;
+                        virtual XMLDOMNodePtr item(int index) = 0;
+                };
+            LOG4CXX_PTR_DEF(XMLDOMNodeList);
+        }  // namespace helpers
+} // namespace log4cxx
+
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif // _LOG4CXX_HELPERS_XML_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/hierarchy.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/hierarchy.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/hierarchy.h	(revision 257)
@@ -0,0 +1,283 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HIERARCHY_H
+#define _LOG4CXX_HIERARCHY_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/spi/loggerrepository.h>
+#include <log4cxx/spi/loggerfactory.h>
+#include <vector>
+#include <map>
+#include <log4cxx/provisionnode.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/spi/hierarchyeventlistener.h>
+#include <log4cxx/helpers/pool.h>
+
+namespace log4cxx
+{
+        /**
+        This class is specialized in retrieving loggers by name and also
+        maintaining the logger hierarchy.
+
+        <p><em>The casual user does not have to deal with this class
+        directly.</em>
+
+        <p>The structure of the logger hierarchy is maintained by the
+        #getLogger method. The hierarchy is such that children link
+        to their parent but parents do not have any pointers to their
+        children. Moreover, loggers can be instantiated in any order, in
+        particular descendant before ancestor.
+
+        <p>In case a descendant is created before a particular ancestor,
+        then it creates a provision node for the ancestor and adds itself
+        to the provision node. Other descendants of the same ancestor add
+        themselves to the previously created provision node.
+        */
+        class LOG4CXX_EXPORT Hierarchy :
+                public virtual spi::LoggerRepository,
+                public virtual helpers::ObjectImpl
+        {
+        private:
+            log4cxx::helpers::Pool pool;
+            log4cxx::helpers::Mutex mutex;
+            bool configured;
+
+            spi::LoggerFactoryPtr defaultFactory;
+            spi::HierarchyEventListenerList listeners;
+
+            typedef std::map<LogString, LoggerPtr> LoggerMap;
+            LoggerMap* loggers;
+
+            typedef std::map<LogString, ProvisionNode> ProvisionNodeMap;
+            ProvisionNodeMap* provisionNodes;
+
+            LoggerPtr root;
+
+            int thresholdInt;
+            LevelPtr threshold;
+
+            bool emittedNoAppenderWarning;
+            bool emittedNoResourceBundleWarning;
+
+        public:
+            DECLARE_ABSTRACT_LOG4CXX_OBJECT(Hierarchy)
+            BEGIN_LOG4CXX_CAST_MAP()
+                LOG4CXX_CAST_ENTRY(spi::LoggerRepository)
+            END_LOG4CXX_CAST_MAP()
+
+            /**
+            Create a new logger hierarchy.
+            */
+            Hierarchy();
+
+            ~Hierarchy();
+
+            void addRef() const;
+            void releaseRef() const;
+
+            void addHierarchyEventListener(const spi::HierarchyEventListenerPtr& listener);
+
+            /**
+            This call will clear all logger definitions from the internal
+            hashtable. Invoking this method will irrevocably mess up the
+            logger hierarchy.
+
+            <p>You should <em>really</em> know what you are doing before
+            invoking this method.
+            */
+            void clear();
+
+            void emitNoAppenderWarning(const LoggerPtr& logger);
+
+            /**
+            Check if the named logger exists in the hierarchy. If so return
+            its reference, otherwise returns <code>null</code>.
+
+              @param name The name of the logger to search for.
+
+            */
+            LoggerPtr exists(const LogString& name);
+
+            /**
+            The string form of {@link #setThreshold(const LevelPtr&) setThreshold}.
+            */
+            void setThreshold(const LogString& levelStr);
+
+            /**
+            Enable logging for logging requests with level <code>l</code> or
+            higher. By default all levels are enabled.
+
+                    @param l The minimum level for which logging requests are sent to
+            their appenders.  */
+            void setThreshold(const LevelPtr& l);
+
+            void fireAddAppenderEvent(const LoggerPtr& logger, const AppenderPtr& appender);
+
+            void fireRemoveAppenderEvent(const LoggerPtr& logger,
+                    const AppenderPtr& appender);
+
+            /**
+            Returns a Level representation of the <code>enable</code>
+            state.
+            */
+            const LevelPtr& getThreshold() const;
+
+            /**
+            Return a new logger instance named as the first parameter using
+            the default factory.
+
+            <p>If a logger of that name already exists, then it will be
+            returned.  Otherwise, a new logger will be instantiated and
+            then linked with its existing ancestors as well as children.
+
+            @param name The name of the logger to retrieve.
+
+            */
+            LoggerPtr getLogger(const LogString& name);
+
+            /**
+            Return a new logger instance named as the first parameter using
+            <code>factory</code>.
+
+            <p>If a logger of that name already exists, then it will be
+            returned.  Otherwise, a new logger will be instantiated by the
+            <code>factory</code> parameter and linked with its existing
+            ancestors as well as children.
+
+            @param name The name of the logger to retrieve.
+            @param factory The factory that will make the new logger instance.
+
+            */
+            LoggerPtr getLogger(const LogString& name,
+                   const spi::LoggerFactoryPtr& factory);
+
+            /**
+            Returns all the currently defined loggers in this hierarchy as
+            a LoggerList.
+
+            <p>The root logger is <em>not</em> included in the returned
+            LoggerList.  */
+            LoggerList getCurrentLoggers() const;
+
+            /**
+            Get the root of this hierarchy.
+            */
+            LoggerPtr getRootLogger() const;
+
+            /**
+            This method will return <code>true</code> if this repository is
+            disabled for <code>level</code> object passed as parameter and
+            <code>false</code> otherwise. See also the
+            {@link #setThreshold(const LevelPtr&) setThreshold} method.  */
+            bool isDisabled(int level) const;
+
+            /**
+            Reset all values contained in this hierarchy instance to their
+            default.  This removes all appenders from all categories, sets
+            the level of all non-root categories to <code>null</code>,
+            sets their additivity flag to <code>true</code> and sets the level
+            of the root logger to DEBUG.  Moreover,
+            message disabling is set its default "off" value.
+
+            <p>Existing categories are not removed. They are just reset.
+
+            <p>This method should be used sparingly and with care as it will
+            block all logging until it is completed.</p>
+            */
+            void resetConfiguration();
+
+            /**
+            Used by subclasses to add a renderer to the hierarchy passed as parameter.
+            */
+            /**
+            Shutting down a hierarchy will <em>safely</em> close and remove
+            all appenders in all categories including the root logger.
+
+            <p>Some appenders such as {@link net::SocketAppender SocketAppender}
+            and AsyncAppender need to be closed before the
+            application exists. Otherwise, pending logging events might be
+            lost.
+
+            <p>The <code>shutdown</code> method is careful to close nested
+            appenders before closing regular appenders. This is allows
+            configurations where a regular appender is attached to a logger
+            and again to a nested appender.
+            */
+            void shutdown();
+
+
+            virtual bool isConfigured();
+            virtual void setConfigured(bool configured);
+
+
+        private:
+
+            /**
+            This method loops through all the *potential* parents of
+            'cat'. There 3 possible cases:
+
+            1) No entry for the potential parent of 'cat' exists
+
+            We create a ProvisionNode for this potential parent and insert
+            'cat' in that provision node.
+
+            2) There entry is of type Logger for the potential parent.
+
+            The entry is 'cat's nearest existing parent. We update cat's
+            parent field with this entry. We also break from the loop
+            because updating our parent's parent is our parent's
+            responsibility.
+
+            3) There entry is of type ProvisionNode for this potential parent.
+
+            We add 'cat' to the list of children for this potential parent.
+            */
+            void updateParents(LoggerPtr logger);
+
+            /**
+            We update the links for all the children that placed themselves
+            in the provision node 'pn'. The second argument 'cat' is a
+            reference for the newly created Logger, parent of all the
+            children in 'pn'
+
+            We loop on all the children 'c' in 'pn':
+
+            If the child 'c' has been already linked to a child of
+            'cat' then there is no need to update 'c'.
+
+            Otherwise, we set cat's parent field to c's parent and set
+            c's parent field to cat.
+            */
+            Hierarchy(const Hierarchy&);
+            Hierarchy& operator=(const Hierarchy&);
+
+            void updateChildren(ProvisionNode& pn, LoggerPtr logger);
+        };
+
+}  //namespace log4cxx
+
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+#endif //_LOG4CXX_HIERARCHY_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/htmllayout.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/htmllayout.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/htmllayout.h	(revision 257)
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HTML_LAYOUT_H
+#define _LOG4CXX_HTML_LAYOUT_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/layout.h>
+#include <log4cxx/helpers/iso8601dateformat.h>
+
+
+
+namespace log4cxx
+{
+        /**
+        This layout outputs events in a HTML table.
+        */
+        class LOG4CXX_EXPORT HTMLLayout : public Layout
+        {
+        private:
+                // Print no location info by default
+                bool locationInfo; //= false
+
+                LogString title;
+
+                helpers::ISO8601DateFormat dateFormat;
+
+        public:
+                DECLARE_LOG4CXX_OBJECT(HTMLLayout)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(HTMLLayout)
+                        LOG4CXX_CAST_ENTRY_CHAIN(Layout)
+                END_LOG4CXX_CAST_MAP()
+
+                HTMLLayout();
+
+                /**
+                The <b>LocationInfo</b> option takes a boolean value. By
+                default, it is set to false which means there will be no location
+                information output by this layout. If the the option is set to
+                true, then the file name and line number of the statement
+                at the origin of the log statement will be output.
+
+                <p>If you are embedding this layout within an
+                {@link net::SMTPAppender SMTPAppender} then make sure
+                to set the <b>LocationInfo</b> option of that appender as well.
+                */
+                inline void setLocationInfo(bool locationInfoFlag)
+                        { this->locationInfo = locationInfoFlag; }
+
+                /**
+                Returns the current value of the <b>LocationInfo</b> option.
+                */
+                inline bool getLocationInfo() const
+                        { return locationInfo; }
+
+                /**
+                The <b>Title</b> option takes a String value. This option sets the
+                document title of the generated HTML document.
+                <p>Defaults to 'Log4cxx Log Messages'.
+                */
+                inline void setTitle(const LogString& title1)
+                        { this->title.assign(title1); }
+
+                /**
+                Returns the current value of the <b>Title</b> option.
+                */
+                inline const LogString& getTitle() const
+                        { return title; }
+
+                /**
+                Returns the content type output by this layout, i.e "text/html".
+                */
+                virtual LogString getContentType() const { return LOG4CXX_STR("text/html"); }
+
+                /**
+                No options to activate.
+                */
+                virtual void activateOptions(log4cxx::helpers::Pool& /* p */) {}
+
+                /**
+                Set options
+                */
+                virtual void setOption(const LogString& option, const LogString& value);
+
+                virtual void format(LogString& output,
+                     const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool) const;
+
+                /**
+                Append appropriate HTML headers.
+                */
+                virtual void appendHeader(LogString& output, log4cxx::helpers::Pool& pool);
+
+                /**
+                Append the appropriate HTML footers.
+                */
+                virtual void appendFooter(LogString& output, log4cxx::helpers::Pool& pool);
+
+                /**
+                The HTML layout handles the throwable contained in logging
+                events. Hence, this method return <code>false</code>.  */
+                virtual bool ignoresThrowable() const
+                        { return false; }
+
+        }; // class HtmlLayout
+      LOG4CXX_PTR_DEF(HTMLLayout);
+}  // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif // _LOG4CXX_HTML_LAYOUT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/layout.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/layout.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/layout.h	(revision 257)
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_LAYOUT_H
+#define _LOG4CXX_LAYOUT_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/spi/optionhandler.h>
+#include <log4cxx/spi/loggingevent.h>
+
+
+namespace log4cxx
+{
+        /**
+        Extend this abstract class to create your own log layout format.
+        */
+        class LOG4CXX_EXPORT Layout :
+                public virtual spi::OptionHandler,
+                public virtual helpers::ObjectImpl
+        {
+        public:
+                DECLARE_ABSTRACT_LOG4CXX_OBJECT(Layout)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(Layout)
+                        LOG4CXX_CAST_ENTRY(spi::OptionHandler)
+                END_LOG4CXX_CAST_MAP()
+    
+                virtual ~Layout();
+                void addRef() const;
+                void releaseRef() const;
+
+
+                /**
+                Implement this method to create your own layout format.
+                */
+                virtual void format(LogString& output,
+                    const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool) const = 0;
+
+                /**
+                Returns the content type output by this layout. The base class
+                returns "text/plain".
+                */
+                virtual LogString getContentType() const;
+
+                /**
+                Append the header for the layout format. The base class does
+                nothing.
+                */
+                virtual void appendHeader(LogString& output, log4cxx::helpers::Pool& p);
+
+                /**
+                Append the footer for the layout format. The base class does
+                nothing.
+                */
+                virtual void appendFooter(LogString& output, log4cxx::helpers::Pool& p);
+
+                /**
+                If the layout handles the throwable object contained within
+                {@link spi::LoggingEvent LoggingEvent}, then the layout should return
+                <code>false</code>. Otherwise, if the layout ignores throwable
+                object, then the layout should return <code>true</code>.
+
+                <p>The SimpleLayout, TTCCLayout,
+                PatternLayout all return <code>true</code>. The {@link
+                xml::XMLLayout XMLLayout} returns <code>false</code>.
+                */
+                virtual bool ignoresThrowable() const = 0;
+        };
+        LOG4CXX_PTR_DEF(Layout);
+}
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif // _LOG4CXX_LAYOUT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/level.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/level.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/level.h	(revision 257)
@@ -0,0 +1,285 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_LEVEL_H
+#define _LOG4CXX_LEVEL_H
+
+
+#include <log4cxx/logstring.h>
+#include <limits.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/objectptr.h>
+
+
+namespace log4cxx
+{
+    class Level;
+    /** smart pointer to a Level instance */
+    LOG4CXX_PTR_DEF(Level);
+
+        /**
+        Defines the minimum set of levels recognized by the system, that is
+        <code>OFF</code>, <code>FATAL</code>, <code>ERROR</code>,
+        <code>WARN</code>, <code>INFO</code>, <code>DEBUG</code> and
+        <code>ALL</code>.
+        <p>The <code>Level</code> class may be subclassed to define a larger
+        level set.
+        */
+        class LOG4CXX_EXPORT Level : public helpers::ObjectImpl
+        {
+        public:
+                class LOG4CXX_EXPORT LevelClass : public helpers::Class
+                {
+                public:
+                        LevelClass() : helpers::Class() {}
+
+                        virtual LogString getName() const {
+                            return LOG4CXX_STR("Level");
+                        }
+
+                        virtual LevelPtr toLevel(const LogString& sArg) const
+                        { return Level::toLevelLS(sArg); }
+
+                        virtual LevelPtr toLevel(int val) const
+                        { return Level::toLevel(val); }
+                };
+
+                DECLARE_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(Level, LevelClass)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(Level)
+                END_LOG4CXX_CAST_MAP()
+
+                /**
+                Instantiate a Level object.
+                */
+                Level(int level,
+                       const LogString& name,
+                       int syslogEquivalent);
+
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns DEBUG.
+                * @param sArg level name.
+                */
+                static LevelPtr toLevel(const std::string& sArg);
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns the value of
+                <code>defaultLevel</code>.
+                * @param sArg level name.
+                * @param defaultLevel level to return if no match.
+                * @return 
+                */
+                static LevelPtr toLevel(const std::string& sArg,
+                        const LevelPtr& defaultLevel);
+                /**
+                 *  Get the name of the level in the current encoding.
+                 *  @param name buffer to which name is appended.
+                 */
+                void toString(std::string& name) const;
+
+#if LOG4CXX_WCHAR_T_API
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns DEBUG.
+                * @param sArg level name.
+                */
+                static LevelPtr toLevel(const std::wstring& sArg);
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns the value of
+                <code>defaultLevel</code>.
+                * @param sArg level name.
+                * @param defaultLevel level to return if no match.
+                * @return 
+                */
+                static LevelPtr toLevel(const std::wstring& sArg,
+                        const LevelPtr& defaultLevel);
+                /**
+                 *  Get the name of the level.
+                 *  @param name buffer to which name is appended.
+                 */
+                void toString(std::wstring& name) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns DEBUG.
+                * @param sArg level name.
+                */
+                static LevelPtr toLevel(const std::basic_string<UniChar>& sArg);
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns the value of
+                <code>defaultLevel</code>.
+                * @param sArg level name.
+                * @param defaultLevel level to return if no match.
+                * @return 
+                */
+                static LevelPtr toLevel(const std::basic_string<UniChar>& sArg,
+                        const LevelPtr& defaultLevel);
+                /**
+                 *  Get the name of the level.
+                 *  @param name buffer to which name is appended.
+                 */
+                void toString(std::basic_string<UniChar>& name) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns DEBUG.
+                * @param sArg level name.
+                */
+                static LevelPtr toLevel(const CFStringRef& sArg);
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns the value of
+                <code>defaultLevel</code>.
+                * @param sArg level name.
+                * @param defaultLevel level to return if no match.
+                * @return 
+                */
+                static LevelPtr toLevel(const CFStringRef& sArg,
+                        const LevelPtr& defaultLevel);
+                /**
+                 *  Get the name of the level.
+                 *  @param name buffer to which name is appended.
+                 */
+                void toString(CFStringRef& name) const;
+#endif
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns DEBUG.
+                * @param sArg level name.
+                */
+                static LevelPtr toLevelLS(const LogString& sArg);
+                /**
+                Convert the string passed as argument to a level. If the
+                conversion fails, then this method returns the value of
+                <code>defaultLevel</code>.
+                * @param sArg level name.
+                * @param defaultLevel level to return if no match.
+                * @return 
+                */
+                static LevelPtr toLevelLS(const LogString& sArg,
+                        const LevelPtr& defaultLevel);
+                /**
+                Returns the string representation of this level.
+                * @return level name.
+                */
+                LogString toString() const;
+
+                /**
+                Convert an integer passed as argument to a level. If the
+                conversion fails, then this method returns DEBUG.
+                */
+                static LevelPtr toLevel(int val);
+
+                /**
+                Convert an integer passed as argument to a level. If the
+                conversion fails, then this method returns the specified default.
+                */
+                static LevelPtr toLevel(int val, const LevelPtr& defaultLevel);
+
+                enum {
+                    OFF_INT = INT_MAX,
+                    FATAL_INT = 50000,
+                    ERROR_INT = 40000,
+                    WARN_INT = 30000,
+                    INFO_INT = 20000,
+                    DEBUG_INT = 10000,
+                    TRACE_INT = 5000,
+                    ALL_INT = INT_MIN
+                };
+
+
+                static LevelPtr getAll();
+                static LevelPtr getFatal();
+                static LevelPtr getError();
+                static LevelPtr getWarn();
+                static LevelPtr getInfo();
+                static LevelPtr getDebug();
+                static LevelPtr getTrace();
+                static LevelPtr getOff();
+
+
+                /**
+                Two levels are equal if their level fields are equal.
+                */
+                virtual bool equals(const LevelPtr& level) const;
+
+                inline bool operator==(const Level& level1) const
+                        { return (this->level == level1.level); }
+
+                inline bool operator!=(const Level& level1) const
+                        { return (this->level != level1.level); }
+
+                /**
+                Return the syslog equivalent of this level as an integer.
+                */
+                inline int getSyslogEquivalent() const {
+                  return syslogEquivalent;
+                }
+
+
+                /**
+                Returns <code>true</code> if this level has a higher or equal
+                level than the level passed as argument, <code>false</code>
+                otherwise.
+
+                <p>You should think twice before overriding the default
+                implementation of <code>isGreaterOrEqual</code> method.
+
+                */
+                virtual bool isGreaterOrEqual(const LevelPtr& level) const;
+
+
+                /**
+                Returns the integer representation of this level.
+                */
+                inline int toInt() const {
+                  return level;
+                }
+
+        private:
+                int level;
+                LogString name;
+                int syslogEquivalent;
+                Level(const Level&);
+                Level& operator=(const Level&);
+        };
+}
+
+#define DECLARE_LOG4CXX_LEVEL(level)\
+public:\
+        class Class##level : public Level::LevelClass\
+{\
+public:\
+        Class##level() : Level::LevelClass() {}\
+        virtual LogString getName() const { return LOG4CXX_STR(#level); } \
+        virtual LevelPtr toLevel(const LogString& sArg) const\
+        { return level::toLevelLS(sArg); }\
+        virtual LevelPtr toLevel(int val) const\
+        { return level::toLevel(val); }\
+};\
+DECLARE_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(level, Class##level)
+
+#define IMPLEMENT_LOG4CXX_LEVEL(level) \
+IMPLEMENT_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS(level, Class##level)
+
+
+#endif //_LOG4CXX_LEVEL_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/log4cxx.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/log4cxx.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/log4cxx.h	(revision 257)
@@ -0,0 +1,99 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef LOG4CXX_LOG4CXX_H
+#define LOG4CXX_LOG4CXX_H
+
+/* GENERATED FILE WARNING!  DO NOT EDIT log4cxx.h
+ *
+ * Edit log4cxx.hw instead
+ *
+ */
+
+#define LOG4CXX_LOGCHAR_IS_UTF8 0
+#if LOG4CXX_LOGCHAR_IS_UTF8
+#define LOG4CXX_LOGCHAR_IS_WCHAR 0
+#else
+#define LOG4CXX_LOGCHAR_IS_WCHAR 1
+#endif
+#define LOG4CXX_LOGCHAR_IS_UNICHAR 0
+
+#define LOG4CXX_CHAR_API 1
+#define LOG4CXX_WCHAR_T_API 1
+#define LOG4CXX_UNICHAR_API 0
+#define LOG4CXX_CFSTRING_API 0
+
+#if defined(_MSC_VER)
+typedef __int64 log4cxx_int64_t;
+#if _MSC_VER < 1300
+#define LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE 1
+#define LOG4CXX_LOGSTREAM_ADD_NOP 1
+#endif
+#elif defined(__BORLANDC__)
+typedef __int64 log4cxx_int64_t;
+#else
+typedef long long log4cxx_int64_t;
+#endif
+
+typedef log4cxx_int64_t log4cxx_time_t;
+typedef int log4cxx_status_t;
+typedef unsigned int log4cxx_uint32_t;
+
+//  definitions used when using static library
+#if defined(LOG4CXX_STATIC)
+#define LOG4CXX_EXPORT
+//   definitions used when building DLL
+#elif defined(LOG4CXX)
+#define LOG4CXX_EXPORT __declspec(dllexport)
+#else
+//    definitions used when using DLL
+#define LOG4CXX_EXPORT __declspec(dllimport)
+#endif
+
+
+//
+//   pointer and list definition macros when building DLL using VC
+//
+#if defined(_MSC_VER) && !defined(LOG4CXX_STATIC) && defined(LOG4CXX)
+#define LOG4CXX_PTR_DEF(T) \
+template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>; \
+typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr
+#define LOG4CXX_LIST_DEF(N, T) \
+template class LOG4CXX_EXPORT std::allocator<T>; \
+template class LOG4CXX_EXPORT std::vector<T>; \
+typedef std::vector<T> N
+//
+//   pointer and list definition macros when linking with DLL using VC
+//
+#elif defined(_MSC_VER) && !defined(LOG4CXX_STATIC)
+#define LOG4CXX_PTR_DEF(T) \
+extern template class LOG4CXX_EXPORT log4cxx::helpers::ObjectPtrT<T>; \
+typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr
+#define LOG4CXX_LIST_DEF(N, T) \
+extern template class LOG4CXX_EXPORT std::allocator<T>; \
+extern template class LOG4CXX_EXPORT std::vector<T>; \
+typedef std::vector<T> N
+//
+//   pointer and list definition macros for all other cases
+//
+#else
+#define LOG4CXX_PTR_DEF(T) typedef log4cxx::helpers::ObjectPtrT<T> T##Ptr
+#define LOG4CXX_LIST_DEF(N, T) typedef std::vector<T> N
+#endif
+
+
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logger.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logger.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logger.h	(revision 257)
@@ -0,0 +1,1911 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_LOGGER_H
+#define _LOG4CXX_LOGGER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/helpers/appenderattachableimpl.h>
+#include <log4cxx/level.h>
+#include <log4cxx/helpers/pool.h>
+#include <log4cxx/helpers/mutex.h>
+#include <log4cxx/spi/location/locationinfo.h>
+#include <log4cxx/helpers/resourcebundle.h>
+#include <log4cxx/helpers/messagebuffer.h>
+
+
+namespace log4cxx
+{
+
+    namespace helpers {
+            class synchronized;
+    }
+    
+    namespace spi {
+        class LoggerRepository;
+        LOG4CXX_PTR_DEF(LoggerRepository);
+        class LoggerFactory;
+        LOG4CXX_PTR_DEF(LoggerFactory);
+    }
+
+    class Logger;
+    /** smart pointer to a Logger class */
+    LOG4CXX_PTR_DEF(Logger);
+    LOG4CXX_LIST_DEF(LoggerList, LoggerPtr);
+
+
+    /**
+    This is the central class in the log4cxx package. Most logging
+    operations, except configuration, are done through this class.
+    */
+    class LOG4CXX_EXPORT Logger :
+                public virtual log4cxx::spi::AppenderAttachable,
+                public virtual helpers::ObjectImpl
+    {
+    public:
+        DECLARE_ABSTRACT_LOG4CXX_OBJECT(Logger)
+        BEGIN_LOG4CXX_CAST_MAP()
+                LOG4CXX_CAST_ENTRY(Logger)
+                LOG4CXX_CAST_ENTRY(spi::AppenderAttachable)
+        END_LOG4CXX_CAST_MAP()
+        
+    private:
+        /**
+         *   Reference to memory pool.
+         */
+        helpers::Pool* pool;
+
+    protected:
+        /**
+        The name of this logger.
+        */
+        LogString name;
+
+        /**
+        The assigned level of this logger.  The
+        <code>level</code> variable need not be assigned a value in
+        which case it is inherited form the hierarchy.  */
+        LevelPtr level;
+
+        /**
+        The parent of this logger. All loggers have at least one
+        ancestor which is the root logger. */
+        LoggerPtr parent;
+
+        /** The resourceBundle for localized messages.
+
+        @see setResourceBundle, getResourceBundle
+        */
+        helpers::ResourceBundlePtr resourceBundle;
+
+
+        // Loggers need to know what Hierarchy they are in
+        log4cxx::spi::LoggerRepository * repository;
+
+        helpers::AppenderAttachableImplPtr aai;
+
+                /** Additivity is set to true by default, that is children inherit
+                        the appenders of their ancestors by default. If this variable is
+                        set to <code>false</code> then the appenders found in the
+                        ancestors of this logger are not used. However, the children
+                        of this logger will inherit its appenders, unless the children
+                        have their additivity flag set to <code>false</code> too. See
+                        the user manual for more details. */
+                bool additive;
+
+    protected:
+        friend class DefaultLoggerFactory;
+
+        /**
+        This constructor created a new <code>logger</code> instance and
+        sets its name.
+
+        <p>It is intended to be used by sub-classes only. You should not
+        create categories directly.
+
+        @param pool lifetime of pool must be longer than logger.
+        @param name The name of the logger.
+        */
+        Logger(log4cxx::helpers::Pool& pool, const LogString& name);
+
+    public:
+        ~Logger();
+
+
+        void addRef() const;
+        void releaseRef() const;
+
+        /**
+        Add <code>newAppender</code> to the list of appenders of this
+        Logger instance.
+
+        <p>If <code>newAppender</code> is already in the list of
+        appenders, then it won't be added again.
+        */
+        virtual void addAppender(const AppenderPtr& newAppender);
+
+
+         /**
+        Call the appenders in the hierrachy starting at
+        <code>this</code>.  If no appenders could be found, emit a
+        warning.
+
+        <p>This method calls all the appenders inherited from the
+        hierarchy circumventing any evaluation of whether to log or not
+        to log the particular log request.
+
+        @param event the event to log.  
+        @param p memory pool for any allocations needed to process request.
+        */
+        void callAppenders(const log4cxx::spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) const;
+
+        /**
+        Close all attached appenders implementing the AppenderAttachable
+        interface.
+        */
+        void closeNestedAppenders();
+
+        /**
+        Log a message string with the DEBUG level.
+
+        <p>This method first checks if this logger is <code>DEBUG</code>
+        enabled by comparing the level of this logger with the
+        DEBUG level. If this logger is
+        <code>DEBUG</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void debug(const std::string& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the DEBUG level.
+
+        <p>This method first checks if this logger is <code>DEBUG</code>
+        enabled by comparing the level of this logger with the
+        DEBUG level. If this logger is
+        <code>DEBUG</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void debug(const std::string& msg) const;
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Log a message string with the DEBUG level.
+
+        <p>This method first checks if this logger is <code>DEBUG</code>
+        enabled by comparing the level of this logger with the
+        DEBUG level. If this logger is
+        <code>DEBUG</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void debug(const std::wstring& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the DEBUG level.
+
+        <p>This method first checks if this logger is <code>DEBUG</code>
+        enabled by comparing the level of this logger with the
+        DEBUG level. If this logger is
+        <code>DEBUG</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void debug(const std::wstring& msg) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Log a message string with the DEBUG level.
+
+        <p>This method first checks if this logger is <code>DEBUG</code>
+        enabled by comparing the level of this logger with the
+        DEBUG level. If this logger is
+        <code>DEBUG</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void debug(const std::basic_string<UniChar>& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the DEBUG level.
+
+        <p>This method first checks if this logger is <code>DEBUG</code>
+        enabled by comparing the level of this logger with the
+        DEBUG level. If this logger is
+        <code>DEBUG</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void debug(const std::basic_string<UniChar>& msg) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Log a message string with the DEBUG level.
+
+        <p>This method first checks if this logger is <code>DEBUG</code>
+        enabled by comparing the level of this logger with the
+        DEBUG level. If this logger is
+        <code>DEBUG</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void debug(const CFStringRef& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the DEBUG level.
+
+        <p>This method first checks if this logger is <code>DEBUG</code>
+        enabled by comparing the level of this logger with the
+        DEBUG level. If this logger is
+        <code>DEBUG</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void debug(const CFStringRef& msg) const;
+#endif
+
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void error(const std::string& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void error(const std::string& msg) const;
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void error(const std::wstring& msg) const;
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void error(const std::wstring& msg, const log4cxx::spi::LocationInfo& location) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void error(const std::basic_string<UniChar>& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void error(const std::basic_string<UniChar>& msg) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void error(const CFStringRef& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void error(const CFStringRef& msg) const;
+#endif
+
+        /**
+        Log a message string with the FATAL level.
+
+        <p>This method first checks if this logger is <code>FATAL</code>
+        enabled by comparing the level of this logger with the
+        FATAL level. If this logger is
+        <code>FATAL</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void fatal(const std::string& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void fatal(const std::string& msg) const;
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void fatal(const std::wstring& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void fatal(const std::wstring& msg) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void fatal(const std::basic_string<UniChar>& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void fatal(const std::basic_string<UniChar>& msg) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void fatal(const CFStringRef& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the ERROR level.
+
+        <p>This method first checks if this logger is <code>ERROR</code>
+        enabled by comparing the level of this logger with the
+        ERROR level. If this logger is
+        <code>ERROR</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void fatal(const CFStringRef& msg) const;
+#endif
+
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message message.
+        @param location location of source of logging request.
+        */
+        void forcedLog(const LevelPtr& level, const std::string& message,
+                        const log4cxx::spi::LocationInfo& location) const;
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message message.
+        */
+        void forcedLog(const LevelPtr& level, const std::string& message) const;
+
+#if LOG4CXX_WCHAR_T_API
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message message.
+        @param location location of source of logging request.
+        */
+        void forcedLog(const LevelPtr& level, const std::wstring& message,
+                        const log4cxx::spi::LocationInfo& location) const;
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message message.
+        */
+        void forcedLog(const LevelPtr& level, const std::wstring& message) const;
+#endif
+#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message message.
+        @param location location of source of logging request.
+        */
+        void forcedLog(const LevelPtr& level, const std::basic_string<UniChar>& message,
+                        const log4cxx::spi::LocationInfo& location) const;
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message message.
+        */
+        void forcedLog(const LevelPtr& level, const std::basic_string<UniChar>& message) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message message.
+        @param location location of source of logging request.
+        */
+        void forcedLog(const LevelPtr& level, const CFStringRef& message,
+                        const log4cxx::spi::LocationInfo& location) const;
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message message.
+        */
+        void forcedLog(const LevelPtr& level, const CFStringRef& message) const;
+#endif
+        /**
+        This method creates a new logging event and logs the event
+        without further checks.
+        @param level the level to log.
+        @param message the message string to log.
+        @param location location of the logging statement.
+        */
+        void forcedLogLS(const LevelPtr& level, const LogString& message,
+                        const log4cxx::spi::LocationInfo& location) const;
+
+        /**
+        Get the additivity flag for this Logger instance.
+        */
+        bool getAdditivity() const;
+
+        /**
+        Get the appenders contained in this logger as an AppenderList.
+        If no appenders can be found, then an empty AppenderList
+        is returned.
+        @return AppenderList An collection of the appenders in this logger.*/
+        AppenderList getAllAppenders() const;
+
+        /**
+        Look for the appender named as <code>name</code>.
+        <p>Return the appender with that name if in the list. Return
+        <code>NULL</code> otherwise.  */
+        AppenderPtr getAppender(const LogString& name) const;
+
+        /**
+        Starting from this logger, search the logger hierarchy for a
+        non-null level and return it.
+
+        <p>The Logger class is designed so that this method executes as
+        quickly as possible.
+
+        @throws RuntimeException if all levels are null in the hierarchy
+        */
+        virtual const LevelPtr& getEffectiveLevel() const;
+
+        /**
+        Return the the LoggerRepository where this
+        <code>Logger</code> is attached.
+        */
+        log4cxx::spi::LoggerRepositoryPtr getLoggerRepository() const;
+
+
+        /**
+        * Get the logger name.
+        * @return logger name as LogString.  
+        */
+        const LogString getName() const { return name; }
+        /**
+        * Get logger name in current encoding.
+        * @param name buffer to which name is appended.  
+        */
+        void getName(std::string& name) const;
+#if LOG4CXX_WCHAR_T_API
+        /**
+        * Get logger name.
+        * @param name buffer to which name is appended.  
+        */
+        void getName(std::wstring& name) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        * Get logger name.
+        * @param name buffer to which name is appended.  
+        */
+        void getName(std::basic_string<UniChar>& name) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        * Get logger name.
+        * @param name buffer to which name is appended.  
+        */
+        void getName(CFStringRef& name) const;
+#endif
+
+        /**
+        Returns the parent of this logger. Note that the parent of a
+        given logger may change during the lifetime of the logger.
+
+        <p>The root logger will return <code>0</code>.
+        */
+        LoggerPtr getParent() const;
+
+
+        /**
+        Returns the assigned Level, if any, for this Logger.
+
+        @return Level - the assigned Level, can be null.
+        */
+        LevelPtr getLevel() const;
+
+        /**
+        * Retrieve a logger by name in current encoding.
+        * @param name logger name. 
+        */
+        static LoggerPtr getLogger(const std::string& name);
+        /**
+        * Retrieve a logger by name in current encoding.
+        * @param name logger name. 
+        */
+        static LoggerPtr getLogger(const char* const name);
+#if LOG4CXX_WCHAR_T_API
+        /**
+        * Retrieve a logger by name.
+        * @param name logger name. 
+        */
+        static LoggerPtr getLogger(const std::wstring& name);
+        /**
+        * Retrieve a logger by name.
+        * @param name logger name. 
+        */
+        static LoggerPtr getLogger(const wchar_t* const name);
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        * Retrieve a logger by name.
+        * @param name logger name. 
+        */
+        static LoggerPtr getLogger(const std::basic_string<UniChar>& name);
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        * Retrieve a logger by name.
+        * @param name logger name. 
+        */
+        static LoggerPtr getLogger(const CFStringRef& name);
+#endif
+        /**
+        * Retrieve a logger by name in Unicode.
+        * @param name logger name. 
+        */
+        static LoggerPtr getLoggerLS(const LogString& name);
+
+        /**
+        Retrieve the root logger.
+        */
+        static LoggerPtr getRootLogger();
+
+        /**
+        Like #getLogger except that the type of logger
+        instantiated depends on the type returned by the
+        LoggerFactory#makeNewLoggerInstance method of the
+        <code>factory</code> parameter.
+
+        <p>This method is intended to be used by sub-classes.
+
+        @param name The name of the logger to retrieve.
+
+        @param factory A LoggerFactory implementation that will
+        actually create a new Instance.
+        */
+        static LoggerPtr getLoggerLS(const LogString& name,
+                        const log4cxx::spi::LoggerFactoryPtr& factory);
+        /**
+        Like #getLogger except that the type of logger
+        instantiated depends on the type returned by the
+        LoggerFactory#makeNewLoggerInstance method of the
+        <code>factory</code> parameter.
+
+        <p>This method is intended to be used by sub-classes.
+
+        @param name The name of the logger to retrieve.
+
+        @param factory A LoggerFactory implementation that will
+        actually create a new Instance.
+        */
+        static LoggerPtr getLogger(const std::string& name,
+                        const log4cxx::spi::LoggerFactoryPtr& factory);
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Like #getLogger except that the type of logger
+        instantiated depends on the type returned by the
+        LoggerFactory#makeNewLoggerInstance method of the
+        <code>factory</code> parameter.
+
+        <p>This method is intended to be used by sub-classes.
+
+        @param name The name of the logger to retrieve.
+
+        @param factory A LoggerFactory implementation that will
+        actually create a new Instance.
+        */
+        static LoggerPtr getLogger(const std::wstring& name,
+                        const log4cxx::spi::LoggerFactoryPtr& factory);
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Like #getLogger except that the type of logger
+        instantiated depends on the type returned by the
+        LoggerFactory#makeNewLoggerInstance method of the
+        <code>factory</code> parameter.
+
+        <p>This method is intended to be used by sub-classes.
+
+        @param name The name of the logger to retrieve.
+
+        @param factory A LoggerFactory implementation that will
+        actually create a new Instance.
+        */
+        static LoggerPtr getLogger(const std::basic_string<UniChar>& name,
+                        const log4cxx::spi::LoggerFactoryPtr& factory);
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Like #getLogger except that the type of logger
+        instantiated depends on the type returned by the
+        LoggerFactory#makeNewLoggerInstance method of the
+        <code>factory</code> parameter.
+
+        <p>This method is intended to be used by sub-classes.
+
+        @param name The name of the logger to retrieve.
+
+        @param factory A LoggerFactory implementation that will
+        actually create a new Instance.
+        */
+        static LoggerPtr getLogger(const CFStringRef& name,
+                        const log4cxx::spi::LoggerFactoryPtr& factory);
+#endif
+
+        /**
+        Return the <em>inherited</em> ResourceBundle for this logger.
+
+
+        This method walks the hierarchy to find the appropriate resource bundle.
+        It will return the resource bundle attached to the closest ancestor of
+        this logger, much like the way priorities are searched. In case there
+        is no bundle in the hierarchy then <code>NULL</code> is returned.
+        */
+        helpers::ResourceBundlePtr getResourceBundle() const;
+
+        protected:
+        /**
+        Returns the string resource coresponding to <code>key</code> in this
+        logger's inherited resource bundle.
+
+        If the resource cannot be found, then an {@link #error error} message
+        will be logged complaining about the missing resource.
+
+        @see #getResourceBundle.
+        */
+        LogString getResourceBundleString(const LogString& key) const;
+
+        public:
+        /**
+        Log a message string with the INFO level.
+
+        <p>This method first checks if this logger is <code>INFO</code>
+        enabled by comparing the level of this logger with the 
+        INFO level. If this logger is
+        <code>INFO</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+                */
+       void info(const std::string& msg, const log4cxx::spi::LocationInfo& location) const;
+       void info(const std::string& msg) const;
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Log a message string with the INFO level.
+
+        <p>This method first checks if this logger is <code>INFO</code>
+        enabled by comparing the level of this logger with the 
+        INFO level. If this logger is
+        <code>INFO</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+                */
+       void info(const std::wstring& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the INFO level.
+
+        <p>This method first checks if this logger is <code>INFO</code>
+        enabled by comparing the level of this logger with the 
+        INFO level. If this logger is
+        <code>INFO</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+                */
+       void info(const std::wstring& msg) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Log a message string with the INFO level.
+
+        <p>This method first checks if this logger is <code>INFO</code>
+        enabled by comparing the level of this logger with the 
+        INFO level. If this logger is
+        <code>INFO</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+                */
+        void info(const std::basic_string<UniChar>& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the INFO level.
+
+        <p>This method first checks if this logger is <code>INFO</code>
+        enabled by comparing the level of this logger with the 
+        INFO level. If this logger is
+        <code>INFO</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+                */
+        void info(const std::basic_string<UniChar>& msg) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Log a message string with the INFO level.
+
+        <p>This method first checks if this logger is <code>INFO</code>
+        enabled by comparing the level of this logger with the 
+        INFO level. If this logger is
+        <code>INFO</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+                */
+        void info(const CFStringRef& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the INFO level.
+
+        <p>This method first checks if this logger is <code>INFO</code>
+        enabled by comparing the level of this logger with the 
+        INFO level. If this logger is
+        <code>INFO</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+                */
+        void info(const CFStringRef& msg) const;
+#endif
+
+        /**
+        Is the appender passed as parameter attached to this logger?
+        */
+        bool isAttached(const AppenderPtr& appender) const;
+
+       /**
+        *  Check whether this logger is enabled for the <code>DEBUG</code>
+        *  Level.
+        *
+        *  <p> This function is intended to lessen the computational cost of
+        *  disabled log debug statements.
+        *
+        *  <p> For some <code>logger</code> Logger object, when you write,
+        *  <pre>
+        *      logger->debug("debug message");
+        *  </pre>
+        *
+        *  <p>You incur the cost constructing the message, concatenation in
+        *  this case, regardless of whether the message is logged or not.
+        *
+        *  <p>If you are worried about speed, then you should write
+        *  <pre>
+        *    if(logger->isDebugEnabled()) {
+        *      logger->debug("debug message");
+        *    }
+        *  </pre>
+        *
+        *  <p>This way you will not incur the cost of parameter
+        *  construction if debugging is disabled for <code>logger</code>. On
+        *  the other hand, if the <code>logger</code> is debug enabled, you
+        *  will incur the cost of evaluating whether the logger is debug
+        *  enabled twice. Once in <code>isDebugEnabled</code> and once in
+        *  the <code>debug</code>.  This is an insignificant overhead
+        *  since evaluating a logger takes about 1%% of the time it
+        *  takes to actually log.
+        *
+        *  @return bool - <code>true</code> if this logger is debug
+        *  enabled, <code>false</code> otherwise.
+        *   */
+        bool isDebugEnabled() const;
+
+        /**
+        Check whether this logger is enabled for a given
+        Level passed as parameter.
+
+        See also #isDebugEnabled.
+
+        @return bool True if this logger is enabled for <code>level</code>.
+        */
+        bool isEnabledFor(const LevelPtr& level) const;
+
+
+        /**
+        Check whether this logger is enabled for the info Level.
+        See also #isDebugEnabled.
+
+        @return bool - <code>true</code> if this logger is enabled
+        for level info, <code>false</code> otherwise.
+        */
+        bool isInfoEnabled() const;
+
+         /**
+        Check whether this logger is enabled for the warn Level.
+        See also #isDebugEnabled.
+
+        @return bool - <code>true</code> if this logger is enabled
+        for level warn, <code>false</code> otherwise.
+        */
+        bool isWarnEnabled() const;
+
+         /**
+        Check whether this logger is enabled for the error Level.
+        See also #isDebugEnabled.
+
+        @return bool - <code>true</code> if this logger is enabled
+        for level error, <code>false</code> otherwise.
+        */
+        bool isErrorEnabled() const;
+
+         /**
+        Check whether this logger is enabled for the fatal Level.
+        See also #isDebugEnabled.
+
+        @return bool - <code>true</code> if this logger is enabled
+        for level fatal, <code>false</code> otherwise.
+        */
+        bool isFatalEnabled() const;
+
+        /**
+        Check whether this logger is enabled for the trace level.
+        See also #isDebugEnabled.
+
+        @return bool - <code>true</code> if this logger is enabled
+        for level trace, <code>false</code> otherwise.
+        */
+        bool isTraceEnabled() const;
+
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param values The values for the placeholders <code>{0}</code>,
+                      <code>{1}</code> etc. within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const LogString& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::vector<LogString>& values) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::string& key,
+                    const log4cxx::spi::LocationInfo& locationInfo) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The first value for the placeholders within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::string& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::string& val1) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The first value for the placeholders within the pattern.
+        @param val2 The second value for the placeholders within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::string& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::string& val1, const std::string& val2) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+        @param val2 The value for the second placeholder within the pattern.
+        @param val3 The value for the third placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::string& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::string& val1, const std::string& val2, const std::string& val3) const;
+
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::wstring& key,
+                    const log4cxx::spi::LocationInfo& locationInfo) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::wstring& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::wstring& val1) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+        @param val2 The value for the second placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::wstring& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::wstring& val1, const std::wstring& val2) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+        @param val2 The value for the second placeholder within the pattern.
+        @param val3 The value for the third placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::wstring& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::wstring& val1, const std::wstring& val2, const std::wstring& val3) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::basic_string<UniChar>& key,
+                    const log4cxx::spi::LocationInfo& locationInfo) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::basic_string<UniChar>& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::basic_string<UniChar>& val1) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+        @param val2 The value for the second placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::basic_string<UniChar>& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::basic_string<UniChar>& val1, const std::basic_string<UniChar>& val2) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+        @param val2 The value for the second placeholder within the pattern.
+        @param val3 The value for the third placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const std::basic_string<UniChar>& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const std::basic_string<UniChar>& val1, const std::basic_string<UniChar>& val2, 
+                    const std::basic_string<UniChar>& val3) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const CFStringRef& key,
+                    const log4cxx::spi::LocationInfo& locationInfo) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const CFStringRef& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const CFStringRef& val1) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+        @param val2 The value for the second placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const CFStringRef& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const CFStringRef& val1, const CFStringRef& val2) const;
+        /**
+        Log a localized and parameterized message.
+
+        First, the user supplied
+        <code>key</code> is searched in the resource bundle. Next, the resulting
+        pattern is formatted using helpers::StringHelper::format method with the user
+        supplied string array <code>params</code>.
+
+        @param level The level of the logging request.
+        @param key The key to be searched in the ResourceBundle.
+        @param locationInfo The location info of the logging request.
+        @param val1 The value for the first placeholder within the pattern.
+        @param val2 The value for the second placeholder within the pattern.
+        @param val3 The value for the third placeholder within the pattern.
+
+        @see #setResourceBundle
+        */
+        void l7dlog(const LevelPtr& level, const CFStringRef& key,
+                    const log4cxx::spi::LocationInfo& locationInfo,
+                    const CFStringRef& val1, const CFStringRef& val2, 
+                    const CFStringRef& val3) const;
+#endif
+
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        @param location The source file of the logging request, may be null. */
+        void log(const LevelPtr& level, const std::string& message,
+            const log4cxx::spi::LocationInfo& location) const;
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        */
+        void log(const LevelPtr& level, const std::string& message) const;
+#if LOG4CXX_WCHAR_T_API
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        @param location The source file of the logging request, may be null. */
+        void log(const LevelPtr& level, const std::wstring& message,
+            const log4cxx::spi::LocationInfo& location) const;
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        */
+        void log(const LevelPtr& level, const std::wstring& message) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        @param location The source file of the logging request, may be null. */
+        void log(const LevelPtr& level, const std::basic_string<UniChar>& message,
+            const log4cxx::spi::LocationInfo& location) const;
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        */
+        void log(const LevelPtr& level, const std::basic_string<UniChar>& message) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        @param location The source file of the logging request, may be null. */
+        void log(const LevelPtr& level, const CFStringRef& message,
+            const log4cxx::spi::LocationInfo& location) const;
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        */
+        void log(const LevelPtr& level, const CFStringRef& message) const;
+#endif
+          /**
+        This is the most generic printing method. It is intended to be
+        invoked by <b>wrapper</b> classes.
+
+        @param level The level of the logging request.
+        @param message The message of the logging request.
+        @param location The source file of the logging request, may be null. */
+        void logLS(const LevelPtr& level, const LogString& message,
+            const log4cxx::spi::LocationInfo& location) const;
+
+
+
+        /**
+        Remove all previously added appenders from this logger
+        instance.
+        <p>This is useful when re-reading configuration information.
+        */
+        void removeAllAppenders();
+
+        /**
+        Remove the appender passed as parameter form the list of appenders.
+        */
+        void removeAppender(const AppenderPtr& appender);
+
+        /**
+        Remove the appender with the name passed as parameter form the
+        list of appenders.
+         */
+        void removeAppender(const LogString& name);
+
+       /**
+        Set the additivity flag for this Logger instance.
+         */
+        void setAdditivity(bool additive);
+
+    protected:
+        friend class Hierarchy;
+        /**
+        Only the Hierarchy class can set the hierarchy of a logger.*/
+        void setHierarchy(spi::LoggerRepository * repository);
+
+        public:
+        /**
+        Set the level of this Logger.
+
+        <p>As in <pre> &nbsp;&nbsp;&nbsp;logger->setLevel(Level::getDebug()); </pre>
+
+        <p>Null values are admitted.  */
+        virtual void setLevel(const LevelPtr& level);
+
+        /**
+        Set the resource bundle to be used with localized logging methods.
+        */
+        inline void setResourceBundle(const helpers::ResourceBundlePtr& bundle)
+                { resourceBundle = bundle; }
+
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Log a message string with the WARN level.
+
+        <p>This method first checks if this logger is <code>WARN</code>
+        enabled by comparing the level of this logger with the
+        WARN level. If this logger is
+        <code>WARN</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void warn(const std::wstring& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the WARN level.
+
+        <p>This method first checks if this logger is <code>WARN</code>
+        enabled by comparing the level of this logger with the
+        WARN level. If this logger is
+        <code>WARN</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void warn(const std::wstring& msg) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Log a message string with the WARN level.
+
+        <p>This method first checks if this logger is <code>WARN</code>
+        enabled by comparing the level of this logger with the
+        WARN level. If this logger is
+        <code>WARN</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void warn(const std::basic_string<UniChar>& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the WARN level.
+
+        <p>This method first checks if this logger is <code>WARN</code>
+        enabled by comparing the level of this logger with the
+        WARN level. If this logger is
+        <code>WARN</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void warn(const std::basic_string<UniChar>& msg) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Log a message string with the WARN level.
+
+        <p>This method first checks if this logger is <code>WARN</code>
+        enabled by comparing the level of this logger with the
+        WARN level. If this logger is
+        <code>WARN</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void warn(const CFStringRef& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the WARN level.
+
+        <p>This method first checks if this logger is <code>WARN</code>
+        enabled by comparing the level of this logger with the
+        WARN level. If this logger is
+        <code>WARN</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void warn(const CFStringRef& msg) const;
+#endif
+        /**
+        Log a message string with the WARN level.
+
+        <p>This method first checks if this logger is <code>WARN</code>
+        enabled by comparing the level of this logger with the
+        WARN level. If this logger is
+        <code>WARN</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void warn(const std::string& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the WARN level.
+
+        <p>This method first checks if this logger is <code>WARN</code>
+        enabled by comparing the level of this logger with the
+        WARN level. If this logger is
+        <code>WARN</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void warn(const std::string& msg) const;
+
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Log a message string with the TRACE level.
+
+        <p>This method first checks if this logger is <code>TRACE</code>
+        enabled by comparing the level of this logger with the
+        TRACE level. If this logger is
+        <code>TRACE</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void trace(const std::wstring& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the TRACE level.
+
+        <p>This method first checks if this logger is <code>TRACE</code>
+        enabled by comparing the level of this logger with the
+        TRACE level. If this logger is
+        <code>TRACE</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void trace(const std::wstring& msg) const;
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Log a message string with the TRACE level.
+
+        <p>This method first checks if this logger is <code>TRACE</code>
+        enabled by comparing the level of this logger with the
+        TRACE level. If this logger is
+        <code>TRACE</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void trace(const std::basic_string<UniChar>& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the TRACE level.
+
+        <p>This method first checks if this logger is <code>TRACE</code>
+        enabled by comparing the level of this logger with the
+        TRACE level. If this logger is
+        <code>TRACE</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void trace(const std::basic_string<UniChar>& msg) const;
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Log a message string with the TRACE level.
+
+        <p>This method first checks if this logger is <code>TRACE</code>
+        enabled by comparing the level of this logger with the
+        TRACE level. If this logger is
+        <code>TRACE</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void trace(const CFStringRef& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the TRACE level.
+
+        <p>This method first checks if this logger is <code>TRACE</code>
+        enabled by comparing the level of this logger with the
+        TRACE level. If this logger is
+        <code>TRACE</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void trace(const CFStringRef& msg) const;
+#endif
+        /**
+        Log a message string with the TRACE level.
+
+        <p>This method first checks if this logger is <code>TRACE</code>
+        enabled by comparing the level of this logger with the
+        TRACE level. If this logger is
+        <code>TRACE</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        @param location location of source of logging request.
+        */
+        void trace(const std::string& msg, const log4cxx::spi::LocationInfo& location) const;
+        /**
+        Log a message string with the TRACE level.
+
+        <p>This method first checks if this logger is <code>TRACE</code>
+        enabled by comparing the level of this logger with the
+        TRACE level. If this logger is
+        <code>TRACE</code> enabled, it proceeds to call all the
+        registered appenders in this logger and also higher in the
+        hierarchy depending on the value of the additivity flag.
+
+        @param msg the message string to log.
+        */
+        void trace(const std::string& msg) const;
+
+        inline const log4cxx::helpers::Mutex& getMutex() const { return mutex; }
+
+        private:
+                //
+        //  prevent copy and assignment
+        Logger(const Logger&);
+        Logger& operator=(const Logger&);
+        log4cxx::helpers::Mutex mutex;
+        friend class log4cxx::helpers::synchronized;
+   };
+   LOG4CXX_LIST_DEF(LoggerList, LoggerPtr);
+   
+}
+
+/** @addtogroup LoggingMacros Logging macros
+@{
+*/
+
+#if !defined(LOG4CXX_UNLIKELY)
+#if __GNUC__ >= 3
+/**
+Provides optimization hint to the compiler
+to optimize for the expression being false.
+@param expr boolean expression.
+@returns value of expression.
+*/
+#define LOG4CXX_UNLIKELY(expr) __builtin_expect(expr, 0)
+#else
+/**
+Provides optimization hint to the compiler
+to optimize for the expression being false.
+@param expr boolean expression.
+@returns value of expression.
+**/
+#define LOG4CXX_UNLIKELY(expr) expr
+#endif
+#endif
+
+
+/**
+Logs a message to a specified logger with a specified level.
+
+@param logger the logger to be used.
+@param level the level to log.
+@param message the message string to log.
+*/
+#define LOG4CXX_LOG(logger, level, message) { \
+        if (logger->isEnabledFor(level)) {\
+           ::log4cxx::helpers::MessageBuffer oss_; \
+           logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); } }
+
+/**
+Logs a message to a specified logger with a specified level.
+
+@param logger the logger to be used.
+@param level the level to log.
+@param message the message string to log in the internal encoding.
+*/
+#define LOG4CXX_LOGLS(logger, level, message) { \
+        if (logger->isEnabledFor(level)) {\
+           ::log4cxx::helpers::LogCharMessageBuffer oss_; \
+           logger->forcedLog(level, oss_.str(oss_ << message), LOG4CXX_LOCATION); } }
+
+/**
+Logs a message to a specified logger with the DEBUG level.
+
+@param logger the logger to be used.
+@param message the message string to log.
+*/
+#define LOG4CXX_DEBUG(logger, message) { \
+        if (LOG4CXX_UNLIKELY(logger->isDebugEnabled())) {\
+           ::log4cxx::helpers::MessageBuffer oss_; \
+           logger->forcedLog(::log4cxx::Level::getDebug(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+
+/**
+Logs a message to a specified logger with the TRACE level.
+
+@param logger the logger to be used.
+@param message the message string to log.
+*/
+#define LOG4CXX_TRACE(logger, message) { \
+        if (LOG4CXX_UNLIKELY(logger->isTraceEnabled())) {\
+           ::log4cxx::helpers::MessageBuffer oss_; \
+           logger->forcedLog(::log4cxx::Level::getTrace(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+
+
+/**
+Logs a message to a specified logger with the INFO level.
+
+@param logger the logger to be used.
+@param message the message string to log.
+*/
+#define LOG4CXX_INFO(logger, message) { \
+        if (logger->isInfoEnabled()) {\
+           ::log4cxx::helpers::MessageBuffer oss_; \
+           logger->forcedLog(::log4cxx::Level::getInfo(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+
+/**
+Logs a message to a specified logger with the WARN level.
+
+@param logger the logger to be used.
+@param message the message string to log.
+*/
+#define LOG4CXX_WARN(logger, message) { \
+        if (logger->isWarnEnabled()) {\
+           ::log4cxx::helpers::MessageBuffer oss_; \
+           logger->forcedLog(::log4cxx::Level::getWarn(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+
+/**
+Logs a message to a specified logger with the ERROR level.
+
+@param logger the logger to be used.
+@param message the message string to log.
+*/
+#define LOG4CXX_ERROR(logger, message) { \
+        if (logger->isErrorEnabled()) {\
+           ::log4cxx::helpers::MessageBuffer oss_; \
+           logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+
+/**
+Logs a error if the condition is not true.
+
+@param logger the logger to be used.
+@param condition condition
+@param message the message string to log.
+*/
+#define LOG4CXX_ASSERT(logger, condition, message) { \
+        if (!(condition) && logger->isErrorEnabled()) {\
+           ::log4cxx::helpers::MessageBuffer oss_; \
+           logger->forcedLog(::log4cxx::Level::getError(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+
+
+/**
+Logs a message to a specified logger with the FATAL level.
+
+@param logger the logger to be used.
+@param message the message string to log.
+*/
+#define LOG4CXX_FATAL(logger, message) { \
+        if (logger->isFatalEnabled()) {\
+           ::log4cxx::helpers::MessageBuffer oss_; \
+           logger->forcedLog(::log4cxx::Level::getFatal(), oss_.str(oss_ << message), LOG4CXX_LOCATION); }}
+
+/**
+Logs a localized message with no parameter.
+
+@param logger the logger to be used.
+@param level the level to log.
+@param key the key to be searched in the resourceBundle of the logger.
+*/
+#define LOG4CXX_L7DLOG(logger, level, key) { \
+        if (logger->isEnabledFor(level)) {\
+        logger->l7dlog(level, key, LOG4CXX_LOCATION); }}
+
+/**
+Logs a localized message with one parameter.
+
+@param logger the logger to be used.
+@param level the level to log.
+@param key the key to be searched in the resourceBundle of the logger.
+@param p1 the unique parameter.
+*/
+#define LOG4CXX_L7DLOG1(logger, level, key, p1) { \
+        if (logger->isEnabledFor(level)) {\
+        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1); }}
+
+/**
+Logs a localized message with two parameters.
+
+@param logger the logger to be used.
+@param level the level to log.
+@param key the key to be searched in the resourceBundle of the logger.
+@param p1 the first parameter.
+@param p2 the second parameter.
+*/
+#define LOG4CXX_L7DLOG2(logger, level, key, p1, p2) { \
+        if (logger->isEnabledFor(level)) {\
+        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2); }}
+
+/**
+Logs a localized message with three parameters.
+
+@param logger the logger to be used.
+@param level the level to log.
+@param key the key to be searched in the resourceBundle of the logger.
+@param p1 the first parameter.
+@param p2 the second parameter.
+@param p3 the third parameter.
+*/
+#define LOG4CXX_L7DLOG3(logger, level, key, p1, p2, p3) { \
+        if (logger->isEnabledFor(level)) {\
+        logger->l7dlog(level, key, LOG4CXX_LOCATION, p1, p2, p3); }}
+
+/**@}*/
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#include <log4cxx/spi/loggerrepository.h>
+
+#endif //_LOG4CXX_LOGGER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logmanager.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logmanager.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logmanager.h	(revision 257)
@@ -0,0 +1,212 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_LOG_MANAGER_H
+#define _LOG4CXX_LOG_MANAGER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/logstring.h>
+#include <vector>
+#include <log4cxx/spi/repositoryselector.h>
+
+namespace log4cxx
+{
+    class Logger;
+    typedef helpers::ObjectPtrT<Logger> LoggerPtr;
+    typedef std::vector<LoggerPtr> LoggerList;
+
+    namespace spi {
+        class LoggerFactory;
+        typedef helpers::ObjectPtrT<LoggerFactory> LoggerFactoryPtr;
+    }
+
+    /**
+    * Use the <code>LogManager</code> class to retreive Logger
+    * instances or to operate on the current 
+    * {@link log4cxx::spi::LoggerRepository LoggerRepository}. 
+    * When the <code>LogManager</code> class is loaded
+    * into memory the default initialization procedure is inititated.
+        */
+    class LOG4CXX_EXPORT LogManager
+    {
+    private:
+        static void * guard;
+        static spi::RepositorySelectorPtr& getRepositorySelector();
+
+    public:
+        /**
+        Sets <code>LoggerFactory</code> but only if the correct
+        <em>guard</em> is passed as parameter.
+
+        <p>Initally the guard is null.  If the guard is
+        <code>null</code>, then invoking this method sets the logger
+        factory and the guard. Following invocations will throw a {@link
+        helpers::IllegalArgumentException IllegalArgumentException},
+                unless the previously set <code>guard</code> is passed as the second
+                parameter.
+
+        <p>This allows a high-level component to set the {@link
+        spi::RepositorySelector RepositorySelector} used by the
+                <code>LogManager</code>.
+                */
+
+        static void setRepositorySelector(spi::RepositorySelectorPtr selector,
+                        void * guard);
+
+        static spi::LoggerRepositoryPtr& getLoggerRepository();
+
+        /**
+        Retrieve the appropriate root logger.
+        */
+        static LoggerPtr getRootLogger();
+
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name in current encoding.
+        * @return logger.
+        */
+        static LoggerPtr getLogger(const std::string& name);
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name in current encoding.
+        * @param factory logger factory.
+        * @return logger.
+        */
+        static LoggerPtr getLogger(const std::string& name,
+                        const spi::LoggerFactoryPtr& factory);
+        /**
+         * Determines if logger name exists in the hierarchy.
+         * @param name logger name.
+         * @return true if logger exists.
+         */
+        static LoggerPtr exists(const std::string& name);
+#if LOG4CXX_WCHAR_T_API
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name.
+        * @return logger.
+        */
+        static LoggerPtr getLogger(const std::wstring& name);
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name.
+        * @param factory logger factory.
+        * @return logger.
+        */
+        static LoggerPtr getLogger(const std::wstring& name,
+                        const spi::LoggerFactoryPtr& factory);
+        /**
+         * Determines if logger name exists in the hierarchy.
+         * @param name logger name.
+         * @return true if logger exists.
+         */
+        static LoggerPtr exists(const std::wstring& name);
+#endif
+#if LOG4CXX_UNICHAR_API
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name.
+        * @return logger.
+        */
+        static LoggerPtr getLogger(const std::basic_string<UniChar>& name);
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name.
+        * @param factory logger factory.
+        * @return logger.
+        */
+        static LoggerPtr getLogger(const std::basic_string<UniChar>& name,
+                        const spi::LoggerFactoryPtr& factory);
+        /**
+         * Determines if logger name exists in the hierarchy.
+         * @param name logger name.
+         * @return true if logger exists.
+         */
+        static LoggerPtr exists(const std::basic_string<UniChar>& name);
+#endif
+#if LOG4CXX_CFSTRING_API
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name.
+        * @return logger.
+        */
+        static LoggerPtr getLogger(const CFStringRef& name);
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name.
+        * @param factory logger factory.
+        * @return logger.
+        */
+        static LoggerPtr getLogger(const CFStringRef& name,
+                        const spi::LoggerFactoryPtr& factory);
+        /**
+         * Determines if logger name exists in the hierarchy.
+         * @param name logger name.
+         * @return true if logger exists.
+         */
+        static LoggerPtr exists(const CFStringRef& name);
+#endif
+
+
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name.
+        * @return logger.
+        */
+        static LoggerPtr getLoggerLS(const LogString& name);
+        /**
+        Retrieve the appropriate Logger instance.
+        * @param name logger name.
+        * @param factory logger factory.
+        * @return logger.
+        */
+        static LoggerPtr getLoggerLS(const LogString& name,
+                        const spi::LoggerFactoryPtr& factory);
+
+        /**
+         * Determines if logger name exists in the hierarchy.
+         * @param name logger name.
+         * @return true if logger exists.
+         */
+        static LoggerPtr existsLS(const LogString& name);
+
+        static LoggerList getCurrentLoggers();
+
+        /**
+        Safely close and remove all appenders in all loggers including
+        the root logger.
+        */
+        static void shutdown();
+
+        /**
+        Reset all values contained in this current {@link
+        spi::LoggerRepository LoggerRepository}  to their default.
+        */
+        static void resetConfiguration();
+    }; // class LogManager
+}  // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif //_LOG4CXX_LOG_MANAGER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logstring.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logstring.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/logstring.h	(revision 257)
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_STRING_H
+#define _LOG4CXX_STRING_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <string>
+#include <log4cxx/log4cxx.h>
+
+#if LOG4CXX_LOGCHAR_IS_WCHAR && LOG4CXX_LOGCHAR_IS_UTF8 && LOG4CXX_LOGCHAR_IS_UNICHAR
+#error only one of LOG4CXX_LOGCHAR_IS_WCHAR, LOG4CXX_LOGCHAR_IS_UTF8 or LOG4CXX_LOGCHAR_IS_UNICHAR may be true
+#endif
+
+#if LOG4CXX_CFSTRING_API
+extern "C" {
+typedef const struct __CFString* CFStringRef;
+}
+#endif
+
+
+
+namespace log4cxx {
+
+#if LOG4CXX_LOGCHAR_IS_UNICHAR || LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API
+typedef unsigned short UniChar;
+#endif
+
+#if LOG4CXX_LOGCHAR_IS_WCHAR
+   typedef wchar_t logchar;
+#define LOG4CXX_STR(str) L ## str
+#endif
+
+#if LOG4CXX_LOGCHAR_IS_UTF8
+   typedef char logchar;
+#if LOG4CXX_CHARSET_EBCDIC
+#define LOG4CXX_STR(str) log4cxx::helpers::Transcoder::decode(str)
+#else   
+#define LOG4CXX_STR(str) str
+#endif
+#endif
+
+#if LOG4CXX_LOGCHAR_IS_UNICHAR
+   typedef UniChar logchar;
+#define LOG4CXX_STR(str) log4cxx::helpers::Transcoder::decode(str)   
+#endif
+
+   typedef std::basic_string<logchar> LogString;
+
+
+}
+
+
+#if !defined(LOG4CXX_EOL)
+#if defined(_WIN32)
+#define LOG4CXX_EOL LOG4CXX_STR("\x0D\x0A")
+#else
+#define LOG4CXX_EOL LOG4CXX_STR("\x0A")
+#endif
+#endif
+
+
+#if LOG4CXX_LOGCHAR_IS_UNICHAR || (LOG4CXX_LOGCHAR_IS_UTF8 || LOG4CXX_CHARSET_EBCDIC)
+#include <log4cxx/helpers/transcoder.h>
+#endif
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+#endif //_LOG4CXX_STRING_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/mdc.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/mdc.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/mdc.h	(revision 257)
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_MDC_H
+#define _LOG4CXX_MDC_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/log4cxx.h>
+#include <log4cxx/logstring.h>
+#include <map>
+
+namespace log4cxx
+{
+        /**
+        The MDC class is similar to the {@link log4cxx::NDC NDC} class except that it is
+        based on a map instead of a stack. It provides <em>mapped
+        diagnostic contexts</em>. A <em>Mapped Diagnostic Context</em>, or
+        MDC in short, is an instrument for distinguishing interleaved log
+        output from different sources. Log output is typically interleaved
+        when a server handles multiple clients near-simultaneously.
+
+        <p><b><em>The MDC is managed on a per thread basis</em></b>. A
+        child thread automatically inherits a <em>copy</em> of the mapped
+        diagnostic context of its parent.
+
+        */
+        class LOG4CXX_EXPORT MDC
+        {
+        public:
+                /** String to string stl map.
+                */
+                typedef std::map<LogString, LogString> Map;
+
+                /**
+                 *  Places a key/value pair in the MDC for the current thread
+                 *    which will be removed during the corresponding destructor.  Both
+                 *    construction and destruction are expected to be on the same thread.
+                 *    @param key key
+                 *    @param value value.
+                 */
+                MDC(const std::string& key, const std::string& value);
+                ~MDC();
+
+                /**
+                * Put a context value (the <code>o</code> parameter) as identified
+                * with the <code>key</code> parameter into the current thread's
+                * context map.
+                *
+                * <p>If the current thread does not have a context map it is
+                * created as a side effect.
+                 *    @param key key
+                 *    @param value value.
+                */
+                static void put(const std::string& key, const std::string& value);
+                /**
+                * Put a context value (the <code>o</code> parameter) as identified
+                * with the <code>key</code> parameter into the current thread's
+                * context map.
+                *
+                * <p>If the current thread does not have a context map it is
+                * created as a side effect.
+                * */
+                static void putLS(const LogString& key, const LogString& value);
+
+                /**
+                * Get the context identified by the <code>key</code> parameter.
+                *
+                *  <p>This method has no side effects.
+                *  @param key key.
+                *  @return value for key, empty if not set.
+                * */
+                static std::string get(const std::string& key);
+                /**
+                 *  Gets the context identified by the <code>key</code> parameter.
+                 *  @param key context key.
+                 *  @param dest destination to which value is appended.
+                 *  @return true if key has associated value.
+                 */
+                static bool get(const LogString& key, LogString& dest);
+
+                /**
+                * Remove the the context identified by the <code>key</code>
+                * parameter.
+                *  @param key key.
+                * @return value if key had been set, empty if not. 
+                */
+                static std::string remove(const std::string& key);
+#if LOG4CXX_WCHAR_T_API
+                /**
+                 *  Places a key/value pair in the MDC for the current thread
+                 *    which will be removed during the corresponding destructor.  Both
+                 *    construction and destruction are expected to be on the same thread.
+                 *    @param key key
+                 *    @param value value.
+                 */
+                MDC(const std::wstring& key, const std::wstring& value);
+                /**
+                * Put a context value (the <code>o</code> parameter) as identified
+                * with the <code>key</code> parameter into the current thread's
+                * context map.
+                *
+                * <p>If the current thread does not have a context map it is
+                * created as a side effect.
+                 *    @param key key
+                 *    @param value value.
+                */
+                static void put(const std::wstring& key, const std::wstring& value);
+                /**
+                * Get the context identified by the <code>key</code> parameter.
+                *
+                *  <p>This method has no side effects.
+                *  @param key key.
+                *  @return value for key, empty if not set.
+                * */
+                static std::wstring get(const std::wstring& key);
+                /**
+                * Remove the the context identified by the <code>key</code>
+                * parameter.
+                *  @param key key.
+                * @return value if key had been set, empty if not. 
+                */
+                static std::wstring remove(const std::wstring& key);
+#endif
+#if LOG4CXX_UNICHAR_API
+                /**
+                 *  Places a key/value pair in the MDC for the current thread
+                 *    which will be removed during the corresponding destructor.  Both
+                 *    construction and destruction are expected to be on the same thread.
+                 *    @param key key
+                 *    @param value value.
+                 */
+                MDC(const std::basic_string<UniChar>& key, const std::basic_string<UniChar>& value);
+                /**
+                * Put a context value (the <code>o</code> parameter) as identified
+                * with the <code>key</code> parameter into the current thread's
+                * context map.
+                *
+                * <p>If the current thread does not have a context map it is
+                * created as a side effect.
+                 *    @param key key
+                 *    @param value value.
+                */
+                static void put(const std::basic_string<UniChar>& key, const std::basic_string<UniChar>& value);
+                /**
+                * Get the context identified by the <code>key</code> parameter.
+                *
+                *  <p>This method has no side effects.
+                *  @param key key.
+                *  @return value for key, empty if not set.
+                * */
+                static std::basic_string<UniChar> get(const std::basic_string<UniChar>& key);
+                /**
+                * Remove the the context identified by the <code>key</code>
+                * parameter.
+                *  @param key key.
+                * @return value if key had been set, empty if not. 
+                */
+                static std::basic_string<UniChar> remove(const std::basic_string<UniChar>& key);
+#endif
+#if LOG4CXX_CFSTRING_API
+                /**
+                 *  Places a key/value pair in the MDC for the current thread
+                 *    which will be removed during the corresponding destructor.  Both
+                 *    construction and destruction are expected to be on the same thread.
+                 *    @param key key
+                 *    @param value value.
+                 */
+                MDC(const CFStringRef& key, const CFStringRef& value);
+                /**
+                * Put a context value (the <code>o</code> parameter) as identified
+                * with the <code>key</code> parameter into the current thread's
+                * context map.
+                *
+                * <p>If the current thread does not have a context map it is
+                * created as a side effect.
+                 *    @param key key
+                 *    @param value value.
+                */
+                static void put(const CFStringRef& key, const CFStringRef& value);
+                /**
+                * Get the context identified by the <code>key</code> parameter.
+                *
+                *  <p>This method has no side effects.
+                *  @param key key.
+                *  @return value for key, empty if not set.
+                * */
+                static CFStringRef get(const CFStringRef& key);
+                /**
+                * Remove the the context identified by the <code>key</code>
+                * parameter.
+                *  @param key key.
+                * @return value if key had been set, empty if not. 
+                */
+                static CFStringRef remove(const CFStringRef& key);
+#endif
+                /**
+                * Remove the the context identified by the <code>key</code>
+                * parameter.
+                *  @param key key.
+                * @param prevValue buffer to which previous value is appended.
+                * @return true if key existed in MDC. 
+                */
+                static bool remove(const LogString& key, LogString& prevValue);
+
+                /**
+                * Clear all entries in the MDC.
+                */
+                static void clear();
+
+        private:
+                MDC(const MDC&);
+                MDC& operator=(const MDC&);
+                LogString key;                
+        }; // class MDC;
+}  // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+
+#endif // _LOG4CXX_MDC_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/ndc.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/ndc.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/ndc.h	(revision 257)
@@ -0,0 +1,353 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NDC_H
+#define _LOG4CXX_NDC_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/log4cxx.h>
+#include <log4cxx/logstring.h>
+#include <stack>
+
+namespace log4cxx
+{
+        /**
+        the ndc class implements <i>nested diagnostic contexts</i> as
+        defined by neil harrison in the article "patterns for logging
+        diagnostic messages" part of the book "<i>pattern languages of
+        program design 3</i>" edited by martin et al.
+
+        <p>a nested diagnostic context, or ndc in short, is an instrument
+        to distinguish interleaved log output from different sources. log
+        output is typically interleaved when a server handles multiple
+        clients near-simultaneously.
+
+        <p>interleaved log output can still be meaningful if each log entry
+        from different contexts had a distinctive stamp. this is where ndcs
+        come into play.
+
+        <p><em><b>note that ndcs are managed on a per thread
+        basis</b></em>. ndc operations such as #push,
+        #pop, #clear and #getDepth
+        affect the ndc of the <em>current</em> thread only. ndcs of other
+        threads remain unaffected.
+
+        <p>for example, a servlet can build a per client request ndc
+        consisting the clients host name and other information contained in
+        the the request. <em>cookies</em> are another source of distinctive
+        information. to build an ndc one uses the #push
+        operation. simply put,
+
+        <p><ul>
+         <li>contexts can be nested.
+
+         <p><li>when entering a context, call <code>ndc.push</code>. as a
+         side effect, if there is no nested diagnostic context for the
+         current thread, this method will create it.
+
+         <p><li>when leaving a context, call <code>ndc.pop</code>.
+
+         <p><li><b>when exiting a thread make sure to call #remove
+         </b>.
+        </ul>
+
+        <p>there is no penalty for forgetting to match each
+        <code>push</code> operation with a corresponding <code>pop</code>,
+        except the obvious mismatch between the real application context
+        and the context set in the ndc.
+
+        <p>if configured to do so, PatternLayout and
+        TTCCLayout instances automatically retrieve the nested diagnostic
+        context for the current thread without any user intervention.
+        hence, even if a servlet is serving multiple clients
+        simultaneously, the logs emanating from the same code (belonging to
+        the same logger) can still be distinguished because each client
+        request will have a different ndc tag.
+
+        <p>heavy duty systems should call the #remove method when
+        leaving the run method of a thread. this ensures that the memory
+        used by the thread can be freed by the java garbage
+        collector. there is a mechanism to lazily remove references to dead
+        threads. in practice, this means that you can be a little sloppy
+        and sometimes forget to call #remove before exiting a
+        thread.
+
+        */
+        class LOG4CXX_EXPORT NDC
+        {
+        public:
+                /**
+                 *  Pair of Message and FullMessage.
+                 */
+                typedef std::pair<LogString, LogString> DiagnosticContext;
+                typedef std::stack<DiagnosticContext> Stack;
+
+                /**
+                 Creates a nested diagnostic context.
+                 Since java performs no automatic cleanup of objects when a
+                 scope is left, in log4j push() and pop() must be used
+                 to manage the NDC. For convenience, log4cxx provides 
+                 an NDC constructor and destructor which simply call the push() and
+                 pop() methods, allowing for automatic cleanup when the current
+                 scope ends.
+
+                 @param message The new diagnostic context information.
+                 @see The #push method.
+                 */
+                NDC(const std::string& message);
+
+                /**
+                Removes the topmost element from the NDC stack.
+
+                @see The #pop method.
+                */
+                ~NDC();
+
+                /**
+                Clear any nested diagnostic information if any. This method is
+                useful in cases where the same thread can be potentially used
+                over and over in different unrelated contexts.
+                */
+                static void clear();
+
+                /**
+                    Clone the diagnostic context for the current thread.
+                    <p>Internally a diagnostic context is represented as a stack.  A
+                    given thread can supply the stack (i.e. diagnostic context) to a
+                    child thread so that the child can inherit the parent thread's
+                    diagnostic context.
+                    <p>The child thread uses the #inherit method to
+                    inherit the parent's diagnostic context.
+                    <p>If not passed to #inherit, returned stack should be deleted by caller.
+                    @return Stack A clone of the current thread's diagnostic context, will not be null.
+                */
+                static Stack * cloneStack();
+
+                /**
+                Inherit the diagnostic context of another thread.
+                <p>The parent thread can obtain a reference to its diagnostic
+                context using the #cloneStack method.  It should
+                communicate this information to its child so that it may inherit
+                the parent's diagnostic context.
+                <p>The parent's diagnostic context is cloned before being
+                inherited. In other words, once inherited, the two diagnostic
+                contexts can be managed independently.
+                @param stack The diagnostic context of the parent thread,
+                    will be deleted during call.  If NULL, NDC will not be modified.
+                */
+                static void inherit(Stack * stack);
+
+                /**
+                 *   Get the current value of the NDC of the
+                 *   currrent thread.
+                * @param dest destination to which to append content of NDC.
+                * @return true if NDC is set.
+                */
+                static bool get(LogString& dest);
+
+                /**
+                Get the current nesting depth of this diagnostic context.
+                */
+                static int getDepth();
+
+
+                /**
+                * Tests if the NDC is empty.
+                */
+                static bool empty();
+
+                /**
+                Pop top value off stack.
+                @return top value.
+                */
+                static LogString pop();
+                /**
+                Pop top value off stack.
+                @param buf to which top value is appended.
+                @return true if NDC contained at least one value.
+                */
+                static bool pop(std::string& buf);
+
+                /**
+                Looks at the last diagnostic context at the top of this NDC
+                without removing it.
+                <p>The returned value is the value that was pushed last. If no
+                context is available, then the empty string "" is returned.
+                @return String The innermost diagnostic context.
+                */
+                static LogString peek();
+                /**
+                Get top value without removing value.
+                @param buf to which top value is appended.
+                @return true if NDC contained at least one value.
+                */
+                static bool peek(std::string& buf);
+
+                /**
+                Push new diagnostic context information for the current thread.
+                <p>The contents of the <code>message</code> parameter is
+                determined solely by the client.
+                @param message The new diagnostic context information.
+                */
+                static void push(const std::string& message);
+                /**
+                Push new diagnostic context information for the current thread.
+                <p>The contents of the <code>message</code> parameter is
+                determined solely by the client.
+                @param message The new diagnostic context information.
+                */
+                static void pushLS(const LogString& message);
+
+                /**
+                Remove the diagnostic context for this thread.
+                <p>Each thread that created a diagnostic context by calling
+                #push should call this method before exiting. Otherwise,
+                the memory used by the <b>thread</b> cannot be reclaimed by the
+                VM.
+                <p>As this is such an important problem in heavy duty systems and
+                because it is difficult to always guarantee that the remove
+                method is called before exiting a thread, this method has been
+                augmented to lazily remove references to dead threads. In
+                practice, this means that you can be a little sloppy and
+                occasionally forget to call #remove before exiting a
+                thread. However, you must call <code>remove</code> sometime. If
+                you never call it, then your application is sure to run out of
+                memory.
+                */
+                static void remove();
+                
+#if LOG4CXX_WCHAR_T_API
+               /**
+                 Creates a nested diagnostic context.
+                 Since java performs no automatic cleanup of objects when a
+                 scope is left, in log4j push() and pop() must be used
+                 to manage the NDC. For convenience, log4cxx provides 
+                 an NDC constructor and destructor which simply call the push() and
+                 pop() methods, allowing for automatic cleanup when the current
+                 scope ends.
+
+                 @param message The new diagnostic context information.
+                 @see The #push method.
+                 */
+                 NDC(const std::wstring& message);
+                 /**
+                Push new diagnostic context information for the current thread.
+                <p>The contents of the <code>message</code> parameter is
+                determined solely by the client.
+                @param message The new diagnostic context information.
+                */
+               static void push(const std::wstring& message);
+                /**
+                 *   Appends the current NDC content to the provided string.
+                 *   @param dst destination.
+                 *   @return true if NDC value set. 
+                 */
+                static bool peek(std::wstring& dst);
+                /**
+                 *   Appends the current NDC content to the provided string and removes the value from the NDC.
+                 *   @param dst destination.
+                 *   @return true if NDC value set. 
+                 */
+                static bool pop(std::wstring& dst);
+#endif
+#if LOG4CXX_UNICHAR_API
+               /**
+                 Creates a nested diagnostic context.
+                 Since java performs no automatic cleanup of objects when a
+                 scope is left, in log4j push() and pop() must be used
+                 to manage the NDC. For convenience, log4cxx provides 
+                 an NDC constructor and destructor which simply call the push() and
+                 pop() methods, allowing for automatic cleanup when the current
+                 scope ends.
+
+                 @param message The new diagnostic context information.
+                 @see The #push method.
+                 */
+                 NDC(const std::basic_string<UniChar>& message);
+                /**
+                Push new diagnostic context information for the current thread.
+                <p>The contents of the <code>message</code> parameter is
+                determined solely by the client.
+                @param message The new diagnostic context information.
+                */
+                static void push(const std::basic_string<UniChar>& message);
+                /**
+                 *   Appends the current NDC content to the provided string.
+                 *   @param dst destination.
+                 *   @return true if NDC value set. 
+                 */
+                static bool peek(std::basic_string<UniChar>& dst);
+                /**
+                 *   Appends the current NDC content to the provided string and removes the value from the NDC.
+                 *   @param dst destination.
+                 *   @return true if NDC value set. 
+                 */
+                static bool pop(std::basic_string<UniChar>& dst);
+#endif
+#if LOG4CXX_CFSTRING_API
+               /**
+                 Creates a nested diagnostic context.
+                 Since java performs no automatic cleanup of objects when a
+                 scope is left, in log4j push() and pop() must be used
+                 to manage the NDC. For convenience, log4cxx provides 
+                 an NDC constructor and destructor which simply call the push() and
+                 pop() methods, allowing for automatic cleanup when the current
+                 scope ends.
+
+                 @param message The new diagnostic context information.
+                 @see The #push method.
+                 */
+                 NDC(const CFStringRef& message);
+                /**
+                Push new diagnostic context information for the current thread.
+                <p>The contents of the <code>message</code> parameter is
+                determined solely by the client.
+                @param message The new diagnostic context information.
+                */
+                static void push(const CFStringRef& message);
+                /**
+                 *   Gets the current NDC value.
+                 *   @param dst destination.
+                 *   @return true if NDC value set. 
+                 */
+                static bool peek(CFStringRef& dst);
+                /**
+                 *  Gets and removes the current NDC value.
+                 *   @param dst destination.
+                 *   @return true if NDC value set. 
+                 */
+                static bool pop(CFStringRef& dst);
+#endif
+                
+        private:
+                NDC(const NDC&);
+                NDC& operator=(const NDC&);
+                static LogString& getMessage(DiagnosticContext& ctx);
+                static LogString& getFullMessage(DiagnosticContext& ctx);
+        }; // class NDC;
+}  // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+
+#endif // _LOG4CXX_NDC_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/smtpappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/smtpappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/smtpappender.h	(revision 257)
@@ -0,0 +1,283 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NET_SMTP_H
+#define _LOG4CXX_NET_SMTP_H
+
+
+#include <log4cxx/appenderskeleton.h>
+#include <log4cxx/helpers/cyclicbuffer.h>
+#include <log4cxx/spi/triggeringeventevaluator.h>
+
+namespace log4cxx
+{
+        namespace net
+        {
+                /**
+                Send an e-mail when a specific logging event occurs, typically on
+                errors or fatal errors.
+                <p>The number of logging events delivered in this e-mail depend on
+                the value of <b>BufferSize</b> option. The
+                <code>SMTPAppender</code> keeps only the last
+                <code>BufferSize</code> logging events in its cyclic buffer. This
+                keeps memory requirements at a reasonable level while still
+                delivering useful application context.
+                */
+                class LOG4CXX_EXPORT SMTPAppender : public AppenderSkeleton
+                {
+                private:
+
+                private:
+                        SMTPAppender(const SMTPAppender&);
+                        SMTPAppender& operator=(const SMTPAppender&);
+                        static bool asciiCheck(const LogString& value, const LogString& label);
+                        /**
+                        This method determines if there is a sense in attempting to append.
+                        <p>It checks whether there is a set output target and also if
+                        there is a set layout. If these checks fail, then the boolean
+                        value <code>false</code> is returned. */
+                        bool checkEntryConditions();
+
+                        LogString to;
+                        LogString cc;
+                        LogString bcc;
+                        LogString from;
+                        LogString subject;
+                        LogString smtpHost;
+                        LogString smtpUsername;
+                        LogString smtpPassword;
+                        int smtpPort;
+                        int bufferSize; // 512
+                        bool locationInfo;
+                        helpers::CyclicBuffer cb;
+                        spi::TriggeringEventEvaluatorPtr evaluator;
+
+                public:
+                        DECLARE_LOG4CXX_OBJECT(SMTPAppender)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(SMTPAppender)
+                                LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                        END_LOG4CXX_CAST_MAP()
+
+                        SMTPAppender();
+                        /**
+                        The default constructor will instantiate the appender with a
+                        spi::TriggeringEventEvaluator that will trigger on events with
+                        level ERROR or higher.*/
+                        SMTPAppender(log4cxx::helpers::Pool& p);
+
+                        /**
+                        Use <code>evaluator</code> passed as parameter as the
+                        spi::TriggeringEventEvaluator for this net::SMTPAppender.
+                        */
+                        SMTPAppender(spi::TriggeringEventEvaluatorPtr evaluator);
+
+                        ~SMTPAppender();
+
+                        /**
+                         Set options
+                        */
+                        virtual void setOption(const LogString& option, const LogString& value);
+
+                        /**
+                        Activate the specified options, such as the smtp host, the
+                        recipient, from, etc.
+                        */
+                        virtual void activateOptions(log4cxx::helpers::Pool& p);
+
+                        /**
+                        Perform SMTPAppender specific appending actions, mainly adding
+                        the event to a cyclic buffer and checking if the event triggers
+                        an e-mail to be sent. */
+                        virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+
+
+                        virtual void close();
+
+                        /**
+                        Returns value of the <b>To</b> option.
+                        */
+                        LogString getTo() const;
+
+                        /**
+                        Returns value of the <b>cc</b> option.
+                        */
+                        LogString getCc() const;
+
+                        /**
+                        Returns value of the <b>bcc</b> option.
+                        */
+                        LogString getBcc() const;
+
+
+                        /**
+                        The <code>SMTPAppender</code> requires a {@link
+                        Layout layout}.  */
+                        virtual bool requiresLayout() const;
+
+                        /**
+                        Send the contents of the cyclic buffer as an e-mail message.
+                        */
+                        void sendBuffer(log4cxx::helpers::Pool& p);
+
+
+                        /**
+                        Returns value of the <b>EvaluatorClass</b> option.
+                        */
+                        LogString getEvaluatorClass();
+
+                        /**
+                        Returns value of the <b>From</b> option.
+                        */
+                        LogString getFrom() const;
+
+                        /**
+                        Returns value of the <b>Subject</b> option.
+                        */
+                        LogString getSubject() const;
+
+
+                        /**
+                        The <b>From</b> option takes a string value which should be a
+                        e-mail address of the sender.
+                        */
+                        void setFrom(const LogString& from);
+
+                        /**
+                        The <b>Subject</b> option takes a string value which should be a
+                        the subject of the e-mail message.
+                        */
+                        void setSubject(const LogString& subject);
+
+                        /**
+                        The <b>BufferSize</b> option takes a positive integer
+                        representing the maximum number of logging events to collect in a
+                        cyclic buffer. When the <code>BufferSize</code> is reached,
+                        oldest events are deleted as new events are added to the
+                        buffer. By default the size of the cyclic buffer is 512 events.
+                        */
+                        void setBufferSize(int bufferSize);
+
+                        /**
+                        The <b>SMTPHost</b> option takes a string value which should be a
+                        the host name of the SMTP server that will send the e-mail message.
+                        */
+                        void setSMTPHost(const LogString& smtpHost);
+
+                        /**
+                        Returns value of the <b>SMTPHost</b> option.
+                        */
+                        LogString getSMTPHost() const;
+
+                        /**
+                        The <b>SMTPPort</b> option takes a string value which should be a
+                        the port of the SMTP server that will send the e-mail message.
+                        */
+                        void setSMTPPort(int port);
+
+                        /**
+                        Returns value of the <b>SMTPHost</b> option.
+                        */
+                        int getSMTPPort() const;
+
+                        /**
+                        The <b>To</b> option takes a string value which should be a
+                        comma separated list of e-mail address of the recipients.
+                        */
+                        void setTo(const LogString& to);
+
+                        /**
+                        The <b>Cc</b> option takes a string value which should be a
+                        comma separated list of e-mail address of the cc'd recipients.
+                        */
+                        void setCc(const LogString& to);
+
+                        /**
+                        The <b>Bcc</b> option takes a string value which should be a
+                        comma separated list of e-mail address of the bcc'd recipients.
+                        */
+                        void setBcc(const LogString& to);
+
+
+                        /**
+                        The <b>SMTPUsername</b> option takes a string value which should be a
+                        the user name for the SMTP server.
+                        */
+                        void setSMTPUsername(const LogString& newVal);
+
+                        /**
+                        Returns value of the <b>SMTPUsername</b> option.
+                        */
+                        LogString getSMTPUsername() const;
+
+                        /**
+                        The <b>SMTPPassword</b> option takes a string value which should be a
+                        the password for the SMTP server.
+                        */
+                        void setSMTPPassword(const LogString& newVal);
+
+                        /**
+                        Returns value of the <b>SMTPPassword</b> option.
+                        */
+                        LogString getSMTPPassword() const;
+
+                        /**
+                        Returns value of the <b>BufferSize</b> option.
+                        */
+                        inline int getBufferSize() const
+                                { return bufferSize; }
+
+                   
+                        /**
+                         *   Gets the current triggering evaluator.
+                         *   @return triggering evaluator.
+                         */     
+                        log4cxx::spi::TriggeringEventEvaluatorPtr getEvaluator() const;
+
+                        /**
+                         *   Sets the triggering evaluator.
+                         *   @param trigger triggering evaluator.
+                         */     
+                        void setEvaluator(log4cxx::spi::TriggeringEventEvaluatorPtr& trigger);
+
+                        /**
+                        The <b>EvaluatorClass</b> option takes a string value
+                        representing the name of the class implementing the
+                        spi::TriggeringEventEvaluator interface. A corresponding object will
+                        be instantiated and assigned as the triggering event evaluator
+                        for the SMTPAppender.
+                        */
+                        void setEvaluatorClass(const LogString& value);
+                 
+                        /**
+                        The <b>LocationInfo</b> option is provided for compatibility with log4j
+                        and has no effect in log4cxx.
+                        */
+                        void setLocationInfo(bool locationInfo);
+
+                        /**
+                        Returns value of the <b>LocationInfo</b> option.
+                        */
+                        bool getLocationInfo() const;
+                }; // class SMTPAppender
+                
+                LOG4CXX_PTR_DEF(SMTPAppender);                
+
+        }  // namespace net
+} // namespace log4cxx
+
+#endif // _LOG4CXX_NET_SMTP_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/socketappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/socketappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/socketappender.h	(revision 257)
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NET_SOCKET_APPENDER_H
+#define _LOG4CXX_NET_SOCKET_APPENDER_H
+
+#include <log4cxx/net/socketappenderskeleton.h>
+#include <log4cxx/helpers/objectoutputstream.h>
+
+namespace log4cxx
+{
+        namespace net
+        {
+
+        /**
+        Sends {@link log4cxx::spi::LoggingEvent LoggingEvent} objects to a remote a log server,
+        usually Apache Chainsaw.
+
+        <p>The SocketAppender has the following properties:
+
+        - If sent to Apache Chainsaw, remote logging
+                is non-intrusive as far as the log event is concerned. In other
+        words, the event will be logged with the same time stamp, {@link
+        NDC NDC}, location info as if it were logged locally by
+        the client.
+
+        - SocketAppenders do not use a layout. They ship a
+        serialized {@link log4cxx::spi::LoggingEvent LoggingEvent} object
+                to the server side.
+
+        - Remote logging uses the TCP protocol. Consequently, if
+        the server is reachable, then log events will eventually arrive
+        at the server.
+
+        - If the remote server is down, the logging requests are
+        simply dropped. However, if and when the server comes back up,
+        then event transmission is resumed transparently. This
+        transparent reconneciton is performed by a <em>connector</em>
+        thread which periodically attempts to connect to the server.
+
+        - Logging events are automatically <em>buffered</em> by the
+        native TCP implementation. This means that if the link to server
+        is slow but still faster than the rate of (log) event production
+        by the client, the client will not be affected by the slow
+        network connection. However, if the network connection is slower
+        then the rate of event production, then the client can only
+        progress at the network rate. In particular, if the network link
+        to the the server is down, the client will be blocked.
+        @n @n On the other hand, if the network link is up, but the server
+        is down, the client will not be blocked when making log requests
+        but the log events will be lost due to server unavailability.
+
+        - Even if a <code>SocketAppender</code> is no longer
+        attached to any logger, it will not be destroyed in
+        the presence of a connector thread. A connector thread exists
+        only if the connection to the server is down. To avoid this
+        destruction problem, you should #close the the
+        <code>SocketAppender</code> explicitly. See also next item.
+        @n @n Long lived applications which create/destroy many
+        <code>SocketAppender</code> instances should be aware of this
+        destruction problem. Most other applications can safely
+        ignore it.
+
+        - If the application hosting the <code>SocketAppender</code>
+                exits before the <code>SocketAppender</code> is closed either
+        explicitly or subsequent to destruction, then there might
+        be untransmitted data in the pipe which might be lost.
+        @n @n To avoid lost data, it is usually sufficient to
+        #close the <code>SocketAppender</code> either explicitly or by
+        calling the LogManager#shutdown method
+        before exiting the application.
+        */
+
+        class LOG4CXX_EXPORT SocketAppender : public SocketAppenderSkeleton
+        {
+        public:
+                /**
+                The default port number of remote logging server (4560).
+                */
+                static int DEFAULT_PORT;
+
+                /**
+                The default reconnection delay (30000 milliseconds or 30 seconds).
+                */
+                static int DEFAULT_RECONNECTION_DELAY;
+
+                DECLARE_LOG4CXX_OBJECT(SocketAppender)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(SocketAppender)
+                        LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                END_LOG4CXX_CAST_MAP()
+
+                SocketAppender();
+                ~SocketAppender();
+
+                /**
+                Connects to remote server at <code>address</code> and <code>port</code>.
+                */
+                SocketAppender(helpers::InetAddressPtr& address, int port);
+
+                /**
+                Connects to remote server at <code>host</code> and <code>port</code>.
+                */
+                SocketAppender(const LogString& host, int port);
+
+
+        protected:
+                virtual void setSocket(log4cxx::helpers::SocketPtr& socket, log4cxx::helpers::Pool& p);
+                
+                virtual void cleanUp(log4cxx::helpers::Pool& p);
+                
+                virtual int getDefaultDelay() const;
+                
+                virtual int getDefaultPort() const;
+
+                void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool);
+
+        private:
+                log4cxx::helpers::ObjectOutputStreamPtr oos;
+
+        }; // class SocketAppender
+        
+        LOG4CXX_PTR_DEF(SocketAppender);
+        
+    } // namespace net
+} // namespace log4cxx
+
+#endif // _LOG4CXX_NET_SOCKET_APPENDER_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/socketappenderskeleton.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/socketappenderskeleton.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/socketappenderskeleton.h	(revision 257)
@@ -0,0 +1,179 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NET_SOCKET_APPENDER_SKELETON_H
+#define _LOG4CXX_NET_SOCKET_APPENDER_SKELETON_H
+
+#include <log4cxx/appenderskeleton.h>
+#include <log4cxx/helpers/socket.h>
+#include <log4cxx/helpers/thread.h>
+#include <log4cxx/helpers/objectoutputstream.h>
+
+namespace log4cxx
+{
+
+        namespace net
+        {
+
+                /**
+                 *  Abstract base class for SocketAppender and XMLSocketAppender
+                 */
+        class LOG4CXX_EXPORT SocketAppenderSkeleton : public AppenderSkeleton
+        {
+        private:
+                /**
+                host name
+                */
+                LogString remoteHost;
+
+                /**
+                IP address
+                */
+                helpers::InetAddressPtr address;
+
+                int port;
+                int reconnectionDelay;
+                bool locationInfo;
+
+        public:
+                SocketAppenderSkeleton(int defaultPort, int reconnectionDelay);
+                        ~SocketAppenderSkeleton();
+
+                /**
+                Connects to remote server at <code>address</code> and <code>port</code>.
+                */
+                SocketAppenderSkeleton(helpers::InetAddressPtr address, int port, int reconnectionDelay);
+
+                /**
+                Connects to remote server at <code>host</code> and <code>port</code>.
+                */
+                SocketAppenderSkeleton(const LogString& host, int port, int reconnectionDelay);
+
+                /**
+                Connect to the specified <b>RemoteHost</b> and <b>Port</b>.
+                */
+                void activateOptions(log4cxx::helpers::Pool& p);
+                
+                void close();
+
+
+                   /**
+                * This appender does not use a layout. Hence, this method
+                * returns <code>false</code>.
+                *
+                        */
+                bool requiresLayout() const
+                        { return false; }
+
+                /**
+                * The <b>RemoteHost</b> option takes a string value which should be
+                * the host name of the server where a
+                * Apache Chainsaw or compatible is running.
+                * */
+                inline void setRemoteHost(const LogString& host)
+                        { address = helpers::InetAddress::getByName(host);
+                        remoteHost.assign(host); }
+
+                /**
+                Returns value of the <b>RemoteHost</b> option.
+                */
+                inline const LogString& getRemoteHost() const
+                        { return remoteHost; }
+
+                /**
+                The <b>Port</b> option takes a positive integer representing
+                the port where the server is waiting for connections.
+                */
+                void setPort(int port1)
+                        { this->port = port1; }
+
+                /**
+                Returns value of the <b>Port</b> option.
+                */
+                int getPort() const
+                        { return port; }
+
+                /**
+                The <b>LocationInfo</b> option takes a boolean value. If true,
+                the information sent to the remote host will include location
+                information. By default no location information is sent to the server.
+                */
+                void setLocationInfo(bool locationInfo1)
+                        { this->locationInfo = locationInfo1; }
+
+                /**
+                Returns value of the <b>LocationInfo</b> option.
+                */
+                bool getLocationInfo() const
+                        { return locationInfo; }
+
+                /**
+                The <b>ReconnectionDelay</b> option takes a positive integer
+                representing the number of milliseconds to wait between each
+                failed connection attempt to the server. The default value of
+                this option is 30000 which corresponds to 30 seconds.
+
+                <p>Setting this option to zero turns off reconnection
+                capability.
+                */
+                void setReconnectionDelay(int reconnectionDelay1)
+                        { this->reconnectionDelay = reconnectionDelay1; }
+
+                /**
+                Returns value of the <b>ReconnectionDelay</b> option.
+                */
+                int getReconnectionDelay() const
+                        { return reconnectionDelay; }
+
+                void fireConnector();
+
+                void setOption(const LogString& option,
+                                const LogString& value);
+
+           protected:
+
+                virtual void setSocket(log4cxx::helpers::SocketPtr& socket, log4cxx::helpers::Pool& p) = 0;
+                
+                virtual void cleanUp(log4cxx::helpers::Pool& p) = 0;
+                
+                virtual int getDefaultDelay() const = 0;
+                
+                virtual int getDefaultPort() const = 0;
+
+           private:
+                void connect(log4cxx::helpers::Pool& p);
+                   /**
+                        The Connector will reconnect when the server becomes available
+                        again.  It does this by attempting to open a new connection every
+                        <code>reconnectionDelay</code> milliseconds.
+
+                        <p>It stops trying whenever a connection is established. It will
+                        restart to try reconnect to the server when previpously open
+                        connection is droppped.
+                        */
+
+                   helpers::Thread thread;
+                   static void* LOG4CXX_THREAD_FUNC monitor(apr_thread_t* thread, void* data);
+                        SocketAppenderSkeleton(const SocketAppenderSkeleton&);
+                        SocketAppenderSkeleton& operator=(const SocketAppenderSkeleton&);
+
+        }; // class SocketAppenderSkeleton
+    } // namespace net
+} // namespace log4cxx
+
+#endif // _LOG4CXX_NET_SOCKET_APPENDER_SKELETON_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/sockethubappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/sockethubappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/sockethubappender.h	(revision 257)
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NET_SOCKET_HUB_APPENDER_H
+#define _LOG4CXX_NET_SOCKET_HUB_APPENDER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/appenderskeleton.h>
+#include <vector>
+#include <log4cxx/helpers/thread.h>
+#include <log4cxx/helpers/objectoutputstream.h>
+
+
+namespace log4cxx
+{
+        namespace helpers {
+                class ObjectOutputStream;
+                typedef ObjectPtrT<ObjectOutputStream> ObjectOutputStreamPtr;
+        }
+        namespace net
+        {
+            LOG4CXX_LIST_DEF(ObjectOutputStreamList, log4cxx::helpers::ObjectOutputStreamPtr);
+                        
+                /**
+                Sends {@link log4cxx::spi::LoggingEvent LoggingEvent} objects to a set of remote log
+                servers, usually a SocketNode.
+
+                <p>Acts just like SocketAppender except that instead of
+                connecting to a given remote log server,
+                <code>SocketHubAppender</code> accepts connections from the remote
+                log servers as clients.  It can accept more than one connection.
+                When a log event is received, the event is sent to the set of
+                currently connected remote log servers. Implemented this way it does
+                not require any update to the configuration file to send data to
+                another remote log server. The remote log server simply connects to
+                the host and port the <code>SocketHubAppender</code> is running on.
+
+                <p>The <code>SocketHubAppender</code> does not store events such
+                that the remote side will events that arrived after the
+                establishment of its connection. Once connected, events arrive in
+                order as guaranteed by the TCP protocol.
+
+                <p>This implementation borrows heavily from the SocketAppender.
+
+                <p>The SocketHubAppender has the following characteristics:
+
+                - If sent to a SocketNode, logging is non-intrusive as
+                far as the log event is concerned. In other words, the event will be
+                logged with the same time stamp, NDC,
+                location info as if it were logged locally.
+
+                - <code>SocketHubAppender</code> does not use a layout. It
+                ships a serialized spi::LoggingEvent object to the remote side.
+
+                - <code>SocketHubAppender</code> relies on the TCP
+                protocol. Consequently, if the remote side is reachable, then log
+                events will eventually arrive at remote client.
+
+                - If no remote clients are attached, the logging requests are
+                simply dropped.
+
+                - Logging events are automatically <em>buffered</em> by the
+                native TCP implementation. This means that if the link to remote
+                client is slow but still faster than the rate of (log) event
+                production, the application will not be affected by the slow network
+                connection. However, if the network connection is slower then the
+                rate of event production, then the local application can only
+                progress at the network rate. In particular, if the network link to
+                the the remote client is down, the application will be blocked.
+                @n @n On the other hand, if the network link is up, but the remote
+                client is down, the client will not be blocked when making log
+                requests but the log events will be lost due to client
+                unavailability.
+                @n @n The single remote client case extends to multiple clients
+                connections. The rate of logging will be determined by the slowest
+                link.
+
+                - If the application hosting the <code>SocketHubAppender</code>
+                exits before the <code>SocketHubAppender</code> is closed either
+                explicitly or subsequent to garbage collection, then there might
+                be untransmitted data in the pipe which might be lost. This is a
+                common problem on Windows based systems.
+                @n @n To avoid lost data, it is usually sufficient to #close
+                the <code>SocketHubAppender</code> either explicitly or by calling
+                the LogManager#shutdown method before
+                exiting the application.
+                */
+
+                class LOG4CXX_EXPORT SocketHubAppender : public AppenderSkeleton
+                {
+                private:
+                        /**
+                        The default port number of the ServerSocket will be created on.
+                        */
+                        static int DEFAULT_PORT;
+
+                        int port;
+                        ObjectOutputStreamList streams;
+                        bool locationInfo;
+
+                public:
+                        DECLARE_LOG4CXX_OBJECT(SocketHubAppender)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(SocketHubAppender)
+                                LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                        END_LOG4CXX_CAST_MAP()
+
+                        SocketHubAppender();
+                        ~SocketHubAppender();
+
+                        /**
+                        Connects to remote server at <code>address</code> and <code>port</code>.
+                        */
+                        SocketHubAppender(int port) ;
+
+                        /**
+                        Set up the socket server on the specified port.
+                        */
+                        virtual void activateOptions(log4cxx::helpers::Pool& p);
+
+                    /**
+                    Set options
+                    */
+                        virtual void setOption(const LogString& option, const LogString& value);
+
+                        virtual void close();
+
+                        /**
+                        Append an event to all of current connections. */
+                        virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+
+                        /**
+                        The SocketHubAppender does not use a layout. Hence, this method returns
+                        <code>false</code>. */
+                        virtual bool requiresLayout() const
+                                { return false; }
+
+                        /**
+                        The <b>Port</b> option takes a positive integer representing
+                        the port where the server is waiting for connections. */
+                        inline void setPort(int port1)
+                                { this->port = port1; }
+
+                        /**
+                        Returns value of the <b>Port</b> option. */
+                        inline int getPort() const
+                                { return port; }
+
+                        /**
+                        The <b>LocationInfo</b> option takes a boolean value. If true,
+                        the information sent to the remote host will include location
+                        information. By default no location information is sent to the server. */
+                        inline void setLocationInfo(bool locationInfo1)
+                                {  this->locationInfo = locationInfo1; }
+
+                        /**
+                        Returns value of the <b>LocationInfo</b> option. */
+                        inline bool getLocationInfo() const
+                                { return locationInfo; }
+
+                        /**
+                        Start the ServerMonitor thread. */
+                private:
+                        void startServer();
+
+                        helpers::Thread thread;
+                        static void* LOG4CXX_THREAD_FUNC monitor(apr_thread_t* thread, void* data);
+
+                }; // class SocketHubAppender
+                LOG4CXX_PTR_DEF(SocketHubAppender);
+        }  // namespace net
+} // namespace log4cxx
+
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif // _LOG4CXX_NET_SOCKET_HUB_APPENDER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/syslogappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/syslogappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/syslogappender.h	(revision 257)
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NET_SYSLOG_APPENDER_H
+#define _LOG4CXX_NET_SYSLOG_APPENDER_H
+
+#include <log4cxx/appenderskeleton.h>
+#include <log4cxx/helpers/syslogwriter.h>
+
+namespace log4cxx
+{
+        namespace net
+        {
+                /** Use SyslogAppender to send log messages to a remote syslog daemon.*/
+                class LOG4CXX_EXPORT SyslogAppender : public AppenderSkeleton
+                {
+                public:
+                        DECLARE_LOG4CXX_OBJECT(SyslogAppender)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(SyslogAppender)
+                                LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                        END_LOG4CXX_CAST_MAP()
+
+
+
+                        SyslogAppender();
+                        SyslogAppender(const LayoutPtr& layout, int syslogFacility);
+                        SyslogAppender(const LayoutPtr& layout,
+                                const LogString& syslogHost, int syslogFacility);
+                        ~SyslogAppender();
+                        /** Release any resources held by this SyslogAppender.*/
+                        void close();
+
+                        /**
+                        Returns the specified syslog facility as a lower-case String,
+                        e.g. "kern", "user", etc.
+                        */
+                        static LogString getFacilityString(int syslogFacility);
+
+                        /**
+                        Returns the integer value corresponding to the named syslog
+                        facility, or -1 if it couldn't be recognized.
+                        @param facilityName one of the strings KERN, USER, MAIL, DAEMON,
+                        AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP, LOCAL0,
+                        LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
+                        The matching is case-insensitive.
+                        */
+                        static int getFacility(const LogString &facilityName);
+
+                        void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+
+                        /**
+                        This method returns immediately as options are activated when they
+                        are set.
+                        */
+                        void activateOptions(log4cxx::helpers::Pool& p);
+                        void setOption(const LogString& option, const LogString& value);
+
+                        /**
+                        The SyslogAppender requires a layout. Hence, this method returns
+                        <code>true</code>.
+                        */
+                        virtual bool requiresLayout() const
+                                { return true; }
+
+                        /**
+                        The <b>SyslogHost</b> option is the name of the the syslog host
+                        where log output should go.
+                        <b>WARNING</b> If the SyslogHost is not set, then this appender
+                        will fail.
+                        */
+                        void setSyslogHost(const LogString& syslogHost);
+
+                        /**
+                        Returns the value of the <b>SyslogHost</b> option.
+                        */
+                        inline const LogString& getSyslogHost() const
+                                { return syslogHost; }
+
+                        /**
+                        Set the syslog facility. This is the <b>Facility</b> option.
+
+                        <p>The <code>facilityName</code> parameter must be one of the
+                        strings KERN, USER, MAIL, DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP,
+                        CRON, AUTHPRIV, FTP, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4,
+                        LOCAL5, LOCAL6, LOCAL7. Case is unimportant.
+                        */
+                        void setFacility(const LogString& facilityName);
+
+                        /**
+                        Returns the value of the <b>Facility</b> option.
+                        */
+                        inline LogString getFacility() const
+                                { return getFacilityString(syslogFacility); }
+
+                        /**
+                        If the <b>FacilityPrinting</b> option is set to true, the printed
+                        message will include the facility name of the application. It is
+                        <em>false</em> by default.
+                        */
+                        inline void setFacilityPrinting(bool facilityPrinting1)
+                                { this->facilityPrinting = facilityPrinting1; }
+
+                        /**
+                        Returns the value of the <b>FacilityPrinting</b> option.
+                        */
+                        inline bool getFacilityPrinting() const
+                                { return facilityPrinting; }
+
+                protected:
+                        void initSyslogFacilityStr();
+
+                        int syslogFacility; // Have LOG_USER as default
+                        LogString facilityStr;
+                        bool facilityPrinting;
+                        helpers::SyslogWriter * sw;
+                        LogString syslogHost;
+                private:
+                        SyslogAppender(const SyslogAppender&);
+                        SyslogAppender& operator=(const SyslogAppender&);
+                }; // class SyslogAppender
+            LOG4CXX_PTR_DEF(SyslogAppender);
+    } // namespace net
+} // namespace log4cxx
+
+#endif // _LOG4CXX_NET_SYSLOG_APPENDER_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/telnetappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/telnetappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/telnetappender.h	(revision 257)
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NET_TELNET_APPENDER_H
+#define _LOG4CXX_NET_TELNET_APPENDER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+
+#include <log4cxx/appenderskeleton.h>
+#include <log4cxx/helpers/socket.h>
+#include <log4cxx/helpers/serversocket.h>
+#include <log4cxx/helpers/thread.h>
+#include <vector>
+#include <log4cxx/helpers/charsetencoder.h>
+
+namespace log4cxx
+{
+        namespace helpers {
+             class ByteBuffer;
+        }
+        namespace net
+        {
+            LOG4CXX_LIST_DEF(ConnectionList, log4cxx::helpers::SocketPtr);
+                        
+/**
+<p>The TelnetAppender is a log4cxx appender that specializes in
+writing to a read-only socket.  The output is provided in a
+telnet-friendly way so that a log can be monitored over TCP/IP.
+Clients using telnet connect to the socket and receive log data.
+This is handy for remote monitoring, especially when monitoring a
+servlet.
+
+<p>Here is a list of the available configuration options:
+
+<table border=1>
+<tr>
+<td align=center><b>Name</b></td>
+<td align=center><b>Requirement</b></td>
+<td align=center><b>Description</b></td>
+<td align=center><b>Sample Value</b></td>
+</tr>
+
+<tr>
+<td>Port</td>
+<td>optional</td>
+<td>This parameter determines the port to use for announcing log events.  The default port is 23 (telnet).</td>
+<td>5875</td>
+</table>
+*/
+        class LOG4CXX_EXPORT TelnetAppender : public AppenderSkeleton
+                {
+                class SocketHandler;
+                friend class SocketHandler;
+                private:
+                        static const int DEFAULT_PORT;
+                        static const int MAX_CONNECTIONS;
+                        int port;
+
+                public:
+                        DECLARE_LOG4CXX_OBJECT(TelnetAppender)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(TelnetAppender)
+                                LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                        END_LOG4CXX_CAST_MAP()
+
+                        TelnetAppender();
+                        ~TelnetAppender();
+
+                        /**
+                        This appender requires a layout to format the text to the
+                        attached client(s). */
+                        virtual bool requiresLayout() const
+                                { return true; }
+                                
+                        LogString getEncoding() const;
+                        void setEncoding(const LogString& value);
+        
+
+                        /** all of the options have been set, create the socket handler and
+                        wait for connections. */
+                        void activateOptions(log4cxx::helpers::Pool& p);
+
+                                                /**
+                                                Set options
+                                                */
+                        virtual void setOption(const LogString& option, const LogString& value);
+
+                                                /**
+                                                Returns value of the <b>Port</b> option.
+                                                */
+                        int getPort() const
+                                { return port; }
+
+                                                /**
+                                                The <b>Port</b> option takes a positive integer representing
+                                                the port where the server is waiting for connections.
+                                                */
+                        void setPort(int port1)
+                        { this->port = port1; }
+
+
+                        /** shuts down the appender. */
+                        void close();
+
+                protected:
+                        /** Handles a log event.  For this appender, that means writing the
+                        message to each connected client.  */
+                        virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p) ;
+
+                        //---------------------------------------------------------- SocketHandler:
+
+                private:
+                        //   prevent copy and assignment statements
+                        TelnetAppender(const TelnetAppender&);
+                        TelnetAppender& operator=(const TelnetAppender&);
+
+                        typedef log4cxx::helpers::SocketPtr Connection;
+                        
+                        void write(log4cxx::helpers::ByteBuffer&);
+                        void writeStatus(const log4cxx::helpers::SocketPtr& socket, const LogString& msg, log4cxx::helpers::Pool& p);
+                        ConnectionList connections;
+                        LogString encoding;
+                        log4cxx::helpers::CharsetEncoderPtr encoder;
+                        helpers::ServerSocket* serverSocket;
+                        helpers::Thread sh;
+                        size_t activeConnections;
+                        static void* LOG4CXX_THREAD_FUNC acceptConnections(apr_thread_t* thread, void* data);
+                }; // class TelnetAppender
+                
+                LOG4CXX_PTR_DEF(TelnetAppender);
+    } // namespace net
+} // namespace log4cxx
+
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif // _LOG4CXX_NET_TELNET_APPENDER_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/xmlsocketappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/xmlsocketappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/net/xmlsocketappender.h	(revision 257)
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NET_XML_SOCKET_APPENDER_H
+#define _LOG4CXX_NET_XML_SOCKET_APPENDER_H
+
+#include <log4cxx/net/socketappenderskeleton.h>
+#include <log4cxx/helpers/writer.h>
+
+namespace log4cxx
+{
+        namespace net
+        {
+
+        /**
+        Sends {@link log4cxx::spi::LoggingEvent LoggingEvent} objects in XML format
+                to a remote a log server, usually a XMLSocketNode.
+
+        <p>The XMLSocketAppender has the following properties:
+
+        - If sent to a XMLSocketNode, remote logging
+                is non-intrusive as far as the log event is concerned. In other
+        words, the event will be logged with the same time stamp, {@link
+        NDC NDC}, location info as if it were logged locally by
+        the client.
+
+        - XMLSocketAppenders use exclusively an XMLLayout. They ship an
+        XML stream representing a {@link spi::LoggingEvent LoggingEvent} object
+                to the server side.
+
+       - Remote logging uses the TCP protocol. Consequently, if
+        the server is reachable, then log events will eventually arrive
+        at the server.
+
+        - If the remote server is down, the logging requests are
+        simply dropped. However, if and when the server comes back up,
+        then event transmission is resumed transparently. This
+        transparent reconneciton is performed by a <em>connector</em>
+        thread which periodically attempts to connect to the server.
+
+        - Logging events are automatically <em>buffered</em> by the
+        native TCP implementation. This means that if the link to server
+        is slow but still faster than the rate of (log) event production
+        by the client, the client will not be affected by the slow
+        network connection. However, if the network connection is slower
+        then the rate of event production, then the client can only
+        progress at the network rate. In particular, if the network link
+        to the the server is down, the client will be blocked.
+        @n @n On the other hand, if the network link is up, but the server
+        is down, the client will not be blocked when making log requests
+        but the log events will be lost due to server unavailability.
+
+        - Even if an <code>XMLSocketAppender</code> is no longer
+        attached to any logger, it will not be destroyed in
+        the presence of a connector thread. A connector thread exists
+        only if the connection to the server is down. To avoid this
+        destruction problem, you should #close the the
+        <code>XMLSocketAppender</code> explicitly. See also next item.
+        @n @n Long lived applications which create/destroy many
+        <code>XMLSocketAppender</code> instances should be aware of this
+        destruction problem. Most other applications can safely
+        ignore it.
+
+        - If the application hosting the <code>XMLSocketAppender</code>
+                exits before the <code>XMLSocketAppender</code> is closed either
+        explicitly or subsequent to destruction, then there might
+        be untransmitted data in the pipe which might be lost.
+        @n @n To avoid lost data, it is usually sufficient to
+        #close the <code>XMLSocketAppender</code> either explicitly or by
+        calling the LogManager#shutdown method
+        before exiting the application.
+       */
+
+        class LOG4CXX_EXPORT XMLSocketAppender : public SocketAppenderSkeleton
+        {
+        public:
+                /**
+                The default port number of remote logging server (4560).
+                */
+                static int DEFAULT_PORT;
+
+                /**
+                The default reconnection delay (30000 milliseconds or 30 seconds).
+                */
+                static int DEFAULT_RECONNECTION_DELAY;
+
+                /**
+                An event XML stream cannot exceed 1024 bytes.
+                */
+                static const int MAX_EVENT_LEN;
+
+                DECLARE_LOG4CXX_OBJECT(XMLSocketAppender)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(XMLSocketAppender)
+                        LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                END_LOG4CXX_CAST_MAP()
+
+                XMLSocketAppender();
+                ~XMLSocketAppender();
+
+                /**
+                Connects to remote server at <code>address</code> and <code>port</code>.
+                */
+                XMLSocketAppender(helpers::InetAddressPtr address, int port);
+
+                /**
+                Connects to remote server at <code>host</code> and <code>port</code>.
+                */
+                XMLSocketAppender(const LogString& host, int port);
+
+
+      protected:
+                virtual void setSocket(log4cxx::helpers::SocketPtr& socket, log4cxx::helpers::Pool& p);
+                
+                virtual void cleanUp(log4cxx::helpers::Pool& p);
+                
+                virtual int getDefaultDelay() const;
+                
+                virtual int getDefaultPort() const;
+
+                void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool);
+
+       private:
+                log4cxx::helpers::WriterPtr writer;
+                //  prevent copy and assignment statements
+                XMLSocketAppender(const XMLSocketAppender&);
+                XMLSocketAppender& operator=(const XMLSocketAppender&);
+        }; // class XMLSocketAppender
+        
+        LOG4CXX_PTR_DEF(XMLSocketAppender);
+        
+    } // namespace net
+} // namespace log4cxx
+
+#endif // _LOG4CXX_NET_XML_SOCKET_APPENDER_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/nt/nteventlogappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/nt/nteventlogappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/nt/nteventlogappender.h	(revision 257)
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NT_EVENT_LOG_APPENDER_HEADER_
+#define _LOG4CXX_NT_EVENT_LOG_APPENDER_HEADER_
+
+#include <log4cxx/appenderskeleton.h>
+
+
+namespace log4cxx
+{
+        namespace nt
+        {
+                /**
+                 * Appends log events to NT EventLog.
+                 */
+                class LOG4CXX_EXPORT NTEventLogAppender : public AppenderSkeleton
+                {
+                public:
+                        DECLARE_LOG4CXX_OBJECT(NTEventLogAppender)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                            LOG4CXX_CAST_ENTRY(NTEventLogAppender)
+                            LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                        END_LOG4CXX_CAST_MAP()
+
+                        NTEventLogAppender();
+                        NTEventLogAppender(const LogString& server, const LogString& log,
+                                const LogString& source, const LayoutPtr& layout);
+
+                        virtual ~NTEventLogAppender();
+
+                        virtual void activateOptions(log4cxx::helpers::Pool& p);
+                        virtual void close();
+                        virtual void setOption(const LogString& option, const LogString& value);
+
+                        /**
+                         * The SocketAppender does not use a layout. Hence, this method
+                         * returns <code>false</code>.
+                         *
+                         */
+                         bool requiresLayout() const
+                                { return true; }
+
+                        void setSource(const LogString& source)
+                                { this->source.assign(source); }
+
+                        const LogString& getSource() const
+                                { return source; }
+
+                        void setLog(const LogString& log)
+                                { this->log.assign(log); }
+
+                        const LogString& getLog() const
+                                { return log; }
+
+                        void setServer(const LogString& server)
+                                { this->server.assign(server); }
+
+                        const LogString& getServer() const
+                                { return server; }
+
+
+                protected:
+                        //
+                        //   these typedef are proxies for the real Win32 definitions
+                        //     and need to be cast to the global definitions before
+                        //     use with a Win32 API call
+                        typedef void SID;
+                        typedef void* HANDLE;
+
+                        virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+                        static unsigned short getEventType(const spi::LoggingEventPtr& event);
+                        static unsigned short getEventCategory(const spi::LoggingEventPtr& event);
+                        /*
+                         * Add this source with appropriate configuration keys to the registry.
+                         */
+                        void addRegistryInfo();
+
+                        // Data
+                        LogString server;
+                        LogString log;
+                        LogString source;
+                        HANDLE hEventLog;
+                        SID * pCurrentUserSID;
+                        static LogString getErrorString(const LogString& function);
+
+                private:
+                        NTEventLogAppender(const NTEventLogAppender&);
+                        NTEventLogAppender& operator=(const NTEventLogAppender&);
+                }; // class NTEventLogAppender
+
+                LOG4CXX_PTR_DEF(NTEventLogAppender);
+
+    }  // namespace nt
+} // namespace log4cxx
+
+#endif //_LOG4CXX_NT_EVENT_LOG_APPENDER_HEADER_
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/nt/outputdebugstringappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/nt/outputdebugstringappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/nt/outputdebugstringappender.h	(revision 257)
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_NT_OUTPUTDEBUGSTRING_APPENDER_HEADER_
+#define _LOG4CXX_NT_OUTPUTDEBUGSTRING_APPENDER_HEADER_
+
+#include <log4cxx/appenderskeleton.h>
+
+namespace log4cxx
+{
+        namespace nt
+        {
+                class LOG4CXX_EXPORT OutputDebugStringAppender : public AppenderSkeleton
+                {
+                public:
+                DECLARE_LOG4CXX_OBJECT(OutputDebugStringAppender)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(OutputDebugStringAppender)
+                        LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                END_LOG4CXX_CAST_MAP()
+
+                OutputDebugStringAppender();
+
+                        bool requiresLayout() const
+                        { return true; }
+
+                        virtual void close() {}
+
+                        virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+                };
+        }
+}
+
+#endif //_LOG4CXX_NT_OUTPUTDEBUGSTRING_APPENDER_HEADER_
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/classnamepatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/classnamepatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/classnamepatternconverter.h	(revision 257)
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_CLASSNAME_PATTERN_CONVERTER_H
+#define _LOG4CXX_PATTERN_CLASSNAME_PATTERN_CONVERTER_H
+
+
+#include <log4cxx/pattern/namepatternconverter.h>
+
+namespace log4cxx {
+ namespace pattern {
+
+
+/**
+ * Formats the class name of the site of the logging request.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT ClassNamePatternConverter : public NamePatternConverter {
+  /**
+   * Private constructor.
+   * @param options options, may be null.
+   * @param logger logger for diagnostic messages, may be null.
+   */
+  ClassNamePatternConverter(
+    const std::vector<LogString>& options);
+
+public:
+   DECLARE_LOG4CXX_PATTERN(ClassNamePatternConverter)
+   BEGIN_LOG4CXX_CAST_MAP()
+        LOG4CXX_CAST_ENTRY(ClassNamePatternConverter)
+        LOG4CXX_CAST_ENTRY_CHAIN(NamePatternConverter)
+   END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Gets an instance of ClassNamePatternConverter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr&event,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+};
+
+ }
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/datepatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/datepatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/datepatternconverter.h	(revision 257)
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_DATE_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_DATE_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+#include <log4cxx/helpers/cacheddateformat.h>
+#include <log4cxx/helpers/date.h>
+#include <vector>
+
+namespace log4cxx {
+  namespace pattern {
+
+
+/**
+ * Convert and format the event's date in a StringBuffer.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT DatePatternConverter : public LoggingEventPatternConverter {
+  /**
+   * Date format.
+   */
+  log4cxx::helpers::DateFormatPtr df;
+
+  /**
+   * Private constructor.
+   * @param options options, may be null.
+   * @param logger logger for diagnostic messages, may be null.
+   */
+  DatePatternConverter(const OptionsList& options);
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static log4cxx::helpers::DateFormatPtr getDateFormat(const OptionsList& options);
+  public:
+  DECLARE_LOG4CXX_PATTERN(DatePatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+       LOG4CXX_CAST_ENTRY(DatePatternConverter)
+       LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+
+ static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+     LogString& output,
+     log4cxx::helpers::Pool& p) const;
+  void format(const log4cxx::helpers::ObjectPtr& obj,
+     LogString& output,
+     log4cxx::helpers::Pool& p) const;
+
+  void format(const log4cxx::helpers::DatePtr& date,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+};
+
+LOG4CXX_PTR_DEF(DatePatternConverter);
+
+  }
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/filedatepatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/filedatepatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/filedatepatternconverter.h	(revision 257)
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_FILE_DATE_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_FILE_DATE_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/patternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Formats an date by delegating to DatePatternConverter.  The default
+ * date pattern for a %d specifier in a file name is different than
+ * the %d pattern in pattern layout.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT FileDatePatternConverter {
+  /**
+   * Private constructor.
+   */
+  FileDatePatternConverter();
+
+public:
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+};
+}
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/filelocationpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/filelocationpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/filelocationpatternconverter.h	(revision 257)
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_FILE_LOCATION_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_FILE_LOCATION_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx {
+   namespace pattern {
+
+
+/**
+ * Return the event's line location information in a StringBuffer.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT FileLocationPatternConverter
+  : public LoggingEventPatternConverter {
+  /**
+   * Private constructor.
+   */
+  FileLocationPatternConverter();
+
+public:
+  DECLARE_LOG4CXX_PATTERN(FileLocationPatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+       LOG4CXX_CAST_ENTRY(FileLocationPatternConverter)
+       LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+};
+
+   }
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/formattinginfo.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/formattinginfo.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/formattinginfo.h	(revision 257)
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_HELPER_FORMATTING_INFO_H
+#define _LOG4CXX_HELPER_FORMATTING_INFO_H
+
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/logstring.h>
+
+namespace log4cxx {
+  namespace pattern {
+
+
+class FormattingInfo;
+typedef helpers::ObjectPtrT<FormattingInfo> FormattingInfoPtr;
+
+
+/**
+ * Modifies the output of a pattern converter for a specified minimum
+ * and maximum width and alignment.
+ *
+ *  
+ *
+ *  
+ */
+class LOG4CXX_EXPORT FormattingInfo : public virtual log4cxx::helpers::ObjectImpl {
+
+  /**
+   * Minimum length.
+   */
+  const int minLength;
+
+  /**
+   * Maximum length.
+   */
+  const int maxLength;
+
+  /**
+   * Alignment.
+   */
+  const bool leftAlign;
+
+public:
+DECLARE_ABSTRACT_LOG4CXX_OBJECT(FormattingInfo)
+BEGIN_LOG4CXX_CAST_MAP()
+        LOG4CXX_CAST_ENTRY(FormattingInfo)
+END_LOG4CXX_CAST_MAP()
+
+
+  /**
+   * Creates new instance.
+   * @param leftAlign left align if true.
+   * @param minLength minimum length.
+   * @param maxLength maximum length.
+   */
+FormattingInfo(
+    const bool leftAlign, const int minLength, const int maxLength);
+
+  /**
+   * Gets default instance.
+   * @return default instance.
+   */
+static FormattingInfoPtr getDefault();
+
+  /**
+   * Determine if left aligned.
+   * @return true if left aligned.
+   */
+inline bool isLeftAligned() const {
+  return leftAlign;
+}
+
+  /**
+   * Get minimum length.
+   * @return minimum length.
+   */
+inline int getMinLength() const {
+  return minLength;
+}
+
+  /**
+   * Get maximum length.
+   * @return maximum length.
+   */
+inline int getMaxLength() const {
+  return maxLength;
+}
+
+  /**
+   * Adjust the content of the buffer based on the specified lengths and alignment.
+   *
+   * @param fieldStart start of field in buffer.
+   * @param buffer buffer to be modified.
+   */
+void format(const int fieldStart, LogString& buffer) const;
+};
+LOG4CXX_PTR_DEF(FormattingInfo);
+  }
+}
+
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/fulllocationpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/fulllocationpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/fulllocationpatternconverter.h	(revision 257)
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_FULL_LOCATION_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_FULL_LOCATION_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx {
+namespace pattern {
+
+
+/**
+ * Format the event's line location information.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT FullLocationPatternConverter
+  : public LoggingEventPatternConverter {
+  /**
+   * Private constructor.
+   */
+  FullLocationPatternConverter();
+
+public:
+  DECLARE_LOG4CXX_PATTERN(FullLocationPatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+       LOG4CXX_CAST_ENTRY(FullLocationPatternConverter)
+       LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+};
+
+}
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/integerpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/integerpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/integerpatternconverter.h	(revision 257)
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_INTEGER_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_INTEGER_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/patternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Formats an integer.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT IntegerPatternConverter : public PatternConverter {
+
+  /**
+   * Private constructor.
+   */
+  IntegerPatternConverter();
+
+public:
+  DECLARE_LOG4CXX_PATTERN(IntegerPatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+       LOG4CXX_CAST_ENTRY(IntegerPatternConverter)
+       LOG4CXX_CAST_ENTRY_CHAIN(PatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::helpers::ObjectPtr& obj,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+};
+
+LOG4CXX_PTR_DEF(IntegerPatternConverter);
+
+}
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/levelpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/levelpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/levelpatternconverter.h	(revision 257)
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_LEVEL_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_LEVEL_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Return the event's level in a StringBuffer.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT LevelPatternConverter : public LoggingEventPatternConverter {
+  /**
+   * Private constructor.
+   */
+  LevelPatternConverter();
+
+public:
+  DECLARE_LOG4CXX_PATTERN(LevelPatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+       LOG4CXX_CAST_ENTRY(LevelPatternConverter)
+       LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+
+  LogString getStyleClass(const log4cxx::helpers::ObjectPtr& e) const;
+};
+}
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/linelocationpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/linelocationpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/linelocationpatternconverter.h	(revision 257)
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_LINE_LOCATION_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_LINE_LOCATION_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx {
+namespace pattern {
+
+
+/**
+ * Format the event's line location information.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT LineLocationPatternConverter
+  : public LoggingEventPatternConverter {
+  /**
+   * Private constructor.
+   */
+  LineLocationPatternConverter();
+
+public:
+  DECLARE_LOG4CXX_PATTERN(LineLocationPatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+       LOG4CXX_CAST_ENTRY(LineLocationPatternConverter)
+       LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+};
+
+}
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/lineseparatorpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/lineseparatorpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/lineseparatorpatternconverter.h	(revision 257)
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_LINE_SEPARATOR_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_LINE_SEPARATOR_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx {
+namespace pattern {
+
+
+/**
+ * Formats a line separator.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT LineSeparatorPatternConverter
+  : public LoggingEventPatternConverter {
+
+  /**
+   * Private constructor.
+   */
+  LineSeparatorPatternConverter();
+
+public:
+DECLARE_LOG4CXX_PATTERN(LineSeparatorPatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(LineSeparatorPatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+
+  void format(const log4cxx::helpers::ObjectPtr& obj,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+};
+
+}
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/literalpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/literalpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/literalpatternconverter.h	(revision 257)
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_LITERAL_PATTERN_CONVERTER_H
+#define _LOG4CXX_PATTERN_LITERAL_PATTERN_CONVERTER_H
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx {
+  namespace pattern {
+
+/**
+ * Formats a string literal.
+ *
+ * 
+ * 
+ *
+ */
+class LOG4CXX_EXPORT LiteralPatternConverter : public LoggingEventPatternConverter {
+  /**
+   * String literal.
+   */
+  const LogString literal;
+
+  /**
+   * Create a new instance.
+   * @param literal string literal.
+   */
+  LiteralPatternConverter(const LogString& literal);
+
+
+public:
+   DECLARE_LOG4CXX_PATTERN(LiteralPatternConverter)
+   BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(LiteralPatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  static PatternConverterPtr newInstance(const LogString& literal);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+
+  void format(const log4cxx::helpers::ObjectPtr& obj,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+};
+
+  }
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/loggerpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/loggerpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/loggerpatternconverter.h	(revision 257)
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ #ifndef _LOG4CXX_PATTERN_LOGGER_PATTERN_CONVERTER_H
+ #define _LOG4CXX_PATTERN_LOGGER_PATTERN_CONVERTER_H
+
+
+#include <log4cxx/pattern/namepatternconverter.h>
+
+namespace log4cxx {
+  namespace pattern {
+
+
+/**
+ * Formats a logger name.
+ *
+ * 
+ *
+ * 
+ */
+class LOG4CXX_EXPORT LoggerPatternConverter : public NamePatternConverter {
+
+  /**
+   * Private constructor.
+   * @param options options, may be null.
+   * @param logger logger for diagnostic messages, may be null.
+   */
+  LoggerPatternConverter(const std::vector<LogString>& options);
+
+public:
+  DECLARE_LOG4CXX_PATTERN(LoggerPatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+       LOG4CXX_CAST_ENTRY(LoggerPatternConverter)
+       LOG4CXX_CAST_ENTRY_CHAIN(NamePatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+};
+
+  }
+}
+
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/loggingeventpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/loggingeventpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/loggingeventpatternconverter.h	(revision 257)
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_LOGGING_EVENT_PATTERN_CONVERTER_H
+#define _LOG4CXX_PATTERN_LOGGING_EVENT_PATTERN_CONVERTER_H
+
+#include <log4cxx/pattern/patternconverter.h>
+#include <log4cxx/spi/loggingevent.h>
+
+namespace log4cxx {
+
+  namespace pattern {
+    /**
+    * LoggingEventPatternConverter is a base class for pattern converters
+    * that can format information from instances of LoggingEvent.
+    *
+    * 
+    *
+    * 
+    */
+class LOG4CXX_EXPORT LoggingEventPatternConverter : public PatternConverter {
+protected:
+  /**
+   * Constructs an instance of LoggingEventPatternConverter.
+   * @param name name of converter.
+   * @param style CSS style for output.
+   */
+  LoggingEventPatternConverter(
+    const LogString& name, const LogString& style);
+
+public:
+DECLARE_LOG4CXX_PATTERN(LoggingEventPatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(LoggingEventPatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(PatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Formats an event into a string buffer.
+   * @param event event to format, may not be null.
+   * @param toAppendTo string buffer to which the formatted event will be appended.  May not be null.
+   * @param p pool for memory allocations needing during format.
+   */
+  virtual void format(
+    const log4cxx::spi::LoggingEventPtr& event,
+    LogString& toAppendTo,
+    log4cxx::helpers::Pool& p) const = 0;
+
+  void format(const log4cxx::helpers::ObjectPtr& obj,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+
+  /**
+   * Normally pattern converters are not meant to handle Exceptions although
+   * few pattern converters might.
+   *
+   * By examining the return values for this method, the containing layout will
+   * determine whether it handles throwables or not.
+
+   * @return true if this PatternConverter handles throwables
+   */
+  virtual bool handlesThrowable() const;
+};
+
+LOG4CXX_PTR_DEF(LoggingEventPatternConverter);
+
+  }
+}
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/messagepatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/messagepatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/messagepatternconverter.h	(revision 257)
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_MESSAGE_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_MESSAGE_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Formats the message of an logging event.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT MessagePatternConverter : public LoggingEventPatternConverter {
+
+  /**
+   * Private constructor.
+   */
+  MessagePatternConverter();
+
+public:
+DECLARE_LOG4CXX_PATTERN(MessagePatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(MessagePatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of pattern converter.
+   * @param options options, may be null.
+   * @return instance of pattern converter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+};
+}
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/methodlocationpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/methodlocationpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/methodlocationpatternconverter.h	(revision 257)
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_METHOD_LOCATION_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_METHOD_LOCATION_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Return the event's line location information in a StringBuffer.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT MethodLocationPatternConverter
+  : public LoggingEventPatternConverter {
+
+  /**
+   * Private constructor.
+   */
+  MethodLocationPatternConverter();
+
+public:
+DECLARE_LOG4CXX_PATTERN(MethodLocationPatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(MethodLocationPatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of MethodLocationPatternConverter.
+   * @param options options, may be null.
+   * @return instance of MethodLocationPatternConverter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+};
+}
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/nameabbreviator.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/nameabbreviator.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/nameabbreviator.h	(revision 257)
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_NAME_ABBREVIATOR
+#define _LOG4CXX_PATTERN_NAME_ABBREVIATOR
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/objectimpl.h>
+
+namespace log4cxx {
+  namespace pattern {
+
+    class NameAbbreviator;
+    LOG4CXX_PTR_DEF(NameAbbreviator);
+
+/**
+ * NameAbbreviator generates abbreviated logger and class names.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT NameAbbreviator : public log4cxx::helpers::ObjectImpl {
+public:
+   DECLARE_ABSTRACT_LOG4CXX_OBJECT(NameAbbreviator)
+   BEGIN_LOG4CXX_CAST_MAP()
+        LOG4CXX_CAST_ENTRY(NameAbbreviator)
+   END_LOG4CXX_CAST_MAP()
+
+protected:
+   NameAbbreviator();
+
+public:
+   virtual ~NameAbbreviator();
+
+  /**
+   * Gets an abbreviator.
+   *
+   * For example, "%logger{2}" will output only 2 elements of the logger name,
+   * "%logger{1.}" will output only the first character of the non-final elements in the name,
+   * "%logger(1~.2~} will output the first character of the first element, two characters of
+   * the second and subsequent elements and will use a tilde to indicate abbreviated characters.
+   *
+   * @param pattern abbreviation pattern.
+   * @return abbreviator, will not be null.
+   */
+  static NameAbbreviatorPtr getAbbreviator(const LogString& pattern);
+
+  /**
+   * Gets default abbreviator.
+   *
+   * @return default abbreviator.
+   */
+  static NameAbbreviatorPtr getDefaultAbbreviator();
+
+  /**
+   * Abbreviates a name in a StringBuffer.
+   *
+   * @param nameStart starting position of name in buf.
+   * @param buf buffer, may not be null.
+   */
+  virtual void abbreviate(LogString::size_type nameStart, LogString& buf) const = 0;
+
+};
+  }
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/namepatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/namepatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/namepatternconverter.h	(revision 257)
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_NAMED_PATTERN_CONVERTER_H
+#define _LOG4CXX_PATTERN_NAMED_PATTERN_CONVERTER_H
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+#include <log4cxx/pattern/nameabbreviator.h>
+
+#include <vector>
+
+namespace log4cxx {
+  namespace pattern {
+
+/**
+ *
+ * Base class for other pattern converters which can return only parts of their name.
+ *
+ */
+class LOG4CXX_EXPORT NamePatternConverter : public LoggingEventPatternConverter {
+  /**
+   * Abbreviator.
+   */
+  const NameAbbreviatorPtr abbreviator;
+
+public:
+DECLARE_LOG4CXX_PATTERN(NamePatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(NamePatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+
+protected:
+  /**
+   * Constructor.
+   * @param name name of converter.
+   * @param style style name for associated output.
+   * @param options options, may be null, first element will be interpreted as an abbreviation pattern.
+   */
+  NamePatternConverter(
+    const LogString& name,
+    const LogString& style,
+    const std::vector<LogString>& options);
+
+  /**
+   * Abbreviate name in string buffer.
+   * @param nameStart starting position of name to abbreviate.
+   * @param buf string buffer containing name.
+   */
+  void abbreviate(int nameStart, LogString& buf) const;
+
+private:
+   NameAbbreviatorPtr getAbbreviator(const std::vector<LogString>& options);
+};
+
+  }
+}
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/ndcpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/ndcpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/ndcpatternconverter.h	(revision 257)
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_NDC_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_NDC_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Return the event's NDC in a StringBuffer.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT NDCPatternConverter : public LoggingEventPatternConverter {
+
+  /**
+   * Private constructor.
+   */
+  NDCPatternConverter();
+
+public:
+DECLARE_LOG4CXX_PATTERN(NDCPatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(NDCPatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of NDCPatternConverter.
+   * @param options options, may be null.
+   * @return instance of NDCPatternConverter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+};
+}
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/patternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/patternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/patternconverter.h	(revision 257)
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_PATTERN_CONVERTER_H
+#define _LOG4CXX_PATTERN_PATTERN_CONVERTER_H
+
+
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/logstring.h>
+#include <vector>
+
+#ifdef _MSC_VER
+//   disable identifier too wide for debugging warning
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#define DECLARE_LOG4CXX_PATTERN(cls) DECLARE_ABSTRACT_LOG4CXX_OBJECT(cls)
+
+namespace log4cxx {
+  namespace pattern {
+
+  typedef std::vector<LogString> OptionsList;
+
+/**
+
+   <p>PatternConverter is an abstract class that provides the
+   formatting functionality that derived classes need.
+
+   <p>Conversion specifiers in a conversion patterns are parsed to
+   individual PatternConverters. Each of which is responsible for
+   converting an object in a converter specific manner.
+   
+ */
+class LOG4CXX_EXPORT PatternConverter : public virtual log4cxx::helpers::ObjectImpl {
+
+  /**
+   * Converter name.
+   */
+  const LogString name;
+
+  /**
+   * Converter style name.
+   */
+  const LogString style;
+
+
+protected:
+  /**
+   * Create a new pattern converter.
+   * @param name name for pattern converter.
+   * @param style CSS style for formatted output.
+   */
+  PatternConverter(const LogString& name,
+         const LogString& style);
+
+  virtual ~PatternConverter();
+
+public:
+  DECLARE_LOG4CXX_PATTERN(PatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+          LOG4CXX_CAST_ENTRY(PatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Formats an object into a string buffer.
+   * @param obj event to format, may not be null.
+   * @param toAppendTo string buffer to which the formatted event will be appended.  May not be null.
+   * @param p pool for any allocations necessary during formatting.
+   */
+  virtual void format(const log4cxx::helpers::ObjectPtr& obj,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const = 0;
+
+  /**
+   * This method returns the name of the conversion pattern.
+   *
+   * The name can be useful to certain Layouts such as HTMLLayout.
+   *
+   * @return        the name of the conversion pattern
+   */
+  LogString getName() const;
+
+  /**
+   * This method returns the CSS style class that should be applied to
+   * the LoggingEvent passed as parameter, which can be null.
+   *
+   * This information is currently used only by HTMLLayout.
+   *
+   * @param e null values are accepted
+   * @return  the name of the conversion pattern
+   */
+  virtual LogString getStyleClass(const log4cxx::helpers::ObjectPtr& e) const;
+
+protected:
+/**
+* Appends content in the locale code page to a LogString.
+* @param toAppendTo string to which content is appended.
+* @param src content.
+*/
+  static void append(LogString& toAppendTo, const std::string& src);
+};
+
+
+LOG4CXX_PTR_DEF(PatternConverter);
+
+  }
+}
+
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/patternparser.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/patternparser.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/patternparser.h	(revision 257)
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef _LOG4CXX_HELPER_PATTERN_CONVERTER_H
+#define _LOG4CXX_HELPER_PATTERN_CONVERTER_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+
+#include <map>
+#include <vector>
+#include <log4cxx/helpers/class.h>
+#include <log4cxx/pattern/patternconverter.h>
+#include <log4cxx/pattern/formattinginfo.h>
+
+namespace log4cxx {
+  namespace pattern {
+
+typedef PatternConverterPtr (*PatternConstructor)(const std::vector<LogString>& options);
+typedef std::map<LogString, PatternConstructor> PatternMap;
+
+
+// Contributors:   Nelson Minar <(nelson@monkey.org>
+//                 Igor E. Poteryaev <jah@mail.ru>
+//                 Reinhard Deschler <reinhard.deschler@web.de>
+
+/**
+ * Most of the work of the {@link log4cxx::PatternLayout PatternLayout} class
+ * is delegated to the PatternParser class.
+ * <p>It is this class that parses conversion patterns and creates
+ * a chained list of {@link PatternConverter PatternConverters}.
+ *
+ * 
+*/
+class LOG4CXX_EXPORT PatternParser {
+  /**
+   * Escape character for format specifier.
+   */
+  static const logchar ESCAPE_CHAR;
+
+  enum {
+    LITERAL_STATE = 0,
+    CONVERTER_STATE = 1,
+    DOT_STATE = 3,
+    MIN_STATE = 4,
+    MAX_STATE = 5
+  };
+
+  /**
+   * Private constructor.
+   */
+  PatternParser();
+
+private:
+  /** Extract the converter identifier found at position i.
+   *
+   * After this function returns, the variable i will point to the
+   * first char after the end of the converter identifier.
+   *
+   * If i points to a char which is not a character acceptable at the
+   * start of a unicode identifier, the value null is returned.
+   *
+   * @param lastChar last processed character.
+   * @param pattern format string.
+   * @param i current index into pattern format.
+   * @param convBuf buffer to receive conversion specifier.
+   * @param currentLiteral literal to be output in case format specifier in unrecognized.
+   * @return position in pattern after converter.
+   */
+  static int extractConverter(
+    logchar lastChar, const LogString& pattern,
+    LogString::size_type i, LogString& convBuf,
+    LogString& currentLiteral);
+
+  /**
+   * Extract options.
+   * @param pattern conversion pattern.
+   * @param i start of options.
+   * @param options array to receive extracted options
+   * @return position in pattern after options.
+   */
+  static int extractOptions(const LogString& pattern, LogString::size_type i,
+     std::vector<LogString>& options);
+
+public:
+  /**
+   * Parse a format specifier.
+   * @param pattern pattern to parse.
+   * @param patternConverters list to receive pattern converters.
+   * @param formattingInfos list to receive field specifiers corresponding to pattern converters.
+   * @param rules map of stock pattern converters keyed by format specifier.
+   */
+  static void parse(
+    const LogString& pattern,
+    std::vector<PatternConverterPtr>& patternConverters,
+    std::vector<FormattingInfoPtr>& formattingInfos,
+    const PatternMap& rules);
+
+private:
+  /**
+   * Creates a new PatternConverter.
+   *
+   *
+   * @param converterId converterId.
+   * @param currentLiteral literal to be used if converter is unrecognized or following converter
+   *    if converterId contains extra characters.
+   * @param rules map of stock pattern converters keyed by format specifier.
+   * @param options converter options.
+   * @return  converter or null.
+   */
+  static PatternConverterPtr createConverter(
+    const LogString& converterId,
+    LogString& currentLiteral,
+    const PatternMap& rules,
+    std::vector<LogString>& options);
+
+  /**
+   * Processes a format specifier sequence.
+   *
+   * @param c initial character of format specifier.
+   * @param pattern conversion pattern
+   * @param i current position in conversion pattern.
+   * @param currentLiteral current literal.
+   * @param formattingInfo current field specifier.
+   * @param rules map of stock pattern converters keyed by format specifier.
+   * @param patternConverters list to receive parsed pattern converter.
+   * @param formattingInfos list to receive corresponding field specifier.
+   * @return position after format specifier sequence.
+   */
+  static int finalizeConverter(
+    logchar c, const LogString& pattern, int i,
+    LogString& currentLiteral, const FormattingInfoPtr& formattingInfo,
+    const PatternMap&  rules,
+    std::vector<PatternConverterPtr>& patternConverters,
+    std::vector<FormattingInfoPtr>&  formattingInfos);
+
+    static bool isUnicodeIdentifierStart(logchar c);
+    static bool isUnicodeIdentifierPart(logchar c);
+
+
+};
+
+}
+}
+
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/propertiespatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/propertiespatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/propertiespatternconverter.h	(revision 257)
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_PROPERTIES_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_PROPERTIES_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Able to handle the contents of the LoggingEvent's Property bundle and either
+ * output the entire contents of the properties in a similar format to the
+ * java.util.Hashtable.toString(), or to output the value of a specific key
+ * within the property bundle
+ * when this pattern converter has the option set.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT PropertiesPatternConverter
+  : public LoggingEventPatternConverter {
+  /**
+   * Name of property to output.
+   */
+  const LogString option;
+
+  /**
+   * Private constructor.
+   * @param options options, may be null.
+   * @param logger logger for diagnostic messages, may be null.
+   */
+  PropertiesPatternConverter(const LogString& name, const LogString& option);
+
+  public:
+  DECLARE_LOG4CXX_PATTERN(PropertiesPatternConverter)
+  BEGIN_LOG4CXX_CAST_MAP()
+       LOG4CXX_CAST_ENTRY(PropertiesPatternConverter)
+       LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of PropertiesPatternConverter.
+   * @param options options, may be null or first element contains name of property to format.
+   * @return instance of PropertiesPatternConverter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+};
+}
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/relativetimepatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/relativetimepatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/relativetimepatternconverter.h	(revision 257)
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_RELATIVE_TIME_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_RELATIVE_TIME_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Format the relative time in milliseconds.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT RelativeTimePatternConverter : public LoggingEventPatternConverter {
+public:
+DECLARE_LOG4CXX_PATTERN(RelativeTimePatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(RelativeTimePatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Private constructor.
+   */
+  RelativeTimePatternConverter();
+
+  /**
+   * Obtains an instance of RelativeTimePatternConverter.
+   * @param options options, currently ignored, may be null.
+   * @return instance of RelativeTimePatternConverter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+      LogString& toAppendTo,
+      log4cxx::helpers::Pool& p) const;
+};
+}
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/threadpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/threadpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/threadpatternconverter.h	(revision 257)
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_THREAD_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_THREAD_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Formats the event thread name.
+ *
+ * 
+ * 
+ */
+class LOG4CXX_EXPORT ThreadPatternConverter : public LoggingEventPatternConverter {
+  /**
+   * Private constructor.
+   */
+  ThreadPatternConverter();
+
+public:
+DECLARE_LOG4CXX_PATTERN(ThreadPatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(ThreadPatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+  /**
+   * Obtains an instance of ThreadPatternConverter.
+   * @param options options, currently ignored, may be null.
+   * @return instance of ThreadPatternConverter.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+        LogString& toAppendTo,
+        log4cxx::helpers::Pool& p) const;
+};
+}
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/throwableinformationpatternconverter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/throwableinformationpatternconverter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/pattern/throwableinformationpatternconverter.h	(revision 257)
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_THROWABLE_INFORMATION_PATTERN_CONVERTER
+#define _LOG4CXX_PATTERN_THROWABLE_INFORMATION_PATTERN_CONVERTER
+
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+
+namespace log4cxx { namespace pattern {
+
+
+/**
+ * Outputs the ThrowableInformation portion of the LoggingiEvent as a full stacktrace
+ * unless this converter's option is 'short', where it just outputs the first line of the trace.
+ *
+ * 
+ * 
+ *
+ */
+class LOG4CXX_EXPORT ThrowableInformationPatternConverter
+  : public LoggingEventPatternConverter {
+  /**
+   * If "short", only first line of throwable report will be formatted.
+   */
+  const bool shortReport;
+
+  /**
+   * Private constructor.
+   */
+  ThrowableInformationPatternConverter(bool shortReport);
+
+public:
+DECLARE_LOG4CXX_PATTERN(ThrowableInformationPatternConverter)
+BEGIN_LOG4CXX_CAST_MAP()
+     LOG4CXX_CAST_ENTRY(ThrowableInformationPatternConverter)
+     LOG4CXX_CAST_ENTRY_CHAIN(LoggingEventPatternConverter)
+END_LOG4CXX_CAST_MAP()
+
+
+  /**
+   * Gets an instance of the class.
+    * @param options pattern options, may be null.  If first element is "short",
+   * only the first line of the throwable will be formatted.
+   * @return instance of class.
+   */
+  static PatternConverterPtr newInstance(
+    const std::vector<LogString>& options);
+  void format(const log4cxx::spi::LoggingEventPtr& event,
+     LogString& toAppendTo,
+     log4cxx::helpers::Pool& p) const;
+
+  /**
+   * This converter obviously handles throwables.
+   * @return true.
+   */
+  bool handlesThrowable() const;
+};
+}
+}
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/patternlayout.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/patternlayout.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/patternlayout.h	(revision 257)
@@ -0,0 +1,409 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PATTERN_LAYOUT_H
+#define _LOG4CXX_PATTERN_LAYOUT_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+
+#include <log4cxx/layout.h>
+#include <log4cxx/pattern/loggingeventpatternconverter.h>
+#include <log4cxx/pattern/formattinginfo.h>
+#include <log4cxx/pattern/patternparser.h>
+
+namespace log4cxx
+{
+    LOG4CXX_LIST_DEF(LoggingEventPatternConverterList, log4cxx::pattern::LoggingEventPatternConverterPtr);
+                LOG4CXX_LIST_DEF(FormattingInfoList, log4cxx::pattern::FormattingInfoPtr);
+                
+        /**
+
+        A flexible layout configurable with pattern string.
+
+        <p>The goal of this class is to #format a {@link
+        spi::LoggingEvent LoggingEvent} and return the results as a string.
+        The results depend on the <em>conversion pattern</em>.
+
+        <p>The conversion pattern is closely related to the conversion
+        pattern of the printf function in C. A conversion pattern is
+        composed of literal text and format control expressions called
+        <em>conversion specifiers</em>.
+
+        <p><i>You are free to insert any literal text within the conversion
+        pattern.</i>
+
+        <p>Each conversion specifier starts with a percent sign (\%) and is
+        followed by optional <em>format modifiers</em> and a <em>conversion
+        character</em>. The conversion character specifies the type of
+        data, e.g. logger, level, date, thread name. The format
+        modifiers control such things as field width, padding, left and
+        right justification. The following is a simple example.
+
+        <p>Let the conversion pattern be <b>"\%-5p [\%t]: \%m\%n"</b> and assume
+        that the log4cxx environment was set to use a PatternLayout. Then the
+        statements
+        <pre>
+        LoggerPtr root = Logger::getRoot();
+        root->debug("Message 1");
+        root->warn("Message 2");
+        </pre>
+        would yield the output
+        <pre>
+        DEBUG [main]: Message 1
+        WARN  [main]: Message 2
+        </pre>
+
+        <p>Note that there is no explicit separator between text and
+        conversion specifiers. The pattern parser knows when it has reached
+        the end of a conversion specifier when it reads a conversion
+        character. In the example above the conversion specifier
+        <b>\%-5p</b> means the level of the logging event should be left
+        justified to a width of five characters.
+
+        The recognized conversion characters are
+
+        <p>
+        <table border="1" CELLPADDING="8">
+        <tr>
+        <td align=center><b>Conversion Character</b></td>
+        <td align=center><b>Effect</b></td>
+        </tr>
+
+        <tr>
+        <td align=center><b>c</b></td>
+
+        <td>Used to output the logger of the logging event. The
+        logger conversion specifier can be optionally followed by
+        <em>precision specifier</em>, that is a decimal constant in
+        brackets.
+
+        <p>If a precision specifier is given, then only the corresponding
+        number of right most components of the logger name will be
+        printed. By default the logger name is printed in full.
+
+        <p>For example, for the logger name "a.b.c" the pattern
+        <b>\%c{2}</b> will output "b.c".
+
+        </td>
+        </tr>
+
+   <tr> <td align=center><b>d</b></td> <td>Used to output the date of
+         the logging event. The date conversion specifier may be
+         followed by a set of braces containing a
+         date and time pattern string compatible with java.text.SimpleDateFormat,
+         <em>ABSOLUTE</em>, <em>DATE</em> or <em>ISO8601</em>.
+         For example, <b>%d{HH:mm:ss,SSS}</b>,
+         <b>%d{dd&nbsp;MMM&nbsp;yyyy&nbsp;HH:mm:ss,SSS}</b> or
+         <b>%d{DATE}</b>.  If no date format specifier is given then
+         ISO8601 format is assumed.
+     </td>
+   </tr>
+
+        <tr>
+        <td align=center><b>F</b></td>
+
+        <td>Used to output the file name where the logging request was
+        issued.
+
+        </tr>
+
+        <tr>
+        <td align=center><b>l</b></td>
+
+        <td>Used to output location information of the caller which generated
+        the logging event.
+
+        </td>
+        </tr>
+
+        <tr>
+        <td align=center><b>L</b></td>
+
+        <td>Used to output the line number from where the logging request
+        was issued.
+        </tr>
+
+
+        <tr>
+        <td align=center><b>m</b></td>
+        <td>Used to output the application supplied message associated with
+        the logging event.</td>
+        </tr>
+
+        <tr>
+        <td align=center><b>n</b></td>
+
+        <td>Outputs the platform dependent line separator character or
+        characters.
+
+        <p>This conversion character offers practically the same
+        performance as using non-portable line separator strings such as
+        "\n", or "\r\n". Thus, it is the preferred way of specifying a
+        line separator.
+
+
+        </tr>
+
+        <tr>
+        <td align=center><b>p</b></td>
+        <td>Used to output the level of the logging event.</td>
+        </tr>
+
+        <tr>
+
+        <td align=center><b>r</b></td>
+
+        <td>Used to output the number of milliseconds elapsed since the start
+        of the application until the creation of the logging event.</td>
+        </tr>
+
+
+        <tr>
+        <td align=center><b>t</b></td>
+
+        <td>Used to output the name of the thread that generated the
+        logging event.</td>
+
+        </tr>
+
+        <tr>
+
+        <td align=center><b>x</b></td>
+
+        <td>Used to output the NDC (nested diagnostic context) associated
+        with the thread that generated the logging event.
+        </td>
+        </tr>
+
+
+        <tr>
+        <td align=center><b>X</b></td>
+
+        <td>
+
+        <p>Used to output the MDC (mapped diagnostic context) associated
+        with the thread that generated the logging event. The <b>X</b>
+        conversion character <em>must</em> be followed by the key for the
+        map placed between braces, as in <b>\%X{clientNumber}</b> where
+        <code>clientNumber</code> is the key. The value in the MDC
+        corresponding to the key will be output.</p>
+
+        <p>See MDC class for more details.
+        </p>
+
+        </td>
+        </tr>
+
+        <tr>
+
+        <td align=center><b>\%</b></td>
+
+        <td>The sequence \%\% outputs a single percent sign.
+        </td>
+        </tr>
+
+        </table>
+
+        <p>By default the relevant information is output as is. However,
+        with the aid of format modifiers it is possible to change the
+        minimum field width, the maximum field width and justification.
+
+        <p>The optional format modifier is placed between the percent sign
+        and the conversion character.
+
+        <p>The first optional format modifier is the <em>left justification
+        flag</em> which is just the minus (-) character. Then comes the
+        optional <em>minimum field width</em> modifier. This is a decimal
+        constant that represents the minimum number of characters to
+        output. If the data item requires fewer characters, it is padded on
+        either the left or the right until the minimum width is
+        reached. The default is to pad on the left (right justify) but you
+        can specify right padding with the left justification flag. The
+        padding character is space. If the data item is larger than the
+        minimum field width, the field is expanded to accommodate the
+        data. The value is never truncated.
+
+        <p>This behavior can be changed using the <em>maximum field
+        width</em> modifier which is designated by a period followed by a
+        decimal constant. If the data item is longer than the maximum
+        field, then the extra characters are removed from the
+        <em>beginning</em> of the data item and not from the end. For
+        example, it the maximum field width is eight and the data item is
+        ten characters long, then the first two characters of the data item
+        are dropped. This behavior deviates from the printf function in C
+        where truncation is done from the end.
+
+        <p>Below are various format modifier examples for the logger
+        conversion specifier.
+
+        <p>
+        <TABLE BORDER=1 CELLPADDING=8>
+        <tr>
+        <td align=center><b>Format modifier</b></td>
+        <td align=center><b>left justify</b></td>
+        <td align=center><b>minimum width</b></td>
+        <td align=center><b>maximum width</b></td>
+        <td align=center><b>comment</b></td>
+        </tr>
+
+        <tr>
+        <td align=center>\%20c</td>
+        <td align=center>false</td>
+        <td align=center>20</td>
+        <td align=center>none</td>
+
+        <td>Left pad with spaces if the logger name is less than 20
+        characters long.
+
+        <tr> <td align=center>\%-20c</td> <td align=center>true</td> <td
+        align=center>20</td> <td align=center>none</td> <td>Right pad with
+        spaces if the logger name is less than 20 characters long.
+
+        <tr>
+        <td align=center>\%.30c</td>
+        <td align=center>NA</td>
+        <td align=center>none</td>
+        <td align=center>30</td>
+
+        <td>Truncate from the beginning if the logger name is longer than 30
+        characters.
+
+        <tr>
+        <td align=center>\%20.30c</td>
+        <td align=center>false</td>
+        <td align=center>20</td>
+        <td align=center>30</td>
+
+        <td>Left pad with spaces if the logger name is shorter than 20
+        characters. However, if logger name is longer than 30 characters,
+        then truncate from the beginning.
+
+        <tr>
+        <td align=center>\%-20.30c</td>
+        <td align=center>true</td>
+        <td align=center>20</td>
+        <td align=center>30</td>
+
+        <td>Right pad with spaces if the logger name is shorter than 20
+        characters. However, if logger name is longer than 30 characters,
+        then truncate from the beginning.
+
+        </table>
+
+        <p>Below are some examples of conversion patterns.
+
+        <p><b>\%r [\%t] \%-5p \%c \%x - \%m\n</b>
+        <p>This is essentially the TTCC layout.
+
+        <p><b>\%-6r [\%15.15t] \%-5p \%30.30c \%x - \%m\n</b>
+
+        <p>Similar to the TTCC layout except that the relative time is
+        right padded if less than 6 digits, thread name is right padded if
+        less than 15 characters and truncated if longer and the logger
+        name is left padded if shorter than 30 characters and truncated if
+        longer.
+
+        <p>The above text is largely inspired from Peter A. Darnell and
+        Philip E. Margolis' highly recommended book "C -- a Software
+        Engineering Approach", ISBN 0-387-97389-3.
+        */
+        class LOG4CXX_EXPORT PatternLayout : public Layout
+        {
+                 /**
+                  * Conversion pattern.
+                  */
+                LogString conversionPattern;
+
+                /**
+                 * Pattern converters.
+                 */
+                LoggingEventPatternConverterList patternConverters;
+
+               /**
+                * Field widths and alignment corresponding to pattern converters.
+                */
+                FormattingInfoList patternFields;
+
+
+        public:
+                DECLARE_LOG4CXX_OBJECT(PatternLayout)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(PatternLayout)
+                        LOG4CXX_CAST_ENTRY_CHAIN(Layout)
+                END_LOG4CXX_CAST_MAP()
+
+                /**
+                Does nothing
+                */
+                PatternLayout();
+
+                /**
+                Constructs a PatternLayout using the supplied conversion pattern.
+                */
+                PatternLayout(const LogString& pattern);
+
+                /**
+                Set the <b>ConversionPattern</b> option. This is the string which
+                controls formatting and consists of a mix of literal content and
+                conversion specifiers.
+                */
+                void setConversionPattern(const LogString& conversionPattern);
+
+                /**
+                Returns the value of the <b>ConversionPattern</b> option.
+                */
+                inline LogString getConversionPattern() const
+                        { return conversionPattern; }
+
+                /**
+                Call createPatternParser
+                */
+                virtual void activateOptions(log4cxx::helpers::Pool& p);
+
+                virtual void setOption(const LogString& option, const LogString& value);
+
+                /**
+                The PatternLayout does not handle the throwable contained within
+                {@link spi::LoggingEvent LoggingEvents}. Thus, it returns
+                <code>true</code>.
+                */
+                virtual bool ignoresThrowable() const
+                        { return true; }
+
+                /**
+                Produces a formatted string as specified by the conversion pattern.
+                */
+                virtual void format(LogString& output,
+                     const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool) const;
+
+        protected:
+                virtual log4cxx::pattern::PatternMap getFormatSpecifiers();
+        };
+      LOG4CXX_PTR_DEF(PatternLayout);
+}  // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif //_LOG4CXX_PATTERN_LAYOUT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/portability.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/portability.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/portability.h	(revision 257)
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PORTABILITY_H
+#define _LOG4CXX_PORTABILITY_H
+
+//
+//    Obsolete file
+//
+
+#endif //_LOG4CXX_PORTABILITY_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/private/log4cxx_private.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/private/log4cxx_private.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/private/log4cxx_private.h	(revision 257)
@@ -0,0 +1,84 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef LOG4CXX_PRIVATE_LOG4CXX_H
+#define LOG4CXX_PRIVATE_LOG4CXX_H
+
+
+/* GENERATED FILE WARNING!  DO NOT EDIT log4cxx.h
+ *
+ * You must modify log4cxx.hw instead.
+ *
+ *
+ * This is the Win32 specific version of log4cxx.h.
+ */
+
+#include <log4cxx/log4cxx.h>
+
+#if !defined(LOG4CXX) && !defined(LOG4CXX_TEST)
+#error "log4cxx/private/log4cxx.h should only be used within log4cxx and tests implementation"
+#endif
+
+
+#if !defined(__BORLANDC__)
+#define LOG4CXX_RETURN_AFTER_THROW 1
+#else
+#define LOG4CXX_RETURN_AFTER_THROW 0
+#endif
+
+#if defined(_WIN32_WCE)
+#define LOG4CXX_HAS_STD_LOCALE 0
+#else
+#define LOG4CXX_HAS_STD_LOCALE 1
+#endif
+
+#define LOG4CXX_FORCE_WIDE_CONSOLE 1
+#define LOG4CXX_FORCE_BYTE_CONSOLE 0
+
+
+#if defined(_MSC_VER)
+#define LOG4CXX_MEMSET_IOS_BASE 1
+#endif
+
+#if !defined(_WIN32_WCE)
+#define LOG4CXX_HAVE_ODBC 1
+#if defined(__BORLANDC__)
+#define LOG4CXX_HAS_MBSRTOWCS 0
+#else
+#define LOG4CXX_HAS_MBSRTOWCS 1
+#endif
+#else
+#define LOG4CXX_HAVE_ODBC 0
+#define LOG4CXX_HAS_MBSRTOWCS 0
+#endif
+
+#define LOG4CXX_HAS_FWIDE 1
+#define LOG4CXX_HAS_WCSTOMBS 1
+
+#define LOG4CXX_CHARSET_UTF8 0
+#define LOG4CXX_CHARSET_ISO88591 0
+#define LOG4CXX_CHARSET_USASCII 0
+#define LOG4CXX_CHARSET_EBCDIC 0
+
+
+#define LOG4CXX_HAVE_LIBESMTP 0
+#define LOG4CXX_HAVE_SYSLOG 0
+
+#define LOG4CXX_WIN32_THREAD_FMTSPEC "0x%.8x"
+#define LOG4CXX_APR_THREAD_FMTSPEC "0x%pt"
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/propertyconfigurator.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/propertyconfigurator.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/propertyconfigurator.h	(revision 257)
@@ -0,0 +1,395 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_PROPERTY_CONFIGURATOR_H
+#define _LOG4CXX_PROPERTY_CONFIGURATOR_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/logstring.h>
+#include <log4cxx/spi/configurator.h>
+#include <map>
+
+#include <log4cxx/file.h>
+
+namespace log4cxx
+{
+   class Logger;
+   typedef helpers::ObjectPtrT<Logger> LoggerPtr;
+
+   class Appender;
+   typedef helpers::ObjectPtrT<Appender> AppenderPtr;
+
+   namespace helpers
+   {
+      class Properties;
+   }
+
+
+    namespace spi {
+        class LoggerFactory;
+    }
+
+/**
+Allows the configuration of log4cxx from an external file.  See
+<b>{@link #doConfigure(const File&, log4cxx::spi::LoggerRepositoryPtr&)}</b>
+for the expected format.
+
+<p>It is sometimes useful to see how log4cxx is reading configuration
+files. You can enable log4cxx internal logging by defining the
+<b>log4j.debug</b> variable.
+
+<P>At class initialization time class,
+the file <b>log4j.properties</b> will be searched in the current directory.
+If the file can be found, then it will
+be fed to the
+{@link PropertyConfigurator#configure(const File& configFilename)}
+method.
+
+<p>The <code>PropertyConfigurator</code> does not handle the
+advanced configuration features supported by the {@link
+xml::DOMConfigurator DOMConfigurator} such as
+support for {@link spi::Filter Filters}, custom
+{@link spi::ErrorHandler ErrorHandlers}, nested
+appenders such as the {@link AsyncAppender
+AsyncAppender}, etc.
+
+<p>All option <em>values</em> admit variable substitution. The
+syntax of variable substitution is similar to that of Unix
+shells. The string between an opening <b>&quot;${&quot;</b> and
+closing <b>&quot;}&quot;</b> is interpreted as a key. The value of
+the substituted variable can be defined as a system property or in
+the configuration file itself. The value of the key is first
+searched in the system properties, and if not found there, it is
+then searched in the configuration file being parsed.  The
+corresponding value replaces the ${variableName} sequence. For
+example, if <code>java.home</code> system property is set to
+<code>/home/xyz</code>, then every occurrence of the sequence
+<code>${java.home}</code> will be interpreted as
+<code>/home/xyz</code>.
+*/
+   class LOG4CXX_EXPORT PropertyConfigurator :
+      virtual public spi::Configurator,
+      virtual public helpers::ObjectImpl
+   {
+   protected:
+
+      /**
+      Used internally to keep track of configured appenders.
+      */
+      std::map<LogString, AppenderPtr>* registry;
+
+      /**
+      Used to create new instances of logger
+      */
+        helpers::ObjectPtrT<spi::LoggerFactory> loggerFactory;
+
+   public:
+      DECLARE_LOG4CXX_OBJECT(PropertyConfigurator)
+      BEGIN_LOG4CXX_CAST_MAP()
+         LOG4CXX_CAST_ENTRY(spi::Configurator)
+      END_LOG4CXX_CAST_MAP()
+
+      PropertyConfigurator();
+      virtual ~PropertyConfigurator();
+      void addRef() const;
+      void releaseRef() const;
+
+/**
+Read configuration from a file. <b>The existing configuration is
+not cleared nor reset.</b> If you require a different behavior,
+then call {@link LogManager#resetConfiguration
+resetConfiguration} method before calling
+<code>doConfigure</code>.
+
+<p>The configuration file consists of statements in the format
+<code>key=value</code>. The syntax of different configuration
+elements are discussed below.
+
+<h3>Repository-wide threshold</h3>
+
+<p>The repository-wide threshold filters logging requests by level
+regardless of logger. The syntax is:
+
+<pre>
+log4j.threshold=[level]
+</pre>
+
+<p>The level value can consist of the string values OFF, FATAL,
+ERROR, WARN, INFO, DEBUG, ALL or a <em>custom level</em> value. A
+custom level value can be specified in the form
+level#classname. By default the repository-wide threshold is set
+to the lowest possible value, namely the level <code>ALL</code>.
+</p>
+
+
+<h3>Appender configuration</h3>
+
+<p>Appender configuration syntax is:
+<pre>
+# For appender named <i>appenderName</i>, set its class.
+# Note: The appender name can contain dots.
+log4j.appender.appenderName=fully.qualified.name.of.appender.class
+
+# Set appender specific options.
+log4j.appender.appenderName.option1=value1
+...
+log4j.appender.appenderName.optionN=valueN
+</pre>
+
+For each named appender you can configure its {@link Layout Layout}. The
+syntax for configuring an appender's layout is:
+<pre>
+log4j.appender.appenderName.layout=fully.qualified.name.of.layout.class
+log4j.appender.appenderName.layout.option1=value1
+....
+log4j.appender.appenderName.layout.optionN=valueN
+</pre>
+
+<h3>Configuring loggers</h3>
+
+<p>The syntax for configuring the root logger is:
+<pre>
+log4j.rootLogger=[level], appenderName, appenderName, ...
+</pre>
+
+<p>This syntax means that an optional <em>level</em> can be
+supplied followed by appender names separated by commas.
+
+<p>The level value can consist of the string values OFF, FATAL,
+ERROR, WARN, INFO, DEBUG, ALL or a <em>custom level</em> value. A
+custom level value can be specified in the form
+<code>level#classname</code>.
+
+<p>If a level value is specified, then the root level is set
+to the corresponding level.  If no level value is specified,
+then the root level remains untouched.
+
+<p>The root logger can be assigned multiple appenders.
+
+<p>Each <i>appenderName</i> (separated by commas) will be added to
+the root logger. The named appender is defined using the
+appender syntax defined above.
+
+<p>For non-root categories the syntax is almost the same:
+<pre>
+log4j.logger.logger_name=[level|INHERITED|NULL], appenderName, appenderName,
+...
+</pre>
+
+<p>The meaning of the optional level value is discussed above
+in relation to the root logger. In addition however, the value
+INHERITED can be specified meaning that the named logger should
+inherit its level from the logger hierarchy.
+
+<p>If no level value is supplied, then the level of the
+named logger remains untouched.
+
+<p>By default categories inherit their level from the
+hierarchy. However, if you set the level of a logger and later
+decide that that logger should inherit its level, then you should
+specify INHERITED as the value for the level value. NULL is a
+synonym for INHERITED.
+
+<p>Similar to the root logger syntax, each <i>appenderName</i>
+(separated by commas) will be attached to the named logger.
+
+<p>See the <a href="Introduction.html#additivity">appender
+additivity rule</a> in the user manual for the meaning of the
+<code>additivity</code> flag.
+
+<h3>Logger Factories</h3>
+
+The usage of custom logger factories is discouraged and no longer
+documented.
+
+<h3>Example</h3>
+
+<p>An example configuration is given below. Other configuration
+file examples are given in the <code>examples</code> folder.
+
+<pre>
+
+# Set options for appender named "A1".
+# Appender "A1" will be a SyslogAppender
+log4j.appender.A1=SyslogAppender
+
+# The syslog daemon resides on www.abc.net
+log4j.appender.A1.SyslogHost=www.abc.net
+
+# A1's layout is a PatternLayout, using the conversion pattern
+# <b>%r %-5p %c{2} %M.%L %x - %m\n</b>. Thus, the log output will
+# include # the relative time since the start of the application in
+# milliseconds, followed by the level of the log request,
+# followed by the two rightmost components of the logger name,
+# followed by the callers method name, followed by the line number,
+# the nested disgnostic context and finally the message itself.
+# Refer to the documentation of PatternLayout for further information
+# on the syntax of the ConversionPattern key.
+log4j.appender.A1.layout=PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%-4r %-5p %c{2} %M.%L %x - %m\n
+
+# Set options for appender named "A2"
+# A2 should be a RollingFileAppender, with maximum file size of 10 MB
+# using at most one backup file. A2's layout is TTCC, using the
+# ISO8061 date format with context printing enabled.
+log4j.appender.A2=RollingFileAppender
+log4j.appender.A2.MaxFileSize=10MB
+log4j.appender.A2.MaxBackupIndex=1
+log4j.appender.A2.layout=TTCCLayout
+log4j.appender.A2.layout.ContextPrinting=enabled
+log4j.appender.A2.layout.DateFormat=ISO8601
+
+# Root logger set to DEBUG using the A2 appender defined above.
+log4j.rootLogger=DEBUG, A2
+
+# Logger definitions:
+# The SECURITY logger inherits is level from root. However, it's output
+# will go to A1 appender defined above. It's additivity is non-cumulative.
+log4j.logger.SECURITY=INHERIT, A1
+log4j.additivity.SECURITY=false
+
+# Only warnings or above will be logged for the logger "SECURITY.access".
+# Output will go to A1.
+log4j.logger.SECURITY.access=WARN
+
+
+# The logger "class.of.the.day" inherits its level from the
+# logger hierarchy.  Output will go to the appender's of the root
+# logger, A2 in this case.
+log4j.logger.class.of.the.day=INHERIT
+</pre>
+
+<p>Refer to the <b>setOption</b> method in each Appender and
+Layout for class specific options.
+
+<p>Use the <code>#</code> or <code>!</code> characters at the
+beginning of a line for comments.
+
+<p>
+@param configFileName The name of the configuration file where the
+configuration information is stored.
+@param hierarchy The hierarchy to operation upon.
+*/
+      void doConfigure(const File& configFileName,
+         spi::LoggerRepositoryPtr& hierarchy);
+
+      /**
+      Read configuration options from file <code>configFilename</code>.
+      */
+      static void configure(const File& configFilename);
+
+      /**
+      Like {@link #configureAndWatch(const File& configFilename, long delay)}
+      except that the
+      default delay as defined by helpers::FileWatchdog#DEFAULT_DELAY
+      is used.
+      @param configFilename A file in key=value format.
+      */
+      static void configureAndWatch(const File& configFilename);
+
+      /**
+      Read the configuration file <code>configFilename</code> if it
+      exists. Moreover, a thread will be created that will periodically
+      check if <code>configFilename</code> has been created or
+      modified. The period is determined by the <code>delay</code>
+      argument. If a change or file creation is detected, then
+      <code>configFilename</code> is read to configure log4j.
+
+      @param configFilename A file in key=value format.
+      @param delay The delay in milliseconds to wait between each check.
+      */
+      static void configureAndWatch(const File& configFilename,
+         long delay);
+
+      /**
+      Read configuration options from <code>properties</code>.
+      See #doConfigure(const File&, log4cxx::spi::LoggerRepositoryPtr&)
+      for the expected format.
+      */
+      static void configure(helpers::Properties& properties);
+
+      /**
+      Read configuration options from <code>properties</code>.
+      See #doConfigure(const File&, log4cxx::spi::LoggerRepositoryPtr&)
+      for the expected format.
+      */
+      void doConfigure(helpers::Properties& properties,
+         spi::LoggerRepositoryPtr& hierarchy);
+
+// --------------------------------------------------------------------------
+// Internal stuff
+// --------------------------------------------------------------------------
+protected:
+      /**
+      Check the provided <code>Properties</code> object for a
+      #loggerFactory
+      entry specified by LOGGER_FACTORY_KEY.  If such an entry
+      exists, an attempt is made to create an instance using the default
+      constructor.  This instance is used for subsequent Logger creations
+      within this configurator.
+      @see #parseCatsAndRenderers
+      */
+      void configureLoggerFactory(helpers::Properties& props);
+
+      void configureRootLogger(helpers::Properties& props,
+         spi::LoggerRepositoryPtr& hierarchy);
+
+      /**
+      Parse non-root elements, such non-root categories and renderers.
+      */
+      void parseCatsAndRenderers(helpers::Properties& props,
+         spi::LoggerRepositoryPtr& hierarchy);
+
+      /**
+      Parse the additivity option for a non-root logger.
+      */
+      void parseAdditivityForLogger(helpers::Properties& props,
+         LoggerPtr& cat, const LogString& loggerName);
+
+      /**
+      This method must work for the root logger as well.
+      */
+      void parseLogger(
+         helpers::Properties& props, LoggerPtr& logger,
+         const LogString& optionKey, const LogString& loggerName,
+         const LogString& value);
+
+      AppenderPtr parseAppender(
+         helpers::Properties& props, const LogString& appenderName);
+
+      void registryPut(const AppenderPtr& appender);
+      AppenderPtr registryGet(const LogString& name);
+      
+private:
+      PropertyConfigurator(const PropertyConfigurator&);
+      PropertyConfigurator& operator=(const PropertyConfigurator&);
+   }; // class PropertyConfigurator
+}  // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+
+#endif //_LOG4CXX_PROPERTY_CONFIGURATOR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/provisionnode.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/provisionnode.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/provisionnode.h	(revision 257)
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+#ifndef _LOG4CXX_PROVISION_NODE_H
+#define _LOG4CXX_PROVISION_NODE_H
+
+#include <vector>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/logger.h>
+
+namespace log4cxx
+{
+    class Logger;
+    typedef helpers::ObjectPtrT<Logger> LoggerPtr;
+
+    
+    typedef std::vector<LoggerPtr> ProvisionNode;
+
+}  // namespace log4cxx
+
+#endif //_LOG4CXX_PROVISION_NODE_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/action.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/action.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/action.h	(revision 257)
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_ACTION_H)
+#define _LOG4CXX_ROLLING_ACTION_H
+
+#include <log4cxx/portability.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/helpers/mutex.h>
+#include <log4cxx/helpers/pool.h>
+
+namespace log4cxx {
+    namespace rolling {
+
+
+        /**
+         *  A file system action performed as part of a rollover event.
+         */
+        class Action : public virtual log4cxx::helpers::ObjectImpl {
+          DECLARE_ABSTRACT_LOG4CXX_OBJECT(Action)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(Action)
+          END_LOG4CXX_CAST_MAP()
+        /**
+         * Is action complete.
+         */
+        bool complete;
+
+        /**
+         * Is action interrupted.
+         */
+        bool interrupted;
+
+        log4cxx::helpers::Pool pool;
+        log4cxx::helpers::Mutex mutex;
+
+
+        protected:
+        /**
+         * Constructor.
+         */
+        Action();
+        virtual ~Action();
+
+        public:
+        /**
+         * Perform action.
+         *
+         * @return true if successful.
+         */
+        virtual bool execute(log4cxx::helpers::Pool& pool) const = 0;
+
+        void run(log4cxx::helpers::Pool& pool);
+
+        void close();
+
+          /**
+           * Tests if the action is complete.
+           * @return true if action is complete.
+           */
+        bool isComplete() const;
+
+        void reportException(const std::exception&);
+
+
+        };
+
+        LOG4CXX_PTR_DEF(Action);
+
+    }
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/filerenameaction.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/filerenameaction.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/filerenameaction.h	(revision 257)
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_FILE_RENAME_ACTION_H)
+#define _LOG4CXX_ROLLING_FILE_RENAME_ACTION_H
+
+#include <log4cxx/rolling/action.h>
+#include <log4cxx/file.h>
+
+namespace log4cxx {
+    namespace rolling {
+
+
+        class FileRenameAction : public Action {
+           const File source;
+           const File destination;
+           bool renameEmptyFile;
+        public:
+          DECLARE_ABSTRACT_LOG4CXX_OBJECT(FileRenameAction)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(FileRenameAction)
+                  LOG4CXX_CAST_ENTRY_CHAIN(Action)
+          END_LOG4CXX_CAST_MAP()
+
+        /**
+         * Constructor.
+         */
+        FileRenameAction(const File& toRename,
+            const File& renameTo,
+            bool renameEmptyFile);
+
+        /**
+         * Perform action.
+         *
+         * @return true if successful.
+         */
+        virtual bool execute(log4cxx::helpers::Pool& pool) const;
+        };
+
+        LOG4CXX_PTR_DEF(FileRenameAction);
+
+    }
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/filterbasedtriggeringpolicy.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/filterbasedtriggeringpolicy.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/filterbasedtriggeringpolicy.h	(revision 257)
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+ #if !defined(_LOG4CXX_ROLLING_FILTER_BASED_TRIGGERING_POLICY_H)
+ #define _LOG4CXX_ROLLING_FILTER_BASED_TRIGGERING_POLICY_H
+
+#include <log4cxx/rolling/triggeringpolicy.h>
+#include <log4cxx/spi/filter.h>
+
+ namespace log4cxx {
+
+     class File;
+
+     namespace helpers {
+        class Pool;
+     }
+
+
+     namespace rolling {
+
+
+/**
+ * FilterBasedTriggeringPolicy determines if rolling should be triggered
+ * by evaluating the current message against a set of filters.  Unless a
+ * filter rejects a message, a rolling event will be triggered.
+ *
+ * 
+ * 
+ *
+ */
+class LOG4CXX_EXPORT FilterBasedTriggeringPolicy : public TriggeringPolicy {
+
+  DECLARE_LOG4CXX_OBJECT(FilterBasedTriggeringPolicy)
+  BEGIN_LOG4CXX_CAST_MAP()
+          LOG4CXX_CAST_ENTRY(FilterBasedTriggeringPolicy)
+          LOG4CXX_CAST_ENTRY_CHAIN(TriggeringPolicy)
+  END_LOG4CXX_CAST_MAP()
+
+  /**
+   * The first filter in the filter chain. Set to <code>null</code> initially.
+   */
+  log4cxx::spi::FilterPtr headFilter;
+
+  /**
+   * The last filter in the filter chain.
+   */
+  log4cxx::spi::FilterPtr tailFilter;
+
+public:
+  /**
+   *  Creates a new FilterBasedTriggeringPolicy.
+   */
+  FilterBasedTriggeringPolicy();
+  virtual ~FilterBasedTriggeringPolicy();
+
+/**
+ * Determines if a rollover may be appropriate at this time.  If
+ * true is returned, RolloverPolicy.rollover will be called but it
+ * can determine that a rollover is not warranted.
+ *
+ * @param appender A reference to the appender.
+ * @param event A reference to the currently event.
+ * @param filename The filename for the currently active log file.
+ * @param fileLength Length of the file in bytes.
+ * @return true if a rollover should occur.
+ */
+virtual bool isTriggeringEvent(
+  Appender* appender,
+  const log4cxx::spi::LoggingEventPtr& event,
+  const LogString& filename,
+  size_t fileLength);
+
+  /**
+   * Add a filter to end of the filter list.
+   * @param newFilter filter to add to end of list.
+   */
+  void addFilter(const log4cxx::spi::FilterPtr& newFilter);
+
+  /**
+   * Clear the filters chain.
+   *
+   */
+  void clearFilters();
+
+  /**
+   * Returns the head Filter.
+   *
+   */
+  log4cxx::spi::FilterPtr& getFilter();
+
+  /**
+   *  Prepares the instance for use.
+   */
+  void activateOptions(log4cxx::helpers::Pool&);
+
+  void setOption(const LogString& option, const LogString& value);
+  };
+
+  LOG4CXX_PTR_DEF(FilterBasedTriggeringPolicy);
+
+}
+ }
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/fixedwindowrollingpolicy.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/fixedwindowrollingpolicy.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/fixedwindowrollingpolicy.h	(revision 257)
@@ -0,0 +1,141 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_FIXED_WINDOW_ROLLING_POLICY_H)
+#define _LOG4CXX_ROLLING_FIXED_WINDOW_ROLLING_POLICY_H
+
+#include <log4cxx/rolling/rollingpolicybase.h>
+
+
+
+
+namespace log4cxx {
+
+    namespace helpers {
+      class Pool;
+    }
+
+    namespace rolling {
+
+
+/**
+ * When rolling over, <code>FixedWindowRollingPolicy</code> renames files
+ * according to a fixed window algorithm as described below.
+ *
+ * <p>The <b>ActiveFileName</b> property, which is required, represents the name
+ * of the file where current logging output will be written.
+ * The <b>FileNamePattern</b>  option represents the file name pattern for the
+ * archived (rolled over) log files. If present, the <b>FileNamePattern</b>
+ * option must include an integer token, that is the string "%i" somwhere
+ * within the pattern.
+ *
+ * <p>Let <em>max</em> and <em>min</em> represent the values of respectively
+ * the <b>MaxIndex</b> and <b>MinIndex</b> options. Let "foo.log" be the value
+ * of the <b>ActiveFile</b> option and "foo.%i.log" the value of
+ * <b>FileNamePattern</b>. Then, when rolling over, the file
+ * <code>foo.<em>max</em>.log</code> will be deleted, the file
+ * <code>foo.<em>max-1</em>.log</code> will be renamed as
+ * <code>foo.<em>max</em>.log</code>, the file <code>foo.<em>max-2</em>.log</code>
+ * renamed as <code>foo.<em>max-1</em>.log</code>, and so on,
+ * the file <code>foo.<em>min+1</em>.log</code> renamed as
+ * <code>foo.<em>min+2</em>.log</code>. Lastly, the active file <code>foo.log</code>
+ * will be renamed as <code>foo.<em>min</em>.log</code> and a new active file name
+ * <code>foo.log</code> will be created.
+ *
+ * <p>Given that this rollover algorithm requires as many file renaming
+ * operations as the window size, large window sizes are discouraged. The
+ * current implementation will automatically reduce the window size to 12 when
+ * larger values are specified by the user.
+ *
+ *
+ * 
+ * 
+ * */
+        class LOG4CXX_EXPORT FixedWindowRollingPolicy : public RollingPolicyBase {
+          DECLARE_LOG4CXX_OBJECT(FixedWindowRollingPolicy)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(FixedWindowRollingPolicy)
+                  LOG4CXX_CAST_ENTRY_CHAIN(RollingPolicyBase)
+          END_LOG4CXX_CAST_MAP()
+
+          int minIndex;
+          int maxIndex;
+          bool explicitActiveFile;
+
+          /**
+           * It's almost always a bad idea to have a large window size, say over 12.
+           */
+          enum { MAX_WINDOW_SIZE = 12 };
+
+          bool purge(int purgeStart, int maxIndex, log4cxx::helpers::Pool& p) const;
+
+        public:
+
+          FixedWindowRollingPolicy();
+
+          void activateOptions(log4cxx::helpers::Pool& p);
+          void setOption(const LogString& option,
+             const LogString& value);
+
+          void rollover();
+
+          int getMaxIndex() const;
+
+          int getMinIndex() const;
+
+          void setMaxIndex(int newVal);
+          void setMinIndex(int newVal);
+
+
+/**
+* Initialize the policy and return any initial actions for rolling file appender.
+*
+* @param file current value of RollingFileAppender::getFile().
+* @param append current value of RollingFileAppender::getAppend().
+* @param p pool used for any required memory allocations.
+* @return Description of the initialization, may be null to indicate
+* no initialization needed.
+* @throws SecurityException if denied access to log files.
+*/
+virtual RolloverDescriptionPtr initialize(
+const LogString& file, const bool append, log4cxx::helpers::Pool& p);
+
+/**
+* Prepare for a rollover.  This method is called prior to
+* closing the active log file, performs any necessary
+* preliminary actions and describes actions needed
+* after close of current log file.
+*
+* @param activeFile file name for current active log file.
+* @param p pool used for any required memory allocations.
+* @return Description of pending rollover, may be null to indicate no rollover
+* at this time.
+* @throws SecurityException if denied access to log files.
+*/
+virtual RolloverDescriptionPtr rollover(const LogString& activeFile, log4cxx::helpers::Pool& p);
+
+protected:
+             log4cxx::pattern::PatternMap getFormatSpecifiers() const;
+
+        };
+
+        LOG4CXX_PTR_DEF(FixedWindowRollingPolicy);
+
+     }
+}
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/gzcompressaction.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/gzcompressaction.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/gzcompressaction.h	(revision 257)
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_GZ_COMPRESS_ACTION_H)
+#define _LOG4CXX_ROLLING_GZ_COMPRESS_ACTION_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/rolling/action.h>
+#include <log4cxx/file.h>
+
+namespace log4cxx {
+    namespace rolling {
+
+
+        class GZCompressAction : public Action {
+           const File source;
+           const File destination;
+           bool deleteSource;
+        public:
+          DECLARE_ABSTRACT_LOG4CXX_OBJECT(GZCompressAction)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(GZCompressAction)
+                  LOG4CXX_CAST_ENTRY_CHAIN(Action)
+          END_LOG4CXX_CAST_MAP()
+
+        /**
+         * Constructor.
+         */
+        GZCompressAction(const File& source,
+            const File& destination,
+            bool deleteSource);
+
+        /**
+         * Perform action.
+         *
+         * @return true if successful.
+         */
+        virtual bool execute(log4cxx::helpers::Pool& pool) const;
+
+        private:
+        GZCompressAction(const GZCompressAction&);
+        GZCompressAction& operator=(const GZCompressAction&);
+        };
+
+        LOG4CXX_PTR_DEF(GZCompressAction);
+
+    }
+}
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/manualtriggeringpolicy.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/manualtriggeringpolicy.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/manualtriggeringpolicy.h	(revision 257)
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_MANUAL_TRIGGERING_POLICY_H)
+#define _LOG4CXX_ROLLING_MANUAL_TRIGGERING_POLICY_H
+
+#include <log4cxx/rolling/triggeringpolicy.h>
+
+namespace log4cxx {
+
+    class File;
+
+    namespace helpers {
+      class Pool;
+    }
+
+    namespace rolling {
+
+        /**
+         * ManualTriggeringPolicy only rolls over on explicit calls to
+         * RollingFileAppender.rollover().
+         *
+         * 
+         *
+         */
+        class LOG4CXX_EXPORT ManualTriggeringPolicy : public TriggeringPolicy {
+          DECLARE_LOG4CXX_OBJECT(ManualTriggeringPolicy)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(ManualTriggeringPolicy)
+                  LOG4CXX_CAST_ENTRY_CHAIN(TriggeringPolicy)
+          END_LOG4CXX_CAST_MAP()
+
+        public:
+            ManualTriggeringPolicy();
+            /**
+             * Determines if a rollover may be appropriate at this time.  If
+             * true is returned, RolloverPolicy.rollover will be called but it
+             * can determine that a rollover is not warranted.
+             *
+             * @param appender A reference to the appender.
+             * @param event A reference to the currently event.
+             * @param filename The filename for the currently active log file.
+             * @param fileLength Length of the file in bytes.
+             * @return true if a rollover should occur.
+             */
+            virtual bool isTriggeringEvent(
+              Appender* appender,
+              const log4cxx::spi::LoggingEventPtr& event,
+              const LogString& filename,
+              size_t fileLength);
+
+            void activateOptions(log4cxx::helpers::Pool&);
+            void setOption(const LogString& option, const LogString& value);
+        };
+    }
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingfileappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingfileappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingfileappender.h	(revision 257)
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_ROLLING_FILE_APPENDER_H)
+#define _LOG4CXX_ROLLING_ROLLING_FILE_APPENDER_H
+
+#include <log4cxx/rolling/rollingfileappenderskeleton.h>
+
+
+namespace log4cxx {
+    namespace rolling {
+
+        
+        /**
+         * <code>RollingFileAppender</code> extends {@link log4cxx::FileAppender} to backup the log files
+         * depending on {@link log4cxx::rolling::RollingPolicy RollingPolicy} and {@link log4cxx::rolling::TriggeringPolicy TriggeringPolicy}.
+         * <p>
+         * To be of any use, a <code>RollingFileAppender</code> instance must have both
+         * a <code>RollingPolicy</code> and a <code>TriggeringPolicy</code> set up.
+         * However, if its <code>RollingPolicy</code> also implements the
+         * <code>TriggeringPolicy</code> interface, then only the former needs to be
+         * set up. For example, {@link log4cxx::rolling::TimeBasedRollingPolicy TimeBasedRollingPolicy} acts both as a
+         * <code>RollingPolicy</code> and a <code>TriggeringPolicy</code>.
+         *
+         * <p><code>RollingFileAppender</code> can be configured programattically or
+         * using {@link log4cxx::xml::DOMConfigurator}. Here is a sample
+         * configration file:
+
+        <pre>&lt;?xml version="1.0" encoding="UTF-8" ?>
+        &lt;!DOCTYPE log4j:configuration>
+
+        &lt;log4j:configuration debug="true">
+
+          &lt;appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender">
+            <b>&lt;rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
+              &lt;param name="FileNamePattern" value="/wombat/foo.%d{yyyy-MM}.gz"/>
+            &lt;/rollingPolicy></b>
+
+            &lt;layout class="org.apache.log4j.PatternLayout">
+              &lt;param name="ConversionPattern" value="%c{1} - %m%n"/>
+            &lt;/layout>
+          &lt;/appender>
+
+          &lt;root">
+            &lt;appender-ref ref="ROLL"/>
+          &lt;/root>
+
+        &lt;/log4j:configuration>
+        </pre>
+
+         *<p>This configuration file specifies a monthly rollover schedule including
+         * automatic compression of the archived files. See
+         * {@link TimeBasedRollingPolicy} for more details.
+         *
+         * 
+         * 
+         * 
+         * */
+        class LOG4CXX_EXPORT RollingFileAppender : public RollingFileAppenderSkeleton {
+          DECLARE_LOG4CXX_OBJECT(RollingFileAppender)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(RollingFileAppender)
+                  LOG4CXX_CAST_ENTRY_CHAIN(RollingFileAppenderSkeleton)
+          END_LOG4CXX_CAST_MAP()
+
+        public:
+          RollingFileAppender();
+
+          using RollingFileAppenderSkeleton::getRollingPolicy;
+
+          using RollingFileAppenderSkeleton::getTriggeringPolicy;
+
+          /**
+           * Sets the rolling policy. In case the 'policy' argument also implements
+           * {@link TriggeringPolicy}, then the triggering policy for this appender
+           * is automatically set to be the policy argument.
+           * @param policy
+           */
+          using RollingFileAppenderSkeleton::setRollingPolicy;
+
+          using RollingFileAppenderSkeleton::setTriggeringPolicy;
+
+        };
+
+        LOG4CXX_PTR_DEF(RollingFileAppender);
+
+    }
+}
+
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingfileappenderskeleton.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingfileappenderskeleton.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingfileappenderskeleton.h	(revision 257)
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_ROLLING_FILE_APPENDER_SKELETON_H)
+#define _LOG4CXX_ROLLING_ROLLING_FILE_APPENDER_SKELETON_H
+
+#include <log4cxx/portability.h>
+#include <log4cxx/spi/optionhandler.h>
+#include <log4cxx/fileappender.h>
+#include <log4cxx/rolling/triggeringpolicy.h>
+#include <log4cxx/rolling/rollingpolicy.h>
+#include <log4cxx/rolling/action.h>
+
+namespace log4cxx {
+    namespace rolling {
+
+
+        /**
+         *  Base class for log4cxx::rolling::RollingFileAppender and log4cxx::RollingFileAppender
+         * (analogues of org.apache.log4j.rolling.RFA from extras companion and
+         *  org.apache.log4j.RFA from log4j 1.2, respectively). 
+         * 
+         * */
+        class LOG4CXX_EXPORT RollingFileAppenderSkeleton : public FileAppender {
+          DECLARE_LOG4CXX_OBJECT(RollingFileAppenderSkeleton)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(RollingFileAppenderSkeleton)
+                  LOG4CXX_CAST_ENTRY_CHAIN(FileAppender)
+          END_LOG4CXX_CAST_MAP()
+
+          /**
+           * Triggering policy.
+           */
+          TriggeringPolicyPtr triggeringPolicy;
+
+          /**
+           * Rolling policy.
+           */
+          RollingPolicyPtr rollingPolicy;
+
+          /**
+           * Length of current active log file.
+           */
+          size_t fileLength;
+
+        public:
+          /**
+           * The default constructor simply calls its {@link
+           * FileAppender#FileAppender parents constructor}.
+           * */
+          RollingFileAppenderSkeleton();
+
+          void activateOptions(log4cxx::helpers::Pool&);
+
+
+          /**
+             Implements the usual roll over behaviour.
+
+             <p>If <code>MaxBackupIndex</code> is positive, then files
+             {<code>File.1</code>, ..., <code>File.MaxBackupIndex -1</code>}
+             are renamed to {<code>File.2</code>, ...,
+             <code>File.MaxBackupIndex</code>}. Moreover, <code>File</code> is
+             renamed <code>File.1</code> and closed. A new <code>File</code> is
+             created to receive further log output.
+
+             <p>If <code>MaxBackupIndex</code> is equal to zero, then the
+             <code>File</code> is truncated with no backup files created.
+
+           */
+          bool rollover(log4cxx::helpers::Pool& p);
+
+        protected:
+
+        /**
+         Actual writing occurs here.
+        */
+        virtual void subAppend(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+
+        protected:
+
+          RollingPolicyPtr getRollingPolicy() const;
+
+          TriggeringPolicyPtr getTriggeringPolicy() const;
+
+          /**
+           * Sets the rolling policy. In case the 'policy' argument also implements
+           * {@link TriggeringPolicy}, then the triggering policy for this appender
+           * is automatically set to be the policy argument.
+           * @param policy
+           */
+          void setRollingPolicy(const RollingPolicyPtr& policy);
+
+          void setTriggeringPolicy(const TriggeringPolicyPtr& policy);
+
+        public:
+          /**
+            * Close appender.  Waits for any asynchronous file compression actions to be completed.
+          */
+          void close();
+
+          protected:
+          /**
+             Returns an OutputStreamWriter when passed an OutputStream.  The
+             encoding used will depend on the value of the
+             <code>encoding</code> property.  If the encoding value is
+             specified incorrectly the writer will be opened using the default
+             system encoding (an error message will be printed to the loglog.
+           @param os output stream, may not be null.
+           @return new writer.
+           */
+          log4cxx::helpers::WriterPtr createWriter(log4cxx::helpers::OutputStreamPtr& os);
+
+          public:
+
+
+
+          /**
+           * Get byte length of current active log file.
+           * @return byte length of current active log file.
+           */
+          size_t getFileLength() const;
+
+          /**
+           * Increments estimated byte length of current active log file.
+           * @param increment additional bytes written to log file.
+           */
+          void incrementFileLength(size_t increment);
+
+        };
+        
+
+        LOG4CXX_PTR_DEF(RollingFileAppenderSkeleton);
+
+    }
+}
+
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingpolicy.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingpolicy.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingpolicy.h	(revision 257)
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_ROLLING_POLICY_H)
+#define _LOG4CXX_ROLLING_ROLLING_POLICY_H
+
+#include <log4cxx/portability.h>
+#include <log4cxx/spi/optionhandler.h>
+#include <log4cxx/rolling/rolloverdescription.h>
+#include <log4cxx/file.h>
+
+namespace log4cxx {
+    namespace rolling {
+
+
+        /**
+         * A <code>RollingPolicy</code> is responsible for performing the
+         * rolling over of the active log file. The <code>RollingPolicy</code>
+         * is also responsible for providing the <em>active log file</em>,
+         * that is the live file where logging output will be directed.
+         *
+         * 
+         * 
+         *
+        */
+        class LOG4CXX_EXPORT RollingPolicy :
+        public virtual spi::OptionHandler {
+            DECLARE_ABSTRACT_LOG4CXX_OBJECT(RollingPolicy)
+
+        public:
+        virtual ~RollingPolicy() {}
+        /**
+       * Initialize the policy and return any initial actions for rolling file appender.
+       *
+       * @param file current value of RollingFileAppender.getFile().
+       * @param append current value of RollingFileAppender.getAppend().
+       * @param p pool for memory allocations during call.
+       * @return Description of the initialization, may be null to indicate
+       * no initialization needed.
+       * @throws SecurityException if denied access to log files.
+       */
+       virtual RolloverDescriptionPtr initialize(
+        const LogString& file,
+        const bool append,
+        log4cxx::helpers::Pool& p) = 0;
+
+      /**
+       * Prepare for a rollover.  This method is called prior to
+       * closing the active log file, performs any necessary
+       * preliminary actions and describes actions needed
+       * after close of current log file.
+       *
+       * @param activeFile file name for current active log file.
+       * @param p pool for memory allocations during call.
+       * @return Description of pending rollover, may be null to indicate no rollover
+       * at this time.
+       * @throws SecurityException if denied access to log files.
+       */
+      virtual RolloverDescriptionPtr rollover(const LogString& activeFile,
+          log4cxx::helpers::Pool& p) = 0;
+        };
+
+      LOG4CXX_PTR_DEF(RollingPolicy);
+
+    }
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingpolicybase.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingpolicybase.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rollingpolicybase.h	(revision 257)
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_ROLLING_POLICY_BASE_H)
+#define _LOG4CXX_ROLLING_ROLLING_POLICY_BASE_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/helpers/object.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/logmanager.h>
+#include <log4cxx/rolling/rollingpolicy.h>
+#include <log4cxx/pattern/patternconverter.h>
+#include <log4cxx/pattern/formattinginfo.h>
+#include <log4cxx/pattern/patternparser.h>
+
+namespace log4cxx {
+    namespace rolling {
+        LOG4CXX_LIST_DEF(PatternConverterList, log4cxx::pattern::PatternConverterPtr);
+          LOG4CXX_LIST_DEF(FormattingInfoList, log4cxx::pattern::FormattingInfoPtr);
+          
+        /**
+         * Implements methods common to most, it not all, rolling
+         * policies.
+         *
+         * 
+         * 
+         */
+        class LOG4CXX_EXPORT RollingPolicyBase :
+           public virtual RollingPolicy,
+           public virtual helpers::ObjectImpl {
+        protected:
+          DECLARE_ABSTRACT_LOG4CXX_OBJECT(RollingPolicyBase)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(RollingPolicy)
+                  LOG4CXX_CAST_ENTRY(spi::OptionHandler)
+          END_LOG4CXX_CAST_MAP()
+
+
+          private:
+          /**
+           * File name pattern converters.
+           */
+          PatternConverterList patternConverters;
+
+          /**
+           * File name field specifiers.
+           */
+          FormattingInfoList patternFields;
+
+          /**
+           * File name pattern.
+           */
+          LogString fileNamePatternStr;
+
+
+          public:
+          RollingPolicyBase();
+          virtual ~RollingPolicyBase();
+          void addRef() const;
+          void releaseRef() const;
+          virtual void activateOptions(log4cxx::helpers::Pool& p) = 0;
+          virtual log4cxx::pattern::PatternMap getFormatSpecifiers() const = 0;
+
+          virtual void setOption(const LogString& option,
+               const LogString& value);
+
+          /**
+           * Set file name pattern.
+           * @param fnp file name pattern.
+           */
+           void setFileNamePattern(const LogString& fnp);
+
+           /**
+            * Get file name pattern.
+            * @return file name pattern.
+            */
+           LogString getFileNamePattern() const;
+
+
+           protected:
+           /**
+            *   Parse file name pattern.
+            */
+           void parseFileNamePattern();
+
+          /**
+           * Format file name.
+           *
+           * @param obj object to be evaluted in formatting, may not be null.
+           * @param buf string buffer to which formatted file name is appended, may not be null.
+           * @param p memory pool.
+           */
+          void formatFileName(log4cxx::helpers::ObjectPtr& obj,
+             LogString& buf, log4cxx::helpers::Pool& p) const;
+
+           log4cxx::pattern::PatternConverterPtr getIntegerPatternConverter() const;
+           log4cxx::pattern::PatternConverterPtr getDatePatternConverter() const;
+
+
+       };
+    }
+}
+
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rolloverdescription.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rolloverdescription.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/rolloverdescription.h	(revision 257)
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_ROLLOVER_DESCRIPTION_H)
+#define _LOG4CXX_ROLLING_ROLLOVER_DESCRIPTION_H
+
+#include <log4cxx/portability.h>
+#include <log4cxx/rolling/action.h>
+
+namespace log4cxx {
+    namespace rolling {
+
+
+        class RolloverDescription : public log4cxx::helpers::ObjectImpl {
+          DECLARE_LOG4CXX_OBJECT(RolloverDescription)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(RolloverDescription)
+          END_LOG4CXX_CAST_MAP()
+          /**
+           * Active log file name after rollover.
+           */
+          LogString activeFileName;
+
+          /**
+           * Should active file be opened for appending.
+           */
+          bool append;
+
+          /**
+           * Action to be completed after close of current active log file
+           * before returning control to caller.
+           */
+          ActionPtr synchronous;
+
+          /**
+           * Action to be completed after close of current active log file
+           * and before next rollover attempt, may be executed asynchronously.
+           */
+          ActionPtr asynchronous;
+
+          public:
+          RolloverDescription();
+          /**
+           * Create new instance.
+           * @param activeFileName active log file name after rollover, may not be null.
+           * @param append true if active log file after rollover should be opened for appending.
+           * @param synchronous action to be completed after close of current active log file, may be null.
+           * @param asynchronous action to be completed after close of current active log file and
+           * before next rollover attempt.
+           */
+          RolloverDescription(
+            const LogString& activeFileName,
+            const bool append,
+            const ActionPtr& synchronous,
+            const ActionPtr& asynchronous);
+
+          /**
+           * Active log file name after rollover.
+           * @return active log file name after rollover.
+           */
+          LogString getActiveFileName() const;
+
+          bool getAppend() const;
+
+          /**
+           * Action to be completed after close of current active log file
+           * before returning control to caller.
+           *
+           * @return action, may be null.
+           */
+          ActionPtr getSynchronous() const;
+
+          /**
+           * Action to be completed after close of current active log file
+           * and before next rollover attempt, may be executed asynchronously.
+           *
+           * @return action, may be null.
+           */
+          ActionPtr getAsynchronous() const;
+        };
+
+        LOG4CXX_PTR_DEF(RolloverDescription);
+
+    }
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/sizebasedtriggeringpolicy.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/sizebasedtriggeringpolicy.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/sizebasedtriggeringpolicy.h	(revision 257)
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_SIZE_BASED_TRIGGERING_POLICY_H)
+#define _LOG4CXX_ROLLING_SIZE_BASED_TRIGGERING_POLICY_H
+
+#include <log4cxx/rolling/triggeringpolicy.h>
+
+namespace log4cxx {
+
+    class File;
+
+    namespace helpers {
+      class Pool;
+    }
+
+    namespace rolling {
+
+        /**
+         * SizeBasedTriggeringPolicy looks at size of the file being
+         * currently written to.
+         *
+         * 
+         *
+         */
+        class LOG4CXX_EXPORT SizeBasedTriggeringPolicy : public TriggeringPolicy {
+          DECLARE_LOG4CXX_OBJECT(SizeBasedTriggeringPolicy)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(SizeBasedTriggeringPolicy)
+                  LOG4CXX_CAST_ENTRY_CHAIN(TriggeringPolicy)
+          END_LOG4CXX_CAST_MAP()
+
+        protected:
+          size_t maxFileSize;
+
+        public:
+            SizeBasedTriggeringPolicy();
+            /**
+             * Determines if a rollover may be appropriate at this time.  If
+             * true is returned, RolloverPolicy.rollover will be called but it
+             * can determine that a rollover is not warranted.
+             *
+             * @param appender A reference to the appender.
+             * @param event A reference to the currently event.
+             * @param filename The filename for the currently active log file.
+             * @param fileLength Length of the file in bytes.
+             * @return true if a rollover should occur.
+             */
+            virtual bool isTriggeringEvent(
+              Appender* appender,
+              const log4cxx::spi::LoggingEventPtr& event,
+              const LogString& filename,
+              size_t fileLength);
+
+            size_t getMaxFileSize();
+
+            void setMaxFileSize(size_t l);
+
+            void activateOptions(log4cxx::helpers::Pool&);
+            void setOption(const LogString& option, const LogString& value);
+        };
+
+        LOG4CXX_PTR_DEF(SizeBasedTriggeringPolicy);
+
+    }
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/timebasedrollingpolicy.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/timebasedrollingpolicy.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/timebasedrollingpolicy.h	(revision 257)
@@ -0,0 +1,227 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#if !defined(_LOG4CXX_ROLLING_TIME_BASED_ROLLING_POLICY_H)
+#define _LOG4CXX_ROLLING_TIME_BASED_ROLLING_POLICY_H
+
+#include <log4cxx/portability.h>
+#include <log4cxx/rolling/rollingpolicybase.h>
+#include <log4cxx/rolling/triggeringpolicy.h>
+
+namespace log4cxx {
+
+    namespace rolling {
+
+
+
+        /**
+         * <code>TimeBasedRollingPolicy</code> is both easy to configure and quite
+         * powerful.
+         *
+         * <p>In order to use  <code>TimeBasedRollingPolicy</code>, the
+         * <b>FileNamePattern</b> option must be set. It basically specifies the name of the
+         * rolled log files. The value <code>FileNamePattern</code> should consist of
+         * the name of the file, plus a suitably placed <code>%d</code> conversion
+         * specifier. The <code>%d</code> conversion specifier may contain a date and
+         * time pattern as specified by the {@link log4cxx::helpers::SimpleDateFormat} class. If
+         * the date and time pattern is ommitted, then the default pattern of
+         * "yyyy-MM-dd" is assumed. The following examples should clarify the point.
+         *
+         * <p>
+         * <table cellspacing="5px" border="1">
+         *   <tr>
+         *     <th><code>FileNamePattern</code> value</th>
+         *     <th>Rollover schedule</th>
+         *     <th>Example</th>
+         *   </tr>
+         *   <tr>
+         *     <td nowrap="true"><code>/wombat/folder/foo.%d</code></td>
+         *     <td>Daily rollover (at midnight).  Due to the omission of the optional
+         *         time and date pattern for the %d token specifier, the default pattern
+         *         of "yyyy-MM-dd" is assumed, which corresponds to daily rollover.
+         *     </td>
+         *     <td>During November 23rd, 2004, logging output will go to
+         *       the file <code>/wombat/foo.2004-11-23</code>. At midnight and for
+         *       the rest of the 24th, logging output will be directed to
+         *       <code>/wombat/foo.2004-11-24</code>.
+         *     </td>
+         *   </tr>
+         *   <tr>
+         *     <td nowrap="true"><code>/wombat/foo.%d{yyyy-MM}.log</code></td>
+         *     <td>Rollover at the beginning of each month.</td>
+         *     <td>During the month of October 2004, logging output will go to
+         *     <code>/wombat/foo.2004-10.log</code>. After midnight of October 31st
+         *     and for the rest of November, logging output will be directed to
+         *       <code>/wombat/foo.2004-11.log</code>.
+         *     </td>
+         *   </tr>
+         * </table>
+         * <h2>Automatic file compression</h2>
+         * <code>TimeBasedRollingPolicy</code> supports automatic file compression.
+         * This feature is enabled if the value of the <b>FileNamePattern</b> option
+         * ends with <code>.gz</code> or <code>.zip</code>.
+         * <p>
+         * <table cellspacing="5px" border="1">
+         *   <tr>
+         *     <th><code>FileNamePattern</code> value</th>
+         *     <th>Rollover schedule</th>
+         *     <th>Example</th>
+         *   </tr>
+         *   <tr>
+         *     <td nowrap="true"><code>/wombat/foo.%d.gz</code></td>
+         *     <td>Daily rollover (at midnight) with automatic GZIP compression of the
+         *      arcived files.</td>
+         *     <td>During November 23rd, 2004, logging output will go to
+         *       the file <code>/wombat/foo.2004-11-23</code>. However, at midnight that
+         *       file will be compressed to become <code>/wombat/foo.2004-11-23.gz</code>.
+         *       For the 24th of November, logging output will be directed to
+         *       <code>/wombat/folder/foo.2004-11-24</code> until its rolled over at the
+         *       beginning of the next day.
+         *     </td>
+         *   </tr>
+         * </table>
+         *
+         * <h2>Decoupling the location of the active log file and the archived log files</h2>
+         * <p>The <em>active file</em> is defined as the log file for the current period
+         * whereas <em>archived files</em> are thos files which have been rolled over
+         * in previous periods.
+         *
+         * <p>By setting the <b>ActiveFileName</b> option you can decouple the location
+         * of the active log file and the location of the archived log files.
+         * <p>
+         *  <table cellspacing="5px" border="1">
+         *   <tr>
+         *     <th><code>FileNamePattern</code> value</th>
+         *     <th>ActiveFileName</th>
+         *     <th>Rollover schedule</th>
+         *     <th>Example</th>
+         *   </tr>
+         *   <tr>
+         *     <td nowrap="true"><code>/wombat/foo.log.%d</code></td>
+         *     <td nowrap="true"><code>/wombat/foo.log</code></td>
+         *     <td>Daily rollover.</td>
+         *
+         *     <td>During November 23rd, 2004, logging output will go to
+         *       the file <code>/wombat/foo.log</code>. However, at midnight that file
+         *       will archived as <code>/wombat/foo.log.2004-11-23</code>. For the 24th
+         *       of November, logging output will be directed to
+         *       <code>/wombat/folder/foo.log</code> until its archived as
+         *       <code>/wombat/foo.log.2004-11-24</code> at the beginning of the next
+         *       day.
+         *     </td>
+         *   </tr>
+         * </table>
+         * <p>
+         * If configuring programatically, do not forget to call {@link #activateOptions}
+         * method before using this policy. Moreover, {@link #activateOptions} of
+         * <code> TimeBasedRollingPolicy</code> must be called <em>before</em> calling
+         * the {@link #activateOptions} method of the owning
+         * <code>RollingFileAppender</code>.
+         *
+         * 
+         * 
+         */
+        class LOG4CXX_EXPORT TimeBasedRollingPolicy : public RollingPolicyBase,
+             public TriggeringPolicy {
+          DECLARE_LOG4CXX_OBJECT(TimeBasedRollingPolicy)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(TimeBasedRollingPolicy)
+                  LOG4CXX_CAST_ENTRY_CHAIN(RollingPolicyBase)
+                  LOG4CXX_CAST_ENTRY_CHAIN(TriggeringPolicy)
+          END_LOG4CXX_CAST_MAP()
+
+        private:
+        /**
+         * Time for next determination if time for rollover.
+         */
+        log4cxx_time_t nextCheck;
+
+        /**
+         * File name at last rollover.
+         */
+        LogString lastFileName;
+
+        /**
+         * Length of any file type suffix (.gz, .zip).
+         */
+        int suffixLength;
+
+        public:
+            TimeBasedRollingPolicy();
+            void addRef() const;
+            void releaseRef() const;
+            void activateOptions(log4cxx::helpers::Pool& );
+            /**
+           * Initialize the policy and return any initial actions for rolling file appender.
+           *
+           * @param file current value of RollingFileAppender.getFile().
+           * @param append current value of RollingFileAppender.getAppend().
+           * @param pool pool for any required allocations.
+           * @return Description of the initialization, may be null to indicate
+           * no initialization needed.
+           * @throws SecurityException if denied access to log files.
+           */
+           RolloverDescriptionPtr initialize(
+            const LogString& file,
+            const bool append,
+            log4cxx::helpers::Pool& pool);
+
+          /**
+           * Prepare for a rollover.  This method is called prior to
+           * closing the active log file, performs any necessary
+           * preliminary actions and describes actions needed
+           * after close of current log file.
+           *
+           * @param activeFile file name for current active log file.
+           * @param pool pool for any required allocations.
+           * @return Description of pending rollover, may be null to indicate no rollover
+           * at this time.
+           * @throws SecurityException if denied access to log files.
+           */
+          RolloverDescriptionPtr rollover(const LogString& activeFile,
+            log4cxx::helpers::Pool& pool);
+
+/**
+ * Determines if a rollover may be appropriate at this time.  If
+ * true is returned, RolloverPolicy.rollover will be called but it
+ * can determine that a rollover is not warranted.
+ *
+ * @param appender A reference to the appender.
+ * @param event A reference to the currently event.
+ * @param filename The filename for the currently active log file.
+ * @param fileLength Length of the file in bytes.
+ * @return true if a rollover should occur.
+ */
+virtual bool isTriggeringEvent(
+  Appender* appender,
+  const log4cxx::spi::LoggingEventPtr& event,
+  const LogString& filename,
+  size_t fileLength);
+
+  protected:
+               log4cxx::pattern::PatternMap getFormatSpecifiers() const;
+
+        };
+
+        LOG4CXX_PTR_DEF(TimeBasedRollingPolicy);
+
+    }
+}
+
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/triggeringpolicy.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/triggeringpolicy.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/triggeringpolicy.h	(revision 257)
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#if !defined(_LOG4CXX_ROLLING_TRIGGER_POLICY_H)
+#define _LOG4CXX_ROLLING_TRIGGER_POLICY_H
+
+
+#include <log4cxx/spi/optionhandler.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/spi/loggingevent.h>
+#include <log4cxx/appender.h>
+
+namespace log4cxx {
+    class File;
+
+    namespace rolling {
+
+        /**
+         * A <code>TriggeringPolicy</code> controls the conditions under which rollover
+         * occurs. Such conditions include time of day, file size, an
+         * external event or a combination thereof.
+         *
+         * 
+         * 
+         * */
+
+        class LOG4CXX_EXPORT TriggeringPolicy :
+              public virtual spi::OptionHandler,
+              public virtual helpers::ObjectImpl {
+              DECLARE_ABSTRACT_LOG4CXX_OBJECT(TriggeringPolicy)
+              BEGIN_LOG4CXX_CAST_MAP()
+                      LOG4CXX_CAST_ENTRY(TriggeringPolicy)
+                      LOG4CXX_CAST_ENTRY(spi::OptionHandler)
+              END_LOG4CXX_CAST_MAP()
+        public:
+             virtual ~TriggeringPolicy();
+             void addRef() const;
+             void releaseRef() const;
+
+            /**
+             * Determines if a rollover may be appropriate at this time.  If
+             * true is returned, RolloverPolicy.rollover will be called but it
+             * can determine that a rollover is not warranted.
+             *
+             * @param appender A reference to the appender.
+             * @param event A reference to the currently event.
+             * @param filename The filename for the currently active log file.
+             * @param fileLength Length of the file in bytes.
+             * @return true if a rollover should occur.
+             */
+            virtual bool isTriggeringEvent(
+              Appender* appender,
+              const log4cxx::spi::LoggingEventPtr& event,
+              const LogString& filename,
+              size_t fileLength) = 0;
+
+        };
+
+        LOG4CXX_PTR_DEF(TriggeringPolicy);
+
+
+    }
+}
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/zipcompressaction.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/zipcompressaction.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rolling/zipcompressaction.h	(revision 257)
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#if !defined(_LOG4CXX_ROLLING_ZIP_COMPRESS_ACTION_H)
+#define _LOG4CXX_ROLLING_ZIP_COMPRESS_ACTION_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/rolling/action.h>
+#include <log4cxx/file.h>
+
+namespace log4cxx {
+    namespace rolling {
+
+
+        class ZipCompressAction : public Action {
+           const File source;
+           const File destination;
+           bool deleteSource;
+        public:
+          DECLARE_ABSTRACT_LOG4CXX_OBJECT(ZipCompressAction)
+          BEGIN_LOG4CXX_CAST_MAP()
+                  LOG4CXX_CAST_ENTRY(ZipCompressAction)
+                  LOG4CXX_CAST_ENTRY_CHAIN(Action)
+          END_LOG4CXX_CAST_MAP()
+
+        /**
+         * Constructor.
+         */
+        ZipCompressAction(const File& source,
+            const File& destination,
+            bool deleteSource);
+
+        /**
+         * Perform action.
+         *
+         * @return true if successful.
+         */
+        virtual bool execute(log4cxx::helpers::Pool& pool) const;
+
+        private:
+        ZipCompressAction(const ZipCompressAction&);
+        ZipCompressAction& operator=(const ZipCompressAction&);
+        };
+
+        LOG4CXX_PTR_DEF(ZipCompressAction);
+        
+    }
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+}
+#endif
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rollingfileappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rollingfileappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/rollingfileappender.h	(revision 257)
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef _LOG4CXX_ROLLING_FILE_APPENDER_H
+#define _LOG4CXX_ROLLING_FILE_APPENDER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/rolling/rollingfileappenderskeleton.h>
+
+namespace log4cxx
+{
+
+  /** RollingFileAppender extends FileAppender to backup the log files when they reach a certain size. */
+  class LOG4CXX_EXPORT RollingFileAppender : public log4cxx::rolling::RollingFileAppenderSkeleton
+  {
+  private:
+    /** The default maximum file size is 10MB. */
+    long maxFileSize;
+
+    /** There is one backup file by default. */
+    int maxBackupIndex;
+
+  public:
+    //
+    //   Use custom class to use non-default name to avoid
+    //       conflict with log4cxx::rolling::RollingFileAppender
+    DECLARE_LOG4CXX_OBJECT_WITH_CUSTOM_CLASS( RollingFileAppender, ClassRollingFileAppender )
+    BEGIN_LOG4CXX_CAST_MAP()
+         LOG4CXX_CAST_ENTRY( RollingFileAppender )
+         LOG4CXX_CAST_ENTRY_CHAIN( FileAppender )
+    END_LOG4CXX_CAST_MAP()
+    /** The default constructor simply calls its {@link FileAppender#FileAppender parents constructor}. */
+    RollingFileAppender();
+
+    /**
+                    Instantiate a RollingFileAppender and open the file designated by
+     <code>filename</code>. The opened filename will become the ouput destination for this appender.
+
+    <p>If the <code>append</code> parameter is true, the file will be appended to. Otherwise, the file desginated by
+     <code>filename</code> will be truncated before being opened.
+    */
+    RollingFileAppender( const LayoutPtr & layout, const LogString & fileName, bool append );
+
+    /**
+                    Instantiate a FileAppender and open the file designated by
+     <code>filename</code>. The opened filename will become the output destination for this appender.
+     <p>The file will be appended to.
+    */
+    RollingFileAppender( const LayoutPtr & layout, const LogString & fileName );
+
+    virtual ~RollingFileAppender();
+
+    /** Returns the value of the <b>MaxBackupIndex</b> option. */
+    int getMaxBackupIndex() const;
+
+    /** Get the maximum size that the output file is allowed to reach before being rolled over to backup files. */
+    long getMaximumFileSize() const;
+
+
+    /**
+                    Set the maximum number of backup files to keep around.
+
+    <p>The <b>MaxBackupIndex</b> option determines how many backup
+     files are kept before the oldest is erased. This option takes
+     a positive integer value. If set to zero, then there will be no
+     backup files and the log file will be truncated when it reaches <code>MaxFileSize</code>.
+    */
+    void setMaxBackupIndex( int maxBackupIndex );
+
+    /**
+                    Set the maximum size that the output file is allowed to reach before being rolled over to backup files.
+
+    <p>In configuration files, the <b>MaxFileSize</b> option takes an
+     long integer in the range 0 - 2^63. You can specify the value with the suffixes "KB", "MB" or "GB" so that the integer is
+     interpreted being expressed respectively in kilobytes, megabytes
+     or gigabytes. For example, the value "10KB" will be interpreted as 10240.
+    */
+    void setMaxFileSize( const LogString & value );
+
+    void setMaximumFileSize( int value );
+
+
+    virtual void setOption( const LogString & option, const LogString & value );
+
+    /** Prepares RollingFileAppender for use. */
+    void activateOptions( log4cxx::helpers::Pool & pool );
+
+
+      }; // class RollingFileAppender
+      LOG4CXX_PTR_DEF(RollingFileAppender);
+
+    } // namespace log4cxx
+
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif //_LOG4CXX_ROLLING_FILE_APPENDER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/simplelayout.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/simplelayout.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/simplelayout.h	(revision 257)
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SIMPLE_LAYOUT_H
+#define _LOG4CXX_SIMPLE_LAYOUT_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/layout.h>
+
+namespace log4cxx
+{
+        /**
+        SimpleLayout consists of the level of the log statement,
+        followed by " - " and then the log message itself. For example,
+
+        <pre>
+                DEBUG - Hello world
+        </pre>
+
+        <p>
+
+        <p>PatternLayout offers a much more powerful alternative.
+        */
+        class LOG4CXX_EXPORT SimpleLayout : public Layout
+        {
+        public:
+                DECLARE_LOG4CXX_OBJECT(SimpleLayout)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(SimpleLayout)
+                        LOG4CXX_CAST_ENTRY_CHAIN(Layout)
+                END_LOG4CXX_CAST_MAP()
+
+                /**
+                Returns the log statement in a format consisting of the
+                <code>level</code>, followed by " - " and then the
+                <code>message</code>. For example, <pre> INFO - "A message"
+                </pre>
+
+                @return A byte array in SimpleLayout format.
+                */
+                virtual void format(LogString& output,
+                    const spi::LoggingEventPtr& event,
+                    log4cxx::helpers::Pool& pool) const;
+
+                /**
+                The SimpleLayout does not handle the throwable contained within
+                {@link spi::LoggingEvent LoggingEvents}. Thus, it returns
+                <code>true</code>.
+                */
+                bool ignoresThrowable() const { return true; }
+
+                virtual void activateOptions(log4cxx::helpers::Pool& /* p */) {}
+                virtual void setOption(const LogString& /* option */,
+                     const LogString& /* value */) {}
+        };
+      LOG4CXX_PTR_DEF(SimpleLayout);
+}  // namespace log4cxx
+
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif //_LOG4CXX_SIMPLE_LAYOUT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/appenderattachable.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/appenderattachable.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/appenderattachable.h	(revision 257)
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_APPENDER_ATTACHABLE_H_
+#define _LOG4CXX_SPI_APPENDER_ATTACHABLE_H_
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/logstring.h>
+#include <vector>
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/object.h>
+#include <log4cxx/appender.h>
+
+namespace log4cxx
+{
+
+    namespace spi
+    {
+
+        /**
+         * This Interface is for attaching Appenders to objects.
+         */
+        class LOG4CXX_EXPORT AppenderAttachable : public virtual helpers::Object
+        {
+        public:
+          // Methods
+         DECLARE_ABSTRACT_LOG4CXX_OBJECT(AppenderAttachable)
+            /**
+             * Add an appender.
+             */
+            virtual void addAppender(const AppenderPtr& newAppender) = 0;
+
+            /**
+             * Get all previously added appenders as an AppenderList.
+             */
+            virtual AppenderList getAllAppenders() const = 0;
+
+            /**
+             * Get an appender by name.
+             */
+            virtual AppenderPtr getAppender(const LogString& name) const = 0;
+
+            /**
+         Returns <code>true</code> if the specified appender is in list of
+         attached attached, <code>false</code> otherwise.
+         */
+         virtual bool isAttached(const AppenderPtr& appender) const = 0;
+
+            /**
+             * Remove all previously added appenders.
+             */
+            virtual void removeAllAppenders() = 0;
+
+            /**
+             * Remove the appender passed as parameter from the list of appenders.
+             */
+            virtual void removeAppender(const AppenderPtr& appender) = 0;
+
+            /**
+             * Remove the appender with the name passed as parameter from the
+             * list of appenders.
+             */
+            virtual void removeAppender(const LogString& name) = 0;
+
+          // Dtor
+            virtual ~AppenderAttachable(){}
+        };
+
+
+        LOG4CXX_PTR_DEF(AppenderAttachable);
+        
+    }
+}
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif //_LOG4CXX_SPI_APPENDER_ATTACHABLE_H_
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/configurator.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/configurator.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/configurator.h	(revision 257)
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_CONFIGURATOR_H
+#define _LOG4CXX_SPI_CONFIGURATOR_H
+
+#include <log4cxx/spi/loggerrepository.h>
+
+namespace log4cxx
+{
+    class File;
+
+   namespace spi
+   {
+      /**
+      Implemented by classes capable of configuring log4j using a URL.
+      */
+      class LOG4CXX_EXPORT Configurator : virtual public helpers::Object
+      {
+      public:
+         DECLARE_ABSTRACT_LOG4CXX_OBJECT(Configurator)
+         Configurator();
+
+         /**
+         Interpret a resource pointed by a URL and set up log4j accordingly.
+
+         The configuration is done relative to the <code>hierarchy</code>
+         parameter.
+
+         @param configFileName The file to parse
+         @param repository The hierarchy to operation upon.
+         */
+         virtual void doConfigure(const File& configFileName,
+            spi::LoggerRepositoryPtr& repository) = 0;
+
+
+      private:
+         Configurator(const Configurator&);
+         Configurator& operator=(const Configurator&);
+         bool initialized;
+      };
+
+      LOG4CXX_PTR_DEF(Configurator);
+   }
+}
+
+#endif // _LOG4CXX_SPI_CONFIGURATOR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/defaultrepositoryselector.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/defaultrepositoryselector.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/defaultrepositoryselector.h	(revision 257)
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_DEFAULT_REPOSITORY_SELECTOR_H
+#define _LOG4CXX_SPI_DEFAULT_REPOSITORY_SELECTOR_H
+
+#include <log4cxx/spi/repositoryselector.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/spi/loggerrepository.h>
+
+namespace log4cxx
+{
+        namespace spi
+        {
+                class LOG4CXX_EXPORT DefaultRepositorySelector :
+                        public virtual RepositorySelector,
+                        public virtual helpers::ObjectImpl
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(DefaultRepositorySelector)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(RepositorySelector)
+                        END_LOG4CXX_CAST_MAP()
+
+                        DefaultRepositorySelector(const LoggerRepositoryPtr& repository1);
+                        void addRef() const;
+                        void releaseRef() const;
+                        virtual LoggerRepositoryPtr& getLoggerRepository();
+
+                private:
+                        LoggerRepositoryPtr repository;
+                };
+        }  // namespace spi
+} // namespace log4cxx
+
+#endif //_LOG4CXX_SPI_DEFAULT_REPOSITORY_SELECTOR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/errorhandler.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/errorhandler.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/errorhandler.h	(revision 257)
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_ERROR_HANDLER_H
+#define _LOG4CXX_SPI_ERROR_HANDLER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/spi/optionhandler.h>
+#include <log4cxx/helpers/exception.h>
+#include <log4cxx/appender.h>
+#include <log4cxx/spi/loggingevent.h>
+
+namespace log4cxx
+{
+    namespace spi
+        {
+                class ErrorCode
+                {
+                public:
+                        enum
+                        {
+                                GENERIC_FAILURE = 0,
+                                WRITE_FAILURE = 1,
+                                FLUSH_FAILURE = 2,
+                                CLOSE_FAILURE = 3,
+                                FILE_OPEN_FAILURE = 4,
+                                MISSING_LAYOUT = 5,
+                                ADDRESS_PARSE_FAILURE = 6
+                        };
+                };
+
+
+                /**
+                Appenders may delegate their error handling to
+                <code>ErrorHandlers</code>.
+
+                <p>Error handling is a particularly tedious to get right because by
+                definition errors are hard to predict and to reproduce.
+
+
+                <p>Please take the time to contact the author in case you discover
+                that errors are not properly handled. You are most welcome to
+                suggest new error handling policies or criticize existing policies.
+                */
+                class LOG4CXX_EXPORT ErrorHandler : public virtual OptionHandler
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(ErrorHandler)
+                        virtual ~ErrorHandler() {}
+
+                                /**
+                        Add a reference to a logger to which the failing appender might
+                        be attached to. The failing appender will be searched and
+                        replaced only in the loggers you add through this method.
+
+                        @param logger One of the loggers that will be searched for the failing
+                        appender in view of replacement.
+                        */
+                        virtual void setLogger(const LoggerPtr& logger) = 0;
+
+
+                        /**
+                        Equivalent to the error(const String&, helpers::Exception&, int,
+                        spi::LoggingEvent&) with the the event parameteter set to
+                        null.
+                        */
+                        virtual void error(const LogString& message, const std::exception& e,
+                                int errorCode) const = 0;
+
+                        /**
+                        This method is normally used to just print the error message
+                        passed as a parameter.
+                        */
+                        virtual void error(const LogString& message) const = 0;
+
+                        /**
+                        This method is invoked to handle the error.
+
+                        @param message The message assoicated with the error.
+                        @param e The Exption that was thrown when the error occured.
+                        @param errorCode The error code associated with the error.
+                        @param event The logging event that the failing appender is asked
+                        to log.
+                        */
+                        virtual void error(const LogString& message, const std::exception& e,
+                                int errorCode, const LoggingEventPtr& event) const = 0;
+
+                        /**
+                        Set the appender for which errors are handled. This method is
+                        usually called when the error handler is configured.
+                        */
+                        virtual void setAppender(const AppenderPtr& appender) = 0;
+
+                        /**
+                        Set the appender to fallback upon in case of failure.
+                        */
+                        virtual void setBackupAppender(const AppenderPtr& appender) = 0;
+                };
+
+                LOG4CXX_PTR_DEF(ErrorHandler);
+        }  //namespace spi
+} //namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif //_LOG4CXX_SPI_ERROR_HANDLER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/filter.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/filter.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/filter.h	(revision 257)
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_FILTER_H
+#define _LOG4CXX_SPI_FILTER_H
+
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/spi/optionhandler.h>
+#include <log4cxx/spi/loggingevent.h>
+
+namespace log4cxx
+{
+        namespace spi
+        {
+                class Filter;
+                LOG4CXX_PTR_DEF(Filter);
+
+
+        /**
+        Users should extend this class to implement customized logging
+        event filtering. Note that Logger and
+        AppenderSkeleton, the parent class of all standard
+        appenders, have built-in filtering rules. It is suggested that you
+        first use and understand the built-in rules before rushing to write
+        your own custom filters.
+
+        <p>This abstract class assumes and also imposes that filters be
+        organized in a linear chain. The {@link #decide
+        decide(LoggingEvent)} method of each filter is called sequentially,
+        in the order of their addition to the chain.
+
+        <p>The {@link #decide decide(LoggingEvent)} method must return one
+        of the integer constants #DENY, #NEUTRAL or
+        #ACCEPT.
+
+        <p>If the value #DENY is returned, then the log event is
+        dropped immediately without consulting with the remaining
+        filters.
+
+        <p>If the value #NEUTRAL is returned, then the next filter
+        in the chain is consulted. If there are no more filters in the
+        chain, then the log event is logged. Thus, in the presence of no
+        filters, the default behaviour is to log all logging events.
+
+        <p>If the value #ACCEPT is returned, then the log
+        event is logged without consulting the remaining filters.
+
+        <p>The philosophy of log4cxx filters is largely inspired from the
+        Linux ipchains.
+
+        <p>Note that filtering is only supported by the {@link
+        xml::DOMConfigurator DOMConfigurator}.
+        */
+                class LOG4CXX_EXPORT Filter : public virtual OptionHandler,
+                        public virtual helpers::ObjectImpl
+                {
+                  /**
+                  Points to the next filter in the filter chain.
+                  */
+                  FilterPtr next;
+                public:
+                        Filter();
+
+                        void addRef() const;
+                        void releaseRef() const;
+
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(Filter)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(Filter)
+                                LOG4CXX_CAST_ENTRY(spi::OptionHandler)
+                        END_LOG4CXX_CAST_MAP()
+
+                        log4cxx::spi::FilterPtr getNext() const;
+                        void setNext(const log4cxx::spi::FilterPtr& newNext);
+ 
+            enum FilterDecision
+            {
+            /**
+            The log event must be dropped immediately without consulting
+                        with the remaining filters, if any, in the chain.  */
+                        DENY = -1,
+            /**
+            This filter is neutral with respect to the log event. The
+            remaining filters, if any, should be consulted for a final decision.
+            */
+                        NEUTRAL = 0,
+            /**
+            The log event must be logged immediately without consulting with
+            the remaining filters, if any, in the chain.
+                        */
+                        ACCEPT = 1
+
+                        };
+
+
+            /**
+            Usually filters options become active when set. We provide a
+
+            default do-nothing implementation for convenience.
+            */
+            void activateOptions(log4cxx::helpers::Pool& p);
+            void setOption(const LogString& option, const LogString& value);
+
+            /**
+            <p>If the decision is <code>DENY</code>, then the event will be
+            dropped. If the decision is <code>NEUTRAL</code>, then the next
+            filter, if any, will be invoked. If the decision is ACCEPT then
+            the event will be logged without consulting with other filters in
+            the chain.
+
+            @param event The LoggingEvent to decide upon.
+            @return The decision of the filter.  */
+            virtual FilterDecision decide(const LoggingEventPtr& event) const = 0;
+                };
+        }
+}
+
+#endif //_LOG4CXX_SPI_FILTER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/hierarchyeventlistener.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/hierarchyeventlistener.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/hierarchyeventlistener.h	(revision 257)
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_HIERARCHY_EVENT_LISTENER_H
+#define _LOG4CXX_SPI_HIERARCHY_EVENT_LISTENER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/helpers/object.h>
+#include <log4cxx/helpers/objectptr.h>
+#include <vector>
+
+namespace log4cxx
+{
+       class Logger;
+      class Appender;
+
+
+        namespace spi
+        {
+
+                /** Listen to events occuring within a Hierarchy.*/
+                class LOG4CXX_EXPORT HierarchyEventListener :
+                        public virtual log4cxx::helpers::Object
+                {
+                public:
+                        virtual ~HierarchyEventListener() {}
+
+                        virtual void addAppenderEvent(
+                     const log4cxx::helpers::ObjectPtrT<Logger>& logger, 
+                     const log4cxx::helpers::ObjectPtrT<Appender>& appender) = 0;
+
+                        virtual void removeAppenderEvent(
+                     const log4cxx::helpers::ObjectPtrT<Logger>& logger, 
+                     const log4cxx::helpers::ObjectPtrT<Appender>& appender) = 0;
+                };
+                LOG4CXX_PTR_DEF(HierarchyEventListener);
+                LOG4CXX_LIST_DEF(HierarchyEventListenerList, HierarchyEventListenerPtr);
+
+        }  // namespace spi
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif //_LOG4CXX_SPI_HIERARCHY_EVENT_LISTENER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/location/locationinfo.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/location/locationinfo.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/location/locationinfo.h	(revision 257)
@@ -0,0 +1,136 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_LOCATION_LOCATIONINFO_H
+#define _LOG4CXX_SPI_LOCATION_LOCATIONINFO_H
+
+#include <log4cxx/log4cxx.h>
+#include <string>
+#include <log4cxx/helpers/objectoutputstream.h>
+
+namespace log4cxx
+{
+  namespace spi
+  {
+      /**
+       * This class represents the location of a logging statement.
+       *
+       */
+      class LOG4CXX_EXPORT LocationInfo
+      {
+      public:
+
+
+
+      /**
+        *   When location information is not available the constant
+        * <code>NA</code> is returned. Current value of this string constant is <b>?</b>.
+        */
+        static const char * const NA;
+        static const char * const NA_METHOD;
+
+        static const LocationInfo& getLocationUnavailable();
+
+
+
+       /**
+        *   Constructor.
+        *   @remarks Used by LOG4CXX_LOCATION to generate
+        *       location info for current code site
+        */
+        LocationInfo( const char * const fileName,
+                      const char * const functionName,
+                      int lineNumber);
+
+       /**
+        *   Default constructor.
+        */
+        LocationInfo();
+
+       /**
+        *   Copy constructor.
+        *   @param src source location
+        */
+        LocationInfo( const LocationInfo & src );
+
+       /**
+        *  Assignment operator.
+        * @param src source location
+        */
+        LocationInfo & operator = ( const LocationInfo & src );
+
+        /**
+         *   Resets location info to default state.
+         */
+        void clear();
+
+
+        /** Return the class name of the call site. */
+        const std::string getClassName() const;
+
+        /**
+         *   Return the file name of the caller.
+         *   @returns file name, may be null.
+         */
+        const char * getFileName() const;
+
+        /**
+          *   Returns the line number of the caller.
+          * @returns line number, -1 if not available.
+          */
+        int getLineNumber() const;
+
+        /** Returns the method name of the caller. */
+        const std::string getMethodName() const;
+
+        void write(log4cxx::helpers::ObjectOutputStream& os, log4cxx::helpers::Pool& p) const;
+
+
+        private:
+        /** Caller's line number. */
+        int lineNumber;
+
+        /** Caller's file name. */
+        const char * fileName;
+
+        /** Caller's method name. */
+        const char * methodName;
+        
+
+      };
+  }
+}
+
+  #if !defined(LOG4CXX_LOCATION)
+#if defined(_MSC_VER)
+#if _MSC_VER >= 1300
+      #define __LOG4CXX_FUNC__ __FUNCSIG__
+#endif
+#else
+#if defined(__GNUC__)
+      #define __LOG4CXX_FUNC__ __PRETTY_FUNCTION__
+#endif
+#endif
+#if !defined(__LOG4CXX_FUNC__)
+#define __LOG4CXX_FUNC__ ""
+#endif
+      #define LOG4CXX_LOCATION ::log4cxx::spi::LocationInfo(__FILE__, \
+           __LOG4CXX_FUNC__,                                                         \
+           __LINE__)
+  #endif
+
+#endif //_LOG4CXX_SPI_LOCATION_LOCATIONINFO_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggerfactory.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggerfactory.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggerfactory.h	(revision 257)
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_LOGGERFACTORY_H
+#define _LOG4CXX_SPI_LOGGERFACTORY_H
+
+#include <log4cxx/logger.h>
+
+namespace log4cxx
+{
+
+        namespace spi
+        {
+                /**
+                Implement this interface to create new instances of Logger or
+                a sub-class of Logger.
+                */
+                class LOG4CXX_EXPORT LoggerFactory : public virtual helpers::Object
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(LoggerFactory)
+                        virtual ~LoggerFactory() {}
+                        virtual LoggerPtr makeNewLoggerInstance(
+                            log4cxx::helpers::Pool& pool, 
+                            const LogString& name) const = 0;
+                };
+
+
+        }  // namespace spi
+} // namesapce log4cxx
+
+#endif //_LOG4CXX_SPI_LOGGERFACTORY_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggerrepository.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggerrepository.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggerrepository.h	(revision 257)
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_LOG_REPOSITORY_H
+#define _LOG4CXX_SPI_LOG_REPOSITORY_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+#include <log4cxx/appender.h>
+#include <log4cxx/spi/loggerfactory.h>
+#include <log4cxx/level.h>
+#include <log4cxx/spi/hierarchyeventlistener.h>
+
+namespace log4cxx
+{
+    namespace spi
+        {
+            
+            /**
+            A <code>LoggerRepository</code> is used to create and retrieve
+            <code>Loggers</code>. The relation between loggers in a repository
+            depends on the repository but typically loggers are arranged in a
+            named hierarchy.
+
+            <p>In addition to the creational methods, a
+            <code>LoggerRepository</code> can be queried for existing loggers,
+            can act as a point of registry for events related to loggers.
+            */
+            class LOG4CXX_EXPORT LoggerRepository : public virtual helpers::Object
+            {
+            public:
+                DECLARE_ABSTRACT_LOG4CXX_OBJECT(LoggerRepository)
+                    virtual ~LoggerRepository() {}
+
+                /**
+                Add a {@link spi::HierarchyEventListener HierarchyEventListener}
+                            event to the repository.
+                */
+                virtual void addHierarchyEventListener(const HierarchyEventListenerPtr&
+                                    listener) = 0;
+                /**
+                Is the repository disabled for a given level? The answer depends
+                on the repository threshold and the <code>level</code>
+                parameter. See also #setThreshold method.  */
+                virtual bool isDisabled(int level) const = 0;
+
+                /**
+                Set the repository-wide threshold. All logging requests below the
+                threshold are immediately dropped. By default, the threshold is
+                set to <code>Level::getAll()</code> which has the lowest possible rank.  */
+                virtual void setThreshold(const LevelPtr& level) = 0;
+
+                /**
+                Another form of {@link #setThreshold(const LevelPtr&)
+                            setThreshold} accepting a string
+                parameter instead of a <code>Level</code>. */
+                virtual void setThreshold(const LogString& val) = 0;
+
+                virtual void emitNoAppenderWarning(const LoggerPtr& logger) = 0;
+
+                /**
+                Get the repository-wide threshold. See {@link
+                #setThreshold(const LevelPtr&) setThreshold}
+                            for an explanation. */
+                virtual const LevelPtr& getThreshold() const = 0;
+
+                virtual LoggerPtr getLogger(const LogString& name) = 0;
+
+                virtual LoggerPtr getLogger(const LogString& name,
+                     const spi::LoggerFactoryPtr& factory) = 0;
+
+                virtual LoggerPtr getRootLogger() const = 0;
+
+                virtual LoggerPtr exists(const LogString& name) = 0;
+
+                virtual void shutdown() = 0;
+
+                virtual LoggerList getCurrentLoggers() const = 0;
+
+                virtual void fireAddAppenderEvent(const LoggerPtr& logger,
+                                    const AppenderPtr& appender) = 0;
+
+                virtual void resetConfiguration() = 0;
+
+            virtual bool isConfigured() = 0;
+            virtual void setConfigured(bool configured) = 0;
+
+            }; // class LoggerRepository
+
+        }  // namespace spi
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+
+#endif //_LOG4CXX_SPI_LOG_REPOSITORY_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggingevent.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggingevent.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/loggingevent.h	(revision 257)
@@ -0,0 +1,263 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_LOGGING_EVENT_H
+#define _LOG4CXX_SPI_LOGGING_EVENT_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/logstring.h>
+#include <time.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/mdc.h>
+#include <log4cxx/spi/location/locationinfo.h>
+#include <vector>
+
+
+namespace log4cxx
+{
+        namespace helpers
+        {
+                class ObjectOutputStream;
+        }
+
+        namespace spi
+        {
+            
+                        LOG4CXX_LIST_DEF(KeySet, LogString);
+                /**
+                The internal representation of logging events. When an affirmative
+                decision is made to log then a <code>LoggingEvent</code> instance
+                is created. This instance is passed around to the different log4cxx
+                components.
+
+                <p>This class is of concern to those wishing to extend log4cxx.
+                */
+                class LOG4CXX_EXPORT LoggingEvent :
+                        public virtual helpers::ObjectImpl
+                {
+                public:
+                        DECLARE_LOG4CXX_OBJECT(LoggingEvent)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(LoggingEvent)
+                        END_LOG4CXX_CAST_MAP()
+
+                        /** For serialization only
+                        */
+                        LoggingEvent();
+
+                        /**
+                        Instantiate a LoggingEvent from the supplied parameters.
+
+                        <p>Except timeStamp all the other fields of
+                        <code>LoggingEvent</code> are filled when actually needed.
+                        <p>
+                        @param logger The logger of this event.
+                        @param level The level of this event.
+                        @param message  The message of this event.
+                        @param location location of logging request.
+                        */
+                        LoggingEvent(const LogString& logger,
+                                const LevelPtr& level,   const LogString& message,
+                                const log4cxx::spi::LocationInfo& location);
+
+                        ~LoggingEvent();
+
+                        /** Return the level of this event. */
+                        inline const LevelPtr& getLevel() const
+                                { return level; }
+
+                        /**  Return the name of the logger. */
+                        inline const LogString& getLoggerName() const {
+                               return logger;
+                        }
+
+                        /** Return the message for this logging event. */
+                        inline const LogString& getMessage() const
+                                { return message; }
+
+                        /** Return the message for this logging event. */
+                        inline const LogString& getRenderedMessage() const
+                                { return message; }
+
+                        /**Returns the time when the application started,
+                        in seconds elapsed since 01.01.1970.
+                        */
+                        static log4cxx_time_t getStartTime();
+
+                        /** Return the threadName of this event. */
+                        inline const LogString& getThreadName() const {
+                             return threadName;
+                        }
+
+                        /** Return the timeStamp of this event. */
+                        inline log4cxx_time_t getTimeStamp() const
+                                { return timeStamp; }
+
+                        /* Return the file where this log statement was written. */
+                        inline const log4cxx::spi::LocationInfo& getLocationInformation() const
+                                { return locationInfo; }
+
+                        /**
+                        * This method appends the NDC for this event to passed string. It will return the
+                        * correct content even if the event was generated in a different
+                        * thread or even on a different machine. The NDC#get method
+                        * should <em>never</em> be called directly.
+                        *
+                        * @param dest destination for NDC, unchanged if NDC is not set.
+                        * @return true if NDC is set.  
+                        */
+                        bool getNDC(LogString& dest) const;
+
+                        /**
+                         *  Writes the content of the LoggingEvent 
+                         *  in a format compatible with log4j's serialized form.
+                         */ 
+                        void write(helpers::ObjectOutputStream& os, helpers::Pool& p) const;
+
+                        /**
+                        * Appends the the context corresponding to the <code>key</code> parameter.
+                        * If there is a local MDC copy, possibly because we are in a logging
+                        * server or running inside AsyncAppender, then we search for the key in
+                        * MDC copy, if a value is found it is returned. Otherwise, if the search
+                        * in MDC copy returns an empty result, then the current thread's
+                        * <code>MDC</code> is used.
+                        *
+                        * <p>
+                        * Note that <em>both</em> the local MDC copy and the current thread's MDC
+                        * are searched.
+                        * </p>
+                        * @param key key.
+                        * @param dest string to which value, if any, is appended.
+                        * @return true if key had a corresponding value.
+                        */
+                        bool getMDC(const LogString& key, LogString& dest) const;
+
+                        /**
+                        * Returns the set of of the key values in the MDC for the event.
+                        * The returned set is unmodifiable by the caller.
+                        *
+                        * @return Set an unmodifiable set of the MDC keys.
+                        * 
+                        */
+                        KeySet getMDCKeySet() const;
+
+                        /**
+                        Obtain a copy of this thread's MDC prior to serialization
+                        or asynchronous logging.
+                        */
+                        void getMDCCopy() const;
+
+                        /**
+                        * Return a previously set property.
+                        * @param key key.
+                        * @param dest string to which value, if any, is appended.
+                        * @return true if key had a corresponding value.
+                        */
+                        bool getProperty(const LogString& key, LogString& dest) const;
+                        /**
+                        * Returns the set of of the key values in the properties
+                        * for the event. The returned set is unmodifiable by the caller.
+                        *
+                        * @return Set an unmodifiable set of the property keys.
+                        */
+                        KeySet getPropertyKeySet() const;
+
+                        /**
+                        * Set a string property using a key and a string value.  since 1.3
+                        */
+                        void setProperty(const LogString& key, const LogString& value);
+
+                private:
+                        /**
+                        * The logger of the logging event.
+                        **/
+                        LogString logger;
+
+                        /** level of logging event. */
+                        LevelPtr level;
+
+                        /** The nested diagnostic context (NDC) of logging event. */
+                        mutable LogString* ndc;
+
+                        /** The mapped diagnostic context (MDC) of logging event. */
+                        mutable MDC::Map* mdcCopy;
+
+                        /**
+                        * A map of String keys and String values.
+                        */
+                        std::map<LogString, LogString> * properties;
+
+                        /** Have we tried to do an NDC lookup? If we did, there is no need
+                        *  to do it again.  Note that its value is always false when
+                        *  serialized. Thus, a receiving SocketNode will never use it's own
+                        *  (incorrect) NDC. See also writeObject method.
+                        */
+                        mutable bool ndcLookupRequired;
+
+                        /**
+                        * Have we tried to do an MDC lookup? If we did, there is no need to do it
+                        * again.  Note that its value is always false when serialized. See also
+                        * the getMDC and getMDCCopy methods.
+                        */
+                        mutable bool mdcCopyLookupRequired;
+
+                        /** The application supplied message of logging event. */
+                        LogString message;
+
+
+                        /** The number of milliseconds elapsed from 1/1/1970 until logging event
+                         was created. */
+                        log4cxx_time_t timeStamp;
+
+                        /** The is the location where this log statement was written. */
+                        const log4cxx::spi::LocationInfo locationInfo;
+
+
+                        /** The identifier of thread in which this logging event
+                        was generated.
+                        */
+                       const LogString threadName;
+
+                       //
+                       //   prevent copy and assignment
+                       //
+                       LoggingEvent(const LoggingEvent&);
+                       LoggingEvent& operator=(const LoggingEvent&);
+                       static const LogString getCurrentThreadName();
+                       
+                       static void writeProlog(log4cxx::helpers::ObjectOutputStream& os, log4cxx::helpers::Pool& p);
+                       
+                };
+
+                LOG4CXX_PTR_DEF(LoggingEvent);
+                LOG4CXX_LIST_DEF(LoggingEventList, LoggingEventPtr);
+        }
+}
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+
+#endif //_LOG4CXX_SPI_LOGGING_EVENT_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/optionhandler.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/optionhandler.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/optionhandler.h	(revision 257)
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_OPTION_HANDLER_H
+#define _LOG4CXX_SPI_OPTION_HANDLER_H
+
+#include <log4cxx/logstring.h>
+#include <log4cxx/helpers/object.h>
+#include <log4cxx/helpers/objectptr.h>
+
+namespace log4cxx
+{
+        namespace spi
+        {
+                class OptionHandler;
+                typedef helpers::ObjectPtrT<OptionHandler> OptionHandlerPtr;
+
+                /**
+                A string based interface to configure package components.
+                */
+                class LOG4CXX_EXPORT OptionHandler : public virtual helpers::Object
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(OptionHandler)
+                        virtual ~OptionHandler() {}
+
+                        /**
+                        Activate the options that were previously set with calls to option
+                        setters.
+
+                        <p>This allows to defer activiation of the options until all
+                        options have been set. This is required for components which have
+                        related options that remain ambigous until all are set.
+
+                        <p>For example, the FileAppender has the {@link
+                        FileAppender#setFile File} and {@link
+                        FileAppender#setAppend Append} options both of
+                        which are ambigous until the other is also set.  */
+                        virtual void activateOptions(log4cxx::helpers::Pool& p) = 0;
+
+
+                        /**
+                        Set <code>option</code> to <code>value</code>.
+
+                        <p>The handling of each option depends on the OptionHandler
+                        instance. Some options may become active immediately whereas
+                        other may be activated only when #activateOptions is
+                        called.
+                        */
+                        virtual void setOption(const LogString& option,
+                            const LogString& value) = 0;
+
+                }; // class OptionConverter
+        }  // namespace spi
+} // namespace log4cxx
+
+
+#endif //_LOG4CXX_SPI_OPTION_HANDLER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/repositoryselector.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/repositoryselector.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/repositoryselector.h	(revision 257)
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_REPOSITORY_SELECTOR_H
+#define _LOG4CXX_SPI_REPOSITORY_SELECTOR_H
+
+#include <log4cxx/helpers/objectptr.h>
+#include <log4cxx/helpers/object.h>
+
+namespace log4cxx
+{
+        namespace spi
+        {
+                class LoggerRepository;
+                typedef helpers::ObjectPtrT<LoggerRepository> LoggerRepositoryPtr;
+
+       /**
+       The <code>LogManager</code> uses one (and only one)
+       <code>RepositorySelector</code> implementation to select the
+       {@link log4cxx::spi::LoggerRepository LoggerRepository}
+           for a particular application context.
+
+       <p>It is the responsability of the <code>RepositorySelector</code>
+       implementation to track the application context. log4cxx makes no
+       assumptions about the application context or on its management.
+
+       <p>See also LogManager.
+       */
+                class LOG4CXX_EXPORT RepositorySelector : public virtual helpers::Object
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(RepositorySelector)
+                        virtual ~RepositorySelector() {}
+                        virtual LoggerRepositoryPtr& getLoggerRepository() = 0;
+                };
+            LOG4CXX_PTR_DEF(RepositorySelector);
+        }  //namespace spi
+} //namespace log4cxx
+
+#endif //_LOG4CXX_SPI_REPOSITORY_SELECTOR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/rootlogger.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/rootlogger.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/rootlogger.h	(revision 257)
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_ROOT_LOGGER_H
+#define _LOG4CXX_SPI_ROOT_LOGGER_H
+
+#include <log4cxx/logger.h>
+
+namespace log4cxx
+{
+        namespace spi
+        {
+        /**
+        RootLogger sits at the top of the logger hierachy. It is a
+        regular logger except that it provides several guarantees.
+
+        <p>First, it cannot be assigned a null
+        level. Second, since root logger cannot have a parent, the
+        #getEffectiveLevel method always returns the value of the
+        level field without walking the hierarchy.
+        */
+        class LOG4CXX_EXPORT RootLogger : public Logger
+                {
+                public:
+            /**
+            The root logger names itself as "root". However, the root
+            logger cannot be retrieved by name.
+            */
+            RootLogger(log4cxx::helpers::Pool& pool, const LevelPtr& level);
+
+            /**
+            Return the assigned level value without walking the logger
+            hierarchy.
+            */
+            virtual const LevelPtr& getEffectiveLevel() const;
+
+            /**
+                        Setting a null value to the level of the root logger may have catastrophic
+                        results. We prevent this here.
+                        */
+            void setLevel(const LevelPtr& level);
+                };
+        }  // namespace spi
+} // namespace log4cxx
+
+#endif //_LOG4CXX_SPI_ROOT_LOGGER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/triggeringeventevaluator.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/triggeringeventevaluator.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/spi/triggeringeventevaluator.h	(revision 257)
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_SPI_TRIGGERING_EVENT_EVALUATOR_H
+#define _LOG4CXX_SPI_TRIGGERING_EVENT_EVALUATOR_H
+
+#include <log4cxx/spi/loggingevent.h>
+
+namespace log4cxx
+{
+        namespace spi
+        {
+                /**
+                Implementions of this interface allow certain appenders to decide
+                when to perform an appender specific action.
+
+                <p>For example the {@link net::SMTPAppender SMTPAppender} sends
+                an email when the #isTriggeringEvent method returns
+                <code>true</code> and adds the event to an internal buffer when the
+                returned result is <code>false</code>.
+
+                */
+                class LOG4CXX_EXPORT TriggeringEventEvaluator : public virtual helpers::Object
+                {
+                public:
+                        DECLARE_ABSTRACT_LOG4CXX_OBJECT(TriggeringEventEvaluator)
+                        /**
+                        Is this the triggering event?
+                        */
+                        virtual bool isTriggeringEvent(const spi::LoggingEventPtr& event) = 0;
+                };
+            LOG4CXX_PTR_DEF(TriggeringEventEvaluator);
+        }
+}
+
+#endif // _LOG4CXX_SPI_TRIGGERING_EVENT_EVALUATOR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/stream.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/stream.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/stream.h	(revision 257)
@@ -0,0 +1,566 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_STREAM_H
+#define _LOG4CXX_STREAM_H
+
+#include <log4cxx/logger.h>
+#include <sstream>
+#include <log4cxx/spi/location/locationinfo.h>
+
+namespace log4cxx
+{
+
+       /**
+         *   Base class for the basic_logstream template which attempts
+         *   to emulate std::basic_ostream but attempts to short-circuit
+         *   unnecessary operations.
+         *
+         *   The logstream has a logger and level that are used for logging
+         *   requests.  The level of the stream is compared against the 
+         *   current level of the logger to determine if the request should be processed.
+         */
+        class LOG4CXX_EXPORT logstream_base {
+        public:
+             /**
+              *  Create new instance.
+              *  @param logger logger logger used in log requests.
+              *  @param level indicates level that will be used in log requests.  Can
+              *      be modified later by inserting a level or calling setLevel.
+              */
+             logstream_base(const log4cxx::LoggerPtr& logger,
+                 const log4cxx::LevelPtr& level);
+             /**
+              *  Destructor.
+              */
+             virtual ~logstream_base();
+             /**
+              *  Insertion operator for std::fixed and similar manipulators.
+              */
+             void insert(std::ios_base& (*manip)(std::ios_base&));
+
+             /**
+              *   get precision.
+              */
+             int precision();
+             /**
+              *   get width.
+              */
+             int width();
+             /**
+              *   set precision.  This should be used in preference to inserting an std::setprecision(n)
+              *   since the other requires construction of an STL stream which may be expensive.
+              */
+             int precision(int newval);
+             /**
+              *   set width.  This should be used in preference to inserting an std::setw(n)
+              *   since the other requires construction of an STL stream which may be expensive.
+              */
+             int width(int newval);
+             /**
+              *   Get fill character.
+              */
+             int fill();
+             /**
+              *  Set fill character.
+              */
+             int fill(int newval);
+             
+             /**
+              *   Set flags. see std::ios_base.
+              */
+             std::ios_base::fmtflags flags(std::ios_base::fmtflags newflags);
+             /**
+              *   Set flags. see std::ios_base.
+              */
+             std::ios_base::fmtflags setf(std::ios_base::fmtflags newflags, std::ios_base::fmtflags mask);
+             /**
+              *   Set flags. see std::ios_base.
+              */
+             std::ios_base::fmtflags setf(std::ios_base::fmtflags newflags);
+             
+             
+             /**
+              *  end of message manipulator, triggers logging.
+              */
+             static logstream_base& endmsg(logstream_base&);
+
+             /**
+              *  no-operation manipulator,  Used to avoid ambiguity with VC6.
+              */
+             static logstream_base& nop(logstream_base&);
+             
+             /**
+              *   end of message action.
+              */
+             void end_message();
+
+
+            
+             /**
+              * Set the level.
+              * @param level level
+              */
+              void setLevel(const LevelPtr& level);
+              /**
+               *  Returns true if the current level is the same or high as the 
+               *  level of logger at time of construction or last setLevel.
+               */
+              inline bool isEnabled() const {
+                 return enabled;
+              }
+
+              /**
+               *  Returns if logger is currently enabled for the specified level.
+               */
+              bool isEnabledFor(const LevelPtr& level) const;
+
+              /**
+               *  Sets the location for subsequent log requests.
+               */
+              void setLocation(const log4cxx::spi::LocationInfo& location);
+
+              /**
+               *  Sets the state of the embedded stream (if any)
+               *     to the state of the formatting info.
+               *   @param os stream to receive formatting info.
+               *   @param fillchar receives fill charater.
+               *   @return true if fill character was specified.     
+               */
+              bool set_stream_state(std::ios_base& os, int& fillchar);
+
+        protected:
+              /**
+               *   Dispatches the pending log request.
+               */
+              virtual void log(LoggerPtr& logger,
+                               const LevelPtr& level,
+                               const log4cxx::spi::LocationInfo& location) = 0;
+              /**
+               *   Erase any content in the message construction buffer.
+               */
+              virtual void erase() = 0;
+              /**
+               *   Copy state of embedded stream (if any)
+               *      to value and mask instances of std::ios_base
+               *      and return fill character value.
+               */
+              virtual void get_stream_state(std::ios_base& base,
+                                            std::ios_base& mask,
+                                            int& fill,
+                                            bool& fillSet) const = 0;
+              virtual void refresh_stream_state() = 0;
+             
+        private:
+            /**
+             *   prevent copy constructor.
+             */
+            logstream_base(logstream_base&);
+            /**
+             *   prevent copy operatpr.
+             */
+            logstream_base& operator=(logstream_base&);
+            /**
+             *   Minimal extension of std::ios_base to allow creation
+             *     of embedded IO states.
+             */
+            class LOG4CXX_EXPORT logstream_ios_base : public std::ios_base {
+            public:
+                logstream_ios_base(std::ios_base::fmtflags initval, 
+                    int initsize);
+            } initset, initclear;
+            /**
+             *   fill character.
+             */
+            int fillchar;
+            /**
+             *   true if fill character is set.
+             */
+            bool fillset;
+            /**
+             *   true if assigned level was same or higher than level of associated logger.
+             */
+            bool enabled;
+            /**
+             *   associated logger.
+             */
+            log4cxx::LoggerPtr logger;
+            /**
+             *   associated level.
+             */
+            log4cxx::LevelPtr level;
+            /**
+             *   associated level.
+             */
+            log4cxx::spi::LocationInfo location;
+        };
+        
+      typedef logstream_base& (*logstream_manipulator)(logstream_base&);
+       
+        /**
+         *  An STL-like stream API for log4cxx using char as the character type.
+       *. Instances of log4cxx::logstream
+         *  are not  designedfor use by multiple threads and in general should be short-lived
+         *  function scoped objects.  Using log4cxx::basic_logstream as a class member or 
+         *  static instance should be avoided in the same manner as you would avoid placing a std::ostringstream
+         *  in those locations.  Insertion operations are generally short-circuited if the 
+         *  level for the stream is not the same of higher that the level of the associated logger.
+         */
+        class LOG4CXX_EXPORT logstream : public logstream_base {
+          typedef char Ch;
+        public:
+            /**
+             *   Constructor.
+             */
+             logstream(const log4cxx::LoggerPtr& logger,
+                 const log4cxx::LevelPtr& level);
+             
+            /**
+             *   Constructor.
+             */
+             logstream(const Ch* loggerName, 
+                const log4cxx::LevelPtr& level);
+
+            /**
+             *   Constructor.
+             */
+             logstream(const std::basic_string<Ch>& loggerName, 
+                const log4cxx::LevelPtr& level);
+             
+             ~logstream();
+             
+             /**
+              *   Insertion operator for std::fixed and similar manipulators.
+              */
+             logstream& operator<<(std::ios_base& (*manip)(std::ios_base&));
+            
+             /**
+              *   Insertion operator for logstream_base::endmsg.
+              */
+              logstream& operator<<(logstream_manipulator manip);
+            
+              /**
+               *   Insertion operator for level.
+               */
+              logstream& operator<<(const log4cxx::LevelPtr& level);
+            /**
+             *   Insertion operator for location.
+             */
+             logstream& operator<<(const log4cxx::spi::LocationInfo& location);
+            
+            /**
+             *   Alias for insertion operator for location.  Kludge to avoid
+          *      inappropriate compiler ambiguity.
+             */
+             logstream& operator>>(const log4cxx::spi::LocationInfo& location);
+
+            /**
+             *   Cast operator to provide access to embedded std::basic_ostream.
+             */
+             operator std::basic_ostream<Ch>&();
+
+#if !(LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE)             
+            /**
+              *  Template to allow any class with an std::basic_ostream inserter
+              *    to be applied to this class.
+             */
+             template <class V>
+             inline log4cxx::logstream& operator<<(const V& val) {
+                 if (LOG4CXX_UNLIKELY(isEnabled())) {
+                      ((std::basic_ostream<char>&) *this) << val;
+                 }
+                 return *this;
+              }
+#endif              
+             
+            
+        protected:
+              virtual void log(LoggerPtr& logger,
+                               const LevelPtr& level,
+                               const log4cxx::spi::LocationInfo& location);
+              
+              virtual void erase();
+              
+              virtual void get_stream_state(std::ios_base& base,
+                                            std::ios_base& mask,
+                                            int& fill,
+                                            bool& fillSet) const;
+              virtual void refresh_stream_state();
+              
+            
+        private:
+            logstream(const logstream&);
+            logstream& operator=(const logstream&);        
+            std::basic_stringstream<Ch>* stream;
+             
+        };
+        
+#if LOG4CXX_WCHAR_T_API        
+        /**
+         *  An STL-like stream API for log4cxx using wchar_t as the character type.
+       *. Instances of log4cxx::logstream
+         *  are not  designedfor use by multiple threads and in general should be short-lived
+         *  function scoped objects.  Using log4cxx::basic_logstream as a class member or 
+         *  static instance should be avoided in the same manner as you would avoid placing a std::ostringstream
+         *  in those locations.  Insertion operations are generally short-circuited if the 
+         *  level for the stream is not the same of higher that the level of the associated logger.
+         */
+        class LOG4CXX_EXPORT wlogstream : public logstream_base {
+          typedef wchar_t Ch;
+        public:
+            /**
+             *   Constructor.
+             */
+             wlogstream(const log4cxx::LoggerPtr& logger,
+                 const log4cxx::LevelPtr& level);
+             
+            /**
+             *   Constructor.
+             */
+             wlogstream(const Ch* loggerName, 
+                const log4cxx::LevelPtr& level);
+
+            /**
+             *   Constructor.
+             */
+             wlogstream(const std::basic_string<Ch>& loggerName, 
+                const log4cxx::LevelPtr& level);
+             
+             ~wlogstream();
+             
+             /**
+              *   Insertion operator for std::fixed and similar manipulators.
+              */
+             wlogstream& operator<<(std::ios_base& (*manip)(std::ios_base&));
+            
+             /**
+              *   Insertion operator for logstream_base::endmsg.
+              */
+              wlogstream& operator<<(logstream_manipulator manip);
+            
+              /**
+               *   Insertion operator for level.
+               */
+              wlogstream& operator<<(const log4cxx::LevelPtr& level);
+            /**
+             *   Insertion operator for location.
+             */
+            wlogstream& operator<<(const log4cxx::spi::LocationInfo& location);
+            
+            /**
+             *   Alias for insertion operator for location.  Kludge to avoid
+          *      inappropriate compiler ambiguity.
+             */
+             wlogstream& operator>>(const log4cxx::spi::LocationInfo& location);
+            
+
+            /**
+             *   Cast operator to provide access to embedded std::basic_ostream.
+             */
+             operator std::basic_ostream<Ch>&();
+            
+#if !(LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE)             
+            /**
+              *  Template to allow any class with an std::basic_ostream inserter
+              *    to be applied to this class.
+             */
+             template <class V>
+             inline log4cxx::wlogstream& operator<<(const V& val) {
+                 if (LOG4CXX_UNLIKELY(isEnabled())) {
+                      ((std::basic_ostream<wchar_t>&) *this) << val;
+                 }
+                 return *this;
+              }
+#endif              
+            
+        protected:
+              virtual void log(LoggerPtr& logger,
+                               const LevelPtr& level,
+                               const log4cxx::spi::LocationInfo& location);
+              
+              virtual void erase();
+              
+              virtual void get_stream_state(std::ios_base& base,
+                                            std::ios_base& mask,
+                                            int& fill,
+                                            bool& fillSet) const;
+              virtual void refresh_stream_state();
+              
+            
+        private:
+            wlogstream(const wlogstream&);
+            wlogstream& operator=(const wlogstream&);
+            std::basic_stringstream<Ch>* stream;
+             
+        };
+#endif
+
+#if LOG4CXX_UNICHAR_API || LOG4CXX_CFSTRING_API        
+        /**
+         *  An STL-like stream API for log4cxx using UniChar as the character type.
+       *. Instances of log4cxx::logstream
+         *  are not  designedfor use by multiple threads and in general should be short-lived
+         *  function scoped objects.  Using log4cxx::basic_logstream as a class member or 
+         *  static instance should be avoided in the same manner as you would avoid placing a std::ostringstream
+         *  in those locations.  Insertion operations are generally short-circuited if the 
+         *  level for the stream is not the same of higher that the level of the associated logger.
+         */
+        class LOG4CXX_EXPORT ulogstream : public logstream_base {
+          typedef UniChar Ch;
+        public:
+            /**
+             *   Constructor.
+             */
+             ulogstream(const log4cxx::LoggerPtr& logger,
+                 const log4cxx::LevelPtr& level);
+             
+#if LOG4CXX_UNICHAR_API             
+            /**
+             *   Constructor.
+             */
+             ulogstream(const Ch* loggerName, 
+                const log4cxx::LevelPtr& level);
+
+            /**
+             *   Constructor.
+             */
+             ulogstream(const std::basic_string<Ch>& loggerName, 
+                const log4cxx::LevelPtr& level);
+#endif
+
+#if LOG4CXX_CFSTRING_API
+             ulogstream(const CFStringRef& loggerName,
+                   const log4cxx::LevelPtr& level);
+#endif             
+             
+             ~ulogstream();
+             
+             /**
+              *   Insertion operator for std::fixed and similar manipulators.
+              */
+             ulogstream& operator<<(std::ios_base& (*manip)(std::ios_base&));
+            
+             /**
+              *   Insertion operator for logstream_base::endmsg.
+              */
+              ulogstream& operator<<(logstream_manipulator manip);
+            
+              /**
+               *   Insertion operator for level.
+               */
+              ulogstream& operator<<(const log4cxx::LevelPtr& level);
+            /**
+             *   Insertion operator for location.
+             */
+            ulogstream& operator<<(const log4cxx::spi::LocationInfo& location);
+            
+            /**
+             *   Alias for insertion operator for location.  Kludge to avoid
+          *      inappropriate compiler ambiguity.
+             */
+             ulogstream& operator>>(const log4cxx::spi::LocationInfo& location);
+            
+
+            /**
+             *   Cast operator to provide access to embedded std::basic_ostream.
+             */
+             operator std::basic_ostream<Ch>&();
+            
+#if !(LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE)             
+            /**
+              *  Template to allow any class with an std::basic_ostream inserter
+              *    to be applied to this class.
+             */
+             template <class V>
+             inline ulogstream& operator<<(const V& val) {
+                 if (LOG4CXX_UNLIKELY(isEnabled())) {
+                      ((std::basic_ostream<Ch>&) *this) << val;
+                 }
+                 return *this;
+              }
+#endif              
+            
+        protected:
+              virtual void log(LoggerPtr& logger,
+                               const LevelPtr& level,
+                               const log4cxx::spi::LocationInfo& location);
+              
+              virtual void erase();
+              
+              virtual void get_stream_state(std::ios_base& base,
+                                            std::ios_base& mask,
+                                            int& fill,
+                                            bool& fillSet) const;
+              virtual void refresh_stream_state();
+              
+            
+        private:
+            ulogstream(const ulogstream&);
+            ulogstream& operator=(const ulogstream&);
+            std::basic_stringstream<Ch>* stream;
+             
+        };
+#endif
+
+
+}  // namespace log4cxx
+
+
+#if LOG4CXX_USE_GLOBAL_SCOPE_TEMPLATE
+//
+//  VC6 will fail to compile if class-scope templates
+//     are used to handle arbitrary insertion operations.
+//     However, using global namespace insertion operations 
+//     run into LOGCXX-150.
+
+/**
+ *  Template to allow any class with an std::basic_ostream inserter
+ *    to be applied to this class.
+ */
+template <class V>
+inline log4cxx::logstream& operator<<(log4cxx::logstream& os, const V& val) {
+     if (LOG4CXX_UNLIKELY(os.isEnabled())) {
+         ((std::basic_ostream<char>&) os) << val;
+     }
+     return os;
+}
+
+#if LOG4CXX_WCHAR_T_API            
+/**
+ *  Template to allow any class with an std::basic_ostream inserter
+ *    to be applied to this class.
+ */
+template <class V>
+inline log4cxx::wlogstream& operator<<(log4cxx::wlogstream& os, const V& val) {
+     if (LOG4CXX_UNLIKELY(os.isEnabled())) {
+         ((std::basic_ostream<wchar_t>&) os) << val;
+     }
+     return os;
+}
+#endif
+#endif
+
+#if !defined(LOG4CXX_ENDMSG)
+#if LOG4CXX_LOGSTREAM_ADD_NOP
+#define LOG4CXX_ENDMSG (log4cxx::logstream_manipulator) log4cxx::logstream_base::nop >> LOG4CXX_LOCATION << (log4cxx::logstream_manipulator) log4cxx::logstream_base::endmsg
+#else
+#define LOG4CXX_ENDMSG LOG4CXX_LOCATION << (log4cxx::logstream_manipulator) log4cxx::logstream_base::endmsg
+#endif
+#endif
+
+
+#endif //_LOG4CXX_STREAM_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/ttcclayout.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/ttcclayout.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/ttcclayout.h	(revision 257)
@@ -0,0 +1,187 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_TTCC_LAYOUT_H
+#define _LOG4CXX_TTCC_LAYOUT_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/helpers/datelayout.h>
+
+namespace log4cxx
+{
+
+    /**
+    TTCC layout format consists of time, thread, logger name and nested
+    diagnostic context information, hence the name.
+
+    <p>Each of the four fields can be individually enabled or
+    disabled. The time format depends on the <code>DateFormat</code>
+    used.
+
+    <p>Here is an example TTCCLayout output with the
+    {@link helpers::RelativeTimeDateFormat RelativeTimeDateFormat}.
+
+    <pre>
+    176 [main] INFO  examples.Sort - Populating an array of 2 elements in reverse order.
+    225 [main] INFO  examples.SortAlgo - Entered the sort method.
+    262 [main] DEBUG examples.SortAlgo.OUTER i=1 - Outer loop.
+    276 [main] DEBUG examples.SortAlgo.SWAP i=1 j=0 - Swapping intArray[0] = 1 and intArray[1] = 0
+    290 [main] DEBUG examples.SortAlgo.OUTER i=0 - Outer loop.
+    304 [main] INFO  examples.SortAlgo.DUMP - Dump of interger array:
+    317 [main] INFO  examples.SortAlgo.DUMP - Element [0] = 0
+    331 [main] INFO  examples.SortAlgo.DUMP - Element [1] = 1
+    343 [main] INFO  examples.Sort - The next log statement should be an error message.
+    346 [main] ERROR examples.SortAlgo.DUMP - Tried to dump an uninitialized array.
+    467 [main] INFO  examples.Sort - Exiting main method.
+    </pre>
+
+    <p>The first field is the number of milliseconds elapsed since the
+    start of the program. The second field is the thread outputting the
+    log statement. The third field is the level, the fourth field is
+    the logger to which the statement belongs.
+
+    <p>The fifth field (just before the '-') is the nested diagnostic
+    context.  Note the nested diagnostic context may be empty as in the
+    first two statements. The text after the '-' is the message of the
+    statement.
+
+    <p><b>WARNING</b> Do not use the same TTCCLayout instance from
+    within different appenders. The TTCCLayout is not thread safe when
+    used in his way. However, it is perfectly safe to use a TTCCLayout
+    instance from just one appender.
+
+    <p>PatternLayout offers a much more flexible alternative.
+    */
+        class LOG4CXX_EXPORT TTCCLayout : public helpers::DateLayout
+        {
+        private:
+                  // Internal representation of options
+                  bool threadPrinting;
+                  bool categoryPrefixing;
+                  bool contextPrinting;
+                  bool filePrinting;
+
+        public:
+                DECLARE_LOG4CXX_OBJECT(TTCCLayout)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(TTCCLayout)
+                        LOG4CXX_CAST_ENTRY_CHAIN(Layout)
+                END_LOG4CXX_CAST_MAP()
+
+        /**
+        Instantiate a TTCCLayout object with {@link
+        helpers::RelativeTimeDateFormat RelativeTimeDateFormat} as the date
+        formatter in the local time zone.
+        */
+                TTCCLayout();
+
+        /**
+        Instantiate a TTCCLayout object using the local time zone. The
+        DateFormat used will depend on the <code>dateFormatType</code>.
+        <p>This constructor just calls the {@link
+        helpers::DateLayout#setDateFormat DateLayout::setDateFormat} method.
+        */
+                TTCCLayout(const LogString& dateFormatType);
+
+        /**
+        The <b>ThreadPrinting</b> option specifies whether the name of the
+        current thread is part of log output or not. This is true by default.
+        */
+                inline void setThreadPrinting(bool threadPrinting1)
+                        { this->threadPrinting = threadPrinting1; }
+
+        /**
+        Returns value of the <b>ThreadPrinting</b> option.
+        */
+                inline bool getThreadPrinting() const
+                        { return threadPrinting; }
+
+        /**
+        The <b>CategoryPrefixing</b> option specifies whether Logger
+        name is part of log output or not. This is true by default.
+        */
+                inline void setCategoryPrefixing(bool categoryPrefixing1)
+                        { this->categoryPrefixing = categoryPrefixing1; }
+
+        /**
+        Returns value of the <b>CategoryPrefixing</b> option.
+        */
+                inline bool getCategoryPrefixing() const
+                        { return categoryPrefixing; }
+
+        /**
+        The <b>ContextPrinting</b> option specifies log output will include
+        the nested context information belonging to the current thread.
+        This is true by default.
+        */
+                inline void setContextPrinting(bool contextPrinting1)
+                        { this->contextPrinting = contextPrinting1; }
+
+        /**
+        Returns value of the <b>ContextPrinting</b> option.
+        */
+                inline bool getContextPrinting() const
+                        { return contextPrinting; }
+
+        /**
+        The <b>FilePrinting</b> option specifies log output will include
+        the file and the line where the log statement was written.
+        */
+                inline void setFilePrinting(bool filePrinting1)
+                        { this->filePrinting = filePrinting1; }
+
+        /**
+        Returns value of the <b>ContextPrinting</b> option.
+        */
+                inline bool getFilePrinting() const
+                        { return filePrinting; }
+
+        /**
+        In addition to the level of the statement and message, this function
+        writes to the ouput stream time, thread, logger and NDC
+        information.
+
+        <p>Time, thread, logger and diagnostic context are printed
+        depending on options.
+
+        @param output destination to receive formatted output.
+        @param event event to format.
+        @param pool pool used to allocate memory needed during formatting.
+        */
+        virtual void format(LogString& output,
+            const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool) const;
+
+        /**
+        The TTCCLayout does not handle the throwable contained within
+        {@link spi::LoggingEvent LoggingEvents}. Thus, it returns
+        <code>true</code>.
+        */
+        virtual bool ignoresThrowable() const { return true; }
+        };
+      LOG4CXX_PTR_DEF(TTCCLayout);
+}
+
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/varia/fallbackerrorhandler.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/varia/fallbackerrorhandler.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/varia/fallbackerrorhandler.h	(revision 257)
@@ -0,0 +1,116 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_VARIA_FALLBACK_ERROR_HANDLER_H
+#define _LOG4CXX_VARIA_FALLBACK_ERROR_HANDLER_H
+
+#include <log4cxx/spi/errorhandler.h>
+#include <log4cxx/helpers/objectimpl.h>
+#include <log4cxx/appender.h>
+#include <log4cxx/logger.h>
+#include <vector>
+
+namespace log4cxx
+{
+        namespace varia
+        {
+                /**
+                The <code>FallbackErrorHandler</code> implements the ErrorHandler
+                interface such that a secondary appender may be specified.  This
+                secondary appender takes over if the primary appender fails for
+                whatever reason.
+
+                <p>The error message is printed on <code>System.err</code>, and
+                logged in the new secondary appender.
+                */
+                class LOG4CXX_EXPORT FallbackErrorHandler :
+                        public virtual spi::ErrorHandler,
+                        public virtual helpers::ObjectImpl
+                {
+                private:
+                        AppenderPtr backup;
+                        AppenderPtr primary;
+                        std::vector<LoggerPtr> loggers;
+
+                public:
+                        DECLARE_LOG4CXX_OBJECT(FallbackErrorHandler)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(spi::OptionHandler)
+                                LOG4CXX_CAST_ENTRY(spi::ErrorHandler)
+                        END_LOG4CXX_CAST_MAP()
+
+                        FallbackErrorHandler();
+                        void addRef() const;
+                        void releaseRef() const;
+
+
+                        /**
+                        <em>Adds</em> the logger passed as parameter to the list of
+                        loggers that we need to search for in case of appender failure.
+                        */
+                        void setLogger(const LoggerPtr& logger);
+
+
+                        /**
+                        No options to activate.
+                        */
+                        void activateOptions(log4cxx::helpers::Pool& p);
+                        void setOption(const LogString& option, const LogString& value);
+
+
+                        /**
+                        Prints the message and the stack trace of the exception on
+                        <code>System.err</code>.
+                        */
+                        void error(const LogString& message, const std::exception& e,
+                                int errorCode) const;
+
+                        /**
+                        Prints the message and the stack trace of the exception on
+                        <code>System.err</code>.
+                        */
+                        void error(const LogString& message, const std::exception& e,
+                                int errorCode, const spi::LoggingEventPtr& event) const;
+
+
+                        /**
+                        Print a the error message passed as parameter on
+                        <code>System.err</code>.
+                        */
+                        void error(const LogString& /* message */) const {}
+
+                        /**
+                        Return the backup appender.
+                        */
+                        const AppenderPtr& getBackupAppender() const
+                                { return backup; }
+
+                        /**
+                        The appender to which this error handler is attached.
+                        */
+                        void setAppender(const AppenderPtr& primary);
+
+                        /**
+                        Set the backup appender.
+                        */
+                        void setBackupAppender(const AppenderPtr& backup);
+                };
+        }  // namespace varia
+} // namespace log4cxx
+
+#endif //_LOG4CXX_VARIA_FALLBACK_ERROR_HANDLER_H
+
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/writerappender.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/writerappender.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/writerappender.h	(revision 257)
@@ -0,0 +1,217 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_WRITER_APPENDER_H
+#define _LOG4CXX_WRITER_APPENDER_H
+
+#if defined(_MSC_VER)
+#pragma warning ( push )
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+#include <log4cxx/appenderskeleton.h>
+#include <log4cxx/helpers/outputstreamwriter.h>
+
+namespace log4cxx
+{
+
+        namespace helpers {
+          class Transcoder;
+        }
+
+        /**
+        WriterAppender appends log events to a standard output stream
+        */
+        class LOG4CXX_EXPORT WriterAppender : public AppenderSkeleton
+        {
+        private:
+                /**
+                Immediate flush means that the underlying writer or output stream
+                will be flushed at the end of each append operation. Immediate
+                flush is slower but ensures that each append request is actually
+                written. If <code>immediateFlush</code> is set to
+                <code>false</code>, then there is a good chance that the last few
+                logs events are not actually written to persistent media if and
+                when the application crashes.
+
+                <p>The <code>immediateFlush</code> variable is set to
+                <code>true</code> by default.
+
+                */
+                bool immediateFlush;
+
+                /**
+                The encoding to use when opening an input stream.
+                <p>The <code>encoding</code> variable is set to <code>""</code> by
+                default which results in the utilization of the system's default
+                encoding.  */
+                LogString encoding;
+
+                /**
+                *  This is the {@link Writer Writer} where we will write to.
+                */
+                log4cxx::helpers::WriterPtr writer;
+
+
+        public:
+                DECLARE_ABSTRACT_LOG4CXX_OBJECT(WriterAppender)
+                BEGIN_LOG4CXX_CAST_MAP()
+                        LOG4CXX_CAST_ENTRY(WriterAppender)
+                        LOG4CXX_CAST_ENTRY_CHAIN(AppenderSkeleton)
+                END_LOG4CXX_CAST_MAP()
+
+                /**
+                This default constructor does nothing.*/
+                WriterAppender();
+        protected:
+                WriterAppender(const LayoutPtr& layout,
+                              log4cxx::helpers::WriterPtr& writer);
+                WriterAppender(const LayoutPtr& layout);
+
+        public:
+                ~WriterAppender();
+
+                /**
+                Derived appenders should override this method if option structure
+                requires it.
+                */
+                virtual void activateOptions(log4cxx::helpers::Pool& pool);
+
+                /**
+                If the <b>ImmediateFlush</b> option is set to
+                <code>true</code>, the appender will flush at the end of each
+                write. This is the default behavior. If the option is set to
+                <code>false</code>, then the underlying stream can defer writing
+                to physical medium to a later time.
+
+                <p>Avoiding the flush operation at the end of each append results in
+                a performance gain of 10 to 20 percent. However, there is safety
+                tradeoff involved in skipping flushing. Indeed, when flushing is
+                skipped, then it is likely that the last few log events will not
+                be recorded on disk when the application exits. This is a high
+                price to pay even for a 20% performance gain.
+                */
+                void setImmediateFlush(bool value);
+                /**
+                Returns value of the <b>ImmediateFlush</b> option.
+                */
+                bool getImmediateFlush() const { return immediateFlush; }
+
+                /**
+                This method is called by the AppenderSkeleton#doAppend
+                method.
+
+                <p>If the output stream exists and is writable then write a log
+                statement to the output stream. Otherwise, write a single warning
+                message to <code>stderr</code>.
+
+                <p>The format of the output will depend on this appender's
+                layout.
+
+                */
+                virtual void append(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+
+
+        protected:
+                /**
+                This method determines if there is a sense in attempting to append.
+
+                <p>It checks whether there is a set output target and also if
+                there is a set layout. If these checks fail, then the boolean
+                value <code>false</code> is returned. */
+                virtual bool checkEntryConditions() const;
+
+
+        public:
+                /**
+                Close this appender instance. The underlying stream or writer is
+                also closed.
+
+                <p>Closed appenders cannot be reused.
+                */
+                virtual void close();
+
+        protected:
+                /**
+                 * Close the underlying {@link log4cxx::helpers::Writer}.
+                 * */
+                void closeWriter();
+
+                /**
+                    Returns an OutputStreamWriter when passed an OutputStream.  The
+                    encoding used will depend on the value of the
+                    <code>encoding</code> property.  If the encoding value is
+                    specified incorrectly the writer will be opened using the default
+                    system encoding (an error message will be printed to the loglog.  */
+                virtual log4cxx::helpers::WriterPtr createWriter(
+                    log4cxx::helpers::OutputStreamPtr& os);
+
+       public:
+                LogString getEncoding() const;
+                void setEncoding(const LogString& value);
+                void setOption(const LogString& option,
+                    const LogString& value);
+
+                /**
+                  <p>Sets the Writer where the log output will go. The
+                  specified Writer must be opened by the user and be
+                  writable.
+
+                  <p>The <code>java.io.Writer</code> will be closed when the
+                  appender instance is closed.
+
+
+                  <p><b>WARNING:</b> Logging to an unopened Writer will fail.
+                  <p>
+                  @param writer An already opened Writer.  */
+                void setWriter(const log4cxx::helpers::WriterPtr& writer);
+
+                virtual bool requiresLayout() const;
+
+        protected:
+               /**
+                Actual writing occurs here.
+               */
+               virtual void subAppend(const spi::LoggingEventPtr& event, log4cxx::helpers::Pool& p);
+
+
+                /**
+                Write a footer as produced by the embedded layout's
+                Layout#appendFooter method.  */
+                virtual void writeFooter(log4cxx::helpers::Pool& p);
+
+                /**
+                Write a header as produced by the embedded layout's
+                Layout#appendHeader method.  */
+                virtual void writeHeader(log4cxx::helpers::Pool& p);
+
+        private:
+                //
+                //  prevent copy and assignment
+                WriterAppender(const WriterAppender&);
+                WriterAppender& operator=(const WriterAppender&);
+        };
+
+        LOG4CXX_PTR_DEF(WriterAppender);
+
+}  //namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning ( pop )
+#endif
+
+#endif //_LOG4CXX_WRITER_APPENDER_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/xml/domconfigurator.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/xml/domconfigurator.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/xml/domconfigurator.h	(revision 257)
@@ -0,0 +1,316 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_XML_DOM_CONFIGURATOR_H
+#define _LOG4CXX_XML_DOM_CONFIGURATOR_H
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning ( disable: 4231 4251 4275 4786 )
+#endif
+
+
+
+#include <log4cxx/logstring.h>
+#include <map>
+#include <log4cxx/appender.h>
+#include <log4cxx/layout.h>
+#include <log4cxx/logger.h>
+#include <log4cxx/helpers/properties.h>
+#include <log4cxx/spi/configurator.h>
+#include <log4cxx/helpers/charsetdecoder.h>
+#include <log4cxx/spi/filter.h>
+#include <log4cxx/rolling/triggeringpolicy.h>
+#include <log4cxx/rolling/rollingpolicy.h>
+#include <log4cxx/file.h>
+#include <log4cxx/config/propertysetter.h>
+
+extern "C" {
+   struct apr_xml_doc;
+   struct apr_xml_elem;
+}
+
+namespace log4cxx
+{
+
+        namespace xml
+        {
+
+              /**
+              Use this class to initialize the log4cxx environment using a DOM tree.
+
+              <p>Sometimes it is useful to see how log4cxx is reading configuration
+              files. You can enable log4cxx internal logging by setting the
+              <code>debug</code> attribute in the
+              <code>log4cxx</code> element. As in
+              <pre>
+                      &lt;log4j:configuration <b>debug="true"</b> xmlns:log4j="http://jakarta.apache.org/log4j/">
+                      ...
+                      &lt;/log4j:configuration>
+              </pre>
+
+              <p>There are sample XML files included in the package.
+              */
+                class LOG4CXX_EXPORT DOMConfigurator :
+                        virtual public spi::Configurator,
+                        virtual public helpers::ObjectImpl
+                {
+                protected:
+                        typedef std::map<LogString, AppenderPtr> AppenderMap;
+                        /**
+                        Used internally to parse appenders by IDREF name.
+                        */
+                        AppenderPtr findAppenderByName(
+                                log4cxx::helpers::Pool& p,
+                                log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                                apr_xml_elem* elem,
+                                apr_xml_doc* doc,
+                                const LogString& appenderName,
+                                AppenderMap& appenders);
+
+                        /**
+                        Used internally to parse appenders by IDREF element.
+                        */
+                        AppenderPtr findAppenderByReference(
+                                log4cxx::helpers::Pool& p,
+                                log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                                apr_xml_elem* appenderRef,
+                                apr_xml_doc* doc,
+                                AppenderMap& appenders);
+
+                        /**
+                        Used internally to parse an appender element.
+                        */
+                        AppenderPtr parseAppender(
+                            log4cxx::helpers::Pool& p,
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* appenderElement,
+                            apr_xml_doc* doc,
+                            AppenderMap& appenders);
+
+                        /**
+                        Used internally to parse an {@link spi::ErrorHandler ErrorHandler } element.
+                        */
+                        void parseErrorHandler(
+                            log4cxx::helpers::Pool& p,
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* element, 
+                            AppenderPtr& appender,
+                            apr_xml_doc* doc,
+                            AppenderMap& appenders);
+
+                        /**
+                         Used internally to parse a filter element.
+                        */
+                        void parseFilters(
+                           log4cxx::helpers::Pool& p,
+                           log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                           apr_xml_elem* element,
+                           std::vector<log4cxx::spi::FilterPtr>& filters);
+
+                        /**
+                        Used internally to parse a logger element.
+                        */
+                        void parseLogger(
+                            log4cxx::helpers::Pool& p,
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* loggerElement,
+                            apr_xml_doc* doc,
+                            AppenderMap& appenders);
+
+                        /**
+                         Used internally to parse the logger factory element.
+                        */
+                        void parseLoggerFactory(
+                            log4cxx::helpers::Pool& p,
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* factoryElement);
+
+                        /**
+                         Used internally to parse the logger factory element.
+                        */
+                        log4cxx::helpers::ObjectPtr parseTriggeringPolicy(
+                            log4cxx::helpers::Pool& p,
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* factoryElement);
+
+                        /**
+                         Used internally to parse the logger factory element.
+                        */
+                        log4cxx::rolling::RollingPolicyPtr parseRollingPolicy(
+                            log4cxx::helpers::Pool& p,
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* factoryElement);
+
+                        /**
+                         Used internally to parse the root logger element.
+                        */
+                        void parseRoot(log4cxx::helpers::Pool& p, 
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* rootElement, apr_xml_doc* doc, AppenderMap& appenders);
+
+                        /**
+                         Used internally to parse the children of a logger element.
+                        */
+                        void parseChildrenOfLoggerElement(
+                                log4cxx::helpers::Pool& p,
+                                log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                                apr_xml_elem* catElement,
+                                LoggerPtr logger, bool isRoot,
+                                apr_xml_doc* doc,
+                                AppenderMap& appenders);
+
+                        /**
+                         Used internally to parse a layout element.
+                        */
+                        LayoutPtr parseLayout(
+                            log4cxx::helpers::Pool& p,
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* layout_element);
+
+                        /**
+                         Used internally to parse a level  element.
+                        */
+                        void parseLevel(
+                                log4cxx::helpers::Pool& p,
+                                log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                                apr_xml_elem* element,
+                                LoggerPtr logger, bool isRoot);
+
+                        void setParameter(
+                                log4cxx::helpers::Pool& p,
+                                log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                                apr_xml_elem* elem,
+                        log4cxx::config::PropertySetter& propSetter);
+
+                        /**
+                         Used internally to configure the log4cxx framework from
+                         an in-memory representation of an XML document.
+                        */
+                        void parse(
+                            log4cxx::helpers::Pool& p,
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem* element, 
+                            apr_xml_doc* doc,
+                            AppenderMap& appenders);
+
+                public:
+                        DOMConfigurator();
+
+                        DECLARE_LOG4CXX_OBJECT(DOMConfigurator)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(spi::Configurator)
+                        END_LOG4CXX_CAST_MAP()
+
+                        DOMConfigurator(log4cxx::helpers::Pool& p);
+
+                        void addRef() const;
+                        void releaseRef() const;
+
+                        /**
+                        A static version of #doConfigure.
+                        */
+                        static void configure(const std::string& filename);
+#if LOG4CXX_WCHAR_T_API
+                        static void configure(const std::wstring& filename);
+#endif
+#if LOG4CXX_UNICHAR_API
+                        static void configure(const std::basic_string<UniChar>& filename);
+#endif
+#if LOG4CXX_CFSTRING_API
+                        static void configure(const CFStringRef& filename);
+#endif
+                        /**
+                        Like #configureAndWatch(const std::string& configFilename, long delay)
+                        except that the default delay as defined by
+                        log4cxx::helpers::FileWatchdog#DEFAULT_DELAY is used.
+                        @param configFilename A log4j configuration file in XML format.
+                        */
+                        static void configureAndWatch(const std::string& configFilename);
+#if LOG4CXX_WCHAR_T_API
+                        static void configureAndWatch(const std::wstring& configFilename);
+#endif
+#if LOG4CXX_UNICHAR_API
+                        static void configureAndWatch(const std::basic_string<UniChar>& configFilename);
+#endif
+#if LOG4CXX_CFSTRING_API
+                        static void configureAndWatch(const CFStringRef& configFilename);
+#endif
+                        /**
+                        Read the configuration file <code>configFilename</code> if it
+                        exists. Moreover, a thread will be created that will periodically
+                        check if <code>configFilename</code> has been created or
+                        modified. The period is determined by the <code>delay</code>
+                        argument. If a change or file creation is detected, then
+                        <code>configFilename</code> is read to configure log4cxx.
+
+                        @param configFilename A log4j configuration file in XML format.
+                        @param delay The delay in milliseconds to wait between each check.
+                        */
+                        static void configureAndWatch(const std::string& configFilename,
+                                long delay);
+#if LOG4CXX_WCHAR_T_API
+                        static void configureAndWatch(const std::wstring& configFilename,
+                                long delay);
+#endif
+#if LOG4CXX_UNICHAR_API
+                        static void configureAndWatch(const std::basic_string<UniChar>& configFilename,
+                                long delay);
+#endif
+#if LOG4CXX_CFSTRING_API
+                        static void configureAndWatch(const CFStringRef& configFilename,
+                                long delay);
+#endif
+
+                        /**
+                        Interpret the XML file pointed by <code>filename</code> and set up
+                        log4cxx accordingly.
+                        <p>The configuration is done relative to the hierarchy parameter.
+                        @param filename The file to parse.
+                        @param repository The hierarchy to operation upon.
+                        */
+                        void doConfigure(const File& filename,
+                                spi::LoggerRepositoryPtr& repository);
+
+                protected:
+                        static LogString getAttribute(
+                            log4cxx::helpers::CharsetDecoderPtr& utf8Decoder,
+                            apr_xml_elem*, 
+                            const std::string& attrName);
+
+                        LogString subst(const LogString& value);
+
+                protected:
+                        helpers::Properties props;
+                        spi::LoggerRepositoryPtr repository;
+                        spi::LoggerFactoryPtr loggerFactory;
+
+                 private:
+                        //   prevent assignment or copy statements
+                        DOMConfigurator(const DOMConfigurator&);
+                        DOMConfigurator& operator=(const DOMConfigurator&);
+
+                };
+            LOG4CXX_PTR_DEF(DOMConfigurator);
+        }  // namespace xml
+} // namespace log4cxx
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+#endif // _LOG4CXX_XML_DOM_CONFIGURATOR_H
Index: tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/xml/xmllayout.h
===================================================================
--- tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/xml/xmllayout.h	(revision 257)
+++ tags/0.0.2/3rd/apache-log4cxx/include/log4cxx/xml/xmllayout.h	(revision 257)
@@ -0,0 +1,138 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _LOG4CXX_XML_LAYOUT_H
+#define _LOG4CXX_XML_LAYOUT_H
+
+#include <log4cxx/layout.h>
+
+namespace log4cxx
+{
+        namespace xml
+        {
+
+                /**
+                The output of the XMLLayout consists of a series of log4j:event
+                elements. It does not output a
+                 complete well-formed XML file. The output is designed to be
+                included as an <em>external entity</em> in a separate file to form
+                a correct XML file.
+
+                <p>For example, if <code>abc</code> is the name of the file where
+                the XMLLayout ouput goes, then a well-formed XML file would be:
+
+                <code>
+                <?xml version="1.0" ?>
+
+                <!DOCTYPE log4j:eventSet [<!ENTITY data SYSTEM "abc">]>
+
+                <log4j:eventSet version="1.2" xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+                        @&data;
+
+                </log4j:eventSet>
+                </code>
+
+                <p>This approach enforces the independence of the XMLLayout and the
+                appender where it is embedded.
+                */
+                class LOG4CXX_EXPORT XMLLayout : public Layout
+                {
+                private:
+
+                        // Print no location info by default
+                        bool locationInfo; //= false
+                        bool properties; // = false
+
+                public:
+                        DECLARE_LOG4CXX_OBJECT(XMLLayout)
+                        BEGIN_LOG4CXX_CAST_MAP()
+                                LOG4CXX_CAST_ENTRY(XMLLayout)
+                                LOG4CXX_CAST_ENTRY_CHAIN(Layout)
+                        END_LOG4CXX_CAST_MAP()
+
+                        XMLLayout();
+
+                        /**
+                        The <b>LocationInfo</b> option takes a boolean value. By
+                        default, it is set to false which means there will be no location
+                        information output by this layout. If the the option is set to
+                        true, then the file name and line number of the statement
+                        at the origin of the log statement will be output.
+
+                        <p>If you are embedding this layout within a SMTPAppender
+                        then make sure to set the
+                        <b>LocationInfo</b> option of that appender as well.
+                        */
+                        inline void setLocationInfo(bool locationInfo1)
+                                { this->locationInfo = locationInfo1; }
+
+                                /**
+                        Returns the current value of the <b>LocationInfo</b> option.
+                        */
+                        inline bool getLocationInfo() const
+                                { return locationInfo; }
+                                
+                        /**
+                         * Sets whether MDC key-value pairs should be output, default false.
+                         * @param flag new value.
+                         * 
+                        */
+                        inline void setProperties(bool flag) {
+                            properties = flag;
+                        }
+
+                        /**
+                        * Gets whether MDC key-value pairs should be output.
+                        * @return true if MDC key-value pairs are output.
+                        * 
+                        */
+                        inline bool getProperties() {
+                            return properties;
+                        }
+                              
+
+                        /** No options to activate. */
+                        void activateOptions(log4cxx::helpers::Pool& /* p */) { }
+
+                        /**
+                        Set options
+                        */
+                        virtual void setOption(const LogString& option,
+                                const LogString& value);
+
+                        /**
+                        * Formats a {@link spi::LoggingEvent LoggingEvent}
+                        * in conformance with the log4cxx.dtd.
+                        **/
+                        virtual void format(LogString& output,
+                           const spi::LoggingEventPtr& event,
+                           log4cxx::helpers::Pool& p) const;
+
+                        /**
+                        The XMLLayout prints and does not ignore exceptions. Hence the
+                        return value <code>false</code>.
+                        */
+                        virtual bool ignoresThrowable() const
+                                { return false; }
+
+                };  // class XMLLayout
+            LOG4CXX_PTR_DEF(XMLLayout);
+        }  // namespace xml
+} // namespace log4cxx
+
+#endif // _LOG4CXX_XML_LAYOUT_H
Index: tags/0.0.2/CMakeLists.txt
===================================================================
--- tags/0.0.2/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/CMakeLists.txt	(revision 257)
@@ -0,0 +1,126 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+project(Pacpus)
+cmake_minimum_required(VERSION 2.8)
+
+# ========================================
+# Pacpus version
+# ========================================
+set(PACPUS_MAJOR_VERSION 0)
+set(PACPUS_MINOR_VERSION 0)
+set(PACPUS_PATCH_VERSION 2)
+set(PACPUS_VERSION
+    "${PACPUS_MAJOR_VERSION}.${PACPUS_MINOR_VERSION}.${PACPUS_PATCH_VERSION}")
+
+# ========================================
+# CMake variables
+# ========================================
+set(IS_BUILDING_PACPUS      TRUE)
+set(PACPUS_ROOT_DIR         ${CMAKE_SOURCE_DIR})
+set(PACPUS_3RD_PARTY_DIR    ${PACPUS_ROOT_DIR}/3rd)
+set(PACPUS_CMAKE_DIR        ${PACPUS_ROOT_DIR}/cmake)
+set(PACPUS_DOC_DIR          ${PACPUS_ROOT_DIR}/doc)
+set(PACPUS_INCLUDE_DIR      ${PACPUS_ROOT_DIR}/include/)
+set(PACPUS_SCRIPTS_DIR      ${PACPUS_ROOT_DIR}/scripts)
+set(PACPUS_SOURCE_DIR       ${PACPUS_ROOT_DIR}/src)
+
+# ========================================
+# Configure CMake
+# ========================================
+list(APPEND CMAKE_MODULE_PATH ${PACPUS_CMAKE_DIR})
+
+# ========================================
+# Import some functions
+# ========================================
+include(${PACPUS_CMAKE_DIR}/PacpusUtilities.cmake)
+
+# ========================================
+# Configure Pacpus
+# ========================================
+include(${PACPUS_CMAKE_DIR}/PacpusConfiguration.cmake)
+
+# ========================================
+# Find dependencies
+# ========================================
+include(${PACPUS_CMAKE_DIR}/PacpusDependencies.cmake)
+
+# ========================================
+# Handle platform specific behaviors
+# ========================================
+include(${PACPUS_CMAKE_DIR}/PacpusPlatforms.cmake)
+
+# ========================================
+# Pre-configuration of the compiler
+# ========================================
+# Includes directories
+include_directories(
+  ${PACPUS_DEPENDENCIES_INC}
+  ${PACPUS_INCLUDE_DIR}
+)
+# Compiler flags coming from PacpusDependencies and PacpusPlatforms
+add_definitions(${PACPUS_DEFINITIONS})
+
+# ========================================
+# Build the Pacpus' modules
+# ========================================
+add_subdirectory(${PACPUS_SOURCE_DIR})
+
+# ========================================
+# Build the documentation if enabled
+# ========================================
+if(PACPUS_BUILD_DOC)
+    add_subdirectory(${PACPUS_DOC_DIR})
+endif()
+
+# ========================================
+# Pacpus Installation
+# ========================================
+include(${PACPUS_CMAKE_DIR}/PacpusInstall.cmake)
+set( ENV{PACPUS_ROOT} ${PACPUS_INSTALL_DIR} )
+
+# ========================================
+# Summary
+# ========================================
+pacpus_info("")
+pacpus_info("=====================================================================")
+pacpus_info("Configuration for Pacpus ${PACPUS_VERSION}")
+pacpus_info("=====================================================================")
+pacpus_info("")
+pacpus_info("  Platform:")
+pacpus_info("    Host:" ${CMAKE_HOST_SYSTEM_NAME} ${CMAKE_HOST_SYSTEM_VERSION} ${CMAKE_HOST_SYSTEM_PROCESSOR})
+if(CMAKE_CROSS_COMPILING)
+    pacpus_info("    Target:" ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_VERSION} ${CMAKE_SYSTEM_PROCESSOR})
+endif()
+pacpus_info("    CMake:" ${CMAKE_VERSION})
+pacpus_info("    CMake generator:" ${CMAKE_GENERATOR})
+pacpus_info("    CMake build tool:" ${CMAKE_BUILD_TOOL})
+if(MSVC)
+    pacpus_info("    MSVC:" ${MSVC_VERSION})
+else()
+    pacpus_info("    Configuration:" ${CMAKE_BUILD_TYPE})
+endif()
+pacpus_info("")
+pacpus_info("  Compiler:")
+pacpus_info("    C++ Compiler:" ${CMAKE_CXX_COMPILER})
+pacpus_info("    C++ flags (release):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE})
+pacpus_info("    C++ flags (debug):" ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG})
+pacpus_info("")
+pacpus_info("  Result:")
+pacpus_info("    Install directory:" ${PACPUS_INSTALL_DIR})
+pacpus_info("    Install with version number:" ${PACPUS_INSTALL_WITH_VERSION_NUMBER})
+pacpus_info("")
+pacpus_info("  Options:")
+pacpus_info("    Logging enabled:" ${PACPUS_USE_LOG})
+pacpus_info("    Installation of 3rd party:" ${PACPUS_INSTALL_3RD})
+pacpus_info("    Documentation enabled:" ${PACPUS_BUILD_DOC})
+pacpus_info("")
+if("${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_BINARY_DIR}")
+    message(WARNING "The source directory is the same as build directory. \"make clean\" may damage the source tree")
+endif()
Index: tags/0.0.2/CODING_STYLE.txt
===================================================================
--- tags/0.0.2/CODING_STYLE.txt	(revision 257)
+++ tags/0.0.2/CODING_STYLE.txt	(revision 257)
@@ -0,0 +1,127 @@
+For the aspects not explained in this document, follow the coding style described in:
+    http://llvm.org/docs/CodingStandards.html
+
+== #include Style ==
+* Avoid #includes in the header files. Use forward declarations if possible.
+* Immediately after the header file comment (and include guards if working on a header file), the minimal list of #includes required by the file should be listed. We prefer these #includes to be listed in this order:
+    1) Main Module Header
+    2) Local/Private Headers
+    3) <Pacpus/...>
+    4) System #includes
+* do not use 'using ...;' in header files
+
+== Mechanical Source Issues ==
+* use standard header-guard:
+    #ifndef PACPUS_EXAMPLE_H
+    #define PACPUS_EXAMPLE_H
+    ...
+    #endif // PACPUS_EXAMPLE_H
+* use C++-style comments (//)
+* ALWAYS use curly brackets with statements if, for, etc.
+* use curly brackets {} as follows:
+    * on the same line with:
+        - namespace {
+        - statements if, for, etc.
+            if (cond) {
+            } else if (cond2) {
+            } else {
+            }
+    * on the next line with:
+        - classes
+        - function and method definitions
+        - local scope blocks
+            class A
+            {
+                void fun A;
+                
+                struct AB
+                {
+                };
+                
+                void fun A
+                {
+                }
+            };
+* write Doxygen-style comments as much as possible, put it in the header file if possible, add developer-only comments in source file
+* use Java-style Doxygen comments, i.e. @returns over \returns
+* use preprocessor directives for long-range comments (#if 0 .... #endif)
+* indent with 4 spaces, do not use tabs
+* do not indent namespaces
+* use camelCaseNotation / CamelCaseNotation
+* end namespace with its name in a comment 
+* start with a lowercase letter for local variables, namespaces, function names, method names, ...
+* start with an Uppercase for classes, structs, ...
+* prefix member variables with 'm'
+* prefix (static) const variables with 'k'
+* prefix static (non-const) variables with 's'
+* separate member methods from member variables with a repetion of 'protected:' / 'private:'
+
+========================================
+Example.h:
+========================================
+/// File description
+
+#ifndef PACPUS_EXAMPLE_H
+#define PACPUS_EXAMPLE_H
+
+#include "BaseClass.h"
+
+namespace pacpus {
+/// Constant description
+static const double kConstA;
+/// Static variable description
+static int sStaticA;
+
+/// Brief description of this class
+///
+/// Somewhat longer description of this class
+class SomeClass
+    : public BaseClass
+{
+public:
+    SomeClass
+
+private:
+    void methodA();
+
+private:
+    int mMemberA;
+};
+
+} // namespace pacpus
+
+#endif // PACPUS_EXAMPLE_H
+
+========================================
+Example.cpp:
+========================================
+#include "Example.h"
+
+#include "Something.h"
+#include "SomethingElse.h"
+
+#include <Pacpus/kernel/DbiteFile.h>
+
+#include <iostream>
+
+using namespace pacpus;
+
+const double kConstA = 3.14159265;
+
+SomeClass::SomeClass()
+    : BaseClass()
+{
+    int someIntegerVariable;
+    
+    if (a) {
+        a();
+    } else {
+        b();
+    }
+    
+    if (isConditionSatisfied()) {
+        doSomething();
+        return 0;
+    }
+    return 1;
+}
Index: tags/0.0.2/DEPENDENCIES.txt
===================================================================
--- tags/0.0.2/DEPENDENCIES.txt	(revision 257)
+++ tags/0.0.2/DEPENDENCIES.txt	(revision 257)
@@ -0,0 +1,21 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+========================================
+3rd party libraries:
+========================================
+Apache log4cxx 0.10.0 (patched for MSVC)
+Boost 1.49 (include-only headers)
+Qt 4.8.4 (pass to Qt 5.0.0)
+
+========================================
+Tools:
+========================================
+CMake >= 2.8.10
+Doxygen (for the documentation)
Index: tags/0.0.2/LICENCE-fr.txt
===================================================================
--- tags/0.0.2/LICENCE-fr.txt	(revision 257)
+++ tags/0.0.2/LICENCE-fr.txt	(revision 257)
@@ -0,0 +1,529 @@
+
+Le framework de développement UTC/CNRS Heudiasyc Pacpus est distribué 
+sous les termes de la licence CECILL-C version 1.0.
+
+Copyright (c) UTC/CNRS Heudiasyc 2005 - 2012. All rights reserved.
+
+
+
+CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL-C
+
+
+    Avertissement
+
+Ce contrat est une licence de logiciel libre issue d'une concertation
+entre ses auteurs afin que le respect de deux grands principes préside à
+sa rédaction:
+
+    * d'une part, le respect des principes de diffusion des logiciels
+      libres: accès au code source, droits étendus conférés aux
+      utilisateurs,
+    * d'autre part, la désignation d'un droit applicable, le droit
+      français, auquel elle est conforme, tant au regard du droit de la
+      responsabilité civile que du droit de la propriété intellectuelle
+      et de la protection qu'il offre aux auteurs et titulaires des
+      droits patrimoniaux sur un logiciel.
+
+Les auteurs de la licence CeCILL-C (pour Ce[a] C[nrs] I[nria] L[ogiciel]
+L[ibre]) sont:
+
+Commissariat à l'Energie Atomique - CEA, établissement public de
+recherche à caractère scientifique, technique et industriel, dont le
+siège est situé 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris.
+
+Centre National de la Recherche Scientifique - CNRS, établissement
+public à caractère scientifique et technologique, dont le siège est
+situé 3 rue Michel-Ange, 75794 Paris cedex 16.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, établissement public à caractère scientifique et technologique,
+dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153
+Le Chesnay cedex.
+
+
+    Préambule
+
+Ce contrat est une licence de logiciel libre dont l'objectif est de
+conférer aux utilisateurs la liberté de modifier et de réutiliser le
+logiciel régi par cette licence.
+
+L'exercice de cette liberté est assorti d'une obligation de remettre à
+la disposition de la communauté les modifications apportées au code
+source du logiciel afin de contribuer à son évolution.
+
+L'accessibilité au code source et les droits de copie, de modification
+et de redistribution qui découlent de ce contrat ont pour contrepartie
+de n'offrir aux utilisateurs qu'une garantie limitée et de ne faire
+peser sur l'auteur du logiciel, le titulaire des droits patrimoniaux et
+les concédants successifs qu'une responsabilité restreinte.
+
+A cet égard l'attention de l'utilisateur est attirée sur les risques
+associés au chargement, à l'utilisation, à la modification et/ou au
+développement et à la reproduction du logiciel par l'utilisateur étant
+donné sa spécificité de logiciel libre, qui peut le rendre complexe à
+manipuler et qui le réserve donc à des développeurs ou des
+professionnels avertis possédant des connaissances informatiques
+approfondies. Les utilisateurs sont donc invités à charger et tester
+l'adéquation du logiciel à leurs besoins dans des conditions permettant
+d'assurer la sécurité de leurs systèmes et/ou de leurs données et, plus
+généralement, à l'utiliser et l'exploiter dans les mêmes conditions de
+sécurité. Ce contrat peut être reproduit et diffusé librement, sous
+réserve de le conserver en l'état, sans ajout ni suppression de clauses.
+
+Ce contrat est susceptible de s'appliquer à tout logiciel dont le
+titulaire des droits patrimoniaux décide de soumettre l'exploitation aux
+dispositions qu'il contient.
+
+
+    Article 1 - DEFINITIONS
+
+Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une
+lettre capitale, auront la signification suivante:
+
+Contrat: désigne le présent contrat de licence, ses éventuelles versions
+postérieures et annexes.
+
+Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code
+Source et le cas échéant sa documentation, dans leur état au moment de
+l'acceptation du Contrat par le Licencié.
+
+Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et
+éventuellement de Code Objet et le cas échéant sa documentation, dans
+leur état au moment de leur première diffusion sous les termes du Contrat.
+
+Logiciel Modifié: désigne le Logiciel modifié par au moins une
+Contribution Intégrée.
+
+Code Source: désigne l'ensemble des instructions et des lignes de
+programme du Logiciel et auquel l'accès est nécessaire en vue de
+modifier le Logiciel.
+
+Code Objet: désigne les fichiers binaires issus de la compilation du
+Code Source.
+
+Titulaire: désigne le ou les détenteurs des droits patrimoniaux d'auteur
+sur le Logiciel Initial.
+
+Licencié: désigne le ou les utilisateurs du Logiciel ayant accepté le
+Contrat.
+
+Contributeur: désigne le Licencié auteur d'au moins une Contribution
+Intégrée.
+
+Concédant: désigne le Titulaire ou toute personne physique ou morale
+distribuant le Logiciel sous le Contrat.
+
+Contribution Intégrée: désigne l'ensemble des modifications,
+corrections, traductions, adaptations et/ou nouvelles fonctionnalités
+intégrées dans le Code Source par tout Contributeur.
+
+Module Lié: désigne un ensemble de fichiers sources y compris leur
+documentation qui, sans modification du Code Source, permet de réaliser
+des fonctionnalités ou services supplémentaires à ceux fournis par le
+Logiciel.
+
+Logiciel Dérivé: désigne toute combinaison du Logiciel, modifié ou non,
+et d'un Module Lié.
+
+Parties: désigne collectivement le Licencié et le Concédant.
+
+Ces termes s'entendent au singulier comme au pluriel.
+
+
+    Article 2 - OBJET
+
+Le Contrat a pour objet la concession par le Concédant au Licencié d'une
+licence non exclusive, cessible et mondiale du Logiciel telle que
+définie ci-après à l'article 5 pour toute la durée de protection des droits
+portant sur ce Logiciel.
+
+
+    Article 3 - ACCEPTATION
+
+3.1 L'acceptation par le Licencié des termes du Contrat est réputée
+acquise du fait du premier des faits suivants:
+
+    * (i) le chargement du Logiciel par tout moyen notamment par
+      téléchargement à partir d'un serveur distant ou par chargement à
+      partir d'un support physique;
+    * (ii) le premier exercice par le Licencié de l'un quelconque des
+      droits concédés par le Contrat.
+
+3.2 Un exemplaire du Contrat, contenant notamment un avertissement
+relatif aux spécificités du Logiciel, à la restriction de garantie et à
+la limitation à un usage par des utilisateurs expérimentés a été mis à
+disposition du Licencié préalablement à son acceptation telle que
+définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris
+connaissance.
+
+
+    Article 4 - ENTREE EN VIGUEUR ET DUREE
+
+
+      4.1 ENTREE EN VIGUEUR
+
+Le Contrat entre en vigueur à la date de son acceptation par le Licencié
+telle que définie en 3.1.
+
+
+      4.2 DUREE
+
+Le Contrat produira ses effets pendant toute la durée légale de
+protection des droits patrimoniaux portant sur le Logiciel.
+
+
+    Article 5 - ETENDUE DES DROITS CONCEDES
+
+Le Concédant concède au Licencié, qui accepte, les droits suivants sur
+le Logiciel pour toutes destinations et pour la durée du Contrat dans
+les conditions ci-après détaillées.
+
+Par ailleurs, si le Concédant détient ou venait à détenir un ou
+plusieurs brevets d'invention protégeant tout ou partie des
+fonctionnalités du Logiciel ou de ses composants, il s'engage à ne pas
+opposer les éventuels droits conférés par ces brevets aux Licenciés
+successifs qui utiliseraient, exploiteraient ou modifieraient le
+Logiciel. En cas de cession de ces brevets, le Concédant s'engage à
+faire reprendre les obligations du présent alinéa aux cessionnaires.
+
+
+      5.1 DROIT D'UTILISATION
+
+Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant
+aux domaines d'application, étant ci-après précisé que cela comporte:
+
+   1. la reproduction permanente ou provisoire du Logiciel en tout ou
+      partie par tout moyen et sous toute forme.
+
+   2. le chargement, l'affichage, l'exécution, ou le stockage du
+      Logiciel sur tout support.
+
+   3. la possibilité d'en observer, d'en étudier, ou d'en tester le
+      fonctionnement afin de déterminer les idées et principes qui sont
+      à la base de n'importe quel élément de ce Logiciel; et ceci,
+      lorsque le Licencié effectue toute opération de chargement,
+      d'affichage, d'exécution, de transmission ou de stockage du
+      Logiciel qu'il est en droit d'effectuer en vertu du Contrat.
+
+
+      5.2 DROIT DE MODIFICATION
+
+Le droit de modification comporte le droit de traduire, d'adapter,
+d'arranger ou d'apporter toute autre modification au Logiciel et le
+droit de reproduire le logiciel en résultant. Il comprend en particulier
+le droit de créer un Logiciel Dérivé.
+
+Le Licencié est autorisé à apporter toute modification au Logiciel sous
+réserve de mentionner, de façon explicite, son nom en tant qu'auteur de
+cette modification et la date de création de celle-ci.
+
+
+      5.3 DROIT DE DISTRIBUTION
+
+Le droit de distribution comporte notamment le droit de diffuser, de
+transmettre et de communiquer le Logiciel au public sur tout support et
+par tout moyen ainsi que le droit de mettre sur le marché à titre
+onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé.
+
+Le Licencié est autorisé à distribuer des copies du Logiciel, modifié ou
+non, à des tiers dans les conditions ci-après détaillées.
+
+
+        5.3.1 DISTRIBUTION DU LOGICIEL SANS MODIFICATION
+
+Le Licencié est autorisé à distribuer des copies conformes du Logiciel,
+sous forme de Code Source ou de Code Objet, à condition que cette
+distribution respecte les dispositions du Contrat dans leur totalité et
+soit accompagnée:
+
+   1. d'un exemplaire du Contrat,
+
+   2. d'un avertissement relatif à la restriction de garantie et de
+      responsabilité du Concédant telle que prévue aux articles 8
+      et 9,
+
+et que, dans le cas où seul le Code Objet du Logiciel est redistribué,
+le Licencié permette un accès effectif au Code Source complet du
+Logiciel pendant au moins toute la durée de sa distribution du Logiciel,
+étant entendu que le coût additionnel d'acquisition du Code Source ne
+devra pas excéder le simple coût de transfert des données.
+
+
+        5.3.2 DISTRIBUTION DU LOGICIEL MODIFIE
+
+Lorsque le Licencié apporte une Contribution Intégrée au Logiciel, les
+conditions de distribution du Logiciel Modifié en résultant sont alors
+soumises à l'intégralité des dispositions du Contrat.
+
+Le Licencié est autorisé à distribuer le Logiciel Modifié sous forme de
+code source ou de code objet, à condition que cette distribution
+respecte les dispositions du Contrat dans leur totalité et soit
+accompagnée:
+
+   1. d'un exemplaire du Contrat,
+
+   2. d'un avertissement relatif à la restriction de garantie et de
+      responsabilité du Concédant telle que prévue aux articles 8
+      et 9,
+
+et que, dans le cas où seul le code objet du Logiciel Modifié est
+redistribué, le Licencié permette un accès effectif à son code source
+complet pendant au moins toute la durée de sa distribution du Logiciel
+Modifié, étant entendu que le coût additionnel d'acquisition du code
+source ne devra pas excéder le simple coût de transfert des données.
+
+
+        5.3.3 DISTRIBUTION DU LOGICIEL DERIVE
+
+Lorsque le Licencié crée un Logiciel Dérivé, ce Logiciel Dérivé peut
+être distribué sous un contrat de licence autre que le présent Contrat à
+condition de respecter les obligations de mention des droits sur le
+Logiciel telles que définies à l'article 6.4. Dans le cas où la création du
+Logiciel Dérivé a nécessité une modification du Code Source le licencié
+s'engage à ce que: 
+
+   1. le Logiciel Modifié correspondant à cette modification soit régi
+      par le présent Contrat,
+   2. les Contributions Intégrées dont le Logiciel Modifié résulte
+      soient clairement identifiées et documentées,
+   3. le Licencié permette un accès effectif au code source du Logiciel
+      Modifié, pendant au moins toute la durée de la distribution du
+      Logiciel Dérivé, de telle sorte que ces modifications puissent
+      être reprises dans une version ultérieure du Logiciel, étant
+      entendu que le coût additionnel d'acquisition du code source du
+      Logiciel Modifié ne devra pas excéder le simple coût du transfert
+      des données.
+
+
+        5.3.4 COMPATIBILITE AVEC LA LICENCE CeCILL
+
+Lorsqu'un Logiciel Modifié contient une Contribution Intégrée soumise au
+contrat de licence CeCILL, ou lorsqu'un Logiciel Dérivé contient un
+Module Lié soumis au contrat de licence CeCILL, les stipulations prévues
+au troisième item de l'article 6.4 sont facultatives.
+
+
+    Article 6 - PROPRIETE INTELLECTUELLE
+
+
+      6.1 SUR LE LOGICIEL INITIAL
+
+Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel
+Initial. Toute utilisation du Logiciel Initial est soumise au respect
+des conditions dans lesquelles le Titulaire a choisi de diffuser son
+oeuvre et nul autre n'a la faculté de modifier les conditions de
+diffusion de ce Logiciel Initial.
+
+Le Titulaire s'engage à ce que le Logiciel Initial reste au moins régi
+par le Contrat et ce, pour la durée visée à l'article 4.2.
+
+
+      6.2 SUR LES CONTRIBUTIONS INTEGREES
+
+Le Licencié qui a développé une Contribution Intégrée est titulaire sur
+celle-ci des droits de propriété intellectuelle dans les conditions
+définies par la législation applicable.
+
+
+      6.3 SUR LES MODULES LIES
+
+Le Licencié qui a développé un Module Lié est titulaire sur celui-ci des
+droits de propriété intellectuelle dans les conditions définies par la
+législation applicable et reste libre du choix du contrat régissant sa
+diffusion dans les conditions définies à l'article 5.3.3.
+
+
+      6.4 MENTIONS DES DROITS
+
+Le Licencié s'engage expressément:
+
+   1. à ne pas supprimer ou modifier de quelque manière que ce soit les
+      mentions de propriété intellectuelle apposées sur le Logiciel;
+
+   2. à reproduire à l'identique lesdites mentions de propriété
+      intellectuelle sur les copies du Logiciel modifié ou non;
+
+   3. à faire en sorte que l'utilisation du Logiciel, ses mentions de
+      propriété intellectuelle et le fait qu'il est régi par le Contrat
+      soient indiqués dans un texte facilement accessible notamment
+      depuis l'interface de tout Logiciel Dérivé.
+
+Le Licencié s'engage à ne pas porter atteinte, directement ou
+indirectement, aux droits de propriété intellectuelle du Titulaire et/ou
+des Contributeurs sur le Logiciel et à prendre, le cas échéant, à
+l'égard de son personnel toutes les mesures nécessaires pour assurer le
+respect des dits droits de propriété intellectuelle du Titulaire et/ou
+des Contributeurs.
+
+
+    Article 7 - SERVICES ASSOCIES
+
+7.1 Le Contrat n'oblige en aucun cas le Concédant à la réalisation de
+prestations d'assistance technique ou de maintenance du Logiciel.
+
+Cependant le Concédant reste libre de proposer ce type de services. Les
+termes et conditions d'une telle assistance technique et/ou d'une telle
+maintenance seront alors déterminés dans un acte séparé. Ces actes de
+maintenance et/ou assistance technique n'engageront que la seule
+responsabilité du Concédant qui les propose.
+
+7.2 De même, tout Concédant est libre de proposer, sous sa seule
+responsabilité, à ses licenciés une garantie, qui n'engagera que lui,
+lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce,
+dans les conditions qu'il souhaite. Cette garantie et les modalités
+financières de son application feront l'objet d'un acte séparé entre le
+Concédant et le Licencié.
+
+
+    Article 8 - RESPONSABILITE
+
+8.1 Sous réserve des dispositions de l'article 8.2, le Licencié a la 
+faculté, sous réserve de prouver la faute du Concédant concerné, de
+solliciter la réparation du préjudice direct qu'il subirait du fait du
+Logiciel et dont il apportera la preuve.
+
+8.2 La responsabilité du Concédant est limitée aux engagements pris en
+application du Contrat et ne saurait être engagée en raison notamment:
+(i) des dommages dus à l'inexécution, totale ou partielle, de ses
+obligations par le Licencié, (ii) des dommages directs ou indirects
+découlant de l'utilisation ou des performances du Logiciel subis par le
+Licencié et (iii) plus généralement d'un quelconque dommage indirect. En
+particulier, les Parties conviennent expressément que tout préjudice
+financier ou commercial (par exemple perte de données, perte de
+bénéfices, perte d'exploitation, perte de clientèle ou de commandes,
+manque à gagner, trouble commercial quelconque) ou toute action dirigée
+contre le Licencié par un tiers, constitue un dommage indirect et
+n'ouvre pas droit à réparation par le Concédant.
+
+
+    Article 9 - GARANTIE
+
+9.1 Le Licencié reconnaît que l'état actuel des connaissances
+scientifiques et techniques au moment de la mise en circulation du
+Logiciel ne permet pas d'en tester et d'en vérifier toutes les
+utilisations ni de détecter l'existence d'éventuels défauts. L'attention
+du Licencié a été attirée sur ce point sur les risques associés au
+chargement, à l'utilisation, la modification et/ou au développement et à
+la reproduction du Logiciel qui sont réservés à des utilisateurs avertis.
+
+Il relève de la responsabilité du Licencié de contrôler, par tous
+moyens, l'adéquation du produit à ses besoins, son bon fonctionnement et
+de s'assurer qu'il ne causera pas de dommages aux personnes et aux biens.
+
+9.2 Le Concédant déclare de bonne foi être en droit de concéder
+l'ensemble des droits attachés au Logiciel (comprenant notamment les
+droits visés à l'article 5).
+
+9.3 Le Licencié reconnaît que le Logiciel est fourni "en l'état" par le
+Concédant sans autre garantie, expresse ou tacite, que celle prévue à
+l'article 9.2 et notamment sans aucune garantie sur sa valeur commerciale,
+son caractère sécurisé, innovant ou pertinent.
+
+En particulier, le Concédant ne garantit pas que le Logiciel est exempt
+d'erreur, qu'il fonctionnera sans interruption, qu'il sera compatible
+avec l'équipement du Licencié et sa configuration logicielle ni qu'il
+remplira les besoins du Licencié.
+
+9.4 Le Concédant ne garantit pas, de manière expresse ou tacite, que le
+Logiciel ne porte pas atteinte à un quelconque droit de propriété
+intellectuelle d'un tiers portant sur un brevet, un logiciel ou sur tout
+autre droit de propriété. Ainsi, le Concédant exclut toute garantie au
+profit du Licencié contre les actions en contrefaçon qui pourraient être
+diligentées au titre de l'utilisation, de la modification, et de la
+redistribution du Logiciel. Néanmoins, si de telles actions sont
+exercées contre le Licencié, le Concédant lui apportera son aide
+technique et juridique pour sa défense. Cette aide technique et
+juridique est déterminée au cas par cas entre le Concédant concerné et
+le Licencié dans le cadre d'un protocole d'accord. Le Concédant dégage
+toute responsabilité quant à l'utilisation de la dénomination du
+Logiciel par le Licencié. Aucune garantie n'est apportée quant à
+l'existence de droits antérieurs sur le nom du Logiciel et sur
+l'existence d'une marque.
+
+
+    Article 10 - RESILIATION
+
+10.1 En cas de manquement par le Licencié aux obligations mises à sa
+charge par le Contrat, le Concédant pourra résilier de plein droit le
+Contrat trente (30) jours après notification adressée au Licencié et
+restée sans effet.
+
+10.2 Le Licencié dont le Contrat est résilié n'est plus autorisé à
+utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les
+licences qu'il aura concédées antérieurement à la résiliation du Contrat
+resteront valides sous réserve qu'elles aient été effectuées en
+conformité avec le Contrat.
+
+
+    Article 11 - DISPOSITIONS DIVERSES
+
+
+      11.1 CAUSE EXTERIEURE
+
+Aucune des Parties ne sera responsable d'un retard ou d'une défaillance
+d'exécution du Contrat qui serait dû à un cas de force majeure, un cas
+fortuit ou une cause extérieure, telle que, notamment, le mauvais
+fonctionnement ou les interruptions du réseau électrique ou de
+télécommunication, la paralysie du réseau liée à une attaque
+informatique, l'intervention des autorités gouvernementales, les
+catastrophes naturelles, les dégâts des eaux, les tremblements de terre,
+le feu, les explosions, les grèves et les conflits sociaux, l'état de
+guerre...
+
+11.2 Le fait, par l'une ou l'autre des Parties, d'omettre en une ou
+plusieurs occasions de se prévaloir d'une ou plusieurs dispositions du
+Contrat, ne pourra en aucun cas impliquer renonciation par la Partie
+intéressée à s'en prévaloir ultérieurement.
+
+11.3 Le Contrat annule et remplace toute convention antérieure, écrite
+ou orale, entre les Parties sur le même objet et constitue l'accord
+entier entre les Parties sur cet objet. Aucune addition ou modification
+aux termes du Contrat n'aura d'effet à l'égard des Parties à moins
+d'être faite par écrit et signée par leurs représentants dûment habilités.
+
+11.4 Dans l'hypothèse où une ou plusieurs des dispositions du Contrat
+s'avèrerait contraire à une loi ou à un texte applicable, existants ou
+futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les
+amendements nécessaires pour se conformer à cette loi ou à ce texte.
+Toutes les autres dispositions resteront en vigueur. De même, la
+nullité, pour quelque raison que ce soit, d'une des dispositions du
+Contrat ne saurait entraîner la nullité de l'ensemble du Contrat.
+
+
+      11.5 LANGUE
+
+Le Contrat est rédigé en langue française et en langue anglaise, ces
+deux versions faisant également foi.
+
+
+    Article 12 - NOUVELLES VERSIONS DU CONTRAT
+
+12.1 Toute personne est autorisée à copier et distribuer des copies de
+ce Contrat.
+
+12.2 Afin d'en préserver la cohérence, le texte du Contrat est protégé
+et ne peut être modifié que par les auteurs de la licence, lesquels se
+réservent le droit de publier périodiquement des mises à jour ou de
+nouvelles versions du Contrat, qui posséderont chacune un numéro
+distinct. Ces versions ultérieures seront susceptibles de prendre en
+compte de nouvelles problématiques rencontrées par les logiciels libres.
+
+12.3 Tout Logiciel diffusé sous une version donnée du Contrat ne pourra
+faire l'objet d'une diffusion ultérieure que sous la même version du
+Contrat ou une version postérieure.
+
+
+    Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE
+
+13.1 Le Contrat est régi par la loi française. Les Parties conviennent
+de tenter de régler à l'amiable les différends ou litiges qui
+viendraient à se produire par suite ou à l'occasion du Contrat.
+
+13.2 A défaut d'accord amiable dans un délai de deux (2) mois à compter
+de leur survenance et sauf situation relevant d'une procédure d'urgence,
+les différends ou litiges seront portés par la Partie la plus diligente
+devant les Tribunaux compétents de Paris.
+
+
+Version 1.0 du 2006-09-05.
+
Index: tags/0.0.2/LICENSE-header.txt
===================================================================
--- tags/0.0.2/LICENSE-header.txt	(revision 257)
+++ tags/0.0.2/LICENSE-header.txt	(revision 257)
@@ -0,0 +1,2 @@
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.1.
Index: tags/0.0.2/LICENSE.txt
===================================================================
--- tags/0.0.2/LICENSE.txt	(revision 257)
+++ tags/0.0.2/LICENSE.txt	(revision 257)
@@ -0,0 +1,561 @@
+
+UTC/CNRS Heudiasyc Pacpus framework is distributed under the CECILL-C 
+License, Version 1.0.
+
+Copyright (c) UTC/CNRS Heudiasyc 2005 - 2012. All rights reserved.
+
+
+
+CeCILL-C FREE SOFTWARE LICENSE AGREEMENT
+
+
+    Notice
+
+This Agreement is a Free Software license agreement that is the result
+of discussions between its authors in order to ensure compliance with
+the two main principles guiding its drafting:
+
+    * firstly, compliance with the principles governing the distribution
+      of Free Software: access to source code, broad rights granted to
+      users,
+    * secondly, the election of a governing law, French law, with which
+      it is conformant, both as regards the law of torts and
+      intellectual property law, and the protection that it offers to
+      both authors and holders of the economic rights over software.
+
+The authors of the CeCILL-C (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
+license are:
+
+Commissariat à l'Energie Atomique - CEA, a public scientific, technical
+and industrial research establishment, having its principal place of
+business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.
+
+Centre National de la Recherche Scientifique - CNRS, a public scientific
+and technological establishment, having its principal place of business
+at 3 rue Michel-Ange, 75794 Paris cedex 16, France.
+
+Institut National de Recherche en Informatique et en Automatique -
+INRIA, a public scientific and technological establishment, having its
+principal place of business at Domaine de Voluceau, Rocquencourt, BP
+105, 78153 Le Chesnay cedex, France.
+
+
+    Preamble
+
+The purpose of this Free Software license agreement is to grant users
+the right to modify and re-use the software governed by this license.
+
+The exercising of this right is conditional upon the obligation to make
+available to the community the modifications made to the source code of
+the software so as to contribute to its evolution.
+
+In consideration of access to the source code and the rights to copy,
+modify and redistribute granted by the license, users are provided only
+with a limited warranty and the software's author, the holder of the
+economic rights, and the successive licensors only have limited liability.
+
+In this respect, the risks associated with loading, using, modifying
+and/or developing or reproducing the software by the user are brought to
+the user's attention, given its Free Software status, which may make it
+complicated to use, with the result that its use is reserved for
+developers and experienced professionals having in-depth computer
+knowledge. Users are therefore encouraged to load and test the
+suitability of the software as regards their requirements in conditions
+enabling the security of their systems and/or data to be ensured and,
+more generally, to use and operate it in the same conditions of
+security. This Agreement may be freely reproduced and published,
+provided it is not altered, and that no provisions are either added or
+removed herefrom.
+
+This Agreement may apply to any or all software for which the holder of
+the economic rights decides to submit the use thereof to its provisions.
+
+
+    Article 1 - DEFINITIONS
+
+For the purpose of this Agreement, when the following expressions
+commence with a capital letter, they shall have the following meaning:
+
+Agreement: means this license agreement, and its possible subsequent
+versions and annexes.
+
+Software: means the software in its Object Code and/or Source Code form
+and, where applicable, its documentation, "as is" when the Licensee
+accepts the Agreement.
+
+Initial Software: means the Software in its Source Code and possibly its
+Object Code form and, where applicable, its documentation, "as is" when
+it is first distributed under the terms and conditions of the Agreement.
+
+Modified Software: means the Software modified by at least one
+Integrated Contribution.
+
+Source Code: means all the Software's instructions and program lines to
+which access is required so as to modify the Software.
+
+Object Code: means the binary files originating from the compilation of
+the Source Code.
+
+Holder: means the holder(s) of the economic rights over the Initial
+Software.
+
+Licensee: means the Software user(s) having accepted the Agreement.
+
+Contributor: means a Licensee having made at least one Integrated
+Contribution.
+
+Licensor: means the Holder, or any other individual or legal entity, who
+distributes the Software under the Agreement.
+
+Integrated Contribution: means any or all modifications, corrections,
+translations, adaptations and/or new functions integrated into the
+Source Code by any or all Contributors.
+
+Related Module: means a set of sources files including their
+documentation that, without modification to the Source Code, enables
+supplementary functions or services in addition to those offered by the
+Software.
+
+Derivative Software: means any combination of the Software, modified or
+not, and of a Related Module.
+
+Parties: mean both the Licensee and the Licensor.
+
+These expressions may be used both in singular and plural form.
+
+
+    Article 2 - PURPOSE
+
+The purpose of the Agreement is the grant by the Licensor to the
+Licensee of a non-exclusive, transferable and worldwide license for the
+Software as set forth in Article 5 hereinafter for the whole term of the
+protection granted by the rights over said Software. 
+
+
+    Article 3 - ACCEPTANCE
+
+3.1 The Licensee shall be deemed as having accepted the terms and
+conditions of this Agreement upon the occurrence of the first of the
+following events:
+
+    * (i) loading the Software by any or all means, notably, by
+      downloading from a remote server, or by loading from a physical
+      medium;
+    * (ii) the first time the Licensee exercises any of the rights
+      granted hereunder.
+
+3.2 One copy of the Agreement, containing a notice relating to the
+characteristics of the Software, to the limited warranty, and to the
+fact that its use is restricted to experienced users has been provided
+to the Licensee prior to its acceptance as set forth in Article 3.1
+hereinabove, and the Licensee hereby acknowledges that it has read and
+understood it.
+
+
+    Article 4 - EFFECTIVE DATE AND TERM
+
+
+      4.1 EFFECTIVE DATE
+
+The Agreement shall become effective on the date when it is accepted by
+the Licensee as set forth in Article 3.1.
+
+
+      4.2 TERM
+
+The Agreement shall remain in force for the entire legal term of
+protection of the economic rights over the Software.
+
+
+    Article 5 - SCOPE OF RIGHTS GRANTED
+
+The Licensor hereby grants to the Licensee, who accepts, the following
+rights over the Software for any or all use, and for the term of the
+Agreement, on the basis of the terms and conditions set forth hereinafter.
+
+Besides, if the Licensor owns or comes to own one or more patents
+protecting all or part of the functions of the Software or of its
+components, the Licensor undertakes not to enforce the rights granted by
+these patents against successive Licensees using, exploiting or
+modifying the Software. If these patents are transferred, the Licensor
+undertakes to have the transferees subscribe to the obligations set
+forth in this paragraph.
+
+
+      5.1 RIGHT OF USE
+
+The Licensee is authorized to use the Software, without any limitation
+as to its fields of application, with it being hereinafter specified
+that this comprises:
+
+   1. permanent or temporary reproduction of all or part of the Software
+      by any or all means and in any or all form.
+
+   2. loading, displaying, running, or storing the Software on any or
+      all medium.
+
+   3. entitlement to observe, study or test its operation so as to
+      determine the ideas and principles behind any or all constituent
+      elements of said Software. This shall apply when the Licensee
+      carries out any or all loading, displaying, running, transmission
+      or storage operation as regards the Software, that it is entitled
+      to carry out hereunder.
+
+
+      5.2 RIGHT OF MODIFICATION
+
+The right of modification includes the right to translate, adapt,
+arrange, or make any or all modifications to the Software, and the right
+to reproduce the resulting software. It includes, in particular, the
+right to create a Derivative Software.
+
+The Licensee is authorized to make any or all modification to the
+Software provided that it includes an explicit notice that it is the
+author of said modification and indicates the date of the creation thereof.
+
+
+      5.3 RIGHT OF DISTRIBUTION
+
+In particular, the right of distribution includes the right to publish,
+transmit and communicate the Software to the general public on any or
+all medium, and by any or all means, and the right to market, either in
+consideration of a fee, or free of charge, one or more copies of the
+Software by any means.
+
+The Licensee is further authorized to distribute copies of the modified
+or unmodified Software to third parties according to the terms and
+conditions set forth hereinafter.
+
+
+        5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION
+
+The Licensee is authorized to distribute true copies of the Software in
+Source Code or Object Code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+   1. a copy of the Agreement,
+
+   2. a notice relating to the limitation of both the Licensor's
+      warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the Object Code of the Software is
+redistributed, the Licensee allows effective access to the full Source
+Code of the Software at a minimum during the entire period of its
+distribution of the Software, it being understood that the additional
+cost of acquiring the Source Code shall not exceed the cost of
+transferring the data.
+
+
+        5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE
+
+When the Licensee makes an Integrated Contribution to the Software, the
+terms and conditions for the distribution of the resulting Modified
+Software become subject to all the provisions of this Agreement.
+
+The Licensee is authorized to distribute the Modified Software, in
+source code or object code form, provided that said distribution
+complies with all the provisions of the Agreement and is accompanied by:
+
+   1. a copy of the Agreement,
+
+   2. a notice relating to the limitation of both the Licensor's
+      warranty and liability as set forth in Articles 8 and 9,
+
+and that, in the event that only the object code of the Modified
+Software is redistributed, the Licensee allows effective access to the
+full source code of the Modified Software at a minimum during the entire
+period of its distribution of the Modified Software, it being understood
+that the additional cost of acquiring the source code shall not exceed
+the cost of transferring the data.
+
+
+        5.3.3 DISTRIBUTION OF DERIVATIVE SOFTWARE
+
+When the Licensee creates Derivative Software, this Derivative Software
+may be distributed under a license agreement other than this Agreement,
+subject to compliance with the requirement to include a notice
+concerning the rights over the Software as defined in Article 6.4.
+In the event the creation of the Derivative Software required modification 
+of the Source Code, the Licensee undertakes that:
+
+   1. the resulting Modified Software will be governed by this Agreement,
+   2. the Integrated Contributions in the resulting Modified Software
+      will be clearly identified and documented,
+   3. the Licensee will allow effective access to the source code of the
+      Modified Software, at a minimum during the entire period of
+      distribution of the Derivative Software, such that such
+      modifications may be carried over in a subsequent version of the
+      Software; it being understood that the additional cost of
+      purchasing the source code of the Modified Software shall not
+      exceed the cost of transferring the data.
+
+
+        5.3.4 COMPATIBILITY WITH THE CeCILL LICENSE
+
+When a Modified Software contains an Integrated Contribution subject to
+the CeCILL license agreement, or when a Derivative Software contains a
+Related Module subject to the CeCILL license agreement, the provisions
+set forth in the third item of Article 6.4 are optional.
+
+
+    Article 6 - INTELLECTUAL PROPERTY
+
+
+      6.1 OVER THE INITIAL SOFTWARE
+
+The Holder owns the economic rights over the Initial Software. Any or
+all use of the Initial Software is subject to compliance with the terms
+and conditions under which the Holder has elected to distribute its work
+and no one shall be entitled to modify the terms and conditions for the
+distribution of said Initial Software.
+
+The Holder undertakes that the Initial Software will remain ruled at
+least by this Agreement, for the duration set forth in Article 4.2.
+
+
+      6.2 OVER THE INTEGRATED CONTRIBUTIONS
+
+The Licensee who develops an Integrated Contribution is the owner of the
+intellectual property rights over this Contribution as defined by
+applicable law.
+
+
+      6.3 OVER THE RELATED MODULES
+
+The Licensee who develops a Related Module is the owner of the
+intellectual property rights over this Related Module as defined by
+applicable law and is free to choose the type of agreement that shall
+govern its distribution under the conditions defined in Article 5.3.3.
+
+
+      6.4 NOTICE OF RIGHTS
+
+The Licensee expressly undertakes:
+
+   1. not to remove, or modify, in any manner, the intellectual property
+      notices attached to the Software;
+
+   2. to reproduce said notices, in an identical manner, in the copies
+      of the Software modified or not;
+
+   3. to ensure that use of the Software, its intellectual property
+      notices and the fact that it is governed by the Agreement is
+      indicated in a text that is easily accessible, specifically from
+      the interface of any Derivative Software.
+
+The Licensee undertakes not to directly or indirectly infringe the
+intellectual property rights of the Holder and/or Contributors on the
+Software and to take, where applicable, vis-à-vis its staff, any and all
+measures required to ensure respect of said intellectual property rights
+of the Holder and/or Contributors.
+
+
+    Article 7 - RELATED SERVICES
+
+7.1 Under no circumstances shall the Agreement oblige the Licensor to
+provide technical assistance or maintenance services for the Software.
+
+However, the Licensor is entitled to offer this type of services. The
+terms and conditions of such technical assistance, and/or such
+maintenance, shall be set forth in a separate instrument. Only the
+Licensor offering said maintenance and/or technical assistance services
+shall incur liability therefor.
+
+7.2 Similarly, any Licensor is entitled to offer to its licensees, under
+its sole responsibility, a warranty, that shall only be binding upon
+itself, for the redistribution of the Software and/or the Modified
+Software, under terms and conditions that it is free to decide. Said
+warranty, and the financial terms and conditions of its application,
+shall be subject of a separate instrument executed between the Licensor
+and the Licensee.
+
+
+    Article 8 - LIABILITY
+
+8.1 Subject to the provisions of Article 8.2, the Licensee shall be
+entitled to claim compensation for any direct loss it may have suffered
+from the Software as a result of a fault on the part of the relevant
+Licensor, subject to providing evidence thereof.
+
+8.2 The Licensor's liability is limited to the commitments made under
+this Agreement and shall not be incurred as a result of in particular:
+(i) loss due the Licensee's total or partial failure to fulfill its
+obligations, (ii) direct or consequential loss that is suffered by the
+Licensee due to the use or performance of the Software, and (iii) more
+generally, any consequential loss. In particular the Parties expressly
+agree that any or all pecuniary or business loss (i.e. loss of data,
+loss of profits, operating loss, loss of customers or orders,
+opportunity cost, any disturbance to business activities) or any or all
+legal proceedings instituted against the Licensee by a third party,
+shall constitute consequential loss and shall not provide entitlement to
+any or all compensation from the Licensor.
+
+
+    Article 9 - WARRANTY
+
+9.1 The Licensee acknowledges that the scientific and technical
+state-of-the-art when the Software was distributed did not enable all
+possible uses to be tested and verified, nor for the presence of
+possible defects to be detected. In this respect, the Licensee's
+attention has been drawn to the risks associated with loading, using,
+modifying and/or developing and reproducing the Software which are
+reserved for experienced users.
+
+The Licensee shall be responsible for verifying, by any or all means,
+the suitability of the product for its requirements, its good working
+order, and for ensuring that it shall not cause damage to either persons
+or properties.
+
+9.2 The Licensor hereby represents, in good faith, that it is entitled
+to grant all the rights over the Software (including in particular the
+rights set forth in Article 5).
+
+9.3 The Licensee acknowledges that the Software is supplied "as is" by
+the Licensor without any other express or tacit warranty, other than
+that provided for in Article 9.2 and, in particular, without any warranty
+as to its commercial value, its secured, safe, innovative or relevant
+nature.
+
+Specifically, the Licensor does not warrant that the Software is free
+from any error, that it will operate without interruption, that it will
+be compatible with the Licensee's own equipment and software
+configuration, nor that it will meet the Licensee's requirements.
+
+9.4 The Licensor does not either expressly or tacitly warrant that the
+Software does not infringe any third party intellectual property right
+relating to a patent, software or any other property right. Therefore,
+the Licensor disclaims any and all liability towards the Licensee
+arising out of any or all proceedings for infringement that may be
+instituted in respect of the use, modification and redistribution of the
+Software. Nevertheless, should such proceedings be instituted against
+the Licensee, the Licensor shall provide it with technical and legal
+assistance for its defense. Such technical and legal assistance shall be
+decided on a case-by-case basis between the relevant Licensor and the
+Licensee pursuant to a memorandum of understanding. The Licensor
+disclaims any and all liability as regards the Licensee's use of the
+name of the Software. No warranty is given as regards the existence of
+prior rights over the name of the Software or as regards the existence
+of a trademark.
+
+
+    Article 10 - TERMINATION
+
+10.1 In the event of a breach by the Licensee of its obligations
+hereunder, the Licensor may automatically terminate this Agreement
+thirty (30) days after notice has been sent to the Licensee and has
+remained ineffective.
+
+10.2 A Licensee whose Agreement is terminated shall no longer be
+authorized to use, modify or distribute the Software. However, any
+licenses that it may have granted prior to termination of the Agreement
+shall remain valid subject to their having been granted in compliance
+with the terms and conditions hereof.
+
+
+    Article 11 - MISCELLANEOUS
+
+
+      11.1 EXCUSABLE EVENTS
+
+Neither Party shall be liable for any or all delay, or failure to
+perform the Agreement, that may be attributable to an event of force
+majeure, an act of God or an outside cause, such as defective
+functioning or interruptions of the electricity or telecommunications
+networks, network paralysis following a virus attack, intervention by
+government authorities, natural disasters, water damage, earthquakes,
+fire, explosions, strikes and labor unrest, war, etc.
+
+11.2 Any failure by either Party, on one or more occasions, to invoke
+one or more of the provisions hereof, shall under no circumstances be
+interpreted as being a waiver by the interested Party of its right to
+invoke said provision(s) subsequently.
+
+11.3 The Agreement cancels and replaces any or all previous agreements,
+whether written or oral, between the Parties and having the same
+purpose, and constitutes the entirety of the agreement between said
+Parties concerning said purpose. No supplement or modification to the
+terms and conditions hereof shall be effective as between the Parties
+unless it is made in writing and signed by their duly authorized
+representatives.
+
+11.4 In the event that one or more of the provisions hereof were to
+conflict with a current or future applicable act or legislative text,
+said act or legislative text shall prevail, and the Parties shall make
+the necessary amendments so as to comply with said act or legislative
+text. All other provisions shall remain effective. Similarly, invalidity
+of a provision of the Agreement, for any reason whatsoever, shall not
+cause the Agreement as a whole to be invalid.
+
+
+      11.5 LANGUAGE
+
+The Agreement is drafted in both French and English and both versions
+are deemed authentic.
+
+
+    Article 12 - NEW VERSIONS OF THE AGREEMENT
+
+12.1 Any person is authorized to duplicate and distribute copies of this
+Agreement.
+
+12.2 So as to ensure coherence, the wording of this Agreement is
+protected and may only be modified by the authors of the License, who
+reserve the right to periodically publish updates or new versions of the
+Agreement, each with a separate number. These subsequent versions may
+address new issues encountered by Free Software.
+
+12.3 Any Software distributed under a given version of the Agreement may
+only be subsequently distributed under the same version of the Agreement
+or a subsequent version.
+
+
+    Article 13 - GOVERNING LAW AND JURISDICTION
+
+13.1 The Agreement is governed by French law. The Parties agree to
+endeavor to seek an amicable solution to any disagreements or disputes
+that may arise during the performance of the Agreement.
+
+13.2 Failing an amicable solution within two (2) months as from their
+occurrence, and unless emergency proceedings are necessary, the
+disagreements or disputes shall be referred to the Paris Courts having
+jurisdiction, by the more diligent Party.
+
+
+Version 1.0 dated 2006-09-05.
+
+
+LICENSE
+
+1. By using and/or opening any packaging enclosing this 
+software, expanding any compressed file containing this 
+software or by utilizing this software, you agree to be 
+bound by the terms of this license agreement.
+
+2. THE SOFTWARE IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY 
+KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 
+PURPOSE AND NONINFRINGEMENT. No oral or written advice given 
+by Licensor or by an authorized representative of Licensor 
+shall create a warranty.
+
+3. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT SHALL 
+THE LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+LIABILITY, INCLUDING BUT NOT LIMITED TO PERSONAL INJURY, OR 
+ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES 
+WHATSOEVER, INCLUDING WITHOUT LIMITATION, DAMAGES FOR LOSS 
+OF PROFITS, LOSS OF DATA, BUSINESS INTERRUPTION OR ANY OTHER 
+COMMERCIAL DAMAGES OR LOSSES, ARISING OUT OF OR RELATED TO 
+YOUR USE OR INABILITY TO USE THE SOFTWARE, HOWEVER CAUSED, 
+REGARDLESS OF THE THEORY OF LIABILITY (CONTRACT, TORT OR 
+OTHERWISE) AND EVEN IF LICENSOR HAS BEEN ADVISED OF THE 
+POSSIBILITY OF SUCH DAMAGES.
+
+4. THIS SOFTWARE IS NOT INTENDED FOR USE IN ANY APPLICATION 
+IN WHICH THE FAILURE OF THE SOFTWARE COULD LEAD TO DEATH, 
+PERSONAL INJURY OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE.
+
+5. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED 
+WARRANTIES, LIABILITY OR LIMITATIONS ON APPLICABLE STATUTORY 
+RIGHTS OF A CONSUMER, SO THE ABOVE EXCLUSIONS AND 
+LIMITATIONS MAY NOT APPLY TO YOU. IF SUCH EXCLUSIONS FROM 
+LIABILITY APPLY TO YOU, DO NOT USE THIS SOFTWARE.
Index: tags/0.0.2/README.txt
===================================================================
--- tags/0.0.2/README.txt	(revision 257)
+++ tags/0.0.2/README.txt	(revision 257)
@@ -0,0 +1,13 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+PACPUS Framework.
+
+TODO: description in Doxygen format.
+TODO: include into Doxygen documentation.
Index: tags/0.0.2/TODO.txt
===================================================================
--- tags/0.0.2/TODO.txt	(revision 257)
+++ tags/0.0.2/TODO.txt	(revision 257)
@@ -0,0 +1,4 @@
+TODO:
+
+DONE:
+* (2013-01-09, kurdejma) installing .pdb (Debug info) files on Windows MSVC
Index: tags/0.0.2/build/build_igep.sh
===================================================================
--- tags/0.0.2/build/build_igep.sh	(revision 257)
+++ tags/0.0.2/build/build_igep.sh	(revision 257)
@@ -0,0 +1,2 @@
+#!/bin/sh
+../scripts/build-igep.sh "/opt/igep/pacpus"
Index: tags/0.0.2/build/build_linux.sh
===================================================================
--- tags/0.0.2/build/build_linux.sh	(revision 257)
+++ tags/0.0.2/build/build_linux.sh	(revision 257)
@@ -0,0 +1,2 @@
+#!/bin/sh
+../scripts/build-linux.sh "/opt/pacpus"
Index: tags/0.0.2/build/build_win.bat
===================================================================
--- tags/0.0.2/build/build_win.bat	(revision 257)
+++ tags/0.0.2/build/build_win.bat	(revision 257)
@@ -0,0 +1,2 @@
+rem ..\scripts\build-msvc-default-installdir.bat
+..\scripts\build-msvc.bat "C:\Pacpus"
Index: tags/0.0.2/cmake/FindPacpus.cmake
===================================================================
--- tags/0.0.2/cmake/FindPacpus.cmake	(revision 257)
+++ tags/0.0.2/cmake/FindPacpus.cmake	(revision 257)
@@ -0,0 +1,106 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+# TODO: write the output variables of this CMake file.
+
+# Check PACPUS_ROOT
+if(NOT PACPUS_ROOT)
+    if(NOT ENV{PACPUS_ROOT} STREQUAL "")
+        set(PACPUS_ROOT $ENV{PACPUS_ROOT})
+		string (REPLACE "\\" "/" PACPUS_ROOT ${PACPUS_ROOT})
+        message(STATUS "Detected PACPUS_ROOT in environment, set to '${PACPUS_ROOT}'")
+    else()
+      if(PACPUS_FIND_REQUIRED)
+		MESSAGE(FATAL_ERROR "Could'not find PACPUS_ROOT ")
+      else()
+		MESSAGE(STATUS "Could'not find PACPUS_ROOT ")
+		return()
+      endif()
+    endif()
+else()
+	string (REPLACE "\\" "/" PACPUS_ROOT ${PACPUS_ROOT})
+	message(STATUS "Detected PACPUS_ROOT as argument with the path: '${PACPUS_ROOT}'")
+endif()
+
+
+
+# Hint directories
+set(PACPUS_INCLUDE_HINT ${PACPUS_ROOT}/include)
+set(PACPUS_LIBRARY_HINT ${PACPUS_ROOT}/lib)
+
+# Locate the include files
+find_path(
+    PACPUS_INCLUDE_DIR
+    NAMES
+        "Pacpus"
+    HINTS
+        ${PACPUS_INCLUDE_HINT}
+    DOC
+        "The Pacpus include directory"
+)
+
+# List of required modules
+set(PACPUS_MODULES "FileLib" "PacpusLib" "PacpusTools" "dbiteplayerlib")
+if(WIN32)
+    list(APPEND PACPUS_MODULES "ROAD_TIME")
+endif()
+
+set(MODULE_MISSING FALSE)
+set(PACPUS_LIBRARIES "")
+
+# Check the presence of each module
+foreach(module ${PACPUS_MODULES})
+    find_library(
+        PACPUS_${module}_LIB
+        NAMES
+            ${module}
+        HINTS
+            ${PACPUS_LIBRARY_HINT}
+    )
+    find_library(
+        PACPUS_${module}_LIBD
+        NAMES
+            ${module}_d
+        HINTS
+            ${PACPUS_LIBRARY_HINT}
+    )
+
+    if(PACPUS_${module}_LIB AND PACPUS_${module}_LIBD)
+        list(APPEND PACPUS_LIBRARIES optimized ${PACPUS_${module}_LIB})
+        list(APPEND PACPUS_LIBRARIES debug ${PACPUS_${module}_LIBD})
+    else()
+        set(MODULE_MISSING TRUE)
+    endif()
+endforeach()
+
+if(NOT MODULE_MISSING AND PACPUS_INCLUDE_DIR)
+    set(PACPUS_FOUND TRUE)
+
+    # Configure Pacpus
+    list(APPEND CMAKE_MODULE_PATH "${PACPUS_ROOT}/cmake")
+    include(${PACPUS_ROOT}/cmake/PacpusUtilities.cmake)
+    include(${PACPUS_ROOT}/cmake/PacpusConfiguration.cmake)
+    include(${PACPUS_ROOT}/cmake/PacpusDependencies.cmake)
+    include(${PACPUS_ROOT}/cmake/PacpusPlatforms.cmake)
+
+    #set(CMAKE_INSTALL_PREFIX ${PACPUS_ROOT})
+    set(PACPUS_INSTALL_DIR ${PACPUS_ROOT})
+    set(PACPUS_LIB_DIR "${PACPUS_ROOT}/lib")
+    MESSAGE(STATUS "PACPUS_ROOT found ${PACPUS_ROOT}")
+
+else()
+    set(PACPUS_FOUND FALSE)
+
+    if(PACPUS_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Could'not find PACPUS_ROOT ")
+    else()
+      MESSAGE(STATUS "Could'not find PACPUS_ROOT ")
+    endif()
+
+endif()
Index: tags/0.0.2/cmake/Findlog4cxx.cmake
===================================================================
--- tags/0.0.2/cmake/Findlog4cxx.cmake	(revision 257)
+++ tags/0.0.2/cmake/Findlog4cxx.cmake	(revision 257)
@@ -0,0 +1,113 @@
+################################################################################
+#
+# CMake script for finding Log4cxx.
+# The default CMake search process is used to locate files.
+#
+# This script creates the following variables:
+#  LOG4CXX_FOUND: Boolean that indicates if the package was found
+#  LOG4CXX_INCLUDE_DIRS: Paths to the necessary header files
+#  LOG4CXX_LIBRARIES: Package libraries
+#  LOG4CXX_LIBRARY_DIRS: Path to package libraries
+#
+################################################################################
+
+include(FindPackageHandleStandardArgs)
+
+# For Windows, when building Pacpus use the local log4cxx files, else use the log4cxx files in the pacpus install dir
+if(WIN32)
+	if(IS_BUILDING_PACPUS)
+		SET(LOG4CXX_ROOT "3rd/apache-log4cxx")
+	elseif(PACPUS_ROOT)
+		SET(LOG4CXX_ROOT "${PACPUS_ROOT}/3rd/apache-log4cxx")
+	else()
+		SET(LOG4CXX_ROOT "$ENV{PACPUS_ROOT}/3rd/apache-log4cxx")
+	endif()
+endif()
+
+
+
+set(LOG4CXX_INC_LIST
+    "/usr/include"
+    "/usr/local/include"
+)
+
+set(LOG4CXX_LIB_LIST
+    "/usr/lib"
+    "/usr/local/lib"
+)
+
+# If LOG4CXX_ROOT is available, set up our hints
+if(LOG4CXX_ROOT)
+    # Includes
+    list(APPEND LOG4CXX_INC_LIST
+      "${LOG4CXX_ROOT}/include"
+      "${LOG4CXX_ROOT}"
+    )
+
+    # Libraries win32
+    if(MSVC)
+        # Visual Studio 2008
+        if(MSVC9)
+            list(APPEND LOG4CXX_LIB_LIST "${LOG4CXX_ROOT}/lib/msvc2008")
+        endif()
+        # Visual Studio 2010
+        if(MSVC10)
+            list(APPEND LOG4CXX_LIB_LIST "${LOG4CXX_ROOT}/lib/msvc2010")
+        endif()
+    endif()
+
+    # Libraries all
+    list(APPEND LOG4CXX_LIB_LIST "${LOG4CXX_ROOT}/lib")
+endif()
+
+# Find headers
+find_path(
+    LOG4CXX_INCLUDE_DIR
+    NAMES
+        log4cxx/log4cxx.h
+    HINTS
+        ${LOG4CXX_INC_LIST}
+)
+
+# Find release library
+find_library(
+    LOG4CXX_LIBRARY
+    NAMES
+        log4cxx
+    HINTS
+        ${LOG4CXX_LIB_LIST}
+)
+
+# Find debug library, if on UNIX this is the same as release
+if(WIN32)
+    find_library(LOG4CXX_LIBRARY_DEBUG NAMES log4cxx_d HINTS ${LOG4CXX_LIB_LIST})
+else()
+    set(LOG4CXX_LIBRARY_DEBUG ${LOG4CXX_LIBRARY})
+endif()
+
+# Set LOG4CXX_FOUND honoring the QUIET and REQUIRED arguments
+find_package_handle_standard_args(LOG4CXX DEFAULT_MSG LOG4CXX_LIBRARY LOG4CXX_INCLUDE_DIR)
+
+# Output variables
+if(LOG4CXX_FOUND)
+    # Include dirs
+    set(LOG4CXX_INCLUDE_DIRS ${LOG4CXX_INCLUDE_DIR})
+
+    # Release Libraries
+    if(LOG4CXX_LIBRARY)
+        LIST(APPEND LOG4CXX_LIBRARIES optimized ${LOG4CXX_LIBRARY})
+    endif()
+
+    # Debug Libraries
+    if(LOG4CXX_LIBRARY_DEBUG)
+        LIST(APPEND LOG4CXX_LIBRARIES debug ${LOG4CXX_LIBRARY_DEBUG})
+    endif()
+
+    # Link dirs
+    get_filename_component(LOG4CXX_LIBRARY_DIRS ${LOG4CXX_LIBRARY} PATH)
+else()
+	message(FATAL_ERROR "LOG4CXX library not found")
+endif()
+
+# Advanced options for not cluttering the cmake UIs
+mark_as_advanced(LOG4CXX_INCLUDE_DIR LOG4CXX_LIBRARY LOG4CXX_LIBRARY_DEBUG)
Index: tags/0.0.2/cmake/PacpusConfiguration.cmake
===================================================================
--- tags/0.0.2/cmake/PacpusConfiguration.cmake	(revision 257)
+++ tags/0.0.2/cmake/PacpusConfiguration.cmake	(revision 257)
@@ -0,0 +1,40 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+# ========================================
+# Build-specific configuration
+# ========================================
+if(IS_BUILDING_PACPUS)
+	if(PACPUS_INSTALL_WITH_VERSION_NUMBER)
+		pacpus_purge_backslash(PACPUS_INSTALL_DIR)
+		set(PACPUS_INSTALL_DIR ${PACPUS_INSTALL_DIR}/${PACPUS_VERSION})
+	endif()
+    set(PACPUS_INSTALL_3RD    FALSE                     CACHE BOOL      "Installation of the 3rd party")
+endif()
+
+
+# ========================================
+# Global configuration
+# ========================================
+set(PACPUS_USE_LOG      TRUE  CACHE BOOL "Logging using log4cxx, the library is required")
+if(win32) 
+	set(PACPUS_INSTALL_3RD  TRUE CACHE BOOL "Installation of the 3rd party")
+else()
+	set(PACPUS_INSTALL_3RD  FALSE CACHE BOOL "Installation of the 3rd party")
+endif()
+set(PACPUS_BUILD_DOC    FALSE CACHE BOOL "Whether build the documentation - requires Doxygen")
+set(PACPUS_USE_SOLUTION_FOLDERS  FALSE CACHE BOOL "Use solution folders to classify projects, works in MS Visual Studio")
+
+if(PACPUS_USE_SOLUTION_FOLDERS)
+    if(CMAKE_VERSION VERSION_GREATER "2.8.0")
+        set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+    else()
+        message(AUTHOR_WARNING "Folders are only supported with CMake 2.8.0 and newer, and MSVC 2005 and newer except for 2005/2008/2010 Express Edition")
+    endif()
+endif(PACPUS_USE_SOLUTION_FOLDERS)
Index: tags/0.0.2/cmake/PacpusDependencies.cmake
===================================================================
--- tags/0.0.2/cmake/PacpusDependencies.cmake	(revision 257)
+++ tags/0.0.2/cmake/PacpusDependencies.cmake	(revision 257)
@@ -0,0 +1,63 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+# ========================================
+# Output
+# ========================================
+set(PACPUS_DEFINITIONS "")
+set(PACPUS_DEPENDENCIES_INC "")
+set(PACPUS_DEPENDENCIES_LIB "")
+
+# ========================================
+# All the Pacpus' modules depends from Qt4
+# However, since each module requires specific Qt's modules, they have to include their own QT_USE_FILE
+# ========================================
+find_package(Qt4 REQUIRED)
+
+# ========================================
+# Boost
+# Do not use compiled modules, include-only headers.
+# ========================================
+find_package(Boost 1.49.0 REQUIRED)
+list(APPEND PACPUS_DEPENDENCIES_INC ${Boost_INCLUDE_DIRS})
+
+# ========================================
+# log4cxx
+# ========================================
+if(PACPUS_USE_LOG)
+    find_package(log4cxx REQUIRED)
+
+    list(APPEND PACPUS_DEFINITIONS " -DPACPUS_USE_LOG ")
+    list(APPEND PACPUS_DEPENDENCIES_INC ${LOG4CXX_INCLUDE_DIRS})
+    list(APPEND PACPUS_DEPENDENCIES_LIB ${LOG4CXX_LIBRARIES})
+
+    # If needed, install the dll of log4cxx
+    if(WIN32 AND MSVC AND IS_BUILDING_PACPUS)
+        pacpus_get_msvc(MSVC_VERSION)
+        pacpus_purge_backslash(LOG4CXX_ROOT)
+
+        install(
+            FILES
+                ${LOG4CXX_ROOT}/bin/${MSVC_VERSION}/log4cxx.dll
+                ${LOG4CXX_ROOT}/bin/${MSVC_VERSION}/log4cxx_d.dll
+            DESTINATION
+                ${PACPUS_INSTALL_DIR}/bin
+        )
+    endif()
+endif()
+
+# ========================================
+# Doxygen
+# ========================================
+if(PACPUS_BUILD_DOC)
+    find_package(Doxygen)
+    if(NOT DOXYGEN_FOUND)
+        message(FATAL_ERROR "Doxygen is needed to build the documentation. Please install it correctly")
+    endif()
+endif()
Index: tags/0.0.2/cmake/PacpusInstall.cmake
===================================================================
--- tags/0.0.2/cmake/PacpusInstall.cmake	(revision 257)
+++ tags/0.0.2/cmake/PacpusInstall.cmake	(revision 257)
@@ -0,0 +1,54 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+# ========================================
+# CMake files
+# ========================================
+install(
+    DIRECTORY
+        ${PACPUS_CMAKE_DIR}
+    DESTINATION
+        ${PACPUS_INSTALL_DIR}
+)
+
+# ========================================
+# Include files
+# ========================================
+install(
+    DIRECTORY
+        ${PACPUS_INCLUDE_DIR}
+    DESTINATION
+        ${PACPUS_INSTALL_DIR}/include
+)
+
+# ========================================
+# Installation of the 3rd party
+# ========================================
+if(PACPUS_INSTALL_3RD)
+	if(WIN32)
+		install(
+		DIRECTORY
+			${PACPUS_3RD_PARTY_DIR}
+		DESTINATION
+			${PACPUS_INSTALL_DIR}
+			)
+	endif()
+endif()
+
+# ========================================
+# Installation of the documentation
+# ========================================
+if(PACPUS_BUILD_DOC)
+    install(
+        DIRECTORY
+            ${CMAKE_BINARY_DIR}/doc/html
+        DESTINATION
+            ${PACPUS_INSTALL_DIR}/doc
+    )
+endif()
Index: tags/0.0.2/cmake/PacpusPlatforms.cmake
===================================================================
--- tags/0.0.2/cmake/PacpusPlatforms.cmake	(revision 257)
+++ tags/0.0.2/cmake/PacpusPlatforms.cmake	(revision 257)
@@ -0,0 +1,16 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+# ========================================
+# GCC-Based compilers
+# ========================================
+if("${CMAKE_C_COMPILER}" MATCHES "gcc|icc|clang")
+    pacpus_info("The libraries will be compiled with -fPIC")
+    list(APPEND PACPUS_DEFINITIONS " -fPIC ")
+endif()
Index: tags/0.0.2/cmake/PacpusUtilities.cmake
===================================================================
--- tags/0.0.2/cmake/PacpusUtilities.cmake	(revision 257)
+++ tags/0.0.2/cmake/PacpusUtilities.cmake	(revision 257)
@@ -0,0 +1,221 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+# ========================================
+# Create a Pacpus plugin
+# ========================================
+function(PACPUS_PLUGIN OUT_CPP OUT_H PLUGIN_NAME)
+
+    set(PLUGIN_NAME ${PLUGIN_NAME}Plugin)
+    set(${OUT_CPP} ${PLUGIN_NAME}.cpp PARENT_SCOPE)
+    set(${OUT_H} ${PLUGIN_NAME}.h PARENT_SCOPE)
+
+    string(TOUPPER ${PLUGIN_NAME} PLUGIN_NAME_UPPER)
+
+    # create the header file
+    file(WRITE ${PLUGIN_NAME}.h
+        "// Autogenerated file by PacpusPlugin.cmake\n"
+        "// DO NOT EDIT!!! ALL CHANGES WOULD BE REMOVED BY THE NEXT CALL OF CMAKE\n"
+        "\n"
+        "#ifndef __${PLUGIN_NAME_UPPER}_H__\n"
+        "#define __${PLUGIN_NAME_UPPER}_H__\n"
+        "\n"
+        "#include <QObject>\n"
+        "#include <qplugin.h>\n"
+        "\n"
+        "#include <Pacpus/kernel/PacpusPluginInterface.h>\n"
+        "\n"
+        "/// Auto-generated plugin class\n"
+        "class ${PLUGIN_NAME}\n"
+        "    : public QObject\n"
+        "    , public PacpusPluginInterface\n"
+        "{\n"
+        "    Q_OBJECT\n"
+        "    Q_INTERFACES(PacpusPluginInterface)\n"    
+        "\n"
+        "public:\n"
+        "    ${PLUGIN_NAME}();\n"
+        "    ~${PLUGIN_NAME}();\n" 
+        "\n"
+        "protected:\n"
+        "    QString name();\n"
+        "};\n"
+        "\n"
+        "#endif // __${PLUGIN_NAME_UPPER}_H__\n"
+    )
+
+    # create the cpp file
+    file(WRITE ${PLUGIN_NAME}.cpp
+        "// Autogenerated file by PacpusPlugin.cmake\n"
+        "// DO NOT EDIT!!! ALL CHANGES WOULD BE REMOVED BY THE NEXT CALL OF CMAKE\n"
+        "\n"
+        "#include \"${PLUGIN_NAME}.h\"\n"
+        "\n"
+        "${PLUGIN_NAME}::${PLUGIN_NAME}()\n"
+        "{\n"
+        "}\n"
+        "\n"
+        "${PLUGIN_NAME}::~${PLUGIN_NAME}()\n"
+        "{\n"
+        "}\n"
+        "\n"
+        "QString ${PLUGIN_NAME}::name()\n"
+        "{\n"
+        "    return \"${PLUGIN_NAME}\";\n"
+        "}\n"
+        "\n"
+        "Q_EXPORT_PLUGIN2(${PLUGIN_NAME}, ${PLUGIN_NAME})\n"
+    )
+endfunction(PACPUS_PLUGIN)
+
+# ========================================
+# Replace backslashes by slashes
+# ========================================
+macro(pacpus_purge_backslash var)
+    string(REGEX REPLACE "\\\\" "/" ${var} "${${var}}")
+endmacro()
+
+# ========================================
+# Get the version of MSVC as a string
+# ========================================
+macro(pacpus_get_msvc output)
+    # By default, unknown
+    set(${output} "unknown")
+    if(MSVC9)
+        set(${output} "msvc2008")
+    elseif(MSVC10)
+        set(${output} "msvc2010")
+    else(MSVC11)
+        set(${output} "msvc2012")
+    endif()
+endmacro()
+
+# ========================================
+# Print a debug message
+# ========================================
+function(pacpus_output_status msg)
+    message(STATUS "${msg}")
+    string(REPLACE "\\" "\\\\" msg "${msg}")
+    string(REPLACE "\"" "\\\"" msg "${msg}")
+endfunction()
+
+# ========================================
+# Pacpus log message
+# ========================================
+function(pacpus_info text)
+    set(status_cond)
+    set(status_then)
+    set(status_else)
+
+    set(status_current_name "cond")
+    foreach(arg ${ARGN})
+        if(arg STREQUAL "THEN")
+            set(status_current_name "then")
+        elseif(arg STREQUAL "ELSE")
+            set(status_current_name "else")
+        else()
+            list(APPEND status_${status_current_name} ${arg})
+        endif()
+    endforeach()
+
+    if(DEFINED status_cond)
+        set(status_placeholder_length 32)
+        string(RANDOM LENGTH ${status_placeholder_length} ALPHABET " " status_placeholder)
+        string(LENGTH "${text}" status_text_length)
+        if(status_text_length LESS status_placeholder_length)
+            string(SUBSTRING "${text}${status_placeholder}" 0 ${status_placeholder_length} status_text)
+        elseif(DEFINED status_then OR DEFINED status_else)
+            pacpus_output_status("${text}")
+            set(status_text "${status_placeholder}")
+        else()
+            set(status_text "${text}")
+        endif()
+
+        if(DEFINED status_then OR DEFINED status_else)
+            if(${status_cond})
+                string(REPLACE ";" " " status_then "${status_then}")
+                string(REGEX REPLACE "^[ \t]+" "" status_then "${status_then}")
+                pacpus_output_status("${status_text} ${status_then}")
+            else()
+                string(REPLACE ";" " " status_else "${status_else}")
+                string(REGEX REPLACE "^[ \t]+" "" status_else "${status_else}")
+                pacpus_output_status("${status_text} ${status_else}")
+            endif()
+        else()
+            string(REPLACE ";" " " status_cond "${status_cond}")
+            string(REGEX REPLACE "^[ \t]+" "" status_cond "${status_cond}")
+            pacpus_output_status("${status_text} ${status_cond}")
+        endif()
+    else()
+        pacpus_output_status("${text}")
+    endif()
+endfunction()
+
+# ========================================
+# Pacpus add library and set debug postfix
+# ========================================
+function(pacpus_add_library target)
+    add_library(
+        ${ARGV}
+    )
+    set_target_properties(
+        ${target}
+        PROPERTIES DEBUG_POSTFIX "_d"
+    )
+endfunction()
+
+# ========================================
+# Pacpus add executable and set debug postfix
+# ========================================
+function(pacpus_add_executable target)
+    add_executable(
+        ${ARGV}
+    )
+    set_target_properties(
+        ${target}
+        PROPERTIES DEBUG_POSTFIX "_d"
+    )
+endfunction()
+
+# ========================================
+# Pacpus install
+# ========================================
+function(pacpus_install)
+    install(
+        TARGETS ${ARGV}
+        RUNTIME DESTINATION ${PACPUS_INSTALL_DIR}/bin
+        LIBRARY DESTINATION ${PACPUS_INSTALL_DIR}/lib
+        ARCHIVE DESTINATION ${PACPUS_INSTALL_DIR}/lib
+    )
+    if(MSVC)
+        # install debug information files .pdb
+        foreach(target ${ARGV})
+            get_target_property(target_filepath ${target} LOCATION_DEBUG)
+            get_filename_component(target_directory ${target_filepath} PATH)
+            get_filename_component(target_basename ${target_filepath} NAME_WE)
+            
+            set(target_pdb "${target_directory}/${target_basename}.pdb")
+            install(FILES ${target_pdb}
+                CONFIGURATIONS Debug
+                DESTINATION ${PACPUS_INSTALL_DIR}/lib
+            )
+        endforeach()
+    endif(MSVC)
+endfunction()
+
+# ========================================
+# Pacpus folder
+# ========================================
+function(pacpus_folder target folder_name)
+    if(PACPUS_USE_SOLUTION_FOLDERS AND MSVC)
+        set_target_properties(${target}
+            PROPERTIES FOLDER ${folder_name}
+        )
+    endif()
+endfunction()
Index: tags/0.0.2/cmake/igep_toolchain.cmake
===================================================================
--- tags/0.0.2/cmake/igep_toolchain.cmake	(revision 257)
+++ tags/0.0.2/cmake/igep_toolchain.cmake	(revision 257)
@@ -0,0 +1,52 @@
+cmake_minimum_required(VERSION 2.8)
+
+# CMake system name must be something like "Linux".
+# This is important for cross-compiling.
+set( CMAKE_SYSTEM_NAME Linux )
+set( CMAKE_SYSTEM_PROCESSOR arm )
+
+if(EXISTS "/opt/poky/1.3/sysroots/x86_64-pokysdk-linux")#64 bits
+	SET(CMAKE_C_COMPILER   /opt/poky/1.3/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc)
+	SET(CMAKE_CXX_COMPILER /opt/poky/1.3/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
+        SET(CMAKE_LINKER       /opt/poky/1.3/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld)
+        SET(CMAKE_AR           /opt/poky/1.3/sysroots/x86_64-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar)
+        SET(QT_QMAKE_EXECUTABLE /opt/poky/1.3/sysroots/x86_64-pokysdk-linux/usr/bin/qmake2)
+elseif(EXISTS "/opt/poky/1.3/sysroots/i686-pokysdk-linux")#32 bits
+	SET(CMAKE_C_COMPILER   /opt/poky/1.3/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc)
+	SET(CMAKE_CXX_COMPILER /opt/poky/1.3/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++)
+        SET(CMAKE_LINKER       /opt/poky/1.3/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-ld)
+        SET(CMAKE_AR           /opt/poky/1.3/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-ar)
+        SET(QT_QMAKE_EXECUTABLE /opt/poky/1.3/sysroots/i686-pokysdk-linux/usr/bin/qmake2)
+else()
+        message(FATAL_ERROR "Cross-compilator is not installed, please read https://devel.hds.utc.fr/projects/igep" )
+endif()
+
+SET(CMAKE_C_ARCHIVE_CREATE "${CMAKE_AR} cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+SET(CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_C_ARCHIVE_CREATE})
+
+SET(CMAKE_SYSTEM_PREFIX_PATH /opt/poky/1.3/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/)
+
+set( CMAKE_C_FLAGS " -march=armv7-a -fno-tree-vectorize     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8  --sysroot=/opt/poky/1.3/sysroots/armv7a-vfp-neon-poky-linux-gnueabi " CACHE STRING "CFLAGS" )
+set( CMAKE_CXX_FLAGS " -march=armv7-a -fno-tree-vectorize     -mthumb-interwork -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a8  --sysroot=/opt/poky/1.3/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -fpermissive" CACHE STRING "CXXFLAGS" )
+set( CMAKE_C_FLAGS_RELEASE "-O2 -pipe -g -feliminate-unused-debug-types  -DNDEBUG" CACHE STRING "CFLAGS for release" )
+set( CMAKE_CXX_FLAGS_RELEASE "-O2 -pipe -g -feliminate-unused-debug-types  -O2 -pipe -g -feliminate-unused-debug-types -fpermissive -fvisibility-inlines-hidden -DNDEBUG" CACHE STRING "CXXFLAGS for release" )
+
+# only search in the paths provided so cmake doesnt pick
+# up libraries and tools from the native build machine
+set( CMAKE_FIND_ROOT_PATH /opt/poky/1.3/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/ )
+set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+
+# Use qt.conf settings
+#set( ENV{QT_CONF_PATH} $ENV{IGEP_ROOT}/uav_dev/include/qt.conf )
+
+# Use native cmake modules
+set( CMAKE_MODULE_PATH /opt/poky/1.3/sysroots/armv7a-vfp-neon-poky-linux-gnueabi/usr/share/cmake-2.8/Modules/ )
+list (APPEND CMAKE_MODULE_PATH " /home/romain/TX1/tmpTarget/cmake/")
+
+# add for non /usr/lib libdir, e.g. /usr/lib64
+set( CMAKE_LIBRARY_PATH /home/romain/TX1/tmpTarget/lib)
+
+set (CMAKE_CXX_FLAGS "-fPIC")
+
Index: tags/0.0.2/doc/CMakeLists.txt
===================================================================
--- tags/0.0.2/doc/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/doc/CMakeLists.txt	(revision 257)
@@ -0,0 +1,20 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+
+if(PACPUS_BUILD_DOC)
+    # Debug
+    pacpus_info("Adding target: documentation")
+    # Configure the template Doxyfile for our specific project
+    configure_file(doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE)
+    # Add a custom target to run Doxygen when ever the project is built
+    add_custom_target (
+        documentation 
+        COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
+        SOURCES ${CMAKE_BINARY_DIR}/Doxyfile)
+endif()
Index: tags/0.0.2/doc/PacpusFramework.h
===================================================================
--- tags/0.0.2/doc/PacpusFramework.h	(revision 257)
+++ tags/0.0.2/doc/PacpusFramework.h	(revision 257)
@@ -0,0 +1,16 @@
+/**
+@mainpage PACPUS Framework API reference
+
+@section sec_introduction Introduction
+
+@todo Write intro
+
+@section sec_overview Overview
+
+@todo Write overview
+
+@section sec_rationale Rationale
+
+@todo Write rationale
+
+*/
Index: tags/0.0.2/doc/doxyfile.in
===================================================================
--- tags/0.0.2/doc/doxyfile.in	(revision 257)
+++ tags/0.0.2/doc/doxyfile.in	(revision 257)
@@ -0,0 +1,1864 @@
+# Doxyfile 1.8.3
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a hash (#) is considered a comment and will be ignored.
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or sequence of words) that should
+# identify the project. Note that if you do not use Doxywizard you need
+# to put quotes around the project name if it contains spaces.
+
+PROJECT_NAME           = "PACPUS Framework"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER         =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is
+# included in the documentation. The maximum height of the logo should not
+# exceed 55 pixels and the maximum width should not exceed 200 pixels.
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = @CMAKE_BINARY_DIR@/doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = YES
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip. Note that you specify absolute paths here, but also
+# relative paths, which will be relative from the directory where doxygen is
+# started.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful if your file system
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding
+# "class=itcl::class" will allow you to use the command class in the
+# itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension,
+# and language is one of the parsers supported by doxygen: IDL, Java,
+# Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C,
+# C++. For instance to make doxygen treat .inc files as Fortran files (default
+# is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note
+# that for custom extensions you also need to set FILE_PATTERNS otherwise the
+# files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all
+# comments according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you
+# can mix doxygen, HTML, and XML commands with Markdown formatting.
+# Disable only in case of backward compatibilities issues.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented classes,
+# or namespaces to their corresponding documentation. Such a link can be
+# prevented in individual cases by by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also makes the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = YES
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES (the
+# default) will make doxygen replace the get and set methods by a property in
+# the documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and
+# unions are shown inside the group in which they are included (e.g. using
+# @ingroup) instead of on a separate page (for HTML and Man pages) or
+# section (for LaTeX and RTF).
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and
+# unions with only public data fields will be shown inline in the documentation
+# of the scope in which they are defined (i.e. file, namespace, or group
+# documentation), provided this scope is documented. If set to NO (the default),
+# structs, classes, and unions are shown on a separate page (for HTML and Man
+# pages) or section (for LaTeX and RTF).
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penalty.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will roughly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols.
+
+SYMBOL_CACHE_SIZE      = 0
+
+# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be
+# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given
+# their name and scope. Since this can be an expensive process and often the
+# same symbol appear multiple times in the code, doxygen keeps a cache of
+# pre-resolved symbols. If the cache is too small doxygen will become slower.
+# If the cache is too large, memory is wasted. The cache size is given by this
+# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+# will list include files with double quotes in the documentation
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS        = YES
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+# will sort the (brief and detailed) documentation of class members so that
+# constructors and destructors are listed first. If set to NO (the default)
+# the constructors will appear in the respective orders defined by
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = YES
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to
+# do proper type resolution of all parameters of a function it will reject a
+# match between the prototype and the implementation of a member function even
+# if there is only one candidate or it is obvious which candidate to choose
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if section-label ... \endif
+# and \cond section-label ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or macro consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and macros in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option.
+# You can optionally specify a file name after the option, if omitted
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files
+# containing the references data. This must be a list of .bib files. The
+# .bib extension is automatically appended if omitted. Using this command
+# requires the bibtex tool to be installed. See also
+# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style
+# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this
+# feature you need bibtex and perl available in the search path. Do not use
+# file names with spaces, bibtex cannot handle them.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT                  = @PACPUS_INCLUDE_DIR@ @PACPUS_DOC_DIR@
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py
+# *.f90 *.f *.for *.vhd *.vhdl
+
+FILE_PATTERNS          =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty or if
+# non of the patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any)
+# and it is also possible to disable source filtering for a specific pattern
+# using *.ext= (so without naming a filter). This option only has effect when
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page (index.html).
+# This can be useful if you have a project on for instance GitHub and want reuse
+# the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C, C++ and Fortran comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header. Note that when using a custom header you are responsible
+#  for the proper inclusion of any scripts and style sheets that doxygen
+# needs, which is dependent on the configuration options used.
+# It is advised to generate a default header using "doxygen -w html
+# header.html footer.html stylesheet.css YourConfigFile" and then modify
+# that header. Note that the header is subject to change so you typically
+# have to redo this when upgrading to a newer version of doxygen or when
+# changing the value of configuration settings such as GENERATE_TREEVIEW!
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If left blank doxygen will
+# generate a default style sheet. Note that it is recommended to use
+# HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this
+# tag will in the future become obsolete.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional
+# user-defined cascading style sheet that is included after the standard
+# style sheets created by doxygen. Using this option one can overrule
+# certain style aspects. This is preferred over using HTML_STYLESHEET
+# since it does not replace the standard style sheet and is therefor more
+# robust against future updates. Doxygen will copy the style sheet file to
+# the output directory.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that
+# the files will be copied as-is; there are no commands or markers available.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+# Doxygen will adjust the colors in the style sheet and background images
+# according to this color. Hue is specified as an angle on a colorwheel,
+# see http://en.wikipedia.org/wiki/Hue for more information.
+# For instance the value 0 represents red, 60 is yellow, 120 is green,
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+# the colors in the HTML output. For a value of 0 the output will use
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+# the luminance component of the colors in the HTML output. Values below
+# 100 gradually make the output lighter, whereas values above 100 make
+# the output darker. The value divided by 100 is the actual gamma applied,
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of
+# entries shown in the various tree structured indices initially; the user
+# can expand and collapse entries dynamically later on. Doxygen will expand
+# the tree to such a level that at most the specified number of entries are
+# visible (unless a fully collapsed tree already exceeds this amount).
+# So setting the number of entries 1 will produce a full collapsed tree by
+# default. 0 is a special value representing an infinite number of entries
+# and will result in a full expanded tree by default.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Pacpus
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely
+# identify the documentation publisher. This should be a reverse domain-name
+# style string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Heudiasyc
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Heudiasyc
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE               =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING     =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+# that can be used as input for Qt's qhelpgenerator to generate a
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+# add. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+#  will be generated, which together with the HTML files, form an Eclipse help
+# plugin. To install this plugin and make it available under the help contents
+# menu in Eclipse, the contents of the directory containing the HTML and XML
+# files needs to be copied into the plugins directory of eclipse. The name of
+# the directory within the plugins directory should be the same as
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs)
+# at top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it. Since the tabs have the same information as the
+# navigation tree you can set this option to NO if you already set
+# GENERATE_TREEVIEW to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+# Since the tree basically has the same information as the tab index you
+# could consider to set DISABLE_INDEX to NO when enabling this option.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML
+# documentation. Note that a value of 0 will completely suppress the enum
+# values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are
+# not supported properly for IE 6.0, but are supported on all modern browsers.
+# Note that when changing this option you need to delete any form_*.png files
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax
+# (see http://www.mathjax.org) which uses client side Javascript for the
+# rendering instead of using prerendered bitmaps. Use this if you do not
+# have LaTeX installed or if you want to formulas look prettier in the HTML
+# output. When enabled you may also need to install MathJax separately and
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# thA MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and
+# SVG. The default value is HTML-CSS, which is slower, but has the best
+# compatibility.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the
+# HTML output directory using the MATHJAX_RELPATH option. The destination
+# directory should contain the MathJax.js script. For instance, if the mathjax
+# directory is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to
+# the MathJax Content Delivery Network so you can quickly see the result without
+# installing MathJax.
+# However, it is strongly recommended to install a local
+# copy of MathJax from http://www.mathjax.org before deployment.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension
+# names that should be enabled during MathJax rendering.
+
+MATHJAX_EXTENSIONS     =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+# for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+# (GENERATE_DOCSET) there is already a search function so this one should
+# typically be disabled. For large projects the javascript based search engine
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript.
+# There are two flavours of web server based search depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools.
+# See the manual for details.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain
+# the search results. Doxygen ships with an example indexer (doxyindexer) and
+# search engine (doxysearch.cgi) which are based on the open source search engine
+# library Xapian. See the manual for configuration details.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will returned the search results when EXTERNAL_SEARCH is enabled.
+# Doxygen ships with an example search engine (doxysearch) which is based on
+# the open source search engine library Xapian. See the manual for configuration
+# details.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through other
+# doxygen projects that are not otherwise connected via tags files, but are
+# all added to the same search index. Each project needs to have a tag file set
+# via GENERATE_TAGFILE. The search mapping then maps the name of the tag file
+# to a relative location where the documentation can be found,
+# similar to the
+# TAGFILES option but without actually processing the tag file.
+# The format is: EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+# Note that when enabling USE_PDFLATEX this option is only used for
+# generating bitmaps for formulas in the HTML output, but not in the
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for
+# the generated latex document. The footer should contain everything after
+# the last chapter. If it is left blank doxygen will generate a
+# standard footer. Notice: only use this tag if you know what you are doing!
+
+LATEX_FOOTER           =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = YES
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+# source code with syntax highlighting in the LaTeX output.
+# Note that which sources are shown also depends on other settings
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See
+# http://en.wikipedia.org/wiki/BibTeX for more info.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load style sheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# pointed to by INCLUDE_PATH will be searched when a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition that
+# overrules the definition found in the source code.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all references to function-like macros
+# that are alone on a line, have an all uppercase name, and do not end with a
+# semicolon, because these will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. For each
+# tag file the location of the external documentation should be added. The
+# format of a tag file without this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths
+# or URLs. Note that each tag file must have a unique name (where the name does
+# NOT include the path). If a tag file is not located in the directory in which
+# doxygen is run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option also works with HAVE_DOT disabled, but it is recommended to
+# install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+# allowed to run in parallel. When set to 0 (the default) doxygen will
+# base this on the number of processors available in the system. You can set it
+# explicitly to a value larger than 0 to get control over the balance
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will use the Helvetica font for all dot files that
+# doxygen generates. When you want a differently looking font you can specify
+# the font name using DOT_FONTNAME. You need to make sure dot is able to find
+# the font, which can be done by putting it in a standard location or by setting
+# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
+# directory containing the font.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the Helvetica font.
+# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to
+# set the path where dot can find it.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside
+# the class node. If there are many fields or methods and many nodes the
+# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS
+# threshold limits the number of items for each type to make the size more
+# managable. Set this to 0 for no limit. Note that the threshold may be
+# exceeded by 50% before the limit is enforced.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will generate a graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are svg, png, jpg, or gif.
+# If left blank png will be used. If you choose svg you need to set
+# HTML_FILE_EXTENSION to xhtml in order to make the SVG files
+# visible in IE 9+ (other browsers do not have this requirement).
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+# Note that this requires a modern browser other than Internet Explorer.
+# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you
+# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files
+# visible. Older versions of IE do not have SVG support.
+
+INTERACTIVE_SVG        = NO
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the
+# \mscfile command).
+
+MSCFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP            = YES
Index: tags/0.0.2/include/Pacpus/DbitePlayer/DbitePlayerConfig.h
===================================================================
--- tags/0.0.2/include/Pacpus/DbitePlayer/DbitePlayerConfig.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/DbitePlayer/DbitePlayerConfig.h	(revision 257)
@@ -0,0 +1,31 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_DBITEPLAYERCONFIG_H
+#define DEF_PACPUS_DBITEPLAYERCONFIG_H
+
+// Export macro for DbitePlayer DLL for Windows only
+#ifdef WIN32
+#   ifdef DBITE_PLAYER_EXPORTS
+        // make DLL
+#       define DBITE_PLAYER_API __declspec(dllexport)
+#   else
+        // use DLL
+#       define DBITE_PLAYER_API __declspec(dllimport)
+#   endif
+#else
+    // On other platforms, simply ignore this 
+#   define DBITE_PLAYER_API 
+#endif
+
+#endif // DEF_PACPUS_DBITEPLAYERCONFIG_H
Index: tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyEngine.h
===================================================================
--- tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyEngine.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyEngine.h	(revision 257)
@@ -0,0 +1,170 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    April, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DbitePlayer DbitePlayer.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_DBTPLYENGINE_H
+#define DEF_PACPUS_DBTPLYENGINE_H
+
+#include <Pacpus/kernel/ComponentBase.h>
+#include <Pacpus/kernel/ComponentFactory.h>
+#include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
+#include <Pacpus/DbitePlayer/DbtPlyEngineStateChart.h>
+#include <Pacpus/DbitePlayer/DbtPlyUserInterface.h>
+
+#include <QSemaphore>
+#include <QThread>
+
+namespace pacpus {
+
+class DbtPlyEngineStateChart;
+class DbtPlyEngineState;
+
+/// @todo Documentation
+enum PlayMode
+{
+    PlayModeLastData = 1,   ///< replay_mode="1"
+    PlayModeAllData = 2     ///< replay_mode="2"
+};
+
+/// XML config properties:
+///     datadir         PATH    root data directory,
+///         e.g. datadir="/home/user/dbt_data"
+///     replay_mode     STRING  {1}|2
+///         e.g. replay_mode="2"
+class DBITE_PLAYER_API DbtPlyEngine
+        : public QThread
+        , public ComponentBase
+{
+    Q_OBJECT
+
+public:
+    /// Constructor
+    DbtPlyEngine(QString name);
+    /// Destructor
+    ~DbtPlyEngine();
+
+    /// @returns the directory where the data are stored
+    QString getDataDir();
+
+    /// @returns the current replay time
+    road_time_t getTime()
+    {
+        return tDbt_;
+    }
+
+    /// @returns @b true if the player is playing, @b false otherwise
+    bool isPlaying();
+    /// Accessor to playmode
+    int replayMode()
+    {
+        return replayMode_;
+    }
+
+    /// @todo Documentation
+    const DbtPlyEngineState * getState();
+    /// @todo Documentation
+    void setState(DbtPlyEngineState * newState);
+
+    /// Goes back to the beginning, sets speed to initial value
+    void reset();
+
+    /// @todo Documentation
+    void speedUp();
+    /// @todo Documentation
+    void speedDown();
+    /// @todo Documentation
+    void setLastTNow(road_time_t newTNow)
+    {
+        this->lastTNow_= newTNow;
+    }
+
+protected:
+    /// @todo Documentation
+    virtual void startActivity();
+    /// @todo Documentation
+    virtual void stopActivity();
+    /// @todo Documentation
+    virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
+
+    /// Thread main loop
+    virtual void run();
+
+private:
+    DbtPlyEngineState * mCurrentState;
+    float mSpeed;
+    bool mIsReverse;
+
+    /// The state chart of the engine (speed, state and direction)
+    DbtPlyEngineStateChart * stateChart_;
+
+    /// A semaphore of protection of the critical section
+    QSemaphore * tMinMaxSem_;
+    /// tmin and tmax regarding to all the DBT files replayed
+    road_time_t tDbtMin_, tDbtMax_;
+
+    /// tNow_ = the current time when the trigger alerts the engine
+    road_time_t tNow_;
+    /// lastTNow_ = previous tNow_
+    road_time_t lastTNow_;
+    /// tDbt_ = the DBT time at which the data have to be replayed corresponding the state of the engine
+    road_time_t tDbt_;
+    /// lastTDbt_ = previous tDbt_
+    road_time_t lastTDbt_;
+
+    /// the direction of reading: forward=1 or backward=-1 used to compute the tDbt that must be replayed
+    short direction_;
+
+    /// the synchronization semaphore with the trigger
+    QSemaphore * sync_;
+
+    /// where the data are stored
+    QString dataDir_;
+
+    /// mode
+    PlayMode replayMode_;
+
+Q_SIGNALS:
+    /// @todo Documentation
+    void play(road_time_t timeToPlay, road_time_t actualTime, bool direction);
+    /// @todo Documentation
+    void stopfile();
+    /// @todo Documentation
+    void displayStateSig(DbtPlyEngineState * state, float speed);
+    /// @todo Documentation
+    void timeMinMax(road_time_t tMin, road_time_t tMax);
+    /// @todo Documentation
+    void curReplayTime(road_time_t time);
+
+public Q_SLOTS:
+    /// @todo Documentation
+    void engReceiver();
+    /// @todo Documentation
+    void changeDirection(bool reverse);
+    /// @todo Documentation
+    void tMinMax(road_time_t tMin, road_time_t tMax);
+
+    /// @todo Documentation
+    void playEvent();
+    /// @todo Documentation
+    void pauseEvent();
+    /// @todo Documentation
+    void stopEvent();
+    /// @todo Documentation
+    void speedUpEvent();
+    /// @todo Documentation
+    void speedDownEvent();
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_DBTPLYENGINE_H
Index: tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h
===================================================================
--- tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h	(revision 257)
@@ -0,0 +1,121 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    April, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DbitePlayer state machine.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_DBTPLYENGINESTATECHART_H
+#define DEF_PACPUS_DBTPLYENGINESTATECHART_H
+
+#include <QString>
+
+#include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
+
+namespace pacpus {
+
+class DbtPlyEngine;
+
+////////////////////////////////////////////////////////////////////////////////
+class DBITE_PLAYER_API DbtPlyEngineState
+{
+public:
+    /// @todo Documentation
+    virtual ~DbtPlyEngineState();
+    
+    /// @todo Documentation
+    virtual void play(DbtPlyEngine & engine);
+    /// @todo Documentation
+    virtual void pause(DbtPlyEngine & engine);
+    /// @todo Documentation
+    virtual void stop(DbtPlyEngine & engine);
+    
+    /// @todo Documentation
+    virtual void speedUp(DbtPlyEngine & engine);
+    /// @todo Documentation
+    virtual void speedDown(DbtPlyEngine & engine);
+    
+    /// @todo Documentation
+    virtual bool isPlaying();
+    
+    /// @todo Documentation
+    virtual QString toString() const = 0;
+
+protected:
+    /// @todo Documentation
+    DbtPlyEngineState();
+};
+
+////////////////////////////////////////////////////////////////////////////////
+class DBITE_PLAYER_API PlayingState
+        : public DbtPlyEngineState
+{
+public:
+    /// @todo Documentation
+    virtual void pause(DbtPlyEngine & engine);
+    /// @todo Documentation
+    virtual void stop(DbtPlyEngine & engine);
+    
+    /// @todo Documentation
+    virtual bool isPlaying();
+    
+    /// @todo Documentation
+    virtual QString toString() const;
+    /// @todo Documentation
+    static DbtPlyEngineState * getInstance();
+
+private:
+    PlayingState();
+    static PlayingState mInstance;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+/// State class when player is on pause.
+class DBITE_PLAYER_API PausedState
+        : public DbtPlyEngineState
+{
+public:
+    /// @todo Documentation
+    virtual void play(DbtPlyEngine & engine);
+    /// @todo Documentation
+    virtual void stop(DbtPlyEngine & engine);
+    
+    /// @todo Documentation
+    virtual QString toString() const;
+    /// @todo Documentation
+    static DbtPlyEngineState * getInstance();
+
+private:
+    PausedState();
+    static PausedState mInstance;
+};
+
+////////////////////////////////////////////////////////////////////////////////
+/// State class when player is stopped.
+class DBITE_PLAYER_API StoppedState
+        : public DbtPlyEngineState
+{
+public:
+    /// @todo Documentation
+    virtual void play(DbtPlyEngine & engine);
+    
+    /// @todo Documentation
+    virtual QString toString() const;
+    /// @todo Documentation
+    static DbtPlyEngineState * getInstance();
+
+private:
+    StoppedState();
+    static StoppedState mInstance;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_DBTPLYENGINESTATECHART_H
Index: tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyFileManager.h
===================================================================
--- tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyFileManager.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyFileManager.h	(revision 257)
@@ -0,0 +1,166 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    April, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DbitePlayer file manager.
+///
+/// Detailed description.
+///
+/// @todo Manage a vector of dbite files and update the functions
+///      playModen and configureComponent to support this funtionnality.
+///      Put the type of data that has just been replayed in a protected 
+///      variable of the abstract class in order to the derived class can
+///      know what to do.
+/// @todo Complete the function playMode2.
+/// @todo Make the variable kMaxPendingTimeFromEngineMicrosecs a property.
+
+#ifndef DEF_PACPUS_DBTPLYFILEMANAGER_H
+#define DEF_PACPUS_DBTPLYFILEMANAGER_H
+
+#include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
+#include <Pacpus/DbitePlayer/DbtPlyEngine.h>
+#include <Pacpus/kernel/road_time.h>
+#include <Pacpus/kernel/ComponentBase.h>
+#include <Pacpus/kernel/DbiteFile.h>
+
+#include <QThread>
+
+class QSemaphore;
+
+namespace pacpus {
+
+class DbtPlyEngine;
+
+/// XML config properties:
+///     dbt             PATH(S) path to DBT data file(s), separated by pipe symbol '|', relative to datadir property of DbtPlyEngine
+///         e.g. dbt="gps/ublox.dbt|gps/ublox2.dbt"
+///     ui              INT     graphical user interface (GUI) window number
+///         e.g. ui="0"
+///     verbose         INT     verbosity level
+///         e.g. verbose="1"
+/// @see DbtPlyEngine
+class DBITE_PLAYER_API DbtPlyFileManager
+        : public QThread
+        , public ComponentBase
+{
+    Q_OBJECT
+
+public:
+    /// constructor
+    DbtPlyFileManager(QString name);
+    /// destructor
+    virtual ~DbtPlyFileManager();
+
+    /// the player replays only the last data that has not been yet replayed
+    /// @todo Rename
+    void playMode1 (road_time_t tDbt, bool reverse);
+    /// the player replays all the data that have not been yet replayed
+    /// @todo Rename
+    void playMode2 (road_time_t tDbt, bool reverse);
+
+    /// virtual method: call when new DBT data are replayed
+    virtual void processData(road_time_t time, road_timerange_t timeRange, void * data) = 0;
+    /// @todo Documentation
+    virtual void displayUI();
+
+    /// 3 Virtual methods relative to the ComponentBase inheritance
+    virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
+    /// @todo Documentation
+    virtual void startActivity();
+    /// @todo Documentation
+    virtual void stopActivity();
+
+    /// The loop of the thread
+    virtual void run();
+
+public Q_SLOTS:
+    /// slot activated by the engine when it computes new DBT time
+    void  playData(road_time_t tDbt,road_time_t tNow, bool reverse);
+
+    /// put the file descriptor to the beginning of the file
+    void beginfile();
+
+Q_SIGNALS:
+    /// signal sent to the engine to provide to it the tmin and tmax of the file
+    void tMinMaxIs(road_time_t tmin, road_time_t tmax);
+
+protected:
+    /// Verbosity level
+    int mVerbose;
+
+    /// a pointer on the player engine
+    DbtPlyEngine * mEngine;
+
+    /// the absolute path of the DBT file
+    QString dbtProperty_;
+    /// @todo Documentation
+    QStringList mDbtFilenameList;
+
+    /// The directory where the DBT file is located
+    QString mDbtDataPath;
+
+    /// Display or not the graphical interface
+    bool mShowGui;
+
+    /// @todo Documentation
+    struct dbtStruct
+    {
+        /// Data buffer
+        char * buffer;
+        /// Acquisition time
+        road_time_t t;
+        /// Acquisition timerange
+        road_timerange_t tr;
+    };
+
+    /// @todo Documentation
+    struct dbtStructFile
+    {
+        /// the DBT file descriptor
+        pacpus::DbiteFile * pfile;
+        /// the buffer where the data are stored after the reading and the associated time, timerange and file descriptor
+        dbtStruct cur;
+        /// the previous DBT data, these ones that must be processed
+        dbtStruct toProcess;
+    };
+
+    /// @todo Documentation
+    QList<dbtStructFile> dbt_;
+    /// @todo Documentation
+    int dbtIndex_;
+
+private:
+    /// @todo Documentation
+    bool processDbtFileHdfile(dbtStructFile & dbtFile, pacpus::DbiteFile::ReadDirection direction);
+
+private:
+    // reading backward?
+    bool reverse_;
+
+    /// the estimated DBT time sent by the engine and computed relatively to the state of the player
+    road_time_t timeToRead_;
+
+    /// The mode of replay
+    /// @see playMode1, playMode2 methods
+    int mode_;
+
+    /// The minimum and maximum time of the data contained in the file
+    road_time_t tMin_, tMax_;
+
+    /// the synchronization semaphore with the engine
+    QSemaphore * sync_;
+
+    /// For statistics purpose - delta time between the instant when the tDbt is computed and the instant when it is
+    /// taken into account by the file manager
+    int deltaTDbtTab_[1000];
+    int deltaTDbtTabLoop_;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_DBTPLYFILEMANAGER_H
Index: tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyTrigger.h
===================================================================
--- tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyTrigger.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyTrigger.h	(revision 257)
@@ -0,0 +1,67 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    April, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DbitePlayer trigger.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_DBTPLYTRIGGER_H
+#define DEF_PACPUS_DBTPLYTRIGGER_H
+
+#include <QThread>
+
+#include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
+#include <Pacpus/DbitePlayer/DbtPlyEngine.h>
+#include <Pacpus/kernel/ComponentBase.h>
+#include <Pacpus/kernel/ComponentFactory.h>
+
+#ifdef WIN32
+#   include <windows.h>
+#   include <mmsystem.h>
+#endif
+
+namespace pacpus {
+
+class DbtPlyEngine;
+
+class DBITE_PLAYER_API DbtPlyTrigger
+        : public QThread
+        , public ComponentBase
+{    
+    Q_OBJECT
+
+public:
+    /// @todo Documentation
+    DbtPlyTrigger(QString name);
+    /// @todo Documentation
+    virtual ~DbtPlyTrigger();
+
+    /// @todo Documentation
+    virtual ComponentBase::COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
+
+    /// @todo Documentation
+    virtual void run();
+
+Q_SIGNALS:
+    /// @todo Documentation
+    void triggerSig();
+
+protected:
+    /// @todo Documentation
+    virtual void startActivity();
+    /// @todo Documentation
+    virtual void stopActivity();
+
+private:
+    DbtPlyEngine * mEngine;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_DBTPLYTRIGGER_H
Index: tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyUserInterface.h
===================================================================
--- tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyUserInterface.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/DbitePlayer/DbtPlyUserInterface.h	(revision 257)
@@ -0,0 +1,129 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    April, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DbitePlayer graphical user interface.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_DBTPLYUSERINTERFACE_H
+#define DEF_PACPUS_DBTPLYUSERINTERFACE_H
+
+#include <QWidget>
+
+#include <Pacpus/kernel/ComponentBase.h>
+#include <Pacpus/kernel/ComponentFactory.h>
+#include <Pacpus/DbitePlayer/DbitePlayerConfig.h>
+#include <Pacpus/DbitePlayer/DbtPlyFileManager.h>
+#include <Pacpus/DbitePlayer/DbtPlyEngine.h>
+
+class QButtonGroup;
+class QCheckBox;
+class QCloseEvent;
+class QGroupBox;
+class QLabel;
+class QLayout;
+class QPushButton;
+class QSlider;
+class QTableWidget;
+
+namespace pacpus {
+    
+class DbtPlyEngine;
+class DbtPlyEngineState;
+
+class DBITE_PLAYER_API DbtPlyUserInterface
+        : public QWidget
+        , public ComponentBase
+{
+    Q_OBJECT
+
+public:
+    /// Constructor.
+    ///
+    /// @param name component name
+    /// @see ComponentBase::ComponentBase(QString)
+    DbtPlyUserInterface(QString name);
+
+    /// Destructor.
+    ~DbtPlyUserInterface();
+
+    /// @returns time slider value
+    int getTime();
+
+    /// sets time slider value to 0
+    void resetTime();
+
+public Q_SLOTS:
+    /// Slot.
+    /// Refreshes the state of the player.
+    void displayStateSlot(DbtPlyEngineState * state, float speed);
+
+    /// Slot.
+    /// Displays the max and min times.
+    void displayMinMaxTime(road_time_t min, road_time_t max);
+
+    /// Slot.
+    /// Displays the current time of the player.
+    void displayTime(road_time_t time);
+
+private:
+    /// Configures the component.
+    virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config);
+
+    /// Starts component activity.
+    virtual void startActivity();
+
+    /// Stops component activity.
+    virtual void stopActivity();
+
+    void closeEvent(QCloseEvent * e);
+
+    void connectButtons();
+    void connectDisplay();
+    void connectSlider();
+    QLayout * createMainLayout();
+    QGroupBox * createControlGroupBox();
+    QGroupBox * createComponentListGroupBox();
+    void updateComponentList();
+    
+private:
+    DbtPlyEngine * mEngine;
+
+    QWidget * wTel_ ;
+    QButtonGroup * butGroup;
+    QPushButton * playBut ;
+    QPushButton * pauseBut ;
+    QPushButton * stopBut ;
+    QPushButton * speedUpBut ;
+    QPushButton * speedDownBut ;
+    QLabel * lab;
+    QCheckBox * rev;
+    QSlider * timeSlider;
+    QLabel * timeMinTitle;
+    QLabel * timeMinValue;
+    QLabel * timeMaxTitle;
+    QLabel * timeMaxValue;
+    QLabel * timeCurTitle;
+    QLabel * timeCurValue;
+
+    QTableWidget * componentTableWidget;
+
+    // current max time
+    road_time_t tMax_;
+    // current min time
+    road_time_t tMin_;
+    // current absolute time
+    road_time_t absTime_;
+    // current relative time
+    int relTime_;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_DBTPLYUSERINTERFACE_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/AsyncWorkerBase.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/AsyncWorkerBase.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/AsyncWorkerBase.h	(revision 257)
@@ -0,0 +1,102 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Samuel Gosselin <firstname.surname@utc.fr>
+/// @date    December, 2012
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Async worker base class
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_ASYNC_WORKER_BASE_H
+#define DEF_PACPUS_ASYNC_WORKER_BASE_H
+
+#include <boost/noncopyable.hpp>
+#include <QObject>
+
+#include "Pacpus/kernel/PacpusToolsConfig.h"
+
+namespace pacpus
+{
+
+/// A simple base class for asynchronous workers able to partake in the
+/// Qt slot / signal mechanism
+///
+/// This class represents an asynchronous event-based worker able to receive and
+/// send Qt signals to other workers or threads. The rationale is to be able to
+/// define stateful objects that perform calculations asynchronously, triggered
+/// by external user-defined messages.
+class PACPUSTOOLS_API AsyncWorkerBase
+    : public QObject
+    , private boost::noncopyable
+{
+    Q_OBJECT
+
+public:
+    /// Constructor.
+    AsyncWorkerBase();
+
+    /// Destructor.
+    virtual ~AsyncWorkerBase();
+
+    /// Starts the worker by creating a new thread for it, and calling the setup() virtual method. */
+    void start();
+
+    /// Terminates the worker as soon as there are no more requests pending and its current processing
+    /// is finished.
+    ///
+    /// This method tries to end the worker gracefully. All pending signals sent before the stop() request will
+    /// be honored.
+    /// It is safe to call this method from any thread.
+    ///
+    ///  @param autoDelete if true, deletes the worker as soon as its event loop has finished processing.
+    void stop(bool autoDelete);
+
+    /// @returns @b true if the worker is active, @b false otherwise.
+    bool isActive() const
+    {
+        return active_;
+    }
+
+Q_SIGNALS:
+    /// @todo Documentation
+    void finished();
+    /// @todo Documentation
+    void stopped();
+
+protected:
+    /// @todo Documentation
+    virtual void setup();
+    /// @todo Documentation
+    virtual void process();
+    /// @todo Documentation
+    virtual void cleanup();
+
+    /// Returns true if the worker is stopping.
+    bool isStopping() const { return stopping_; }
+
+private Q_SLOTS:
+    /// @todo Documentation
+    void doSetup();
+    /// @todo Documentation
+    void doFinish();
+
+private:
+    /// Ends the worker, asking the underlying thread to terminate
+    ///
+    /// This method signals the end of processing and requests the underlying thread to terminate. Actual termination
+    /// will occur as soon as all pending signals (including those that may come from other workers during the
+    /// finish request handling) have been processed.
+    void finish();
+
+    // Attributes
+    bool active_;
+    bool stopping_;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_ASYNC_WORKER_BASE_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/BinaryDecoder.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/BinaryDecoder.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/BinaryDecoder.h	(revision 257)
@@ -0,0 +1,1390 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    July, 2008
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Extracts data of specified type in a string.
+///
+/// Purpose:    Extract data of specified type in a string (char *)
+/// Usage:
+///     bool xDecodeToXXX(T* result, const char * data, const unsigned int startBit, const unsigned int length)
+///     => x = format (i:Intel, Little Endian)
+///                   (m:Motorola, Big Endian)
+///     => XXX = type of return value
+///                   (Bool = bool)
+///                   (I8 = char - 8 bits)
+///                   (UI8 = unsigned char - 8 bits)
+///                   (I16 = short - 16 bits)
+///                   (UI16 = unsigned short - 16 bits)
+///                   (I32 = long - 32 bits)
+///                   (UI32 = unsigned long - 32 bits)
+///                   (I64 = long long - 64 bits)
+///                   (UI16 = unisgned long long - 64 bits)
+///
+///     ex: inline bool mDecodeToUI16(r, str, 8, 12);
+
+#ifndef BINARYDECODER_H
+#define BINARYDECODER_H
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+#include <stdio.h>
+
+//////////////////////////////////////////////////////////////////////////
+// print the data in the hexadecimal format in the console
+inline void displayData(const unsigned char * data, const unsigned long length, const int id)
+{
+    printf("\ndata = ");
+    for (unsigned int i = 0;i< length;++i )
+        printf("%02x ",data[i]);
+    printf(" dlc = %ld ID = 0x%x\n", length, id);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// for Big Endian - Motorola coding
+//------------------------------------------------------------------------
+// return true if the signal is spread on more than 1 byte
+// ie if length is greater than ((startBit%8) + 1)
+// example:
+//   7654 3210
+// 0 .... ..||
+// 1 |||| ....
+// startBit is 1 and the length is 8: result gives (1%8)+1 = 2 < length(=6)
+inline bool mSpreadOnMoreThan1Byte(const unsigned int startBit, const unsigned int length)
+{
+    if ( (length  > (startBit & 0x07) + 1) ) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// for Little Endian - Intel coding
+//------------------------------------------------------------------------
+// return true if the signal is spread on more than 1 byte
+// ie if length is greater than 8-(startBit%8)
+// example:
+//   7654 3210
+// 0 ||.. ....
+// 1 .... ||||
+// startBit is 6 and the length is 6: result gives 8-((6%8)) = 2 < length(=6)
+inline bool iSpreadOnMoreThan1Byte(const unsigned int startBit, const unsigned int length)
+{
+    if ( length  > 8 - (startBit & 0x07) ) {
+        return true;
+    } else {
+        return false;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// for Big Endian - Motorola coding
+//------------------------------------------------------------------------
+// return true if the signal is spread on more than 2 bytes
+// ie if (length - ((startBit%8) + 1) is greater than 8
+// example:
+//   7654 3210
+// 0 .... ...|
+// 1 |||| ||||
+// 2 ||.. ....
+// the start bit is 0 and the length is 11: result gives 11 - (0%8+1) = 10 (>8)
+//////////////////////////////////////////////////////////////////////////
+inline bool mSpreadOnMoreThan2Bytes(const unsigned int startBit, const unsigned int length)
+{
+    if ( length - ((startBit & 0x07) + 1) > 8 )
+        return true;
+    else
+        return false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// for Little Endian - Intel coding
+//------------------------------------------------------------------------
+// return true if the signal is spread on more than 2 bytes
+// ie if (length - (8 - startBit)) is greater than 8
+// example:
+//   7654 3210
+// 0 |... ....
+// 1 |||| ||||
+// 2 .... ..||
+// the start bit is 7 and the length is 11: result gives 11 - (8 - 7) = 10 (>8)
+//////////////////////////////////////////////////////////////////////////
+inline bool iSpreadOnMoreThan2Bytes(const unsigned int startBit, const unsigned int length)
+{
+    if ( length - (8 - (startBit & 0x07)) > 8 )
+        return true;
+    else
+        return false;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// for Big Endian - Motorola coding
+//------------------------------------------------------------------------
+// return true if the signal is spread on more than 4 bytes
+// ie if length is greater than ((startBit%8) + 1)
+// example:
+//   7654 3210
+// 0 .... ..||
+// 1 |||| ||||
+// 2 |||| ||||
+// 3 |||| ||||
+// 4 |||. ....
+// startBit is 1 and the length is 29: result gives 29 - ((1%8)+1) = 27 (> 24)
+inline bool mSpreadOnMoreThan4Bytes(const unsigned int startBit, const unsigned int length)
+{
+    return (3*8) < (length - ((startBit & 0x07) + 1));
+}
+
+//////////////////////////////////////////////////////////////////////////
+// for Little Endian - Intel coding
+//------------------------------------------------------------------------
+// return true if the signal is spread on more than 4 bytes
+// ie if length is greater than 8-(startBit%8)
+// example:
+//   7654 3210
+// 0 ||.. ....
+// 1 |||| ||||
+// 2 |||| ||||
+// 3 |||| ||||
+// 4 .... ..||
+// startBit is 6 and the length is 28: result gives 28 - (8-((6%8))) = 26  (>24)
+inline bool iSpreadOnMoreThan4Bytes(const unsigned int startBit, const unsigned int length)
+{
+    return (3*8) < (length - (8 - (startBit & 0x07)));
+}
+
+//////////////////////////////////////////////////////////////////////////
+// return a 8-bits shifted-left mask corresponding to the length parameter
+// ex: shift = 2 and length = 3
+// mask will be 0b00011100
+inline unsigned char getShiftMask8(const unsigned int shift, const unsigned int length)
+{
+    unsigned char mask;
+    switch (length)
+    {
+    case 1: mask = 0x01; break;
+    case 2: mask = 0x03; break;
+    case 3: mask = 0x07; break;
+    case 4: mask = 0x0F; break;
+    case 5: mask = 0x1F; break;
+    case 6: mask = 0x3F; break;
+    case 7: mask = 0x7F; break;
+    case 8: mask = 0xFF; break;
+    default: mask = 0; break;
+    }
+    return mask << shift;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// return a 8-bits mask corresponding to the length parameter with bit order decreasing
+// ex: startBit = 2 and length = 3
+// mask will be 0b00000111
+inline unsigned char getMask8( const unsigned int length )
+{
+    unsigned char mask;
+    switch (length) {
+    case 1: mask = 0x01; break;
+    case 2: mask = 0x03; break;
+    case 3: mask = 0x07; break;
+    case 4: mask = 0x0F; break;
+    case 5: mask = 0x1F; break;
+    case 6: mask = 0x3F; break;
+    case 7: mask = 0x7F; break;
+    case 8: mask = 0xFF; break;
+    default: mask = 0; break;
+    }
+    return mask;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// return a 16-bits shifted-left mask corresponding to the length parameter
+inline unsigned short getShiftMask16(const unsigned int shift, const unsigned int length)
+{
+    unsigned short mask;
+    switch (length) {
+    case 1: mask = 0x0001; break;
+    case 2: mask = 0x0003; break;
+    case 3: mask = 0x0007; break;
+    case 4: mask = 0x000F; break;
+    case 5: mask = 0x001F; break;
+    case 6: mask = 0x003F; break;
+    case 7: mask = 0x007F; break;
+    case 8: mask = 0x00FF; break;
+    case 9: mask = 0x01FF; break;
+    case 10: mask = 0x03FF; break;
+    case 11: mask = 0x07FF; break;
+    case 12: mask = 0x0FFF; break;
+    case 13: mask = 0x1FFF; break;
+    case 14: mask = 0x3FFF; break;
+    case 15: mask = 0x7FFF; break;
+    case 16: mask = 0xFFFF; break;
+    default: mask = 0; break;
+    }
+    return mask << shift;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// return a 16-bits mask corresponding to the length parameter with bit order decreasing
+inline unsigned short getMask16( const unsigned int length )
+{
+    unsigned short mask;
+    switch (length) {
+    case 1: mask = 0x0001; break;
+    case 2: mask = 0x0003; break;
+    case 3: mask = 0x0007; break;
+    case 4: mask = 0x000F; break;
+    case 5: mask = 0x001F; break;
+    case 6: mask = 0x003F; break;
+    case 7: mask = 0x007F; break;
+    case 8: mask = 0x00FF; break;
+    case 9: mask = 0x01FF; break;
+    case 10: mask = 0x03FF; break;
+    case 11: mask = 0x07FF; break;
+    case 12: mask = 0x0FFF; break;
+    case 13: mask = 0x1FFF; break;
+    case 14: mask = 0x3FFF; break;
+    case 15: mask = 0x7FFF; break;
+    case 16: mask = 0xFFFF; break;
+    default: mask = 0; break;
+    }
+    return mask;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// return a 32-bits shifted-left mask corresponding to the length parameter
+inline unsigned long getShiftMask32(const unsigned int shift, const unsigned int length)
+{
+    unsigned long mask;
+    switch (length) {
+    case 1: mask = 0x00000001; break;
+    case 2: mask = 0x00000003; break;
+    case 3: mask = 0x00000007; break;
+    case 4: mask = 0x0000000F; break;
+    case 5: mask = 0x0000001F; break;
+    case 6: mask = 0x0000003F; break;
+    case 7: mask = 0x0000007F; break;
+    case 8: mask = 0x000000FF; break;
+    case 9: mask = 0x000001FF; break;
+    case 10: mask = 0x000003FF; break;
+    case 11: mask = 0x000007FF; break;
+    case 12: mask = 0x00000FFF; break;
+    case 13: mask = 0x00001FFF; break;
+    case 14: mask = 0x00003FFF; break;
+    case 15: mask = 0x00007FFF; break;
+    case 16: mask = 0x0000FFFF; break;
+    case 17: mask = 0x0001FFFF; break;
+    case 18: mask = 0x0003FFFF; break;
+    case 19: mask = 0x0007FFFF; break;
+    case 20: mask = 0x000FFFFF; break;
+    case 21: mask = 0x001FFFFF; break;
+    case 22: mask = 0x003FFFFF; break;
+    case 23: mask = 0x007FFFFF; break;
+    case 24: mask = 0x00FFFFFF; break;
+    case 25: mask = 0x01FFFFFF; break;
+    case 26: mask = 0x03FFFFFF; break;
+    case 27: mask = 0x07FFFFFF; break;
+    case 28: mask = 0x0FFFFFFF; break;
+    case 29: mask = 0x1FFFFFFF; break;
+    case 30: mask = 0x3FFFFFFF; break;
+    case 31: mask = 0x7FFFFFFF; break;
+    case 32: mask = 0xFFFFFFFF; break;
+    default: mask = 0; break;
+    }
+    return mask << shift;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// return a 32-bits mask corresponding to the length parameter with bit order decreasing
+inline unsigned long getMask32( const unsigned int length )
+{
+    unsigned long mask;
+    switch (length) {
+    case 1: mask = 0x00000001; break;
+    case 2: mask = 0x00000003; break;
+    case 3: mask = 0x00000007; break;
+    case 4: mask = 0x0000000F; break;
+    case 5: mask = 0x0000001F; break;
+    case 6: mask = 0x0000003F; break;
+    case 7: mask = 0x0000007F; break;
+    case 8: mask = 0x000000FF; break;
+    case 9: mask = 0x000001FF; break;
+    case 10: mask = 0x000003FF; break;
+    case 11: mask = 0x000007FF; break;
+    case 12: mask = 0x00000FFF; break;
+    case 13: mask = 0x00001FFF; break;
+    case 14: mask = 0x00003FFF; break;
+    case 15: mask = 0x00007FFF; break;
+    case 16: mask = 0x0000FFFF; break;
+    case 17: mask = 0x0001FFFF; break;
+    case 18: mask = 0x0003FFFF; break;
+    case 19: mask = 0x0007FFFF; break;
+    case 20: mask = 0x000FFFFF; break;
+    case 21: mask = 0x001FFFFF; break;
+    case 22: mask = 0x003FFFFF; break;
+    case 23: mask = 0x007FFFFF; break;
+    case 24: mask = 0x00FFFFFF; break;
+    case 25: mask = 0x01FFFFFF; break;
+    case 26: mask = 0x03FFFFFF; break;
+    case 27: mask = 0x07FFFFFF; break;
+    case 28: mask = 0x0FFFFFFF; break;
+    case 29: mask = 0x1FFFFFFF; break;
+    case 30: mask = 0x3FFFFFFF; break;
+    case 31: mask = 0x7FFFFFFF; break;
+    case 32: mask = 0xFFFFFFFF; break;
+    default: mask = 0; break;
+    }
+    return mask;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// return a 64-bits mask corresponding to the length parameter with bit order decreasing
+inline unsigned long long getMask64( const unsigned int length )
+{
+    unsigned long long mask;
+    switch (length) {
+    case 1: mask = 0x0000000000000001ULL; break;
+    case 2: mask = 0x0000000000000003ULL; break;
+    case 3: mask = 0x0000000000000007ULL; break;
+    case 4: mask = 0x000000000000000FULL; break;
+    case 5: mask = 0x000000000000001FULL; break;
+    case 6: mask = 0x000000000000003FULL; break;
+    case 7: mask = 0x000000000000007FULL; break;
+    case 8: mask = 0x00000000000000FFULL; break;
+    case 9: mask = 0x00000000000001FFULL; break;
+    case 10: mask = 0x00000000000003FFULL; break;
+    case 11: mask = 0x00000000000007FFULL; break;
+    case 12: mask = 0x0000000000000FFFULL; break;
+    case 13: mask = 0x0000000000001FFFULL; break;
+    case 14: mask = 0x0000000000003FFFULL; break;
+    case 15: mask = 0x0000000000007FFFULL; break;
+    case 16: mask = 0x000000000000FFFFULL; break;
+    case 17: mask = 0x000000000001FFFFULL; break;
+    case 18: mask = 0x000000000003FFFFULL; break;
+    case 19: mask = 0x000000000007FFFFULL; break;
+    case 20: mask = 0x00000000000FFFFFULL; break;
+    case 21: mask = 0x00000000001FFFFFULL; break;
+    case 22: mask = 0x00000000003FFFFFULL; break;
+    case 23: mask = 0x00000000007FFFFFULL; break;
+    case 24: mask = 0x0000000000FFFFFFULL; break;
+    case 25: mask = 0x0000000001FFFFFFULL; break;
+    case 26: mask = 0x0000000003FFFFFFULL; break;
+    case 27: mask = 0x0000000007FFFFFFULL; break;
+    case 28: mask = 0x000000000FFFFFFFULL; break;
+    case 29: mask = 0x000000001FFFFFFFULL; break;
+    case 30: mask = 0x000000003FFFFFFFULL; break;
+    case 31: mask = 0x000000007FFFFFFFULL; break;
+    case 32: mask = 0x00000000FFFFFFFFULL; break;
+    case 33: mask = 0x00000001FFFFFFFFULL; break;
+    case 34: mask = 0x00000003FFFFFFFFULL; break;
+    case 35: mask = 0x00000007FFFFFFFFULL; break;
+    case 36: mask = 0x0000000FFFFFFFFFULL; break;
+    case 37: mask = 0x0000001FFFFFFFFFULL; break;
+    case 38: mask = 0x0000003FFFFFFFFFULL; break;
+    case 39: mask = 0x0000007FFFFFFFFFULL; break;
+    case 40: mask = 0x000000FFFFFFFFFFULL; break;
+    case 41: mask = 0x000001FFFFFFFFFFULL; break;
+    case 42: mask = 0x000003FFFFFFFFFFULL; break;
+    case 43: mask = 0x000007FFFFFFFFFFULL; break;
+    case 44: mask = 0x00000FFFFFFFFFFFULL; break;
+    case 45: mask = 0x00001FFFFFFFFFFFULL; break;
+    case 46: mask = 0x00003FFFFFFFFFFFULL; break;
+    case 47: mask = 0x00007FFFFFFFFFFFULL; break;
+    case 48: mask = 0x0000FFFFFFFFFFFFULL; break;
+    case 49: mask = 0x0001FFFFFFFFFFFFULL; break;
+    case 50: mask = 0x0003FFFFFFFFFFFFULL; break;
+    case 51: mask = 0x0007FFFFFFFFFFFFULL; break;
+    case 52: mask = 0x000FFFFFFFFFFFFFULL; break;
+    case 53: mask = 0x001FFFFFFFFFFFFFULL; break;
+    case 54: mask = 0x003FFFFFFFFFFFFFULL; break;
+    case 55: mask = 0x007FFFFFFFFFFFFFULL; break;
+    case 56: mask = 0x00FFFFFFFFFFFFFFULL; break;
+    case 57: mask = 0x01FFFFFFFFFFFFFFULL; break;
+    case 58: mask = 0x03FFFFFFFFFFFFFFULL; break;
+    case 59: mask = 0x07FFFFFFFFFFFFFFULL; break;
+    case 60: mask = 0x0FFFFFFFFFFFFFFFULL; break;
+    case 61: mask = 0x1FFFFFFFFFFFFFFFULL; break;
+    case 62: mask = 0x3FFFFFFFFFFFFFFFULL; break;
+    case 63: mask = 0x7FFFFFFFFFFFFFFFULL; break;
+    case 64: mask = 0xFFFFFFFFFFFFFFFFULL; break;
+    default: mask = 0; break;
+    }
+    return mask;
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Returns a 64-bits shifted-left mask corresponding to the length parameter
+inline unsigned long long getShiftMask64(const unsigned int shift, const unsigned int length)
+{
+    unsigned long long mask;
+    mask = getMask64( length );
+    mask <<= shift;
+    return mask;
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Big Endian - Motorola coding
+inline bool mDecodeToBool(const unsigned char * data, const unsigned int startBit)
+{
+    return (data[startBit>>3] & getShiftMask8(startBit&0x07,1)) != 0;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// to test ?
+inline bool mDecodeToUI64(unsigned long long * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 64) {
+        *result = 0;
+        return false;
+    }
+
+    if (length == 64) {
+        // only work if data are correctly byte-aligned
+        unsigned char c[8];   // c[0] = MSB
+        for (int i = 0 ; i < 8 ; i++)
+            c[i] = data[(startBit>>3) + i];
+
+        unsigned long long temp = 0;
+        for (int i = 0 ; i < 8 ; i++)
+            temp += (c[i] << ( 56 - (8*i) ) );
+        *result = temp;
+        return true;
+    } else {
+        unsigned char c[8], mask[8], nbBits[8]; // MSB = c[0]
+        nbBits[0] = (startBit & 0x07)+1;
+        mask[0] = getMask8( nbBits[0] );
+        c[0] = data[startBit>>3] & mask[0];
+        unsigned short nbBitsIncrement = nbBits[0];
+        for (int i = 1 ; i < 8 ; i++) {
+            nbBits[i] = static_cast<unsigned char>( (length - nbBitsIncrement) < 8 ? length - nbBitsIncrement : 8 );
+            nbBitsIncrement += nbBits[i];
+            mask[i] = getShiftMask8(8 - nbBits[i],nbBits[i]);
+            c[i] = data[(startBit>>3) + i] & mask[i];
+        }
+
+        unsigned long long temp = 0;
+        for (int i = 0 ; i < 8 ; i++)
+            temp += (c[i] << ( 56 - (8*i) ) );
+        *result = temp >> (56 + (startBit&0x07) + 1 - length);
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// to test ?
+inline bool mDecodeToI64(long long *result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>64) {
+        *result = 0;
+        return false;
+    }
+
+    if (length == 64) {
+        // only work if data are correctly byte-aligned
+        unsigned char c[8];   // c[0] = MSB
+        for (int i = 0 ; i < 8 ; i++)
+            c[i] = data[(startBit>>3) + i];
+
+        for (int i = 0 ; i < 8 ; i++)
+            *result += (c[i] << ( 56 - (8*i) ) );
+
+        // need to be signed ??
+        return true;
+    } else {
+        unsigned char c[8], mask[8], nbBits[8]; // MSB = c[0]
+        nbBits[0] = (startBit & 0x07)+1;
+        mask[0] = getMask8( nbBits[0] );
+        c[0] = data[startBit>>3] & mask[0];
+        unsigned short nbBitsIncrement = nbBits[0];
+        for (int i = 1 ; i < 8 ; i++) {
+            nbBits[i] = static_cast<unsigned char>( (length - nbBitsIncrement) < 8 ? (length - nbBitsIncrement) : 8 );
+            nbBitsIncrement += nbBits[i];
+            mask[i] = getShiftMask8(8 - nbBits[i],nbBits[i]);
+            c[i] = data[(startBit>>3) + i] & mask[i];
+        }
+        unsigned long long temp = 0;
+        for (int i = 0 ; i < 8 ; i++)
+            temp += (c[i] << ( 56 - (8*i) ) );
+        temp >>= (56 + (startBit&0x07) + 1 - length);
+
+        if ( temp & getShiftMask64(length-1,1) )
+            // do the two's complement to get the signed value if the msb=1
+            *result = -1 * ( ( (~temp) + 1 ) & getMask64(length) );
+        else
+            *result = temp;
+
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// ok
+inline bool mDecodeToUI32(unsigned long *result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>32) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 5 bytes
+    if (mSpreadOnMoreThan4Bytes(startBit, length)) {
+        // decode in a 64-bits integer
+        unsigned long long temp;
+        if (mDecodeToUI64(&temp,data,startBit,length))
+        {
+            *result = static_cast<unsigned long> (temp);
+            return true;
+        } else {
+            *result = 0;
+            return false;
+        }
+    } else {
+        if (length == 32) {
+            // only work if data are correctly byte-aligned
+            unsigned char c1, c2, c3, c4;
+            c1 = data[startBit>>3];
+            c2 = data[(startBit>>3) + 1];
+            c3 = data[(startBit>>3) + 2];
+            c4 = data[(startBit>>3) + 3];
+
+            *result = (c1 << 24) + (c2 << 16) + (c3 << 8) + c4;
+            return true;
+        } else {
+            unsigned char c[4], mask[4], nbBits[4]; // MSB = c[0]
+            nbBits[0] = (startBit & 0x07)+1;
+            nbBits[1] = static_cast<unsigned char>( (length - nbBits[0]) < 8 ? length - nbBits[0] : 8 );
+            nbBits[2] = static_cast<unsigned char>( (length - nbBits[0] - nbBits[1]) < 8 ? (length - nbBits[0] - nbBits[1]) : 8 );
+            nbBits[3] = static_cast<unsigned char>( (length - nbBits[0] - nbBits[1] - nbBits[2]) < 8 ? (length - nbBits[0] - nbBits[1] - nbBits[2]) : 8 );
+            mask[0] = getMask8( nbBits[0] );
+            mask[1] = getShiftMask8(8 - nbBits[1],nbBits[1]);
+            mask[2] = getShiftMask8(8 - nbBits[2],nbBits[2]);
+            mask[3] = getShiftMask8(8 - nbBits[3],nbBits[3]);
+            c[0] = data[startBit>>3] & mask[0];
+            c[1] = data[(startBit>>3) + 1] & mask[1];
+            c[2] = data[(startBit>>3) + 2] & mask[2];
+            c[3] = data[(startBit>>3) + 3] & mask[3];
+            *result = ( (c[0]<<24) + (c[1]<<16) + (c[2]<<8) + c[3]) >> (24 + (startBit&0x07) + 1 - length);
+            return true;
+        }
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// ok
+inline bool mDecodeToI32(long *result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>32) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 5 bytes
+    if (mSpreadOnMoreThan4Bytes(startBit, length)) {
+        // decode in a 64-bits integer
+        long long temp;
+        if (mDecodeToI64(&temp,data,startBit,length))
+        {
+            *result = static_cast<long>(temp);
+            return true;
+        } else {
+            *result = 0;
+            return false;
+        }
+    } else {
+        if (length == 32)
+        {
+            // only work if data are correctly byte-aligned
+            unsigned char c1, c2, c3, c4;
+            c1 = data[startBit>>3];
+            c2 = data[(startBit>>3) + 1];
+            c3 = data[(startBit>>3) + 2];
+            c4 = data[(startBit>>3) + 3];
+
+            *result = (c1 << 24) + (c2 << 16) + (c3 << 8) + c4;
+            return true;
+        } else {
+            unsigned char c[4], mask[4], nbBits[4]; // MSB = c[0]
+            nbBits[0] = (startBit & 0x07) + 1;
+            nbBits[1] = static_cast<unsigned char>( (length - nbBits[0]) < 8 ? length - nbBits[0] : 8 );
+            nbBits[2] = static_cast<unsigned char>( (length - nbBits[0] - nbBits[1]) < 8 ? (length - nbBits[0] - nbBits[1]) : 8 );
+            nbBits[3] = static_cast<unsigned char>( (length - nbBits[0] - nbBits[1] - nbBits[2]) < 8 ? length - nbBits[0] - nbBits[1] - nbBits[2] : 8 );
+            mask[0] = getMask8( nbBits[0] );
+            mask[1] = getShiftMask8(8 - nbBits[1],nbBits[1]);
+            mask[2] = getShiftMask8(8 - nbBits[2],nbBits[2]);
+            mask[3] = getShiftMask8(8 - nbBits[3],nbBits[3]);
+            c[0] = data[startBit>>3] & mask[0];
+            c[1] = data[(startBit>>3) + 1] & mask[1];
+            c[2] = data[(startBit>>3) + 2] & mask[2];
+            c[3] = data[(startBit>>3) + 3] & mask[3];
+
+            unsigned long temp = ( (c[0]<<24) + (c[1]<<16) + (c[2]<<8) + c[3]) >> (24 + (startBit&0x07) + 1 - length);
+            if (temp & getShiftMask32(length-1, 1))
+                // do the two's complement to get the signed value if the msb=1
+                *result = -1 * ( ( (~temp) + 1 ) & getMask32(length) );
+            else
+                *result = temp;
+            return true;
+        }
+    }
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// ok
+inline bool mDecodeToUI16(unsigned short * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 16) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 3 bytes
+    if (mSpreadOnMoreThan2Bytes(startBit, length)) {
+        // decode in a 32-bits integer
+        unsigned long temp;
+        if (mDecodeToUI32(&temp,data,startBit,length)) {
+            *result = static_cast<unsigned short>(temp);
+            return true;
+        } else {
+            *result = 0;
+            return false;
+        }
+    } else {
+        if (length == 16) {
+            // only work if data are correctly byte-aligned
+            unsigned char LSB, MSB;
+            MSB = data[startBit>>3];
+            LSB = data[(startBit>>3) + 1];
+
+            *result = ( (MSB << 8) + LSB );
+            return true;
+        } else {
+            unsigned char LSB, MSB, maskMSB, maskLSB, nbBitsMSB, nbBitsLSB;
+            nbBitsMSB = (startBit & 0x07) + 1;  // the number of bits contained in the MSB
+            nbBitsLSB = static_cast<unsigned char>(length - nbBitsMSB);
+            maskMSB = getMask8( nbBitsMSB );
+            maskLSB = getShiftMask8(8 - nbBitsLSB , nbBitsLSB);
+            MSB = data[startBit>>3] & maskMSB;
+            LSB = data[(startBit>>3) + 1] & maskLSB;
+
+            *result = ( (MSB << 8) + LSB ) >> (8 + (startBit&0x07) + 1 - length);
+            return true;
+        }
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// ok
+inline bool mDecodeToI16(short *result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 16) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 3 bytes
+    if (mSpreadOnMoreThan2Bytes(startBit, length)) {
+        // decode in a 32-bits integer
+        long temp;
+        if (mDecodeToI32(&temp, data, startBit, length)) {
+            *result = (short)temp;
+            return true;
+        } else  {
+            *result = 0;
+            return false;
+        }
+    } else {
+        // ok data are stored at most in 2 bytes
+        if (length == 16) {
+            // only work if data are correctly byte-aligned
+            unsigned char LSB, MSB;
+            MSB = data[startBit>>3];
+            LSB = data[(startBit>>3) + 1];
+            short temp = (MSB << 8) + LSB;
+
+            // Attention : a-t on besoin d'appliquer le signe ?
+            // n'est-il pas deja inclu dans la donn�e comme elle est correctement align�e sur l'octet ?
+            if (temp & 0x8000) {
+                // do the two's complement to get the signed value
+                *result = - ( ( (~temp) + 1 ) & 0xFFFF );
+            } else {
+                *result = temp;
+            }
+            return true;
+        } else {
+            unsigned char LSB, MSB, maskMSB, maskLSB, nbBitsMSB, nbBitsLSB;
+            nbBitsMSB = (startBit & 0x07) + 1;  // the number of bits contained in the MSB
+            nbBitsLSB = static_cast<unsigned char>(length - nbBitsMSB);
+            maskMSB = getMask8( nbBitsMSB );
+            maskLSB = getShiftMask8(8 - nbBitsLSB , nbBitsLSB);
+            MSB = data[startBit>>3] & maskMSB;
+            LSB = data[(startBit>>3) + 1] & maskLSB;
+            // assign the MSB and LSB char in the short integer value and right-shift
+            // to place the lsb to the bit 0
+            unsigned short temp = ( (MSB << 8) + LSB ) >> (8 + (startBit&0x07) + 1 - length);
+            if (temp & getShiftMask16(length-1,1))
+                // do the two's complement to get the signed value if the msb=1
+                *result = -1 * ( ( (~temp) + 1 ) & getMask16(length) );
+            else
+                *result = temp;
+            return true;
+        }
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// OK
+inline bool mDecodeToUI8(unsigned char * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 8) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 2 bytes
+    if (mSpreadOnMoreThan1Byte(startBit, length)) {
+        // decode in a 16-bit integer
+        unsigned short temp;
+        if ( mDecodeToUI16(&temp, data, startBit, length) ) {
+            *result = static_cast<unsigned char>(temp);
+            return true;
+        } else {
+            *result = 0;
+            return true;
+        }
+    } else {
+        // ok data is stored at most in 1 byte
+        unsigned char c;
+        c = data[startBit>>3];                // >>3 <=> div 8
+        c >>= (8-((startBit & 0x07)+1));      // &0x07 <=> modulo 8
+        *result = c & getMask8( length );
+
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// OK
+inline bool mDecodeToI8(char * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 8) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 2 bytes
+    if (mSpreadOnMoreThan1Byte(startBit, length)) {
+        // decode in a 16-bit integer
+        short temp;
+        if ( mDecodeToI16(&temp, data, startBit, length) ) {
+            *result = static_cast<char>(temp);
+            return true;
+        } else {
+            *result = 0;
+            return true;
+        }
+    }
+    else {
+        // ok data is stored at most in 1 byte
+        char c;
+        c = data[startBit>>3];
+        c >>= (8-((startBit & 0x07)+1));
+        c = c & getMask8( length );
+
+        // a-t-on besoin d'appliquer le signe dans le cas ou length = 8
+        // la donnee est correctement alignee sur l'octet donc le signe est peut-etre compris
+        if (c & getShiftMask8(length-1,1))
+            // do the two's complement to get the signed value if the msb=1
+            *result = - ( ( (~c) + 1 ) & getMask8(length) );
+        else
+            *result = c;
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// ok
+inline bool iDecodeToBool(const unsigned char * data, const unsigned int startBit)
+{
+    mDecodeToBool(data, startBit);
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// pas de depassement possible - la trame CAN fait 64 bits max
+// gerer le signe
+inline bool iDecodeToUI64(unsigned long long * /*result*/, const unsigned char * /*data*/, const unsigned int /*startBit*/, const unsigned int /*length*/)
+{
+    return true;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// pas de depassement possible - la trame CAN fait 64 bits max
+// gerer le signe
+inline bool iDecodeToI64(long long * /*result*/, const unsigned char * /*data*/, const unsigned int /*startBit*/, const unsigned int /*length*/)
+{
+    return true;
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// gerer le depassement sur plus de 4 octets : necessite la fonction de decodage 64 bits
+// verifier le depassement avant cette ligne :   if (length == 32)
+inline bool iDecodeToUI32(unsigned long * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>32) {
+        *result = 0;
+        return false;
+    }
+
+    if (length == 32) {
+        // only work if length == 32
+        unsigned char c1, c2, c3, c4;
+        c4 = data[startBit>>3];       // LSB
+        c3 = data[(startBit>>3) + 1];
+        c2 = data[(startBit>>3) + 2];
+        c1 = data[(startBit>>3) + 3]; // MSB
+
+        *result = (c1 << 24) + (c2 << 16) + (c3 << 8) + c4;
+        return true;
+    } else {
+        // todo
+        *result = 0;
+        return false;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// gerer le signe
+// gerer le depassement sur plus de 4 octets : necessite la fonction de decodage 64 bits
+// verifier le depassement avant cette ligne :   if (length == 32)
+inline bool iDecodeToI32(long * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>32) {
+        *result = 0;
+        return false;
+    }
+
+    if (length == 32) {
+        // only work if length == 32
+        unsigned char c1, c2, c3, c4;
+        c4 = data[startBit>>3];       // LSB
+        c3 = data[(startBit>>3) + 1];
+        c2 = data[(startBit>>3) + 2];
+        c1 = data[(startBit>>3) + 3]; // MSB
+
+        *result = (c1 << 24) + (c2 << 16) + (c3 << 8) + c4;
+        return true;
+    } else {
+        // todo
+        *result = 0;
+        return false;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// gerer le depassement sur plus de 2 octets
+// verifier le depassement avant cette ligne :   if (length == 16)
+inline bool iDecodeToUI16(unsigned short * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 16) {
+        *result = 0;
+        return false;
+    }
+
+    if (length == 16) {
+        // only work if length == 16
+        unsigned char LSB, MSB;
+        LSB = data[startBit>>3];
+        MSB = data[(startBit>>3) + 1];
+
+        *result = (MSB << 8) + LSB;
+        return true;
+    } else {
+        // TODO
+        *result = 0;
+        return false;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// gerer le signe
+// gerer le depassement sur plus de 2 octets
+// verifier le depassement avant cette ligne :   if (length == 16)
+// manque le decalage
+inline bool iDecodeToI16(short * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 16) {
+        *result = 0;
+        return false;
+    }
+
+    if (length == 16) {
+        // only work if length == 16
+        unsigned char LSB, MSB;
+        LSB = data[startBit>>3];
+        MSB = data[(startBit>>3) + 1];
+
+        *result = (MSB << 8) + LSB;
+        return true;
+    } else {
+        // todo
+        *result = 0;
+        return false;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// OK
+inline bool iDecodeToUI8(unsigned char * result,const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 8) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 2 bytes
+    if (iSpreadOnMoreThan1Byte(startBit, length)) {
+        // decode in a 16-bit integer
+        unsigned short temp;
+        if ( iDecodeToUI16(&temp, data, startBit, length) ) {
+            // and cast in an 8 bit integer
+            *result = (unsigned char) temp;
+            return true;
+        } else {
+            *result = 0;
+            return true;
+        }
+    } else {
+        // ok data is stored at most in 1 byte
+        unsigned char c;
+        c = data[startBit>>3];
+        c >>= (startBit & 0x07);
+        *result = c & getMask8( length );
+
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// OK
+inline bool iDecodeToI8(char * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 8) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 2 bytes
+    if (iSpreadOnMoreThan1Byte(startBit, length)) {
+        // decode in a 16-bit integer
+        short temp;
+        if ( iDecodeToI16(&temp, data, startBit, length) ) {
+            // and cast in an 8 bit integer
+            *result = static_cast<char>(temp);
+            return true;
+        } else {
+            *result = 0;
+            return true;
+        }
+    } else {
+        // ok data is stored at most in 1 byte
+        char c;
+        c = data[startBit>>3];     // >>3 <=> div 8
+        c >>= (startBit & 0x07);    // &0x07 <=> modulo 8
+        c = c & getMask8( length );
+        if (c & getShiftMask8(length-1,1))
+            // do the two's complement to get the signed value if the msb=1
+            *result = - ( ( (~c) + 1 ) & getMask8(length) );
+        else
+            *result = c;
+
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// ok
+inline bool mobileyemDecodeToUI16(unsigned short * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>16){ *result = 0; return false; }
+
+    // verify that the frame is not spread in 3 bytes
+    /*    if (mSpreadOnMoreThan2Bytes(startBit, length))
+    {
+    // decode in a 32-bits integer
+    unsigned long temp;
+    if (mDecodeToUI32(&temp,data,startBit,length))
+    {
+    *result = static_cast<unsigned short>(temp);
+    return true;
+    } else {
+    *result = 0;
+    return false;
+    }
+    }
+    else
+    {*/
+    if (length == 16) {
+        // only work if data are correctly byte-aligned
+        unsigned char LSB, MSB;
+        MSB = data[startBit>>3];
+        LSB = data[(startBit>>3) + 1];
+
+        *result = ( (MSB << 8) + LSB );
+        return true;
+    } else {
+        unsigned char LSB, MSB, maskMSB, maskLSB, nbBitsMSB, nbBitsLSB;
+        nbBitsMSB = (startBit & 0x07) + 1;  // the number of bits contained in the MSB
+        nbBitsLSB = static_cast<unsigned char>(length - nbBitsMSB);
+        maskMSB = getMask8( nbBitsMSB );
+        maskLSB = getShiftMask8(8 - nbBitsLSB , nbBitsLSB);
+        MSB = data[startBit>>3] & maskMSB;
+        LSB = data[(startBit>>3) + 1] & maskLSB;
+
+        *result = ( (MSB << 8) + LSB ) >> (8 + (startBit&0x07) + 1 - length);
+        return true;
+    }
+    //}
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// ok
+inline bool mobileyemDecodeToI16(short *result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>16) { *result = 0; return false; }
+
+    // verify that the frame is not spread in 3 bytes
+    /*    if (mSpreadOnMoreThan2Bytes(startBit, length))
+    {
+    // decode in a 32-bits integer
+    long temp;
+    if (mDecodeToI32(&temp, data, startBit, length)) {
+    *result = (short)temp;
+    return true;
+    } else  {
+    *result = 0;
+    return false;
+    }
+    }
+    else  // ok data are stored at most in 2 bytes
+    {*/
+    if (length == 16)
+    {
+        // only work if data are correctly byte-aligned
+        unsigned char LSB, MSB;
+        MSB = data[startBit>>3];
+        LSB = data[(startBit>>3) + 1];
+        short temp = (MSB << 8) + LSB;
+
+        // Attention : a-t on besoin d'appliquer le signe ?
+        // n'est-il pas deja inclu dans la donn�e comme elle est correctement align�e sur l'octet ?
+        if (temp & 0x8000) {
+            // do the two's complement to get the signed value
+            *result = - ( ( (~temp) + 1 ) & 0xFFFF );
+        } else {
+            *result = temp;
+        }
+        return true;
+    } else {
+        unsigned char LSB, MSB, maskMSB, maskLSB, nbBitsMSB, nbBitsLSB;
+        nbBitsMSB = (startBit & 0x07)+1;  // the number of bits contained in the MSB
+        nbBitsLSB = static_cast<unsigned char>(length - nbBitsMSB);
+        maskMSB = getMask8( nbBitsMSB );
+        maskLSB = getShiftMask8(8 - nbBitsLSB , nbBitsLSB);
+        MSB = data[startBit>>3] & maskMSB;
+        LSB = data[(startBit>>3) + 1] & maskLSB;
+        // assign the MSB and LSB char in the short integer value and right-shift
+        // to place the lsb to the bit 0
+        unsigned short temp = ( (MSB << 8) + LSB ) >> (8 + (startBit&0x07) + 1 - length);
+        if (temp & getShiftMask16(length-1,1))
+            // do the two's complement to get the signed value if the msb=1
+            *result = -1 * ( ( (~temp) + 1 ) & getMask16(length) );
+        else
+            *result = temp;
+        return true;
+    }
+    //}
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// OK
+inline bool mobileyemDecodeToUI8(unsigned char * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>8) { *result = 0; return false; }
+
+    // verify that the frame is not spread in 2 bytes
+    if (mSpreadOnMoreThan1Byte(startBit, length))
+    {
+        // decode in a 16-bit integer
+        unsigned short temp;
+        if ( mDecodeToUI16(&temp, data, startBit, length) ) {
+            *result = static_cast<unsigned char>(temp);
+            return true;
+        } else {
+            *result = 0;
+            return true;
+        }
+    }
+    else // ok data is stored at most in 1 byte
+    {
+        unsigned char c;
+        c = data[startBit>>3];                // >>3 <=> div 8
+        c >>= (8-((startBit & 0x07)+1));      // &0x07 <=> modulo 8
+        *result = c & getMask8( length );
+
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Big Endian - Motorola coding
+// OK
+inline bool mobileyemDecodeToI8(char * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>8) { *result = 0; return false; }
+
+    // verify that the frame is not spread in 2 bytes
+    if (mSpreadOnMoreThan1Byte(startBit, length))
+    {
+        // decode in a 16-bit integer
+        short temp;
+        if ( mDecodeToI16(&temp, data, startBit, length) ) {
+            *result = static_cast<char>(temp);
+            return true;
+        } else {
+            *result = 0;
+            return true;
+        }
+    }
+    else // ok data is stored at most in 1 byte
+    {
+        char c;
+        c = data[startBit>>3];
+        c >>= (8-((startBit & 0x07)+1));
+        c = c & getMask8( length );
+
+        // a-t-on besoin d'appliquer le signe dans le cas ou length = 8
+        // la donnee est correctement alignee sur l'octet donc le signe est peut-etre compris
+        if (c & getShiftMask8(length-1,1))
+            // do the two's complement to get the signed value if the msb=1
+            *result = - ( ( (~c) + 1 ) & getMask8(length) );
+        else
+            *result = c;
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// OK, mais gerer le depassement sur plus de 2 octets
+inline bool mobileyeiDecodeToUI16(unsigned short * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>16) {
+        *result = 0;
+        return false;
+    }
+
+    if (length == 16) {
+        // only work if length == 16
+        unsigned char LSB, MSB;
+        LSB = data[startBit>>3];
+        MSB = data[(startBit>>3) + 1];
+
+        *result = (unsigned short)((MSB << 8) + LSB);
+        return true;
+    } else {
+        unsigned char LSB, MSB, maskMSB, maskLSB, nbBitsMSB, nbBitsLSB;
+
+        nbBitsLSB = static_cast<unsigned char>(8*((startBit>>3) + 1) - startBit);
+        nbBitsMSB = static_cast<unsigned char>(length - nbBitsLSB);
+        maskLSB = getShiftMask8(8 - nbBitsLSB , nbBitsLSB);
+        maskMSB = getMask8( nbBitsMSB );
+        LSB = data[startBit>>3] & maskLSB;
+        MSB = data[(startBit>>3) + 1] & maskMSB;
+
+        *result = (unsigned short)((MSB<<8) + (LSB>>(startBit-8*(startBit>>3))));
+
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// gerer le signe
+// gerer le depassement sur plus de 2 octets
+// verifier le depassement avant cette ligne :   if (length == 16)
+// manque le decalage
+inline bool mobileyeiDecodeToI16(short * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 16) {
+        *result = 0;
+        return false;
+    }
+
+    if (length == 16) {
+        // only work if length == 16
+        unsigned char LSB, MSB;
+        LSB = data[startBit>>3];
+        MSB = data[(startBit>>3) + 1];
+
+        short temp = (MSB << 8) + LSB;
+
+        if (temp & 0x8000) {
+            // do the two's complement to get the signed value
+            *result = - ( ( (~temp) + 1 ) & 0xFFFF );
+        } else {
+            *result = temp;
+        }
+        return true;
+    } else {
+        unsigned char LSB, MSB, maskMSB, maskLSB, nbBitsMSB, nbBitsLSB;
+
+        nbBitsLSB = static_cast<unsigned char>(8*((startBit>>3) + 1) - startBit);
+        nbBitsMSB = static_cast<unsigned char>(length - nbBitsLSB);
+        maskLSB = getShiftMask8(8 - nbBitsLSB , nbBitsLSB);
+        maskMSB = getMask8( nbBitsMSB );
+        LSB = data[startBit>>3] & maskLSB;
+        MSB = data[(startBit>>3) + 1] & maskMSB;
+
+        unsigned short temp = (unsigned short)((MSB<<8) + (LSB>>(startBit-8*(startBit>>3))));
+
+        if (temp & getShiftMask16(length-1,1))
+            // do the two's complement to get the signed value if the msb=1
+            *result = -1 * ( ( (~temp) + 1 ) & getMask16(length) );
+        else
+            *result = temp;
+        return true;
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// OK
+inline bool mobileyeiDecodeToUI8(unsigned char * result,const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length>8) { *result = 0; return false; }
+
+    // verify that the frame is not spread in 2 bytes
+    if (iSpreadOnMoreThan1Byte(startBit, length))
+    {
+        // decode in a 16-bit integer
+        unsigned short temp;
+        if ( iDecodeToUI16(&temp, data, startBit, length) )
+        {
+            // and cast in an 8 bit integer
+            *result = (unsigned char) temp;
+            return true;
+        }
+        else
+        {
+            *result = 0;
+            return true;
+        }
+    }
+    else // ok data is stored at most in 1 byte
+    {
+        unsigned char c;
+        c = data[startBit>>3];
+        c >>= (startBit & 0x07);
+        *result = c & getMask8( length );
+
+        return true;
+    }
+
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Little Endian - Intel coding
+// OK
+inline bool mobileyeiDecodeToI8(char * result, const unsigned char * data, const unsigned int startBit, const unsigned int length)
+{
+    if (length > 8) {
+        *result = 0;
+        return false;
+    }
+
+    // verify that the frame is not spread in 2 bytes
+    if (iSpreadOnMoreThan1Byte(startBit, length)) {
+        // decode in a 16-bit integer
+        short temp;
+        if ( iDecodeToI16(&temp, data, startBit, length) ) {
+            // and cast in an 8 bit integer
+            *result = (char)(temp);
+            return true;
+        } else {
+            *result = 0;
+            return true;
+        }
+    } else {
+        // ok data is stored at most in 1 byte
+        char c;
+        c = data[startBit>>3];     // >>3 <=> div 8
+        c >>= (startBit & 0x07);    // &0x07 <=> modulo 8
+        c = c & getMask8( length );
+        if (c & getShiftMask8(length-1,1))
+            // do the two's complement to get the signed value if the msb=1
+            *result = - ( ( (~c) + 1 ) & getMask8(length) );
+        else
+            *result = c;
+
+        return true;
+    }
+}
+
+inline int mobileyeDecodeCAN(unsigned char *data,unsigned char bigEndian,unsigned int startBit,unsigned int length,unsigned char Signed)
+{
+    int value;
+    unsigned short ustemp16 = 0;
+    unsigned char uctemp8 = 0;
+    short stemp16 = 0;
+    char ctemp8 = 0;
+
+    if(bigEndian) {
+        if(length>8){
+            if(Signed){mobileyemDecodeToI16(&stemp16,data, startBit, length);value = stemp16;}
+            else {mobileyemDecodeToUI16(&ustemp16,data, startBit, length);value = ustemp16;}}
+        else if(Signed) {mobileyemDecodeToI8(&ctemp8,data, startBit, length);value = ctemp8;}
+        else {mobileyemDecodeToUI8(&uctemp8,data, startBit, length);value = uctemp8;}
+    } else {
+        if(length>8){
+            if(Signed) {mobileyeiDecodeToI16(&stemp16,data, startBit, length);value = stemp16;}
+            else {mobileyeiDecodeToUI16(&ustemp16,data, startBit, length);value = ustemp16;}}
+        else if(Signed) {mobileyeiDecodeToI8(&ctemp8,data, startBit, length);value = ctemp8;}
+        else {mobileyeiDecodeToUI8(&uctemp8,data, startBit, length);value = uctemp8;}
+    }
+
+    return value;
+}
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif // BINARYDECODER_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/PeriodicWorker.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/PeriodicWorker.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/PeriodicWorker.h	(revision 257)
@@ -0,0 +1,72 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Samuel Gosselin <firstname.surname@utc.fr>
+/// @date    December, 2012
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Periodic worker base class
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_PERIODIC_WORKER_H
+#define DEF_PACPUS_PERIODIC_WORKER_H
+
+// Includes, pacpus.
+#include "Pacpus/kernel/PacpusToolsConfig.h"
+#include <Pacpus/PacpusTools/AsyncWorkerBase.h>
+
+class QTimer;
+
+namespace pacpus
+{
+
+/// @brief A simple base class for periodic worker.
+/// 
+/// @example
+/// To use the PeriodicWorker, simply inherit from this class when creating your worker.
+/// ~~~
+/// class MyWorker
+///     : public PeriodicWorkder
+/// {
+/// public:
+///     void doWork() { std::cout << "Hey, I'm working!" << std::endl; }
+/// };
+///
+/// // Do its work every second.
+/// MyWorker worker;
+/// worker.startWork(1000);
+/// ~~~
+class PACPUSTOOLS_API PeriodicWorker
+    : public AsyncWorkerBase
+{
+    Q_OBJECT
+public:
+    /// Ctor of PeriodicWorker.
+    PeriodicWorker();
+
+    /// Dtor of PeriodicWorker.
+    virtual ~PeriodicWorker();
+
+    /// Start the periodic worker.
+    /// @param msec Period in mseconds.
+    void startWork(int msec);
+
+    /// Stop the periodic worker, but do not delete it.
+    void stopWork();
+
+    public Q_SLOTS:
+        /// Do the work.
+        /// This method need to be implemented in the subclasses, it will be called
+        /// each time the timer has reached its period.
+        virtual void doWork() = 0;
+
+private:
+    QTimer * mHeartbeat;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_PERIODIC_WORKER_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/PosixShMem.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/PosixShMem.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/PosixShMem.h	(revision 257)
@@ -0,0 +1,48 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    January, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_POSIXSHMEM_H
+#define DEF_PACPUS_POSIXSHMEM_H
+
+#include <QSharedMemory>
+#include <QSystemSemaphore>
+
+#include <Pacpus/PacpusTools/ShMemBase.h>
+
+/// @todo Documentation
+class PosixShMem
+        : public ShMemBase
+{
+public:
+    /// @todo Documentation
+    PosixShMem(const char * name, int size);
+    /// @todo Documentation
+    virtual ~PosixShMem();
+
+    /// @todo Documentation
+    virtual void *read();
+    /// @todo Documentation
+    virtual void write(void *data, int size, unsigned long offset = 0);
+    /// @todo Documentation
+    virtual bool wait(unsigned long timeout = 0);
+    /// @todo Documentation
+    virtual void lockMemory();
+    /// @todo Documentation
+    virtual void unlockMemory();
+
+private:
+    QSystemSemaphore * event_;
+    QSharedMemory * memory_;
+};
+
+#endif // DEF_PACPUS_POSIXSHMEM_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/ShMem.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/ShMem.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/ShMem.h	(revision 257)
@@ -0,0 +1,64 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    January, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_SHMEM_H
+#define DEF_PACPUS_SHMEM_H
+
+#ifdef WIN32
+#   include "Win32ShMem.h"
+/// Defines shared memory as a Windows shared memory
+#   define ShMemType Win32ShMem
+#else
+#   include "PosixShMem.h"
+/// Defines shared memory as a POSIX shared memory
+#   define ShMemType PosixShMem
+#endif
+
+namespace pacpus {
+
+/// Shared memory class.
+///
+/// Inherits from Win32ShMem on Windows system and from PosixShMem on Unix-like systems.
+class ShMem
+    : public ShMemType
+{
+public:
+    /// Ctor of shared memory class.
+    ///
+    /// Creates a shared memory of size @b size and named @b name.
+    /// If a shared memory with the name @b name already exists, than
+    /// it will return object pointing to the same memory.
+    /// If this existing memory space has a size smaller than @b size,
+    /// a warning will be issued.
+    ///
+    /// @param name Name of the created shared memory space.
+    /// @param size Size of the created shared memory space in [bytes].
+    ShMem(const char * name, int size)
+        : ShMemType(name, size)
+    {
+    }
+
+    /// Dtor of shared memory class.
+    ///
+    /// Does nothing.
+    ~ShMem()
+    {
+    }
+
+protected:
+private:
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_SHMEM_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/ShMemBase.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/ShMemBase.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/ShMemBase.h	(revision 257)
@@ -0,0 +1,61 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_SHMEMBASE_H
+#define DEF_PACPUS_SHMEMBASE_H
+
+/// Base class for shared memory objects.
+class ShMemBase
+{
+public:
+    /// Ctor
+    ShMemBase()
+    {
+    }
+
+    /// Dtor
+    virtual ~ShMemBase()
+    {
+    }
+
+    /// Use this method to get the data of the shared memory
+    virtual void *read() = 0; 
+
+    /// Use this method to write data in shared memory
+    virtual void write(void *data, int size, unsigned long offset = 0) = 0; 
+
+    /// Use this method to wait the incoming of new data
+    /// you can specify a timeout in ms to avoid infinite blocking or 0 (infinite)
+    /// @returns @b true if new data available before the timeout, @b false otherwise
+    virtual bool wait(unsigned long timeout = 0) = 0; 
+
+    /// To lock the access to the memory
+    virtual void lockMemory() = 0; 
+
+    /// To unlock the access to the memory
+    virtual void unlockMemory() = 0; 
+
+#ifdef WIN32
+    /// Return the event handle under Windows 
+    /// @todo ... under Linux ? 
+    virtual void * getEventIdentifier() = 0; 
+#endif 
+  
+protected:
+    /// @todo Documentation
+    void * shMem_;
+
+private:
+};
+
+#endif // DEF_PACPUS_SHMEMBASE_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/Win32ShMem.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/Win32ShMem.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/Win32ShMem.h	(revision 257)
@@ -0,0 +1,73 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    January, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Shared memory implementation for Windows.
+///
+/// Shared memory implementation for Windows.
+/// @todo Derive from a common base class. Same for @link PosixShMem @endlink.
+
+#ifndef DEF_PACPUS_WIN32SHMEM_H
+#define DEF_PACPUS_WIN32SHMEM_H
+
+#include "Pacpus\kernel\PacpusToolsConfig.h"
+
+#include <Pacpus/PacpusTools/ShMemBase.h>
+
+/// Windows handle (opaque pointer) type definition
+/// 
+/// Forward declaration of typedefs is impossible.
+typedef void * HANDLE;
+
+#ifdef _MSC_VER
+#   pragma warning(push)
+#   pragma warning(disable: 4275)
+#endif // _MSC_VER
+
+namespace pacpus {
+
+/// Shared memory object for Windows.
+class PACPUSTOOLS_API Win32ShMem
+        : public ShMemBase
+{
+public:
+    /// Ctor
+    Win32ShMem(const char * name, int size);
+    /// Dtor
+    ~Win32ShMem();
+
+    /// @todo Documentation
+    virtual bool wait(unsigned long timeout = 0);
+    /// @todo Documentation
+    virtual void * read();
+    /// @todo Documentation
+    virtual void read(void * mem, int size);
+    /// @todo Documentation
+    virtual void write(void * data, int size, unsigned long offset = 0);
+    /// @todo Documentation
+    virtual void lockMemory();
+    /// @todo Documentation
+    virtual void unlockMemory();
+    /// @todo Documentation
+    virtual void * getEventIdentifier();
+
+protected:  
+
+private:
+    HANDLE semaphore_;
+    HANDLE shMemHandle_;
+    HANDLE event_;
+};
+
+} // namespace pacpus
+
+#ifdef _MSC_VER
+#   pragma warning(pop)
+#endif // _MSC_VER
+
+#endif // DEF_PACPUS_WIN32SHMEM_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/filtering/bayes_filtering.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/filtering/bayes_filtering.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/filtering/bayes_filtering.hpp	(revision 257)
@@ -0,0 +1,92 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __BAYES_FILTERING__
+#define __BAYES_FILTERING__
+
+#include "filter_exception.hpp"
+
+namespace filter {
+
+   /*!
+    * \enum Filters
+    * \brief Enumeration of bayes filters
+    */
+   enum Filters { KF, EKF, UKF, GSF, PF };
+
+
+    /*!
+    * \class BayesDynamicEquation 
+    * \brief This class describes a basic dynamic equation in bayes filtering scheme \n
+    * Class S describe the filter state \n
+    * Class I describe middle variable stored in the filter state \n 
+    * ( for exmaple in  particle scheme, the state vector (S) is a set of particle (I) ) \n   
+    */
+   template <class S, class I> class BayesDynamicEquation{
+     public :
+
+        /*!
+        * \brief virtual method where the a priori state vector must be computed
+        * \param in : the state vector at time k-1  
+        * \param out : the state vector at time k 
+        */  
+       virtual void Predict(S *in,S *out)=0;
+ 
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be evaluated 
+        * \param  s : the middle variable at time k-1 
+        */
+       virtual void EvaluateParameters(I *s)=0;
+
+        
+       /*!
+        * \brief Destructor 
+        */ 
+       virtual ~BayesDynamicEquation(){}
+
+   }; 
+
+
+    /*!
+    * \class BayesMeasureEquation
+    * \brief This class describes a basic measure equation in bayes filtering scheme \n
+    * Class S describe the filter state \n
+    * Class I describe middle variable stored in the filter state  \n
+    * ( for exmaple in  particle scheme, the state vector (S) is a set of particle (I) ) \n   
+    */
+   template <class S, class I> class BayesMeasureEquation{
+       public :
+
+       /*!
+        * \brief virtual method where parameters of the measure equation must be evaluated 
+        * \param s : the meedle variable at time k 
+        */
+        virtual void EvaluateParameters(I *s)=0;
+
+        /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori state vector at time k  
+        * \param out : the a posteriori state vector at time k 
+        */      
+       virtual void Update(S *in,S *out)=0;
+
+       /*!
+        * \brief  Destructor 
+        */ 
+       virtual ~BayesMeasureEquation(){}
+
+   };
+
+} // namespace filter
+
+#endif // __BAYES_FILTERING__
Index: tags/0.0.2/include/Pacpus/PacpusTools/filtering/filter_exception.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/filtering/filter_exception.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/filtering/filter_exception.hpp	(revision 257)
@@ -0,0 +1,36 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __FILTERING_EXECPTION_HPP__
+#define __FILTERING_EXECPTION_HPP__
+
+#include <stdexcept>
+
+namespace filter {
+
+   /*!
+    *  \class filter_error
+    *  \brief This class describes the filtering exception
+    */ 
+   class filter_error : public std::logic_error
+   {
+    public: 
+        /*!
+         * \brief Construtor 
+         */
+        filter_error (const std::string& what_arg) : logic_error( what_arg) {}
+   };
+
+} // namespace filter
+
+#endif // __FILTERING_EXECPTION_HPP__
Index: tags/0.0.2/include/Pacpus/PacpusTools/filtering/gaussian_sum_filtering.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/filtering/gaussian_sum_filtering.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/filtering/gaussian_sum_filtering.hpp	(revision 257)
@@ -0,0 +1,343 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __GAUSSIAN_FILTERING_BASE__
+#define __GAUSSIAN_FILTERING_BASE__
+
+#include "kalman_filtering.hpp"
+#include "../math/pdf.hpp"
+
+#include <vector>
+
+namespace filter{
+
+namespace gaussiansum{
+
+   using namespace math;
+//   using namespace rng;
+   using namespace ublas;
+
+  /*!
+   * \class Gaussian
+   * \brief This class describes a basic weighted kalman state
+   */
+  class Gaussian : public filter::kalman::State{
+     public :
+
+     /*!
+      * \brief Constructor
+      * \param state_size : Size of the state vector 
+      * \param weight_ : Initial weight
+      */
+    Gaussian(const size_t &state_size, const double &weight_){
+       filter::kalman::State::Allocator(state_size);
+       weight=weight_;
+     }
+
+     /**
+      * \brief Constructor
+      * \param state_size : Size of the state vector 
+      */
+
+     Gaussian(const size_t &state_size){
+       filter::kalman::State::Allocator(state_size);
+       weight=0;
+     }
+
+     double weight; /*!< Weight of the Kalman state */
+
+/*
+    protected :*/
+
+//      Gaussian:weight(1){};
+  };
+
+
+  /*!
+   * \class GaussianSet
+   * \brief  This method describes a set of gaussians \n
+   *  A set of gaussains is reprented by a vector of weighted kalman state \n 
+   *  somes methods can be applied to the set of particles like :\n 
+   *  estimate computation, resampling scheme or normalization method \n
+   */
+  template<class G=Gaussian> class GaussianSet {
+    public :
+
+      /** Normalize the weights of gaussian states*/
+      void NormalizeWeights();
+
+      /*!
+      * \brief Allocate the set of gaussians  
+      * \param ngaussian : number of gaussians in the set
+      */  
+      void Allocator(const size_t &ngaussian);
+
+      /*!
+       * \brief Compute the estimate
+       *  \return Vector
+       */  
+      Vector Estimate();
+
+      /*!
+       * \brief Destructor 
+       */
+      ~GaussianSet(){}
+
+
+      std::vector<G>  gaussians; /*!< gaussian states */
+
+
+    };
+
+
+     template<class G> void GaussianSet<G>::NormalizeWeights(){
+        double sum=0;
+        for(typename std::vector<G>::iterator I=gaussians.begin();I!=gaussians.end();I++)
+          sum+=(*I).weight;
+
+        if(sum==0){throw filter_error("Gaussian set normalization weight sum =0");}
+        for(typename std::vector<G>::iterator I=gaussians.begin();I!=gaussians.end();I++)
+           (*I).weight/=sum;
+      }
+
+      
+      template<class G> void GaussianSet<G>::Allocator(const size_t &ngaussian){
+        gaussians.reserve(ngaussian);
+      } 
+
+     template<class G> Vector GaussianSet<G>::Estimate(){
+       Vector estimate = ZeroVector(gaussians[0].X.size());
+       for(typename std::vector<G>::iterator I=gaussians.begin();I!=gaussians.end();I++)
+         estimate+=(*I).X*(*I).weight;
+       return estimate;
+     }
+
+
+  /*!
+   * \class LinearDynamicEquation
+   * \brief This class describes a linear dynamic equation 
+   */
+  template <template <class> class S=GaussianSet, class G=Gaussian > class LinearDynamicEquation:public filter::kalman::LinearDynamicEquation<G>{
+   public :
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be  evaluated 
+        * \param s : weighted kalman state at time k-1
+        */
+        virtual void EvaluateParameters(G *s)=0;
+
+        /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a posteriori set of gaussian at time k-1 
+        * \param out : the a priori set of gaussian at time k 
+        */  
+        virtual void Predict(S<G> *in,S<G> *out);
+
+       /*!
+        * \brief Destructor 
+        */
+        virtual ~LinearDynamicEquation(){}
+   };
+
+
+       template <template <class> class S, class G> void LinearDynamicEquation<S,G>::Predict(S<G> *in,S<G> *out){
+          for(size_t i=0;i<in->gaussians.size();i++){
+            EvaluateParameters(&in->gaussians[i]); 
+
+            out->gaussians[i].P= filter::kalman::LinearDynamicEquation<G>::_A*in->gaussians[i].P*Trans( filter::kalman::LinearDynamicEquation<G>::_A)
+                                 +filter::kalman::LinearDynamicEquation<G>::_B*filter::kalman::LinearDynamicEquation<G>::_Q*Trans(filter::kalman::LinearDynamicEquation<G>::_B);
+            out->gaussians[i].X= filter::kalman::LinearDynamicEquation<G>::_A*in->gaussians[i].X
+                                 +filter::kalman::LinearDynamicEquation<G>::_B*filter::kalman::LinearDynamicEquation<G>::_U;
+            out->gaussians[i].weight=in->gaussians[i].weight;
+          }
+      }
+
+
+  /*!
+   * \class NonLinearDynamicEquation
+   * \brief This class describes a non linear dynamic equation 
+   */
+   template <template <class> class S=GaussianSet, class G=Gaussian > class NonLinearDynamicEquation:public filter::kalman::NonLinearDynamicEquation<G>{
+   public :
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be  evaluated 
+        * \param s : weighted kalman state at time k-1
+        * f= \n
+        * F= \n
+        * G= \n
+        */
+        virtual void EvaluateParameters(G *s)=0;
+
+       /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a posteriori set of gaussian at time k-1 
+        * \param out : the a priori set of gaussian at time k 
+        */  
+      virtual void Predict(S<G> *in,S<G> *out);
+
+      /*!
+       * \brief Destructor 
+       */
+      virtual ~NonLinearDynamicEquation(){}
+  };
+
+
+       template <template <class> class S, class G>  void NonLinearDynamicEquation<S,G>::Predict(S<G> *in,S<G> *out){
+        for(size_t i=0;i<in->gaussians.size();i++){
+            EvaluateParameters(&in->gaussians[i]); 
+
+            out->gaussians[i].P=filter::kalman::NonLinearDynamicEquation<G>::_F*in->gaussians[i].P*Trans(filter::kalman::NonLinearDynamicEquation<G>::_F)
+                                +filter::kalman::NonLinearDynamicEquation<G>::_G*filter::kalman::NonLinearDynamicEquation<G>::_Q*Trans(filter::kalman::NonLinearDynamicEquation<G>::_G);
+            out->gaussians[i].X=filter::kalman::NonLinearDynamicEquation<G>::_f;
+            out->gaussians[i].weight=in->gaussians[i].weight;
+         }
+      }
+
+  /*!
+   * \class LinearMeasureEquation
+   * \brief This class describes a linear measure equation 
+   */  
+   template <template <class> class S=GaussianSet, class G=Gau
+ssian >class LinearMeasureEquation:public filter::kalman::LinearMeasureEquation<G>{
+   public :
+
+        /*!
+        * \brief virtual method where parameters of the measure equation must be  evaluated 
+        * \param s : weighted kalman state at time k-1
+        */
+      virtual void EvaluateParameters(G *s)=0;
+     
+
+       /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori set of gaussian at time k 
+        * \param out : the a posteriori set of gaussian at time k 
+        */  
+        virtual void Update(S<G> *in,S<G> *out);
+
+
+ 
+
+       /*! 
+        * \brief Destructor 
+        */ 
+        virtual ~LinearMeasureEquation(){};
+
+      protected :
+
+       /*!
+        * \brief virtual method where likelihood value for each particle is computed
+        * \param s :  a priori weighted kalman state at time k
+        * \return likelihood value
+        */
+        virtual double ZPDF(G *s);
+
+ };
+
+
+      template <template <class> class S, class G>  void LinearMeasureEquation<S,G>::Update(S<G> *in,S<G> *out){ 
+  
+         for(size_t i=0;i<in->gaussians.size();i++){
+            filter::kalman::LinearMeasureEquation<G>::_coherency=true;
+            EvaluateParameters(&in->gaussians[i]); 
+   
+           if(filter::kalman::LinearMeasureEquation<G>::_coherency){
+              filter::kalman::LinearMeasureEquation<G>::_K=in->gaussians[i].P*Trans(filter::kalman::LinearMeasureEquation<G>::_H) *
+                ( InvQR(filter::kalman::LinearMeasureEquation<G>::_H*in->gaussians[i].P*Trans(filter::kalman::LinearMeasureEquation<G>::_H)+filter::kalman::LinearMeasureEquation<G>::_R) );
+               out->gaussians[i].X=in->gaussians[i].X+filter::kalman::LinearMeasureEquation<G>::_K*(filter::kalman::LinearMeasureEquation<G>::_Z-filter::kalman::LinearMeasureEquation<G>::_H*in->gaussians[i].X);
+               out->gaussians[i].P=in->gaussians[i].P-filter::kalman::LinearMeasureEquation<G>::_K*filter::kalman::LinearMeasureEquation<G>::_H*in->gaussians[i].P;
+           }   
+        
+           out->gaussians[i].weigh=ZPDF(&in->gaussian[i])*in->gaussians[i].weight;
+
+         }
+
+         //out->NormalizeWeights();
+      }
+
+     template <template <class> class S, class G> double LinearMeasureEquation<S,G>::ZPDF(G *s){
+        Vector apvec=filter::kalman::LinearMeasureEquation<G>::_H*s->X;
+        Matrix apcov=filter::kalman::LinearMeasureEquation<G>::_H*s->P*Trans(filter::kalman::LinearMeasureEquation<G>::_H)+filter::kalman::LinearMeasureEquation<G>::_R;
+        Matrix apinv=InvQR(apcov);
+        double apdet=Det(apcov);
+        return (std::exp(-0.5*Dot(filter::kalman::LinearMeasureEquation<G>::_Z-apvec,apinv*(filter::kalman::LinearMeasureEquation<G>::_Z-apvec)))/
+               (std::sqrt(std::pow(2*M_PI,static_cast<int>(apvec.size()))*std::abs(apdet))));
+     }
+
+
+  /*!
+   * \class NonLinearMeasureEquation
+   * \brief This class describes a non linear measure equation 
+   */  
+ template <template <class> class S=GaussianSet, class G=Gaussian > class NonLinearMeasureEquation:public filter::kalman::NonLinearMeasureEquation<G>{
+   public :
+        /*!
+        * \brief virtual method where parameters of the measure equation must be  evaluated 
+        * \param s : weighted kalman state at time k-1
+        * h= \n
+        * H= \n
+        */
+        virtual void EvaluateParameters(G *s )=0;
+
+       /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori set of gaussian at time k 
+        * \param out : the a posteriori set of gaussian at time k 
+        */  
+        virtual void Update(S<G> *in,S<G> *out);
+      
+       /*!
+        * \brief  destructor 
+        */
+        virtual ~NonLinearMeasureEquation(){}
+
+     protected :
+
+       /*!
+        * \brief virtual method where likelihood value for each particle is computed
+        * \param s :  a priori weighted kalman state at time k
+        * \return likelihood value
+        */
+        virtual  double ZPDF(G *s);
+
+  };
+
+     template <template <class> class S, class G> void NonLinearMeasureEquation<S,G>::Update(S<G> *in,S<G> *out){
+
+        for(size_t i=0;i<in->gaussians.size();i++){
+            filter::kalman::NonLinearMeasureEquation<G>::_coherency=true;
+            EvaluateParameters(&in->gaussians[i]); 
+
+            if(filter::kalman::NonLinearMeasureEquation<G>::_coherency){
+               filter::kalman::NonLinearMeasureEquation<G>::_K=in->gaussians[i].P*Trans(filter::kalman::NonLinearMeasureEquation<G>::_H)*(InvQR(filter::kalman::NonLinearMeasureEquation<G>::_H*in->gaussians[i].P*Trans(filter::kalman::NonLinearMeasureEquation<G>::_H) + filter::kalman::NonLinearMeasureEquation<G>::_R));
+                out->gaussians[i].X=in->gaussians[i].X+filter::kalman::NonLinearMeasureEquation<G>::_K*(filter::kalman::NonLinearMeasureEquation<G>::_Z-filter::kalman::NonLinearMeasureEquation<G>::_h);
+                out->gaussians[i].P=in->gaussians[i].P-filter::kalman::NonLinearMeasureEquation<G>::_K*filter::kalman::NonLinearMeasureEquation<G>::_H*in->gaussians[i].P;
+            }
+            out->gaussians[i].weight=ZPDF(&in->gaussians[i])*in->gaussians[i].weight;
+         }
+ 
+         //out->NormalizeWeights();
+     }
+
+     template <template <class> class S, class G> double NonLinearMeasureEquation<S,G>::ZPDF(G *s){
+        Vector apvec=filter::kalman::NonLinearMeasureEquation<G>::_H*s->X;
+        Matrix apcov=filter::kalman::NonLinearMeasureEquation<G>::_H*s->P*Trans(filter::kalman::NonLinearMeasureEquation<G>::_H)+filter::kalman::NonLinearMeasureEquation<G>::_R;
+        Matrix apinv=InvQR(apcov);
+        double apdet=Det(apcov);
+        return (std::exp(-0.5*Dot(filter::kalman::NonLinearMeasureEquation<G>::_Z-apvec,apinv*(filter::kalman::NonLinearMeasureEquation<G>::_Z-apvec)))/
+               (std::sqrt(std::pow(2*M_PI,static_cast<int>(apvec.size()))*std::abs(apdet))));
+     }
+
+} // namespace gaussiansum
+} // namespace filter
+
+#endif // __GAUSSIAN_FILTERING_BASE__
Index: tags/0.0.2/include/Pacpus/PacpusTools/filtering/kalman_filtering.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/filtering/kalman_filtering.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/filtering/kalman_filtering.hpp	(revision 257)
@@ -0,0 +1,477 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __KALMAN_FILTERING__
+#define __KALMAN_FILTERING__
+
+#include "bayes_filtering.hpp"
+#include "../math/ublas.hpp"
+
+namespace filter{
+namespace kalman{
+  using namespace math::ublas;
+
+
+  /*!
+   * \class State
+   * \brief This class describes a basic Kalman state
+   */
+  class State {
+    public :
+
+      Vector X; /*!<  State vector */
+    
+      Matrix P; /*!< Covariance matrix*/ 
+
+      /*!
+       * \brief method where the state vector and covariance matrix are allocated 
+       * \param state_size : the size of the state vector
+       */ 
+      void Allocator(const size_t &state_size){
+         X=ZeroVector(state_size);
+         P=ZeroMatrix(state_size,state_size);
+      }
+
+   };
+
+  
+  /*!
+   * \class DynamicEquation
+   * \brief This class describes a basic Kalman dynamic equation
+   */
+  template <class S=State> class DynamicEquation: public BayesDynamicEquation<S,S>{
+   public :
+    
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector
+        * \param data_size : the size of the input vector 
+        */ 
+       virtual void Allocator(const size_t &state_size,const size_t &data_size)=0;
+
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be evaluated 
+        * \param s : the state vector at time k-1 
+        */
+       virtual void EvaluateParameters(S *s)=0;
+  
+       /*!
+        * \brief virtual method where the a priori state vector must be computed
+        * \param in  the state vector at time k-1  
+        * \param out  the state vector at time k 
+        */
+       virtual void Predict(S *in,S *out)=0;
+ 
+       /*! 
+        * \brief Destructor 
+        */ 
+       virtual ~DynamicEquation(){}
+
+       /*!
+        * \brief Get/Set data in input vector U
+        * \return  vector U
+        */ 
+       double & U(const int &row){return _U(row);}
+
+       /*!
+        * \brief Get/Set data in covariance matrix Q
+        * return  matrix Q
+        */ 
+       double & Q(const int &row, const int &column){return _Q(row,column);}
+
+     protected :
+       Vector _U; /*!<   Input vector */
+
+       Matrix _Q; /*!<   Input covariance matrix */
+   };
+
+    /*!
+    * \class LinearDynamicEquation 
+    * \brief This clas dscribes a linear dynamic equation 
+    *  \n
+    *   X(k+1|k) =A*X(k)+B*U(k) \n
+    *   P(k+1|k) = A*P(k+1|k)*A'+B*Q(k)*B' \n
+    *   A = state matrix \n
+    *   B = input matrix \n
+    *   U = input of dynamic system \n
+    *   Q = input covariance matrix  \n
+    */
+    template <class S=State> class LinearDynamicEquation : public DynamicEquation<S>{
+      public :
+        /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector
+        * \param data_size : the size of the input vector 
+        */ 
+      virtual void Allocator(const size_t &state_size,const size_t &data_size);
+        /*!
+        * \brief virtual method where parameters of the dynamic equation must be evaluated 
+        * \param s : the state vector at time k-1 
+        */
+      virtual void EvaluateParameters(S *s)=0;
+
+      /*!
+        * \brief virtual method where the a priori state vector must be computed
+        * \param in : the state vector at time k-1  
+        * \param out : the state vector at time k 
+        */      
+      virtual void Predict(S *in,S *out);
+
+      /*!
+       * \brief Destructor 
+       */
+      virtual ~LinearDynamicEquation(){}
+
+      /*!
+       * \brief Get/Set an constant variable in A matrix
+       *  \return  A(row,column) 
+       */ 
+      double & A(const int &row, const int &column){return _A(row,column);}
+
+      /*!
+       * \brief Get/Set an constant variable in B matrix
+       * \return   B(row,column)
+       */ 
+      double & B(const int &row, const int &column){return _B(row,column);}
+
+     protected :  
+       Matrix _A;   /*!<   A matrix */
+
+       Matrix _B;  /*!<    B matrix */
+
+
+   };
+
+
+    // Kalman linear dynamic equation member functions
+   template <class S> void LinearDynamicEquation<S>::Allocator(const size_t &state_size,const size_t &data_size){
+      DynamicEquation<S>::_U=ZeroVector(data_size);
+      DynamicEquation<S>::_Q=ZeroMatrix(data_size,data_size);
+      _A=ZeroMatrix(state_size,state_size);
+      _B=ZeroMatrix(state_size,data_size);
+
+    }
+    
+   template <class S> void LinearDynamicEquation<S>::Predict(S *in,S *out){
+          EvaluateParameters(in); 
+          out->P=_A*in->P*Trans(_A) +_B*DynamicEquation<S>::_Q*Trans(_B);
+          out->X=_A*in->X+_B*DynamicEquation<S>::_U; 
+    }
+
+
+
+    /*!
+     *  \class NonLinearDynamicEquation
+     *  \brief this class describes a non linear dynamic equation
+     *  \n
+     *   X(k+1|k) =f(X(k)+U(k)) \n
+     *   P(k+1|k) = F*P(k+1|k)*F'+G*Q(k)*G' \n
+     *   F= Jacobian of dynamic equation with respect of the state vector \n
+     *   G= Jacobian of dynamic equation with respect of the entrie vector \n
+     *   U = entrie of dynamic system \n
+     *   Q = covariance matrix associated with U \n
+     */
+    template <class S=State> class NonLinearDynamicEquation : public DynamicEquation<S>{
+       public :
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector
+        * \param data_size : the size of the input vector 
+        */ 
+        virtual void Allocator(const size_t &state_size,const size_t &data_size);
+
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be evaluated 
+        * \param s : the state vector at time k-1 
+        * f=
+        * F= 
+        * G=
+        */
+
+      virtual void EvaluateParameters(S *s)=0;
+
+      
+      /*!
+        * \brief virtual method where the a priori state vector must be computed
+        * \param in : the state vector at time k-1  
+        * \param out : the state vector at time k 
+        */      
+      virtual void Predict(S *in,S *out);
+
+      /*! 
+       * \brief Destructor 
+       */
+      virtual ~NonLinearDynamicEquation(){}
+
+      /*!
+       * \brief Get/Set a constant variable in F matrix 
+       * return : F(row,column)
+       */ 
+      double & F(const int &row, const int &column){return _F(row,column);}
+
+      /*!
+       * \brief Get/Set a constant variable in G matrix 
+       * return : G(row,column)
+       */ 
+      double & G(const int &row, const int &column){return _G(row,column);}
+       
+
+       protected:
+      
+       Vector _f; /*!< Vector f where f(X,U) is stored */  
+
+       Matrix _F; /*!< Jacobian of dynamic equation with respect of the state vector */
+
+       Matrix _G; /*!< Jacobian of dynamic equation with respect of the input vector*/
+
+   };
+
+
+    // Kalman non linear dynamic equation member functions
+    template <class S> void NonLinearDynamicEquation<S>::Allocator(const size_t &state_size,const size_t &data_size){
+        DynamicEquation<S>::_U=ZeroVector(data_size);
+        DynamicEquation<S>::_Q=ZeroMatrix(data_size,data_size);
+        _f=ZeroVector(state_size);
+        _F=ZeroMatrix(state_size,state_size);
+        _G=ZeroMatrix(state_size,data_size);
+     }
+
+    template <class S> void NonLinearDynamicEquation<S>::Predict(S *in,S *out){
+         EvaluateParameters(in);
+         out->X=_f;
+         out->P=_F*in->P*Trans(_F) + _G*DynamicEquation<S>::_Q*Trans(_G);
+    }
+   
+
+
+  /*!
+   * \class MeasureEquation
+   * \brief This class describes a basic Kalman measure equation
+   */
+   template <class S=State> class MeasureEquation: public BayesMeasureEquation<S,S>{
+   public :
+
+
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector
+        * \param data_size : the size of the observation vector 
+        */ 
+       virtual void Allocator(const size_t &state_size,const size_t &data_size)=0;
+
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be evaluated 
+        * \param s  the state vector at time k 
+        */
+       virtual void EvaluateParameters(S *s)=0;
+
+      /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori state vector at time k  
+        * \param out : the a posteriori state vector at time k 
+        */      
+       virtual void Update(S *in,S *out)=0;
+ 
+       /*!
+        * \brief Destructor 
+        */ 
+       virtual ~MeasureEquation(){};
+
+       /*!
+        * \brief Get/Set data in observation vector Z 
+        * \return  Z(row,column)
+        */ 
+       double & Z(const int &row){return _Z(row);}
+
+       /*!
+        * \brief Get/Set data in observation covariane matrix R
+        * return  R(row,column)
+        */ 
+       double & R(const int &row,const int &column){return _R(row,column);}
+
+       /*!
+        * \brief Get/Set observation vector Z
+        * return  vector Z
+        */ 
+       Vector & Z(){return _Z;}
+       /*!
+        * \brief Get/Set observation covariance matrix R 
+        * return  matrix R
+        */ 
+       Matrix & R(){return _R;}
+       
+     
+       protected :
+    
+       Vector _Z;  /*!< Observation  vector */
+
+       Matrix _R;  /*!< Observation  covariance matrix */
+
+       Matrix _K;  /*!< Kalman gain matrix */
+
+       
+       /*!
+        * \brief Coherency of observation data \n
+        *  This parameter must be computed in the EvaluateParameters method \n
+        *  For kalman filtering the mahalanobis distance is usually used \n
+        *  By default the coherency value is true  \n
+        */
+       bool _coherency;
+   };
+
+
+
+    /*! 
+    *   \class LinearMeasureEquation
+    *   \brief This class describes a linear measure equation \n 
+    *   X(k+1|k+1)=X(k+1|k)+K(Z(k)-H*X(k+1|k)) \n
+    *   P(k+1|k+1) = (I-K*H)P(k+1|k) \n
+    *   K=P(k+1|k)*H'/(H*P(k+1|k)*H'+R) \n
+    *   H = observation matrix \n
+    *   Z = observation data \n
+    *   Q = observation covariance matrix \n
+    */
+    template<class S=State> class LinearMeasureEquation : public MeasureEquation<S>{
+      public :
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector
+        * \param data_size : the size of the observation vector 
+        */ 
+       virtual void Allocator(const size_t &state_size,const size_t &data_size);
+
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be evaluated 
+        * \param s : the state vector at time k 
+        */
+       virtual void EvaluateParameters(S *s)=0;
+
+        /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori state vector at time k  
+        * \param out : the a posteriori state vector at time k 
+        */  
+       virtual void Update(S *in,S *out);
+
+       /*!
+        *  \brief Destructor 
+        */
+       virtual ~LinearMeasureEquation(){}
+
+       /*!
+        * \brief Get/Set an constant variable in observation matrix H 
+        */ 
+       double & H(int row, int column){return _H(row,column);}
+
+      protected:  
+
+       Matrix _H; /*!< Observation matrix */
+
+   };
+
+
+    // Kalman  linear measure equation member functions
+    template <class S> void LinearMeasureEquation<S>::Allocator(const size_t &state_size,const size_t &data_size){
+        MeasureEquation<S>::_Z=ZeroVector(data_size);
+        MeasureEquation<S>::_R=ZeroMatrix(data_size,data_size);
+        _H=ZeroMatrix(data_size,state_size);
+        MeasureEquation<S>::_coherency=true;
+    }
+    
+    template <class S> void LinearMeasureEquation<S>::Update(S *in,S *out){
+         MeasureEquation<S>::_coherency=true;
+         EvaluateParameters(in);  
+
+         if(MeasureEquation<S>::_coherency){
+            MeasureEquation<S>::_K=in->P*Trans(_H) *InvQR( _H*in->P*Trans(_H) +MeasureEquation<S>::_R );     
+             out->X=in->X + MeasureEquation<S>::_K*(MeasureEquation<S>::_Z - _H*in->X);       
+             out->P=in->P - MeasureEquation<S>::_K*_H*in->P;
+         }
+    }
+
+
+    /*!
+    *   \class NonLinearMeasureEquation
+    *   \brief This clas describes a non linear measure equation \n
+    *   X(k+1|k+1)=X(k+1|k)+K(Z(k)-h(X(k+1|k))) \n
+    *   P(k+1|k+1) = (I-K*H)P(k+1|k) \n
+    *   K=P(k+1|k)*H'/(H*P(k+1|k)*H'+R) \n
+    *   H = jacobian matrix of h() with respect of X \n
+    *   Z = observation data \n
+    *   Q = covariance matrix associated with Z \n
+    */
+    template <class S=State> class NonLinearMeasureEquation : public MeasureEquation<S>{
+      public :
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector
+        * \param data_size : the size of the observation vector 
+        */ 
+       virtual void Allocator(const size_t &state_size,const size_t &data_size);
+
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be evaluated 
+        * \param s : the state vector at time k   
+        * h=
+        * H=
+        */
+       virtual void EvaluateParameters(S *s )=0;
+
+        /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori state vector at time k  
+        * \param out : the a posteriori state vector at time k 
+        */  
+       virtual void Update(S *in,S *out); 
+       
+        /** destructor */
+       virtual ~NonLinearMeasureEquation(){}
+
+        /*!
+         * \brief Get/Set  constant data in H matrix  
+         * \return H(row,column) 
+         */ 
+        double & H(const int &row,const int &column){return _H(row,column);}
+
+      protected :  
+        
+
+
+       Matrix _H;   /*!< Jacobian of measure equation with respect of the state vector */
+     
+       Vector _h;   /*!< Vector f where h(X) is stored */  
+
+   };
+
+    // Kalman  non linear measure equation member functions
+    template <class S> void NonLinearMeasureEquation<S>::Allocator(const size_t &state_size,const size_t &data_size){
+        MeasureEquation<S>::_Z=ZeroVector(data_size);
+        MeasureEquation<S>::_R=ZeroMatrix(data_size,data_size);
+        _H=ZeroMatrix(data_size,state_size);
+        _h=ZeroVector(data_size);
+    }
+    
+    template <class S> void NonLinearMeasureEquation<S>::Update(S *in,S *out){
+         MeasureEquation<S>::_coherency=true;
+         EvaluateParameters(in);   
+
+         if(MeasureEquation<S>::_coherency){ 
+             MeasureEquation<S>::_K=in->P*Trans(_H) *( InvLU(_H*in->P*Trans(_H) + MeasureEquation<S>::_R));
+             out->X=in->X+MeasureEquation<S>::_K*(MeasureEquation<S>::_Z-_h);
+             out->P=in->P-MeasureEquation<S>::_K*_H*in->P;
+         }
+    }
+} // namespace kalman
+} // namespace filter
+
+#endif // __KALMAN_FILTERING__
Index: tags/0.0.2/include/Pacpus/PacpusTools/filtering/particle_filtering.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/filtering/particle_filtering.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/filtering/particle_filtering.hpp	(revision 257)
@@ -0,0 +1,596 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __PARTICLE_FILTERING_BASE__
+#define __PARTICLE_FILTERING_BASE__
+
+#include "bayes_filtering.hpp"
+#include "../math/ublas.hpp"
+#include "../math/rng.hpp"
+#include "../math/distributions.hpp"
+
+namespace filter{
+namespace particle {
+
+   using namespace math;
+   using namespace ublas;
+   using namespace rng;
+   using namespace distributions;
+
+
+   /*! 
+   * \class Particle
+   * \brief This class describe a particle \n
+   *  A particle is constituted by : 1) a state vector and 2) importance weight \n
+   */
+  class Particle {
+    public :
+      /*!
+       * \brief Constructor 
+       * \param state_size : the size of the state vector
+       * \param weight_ : the initial weight of the particle  
+       */
+      Particle(const size_t state_size, const double & weight_){
+       X=ZeroVector(state_size);
+       weight=weight_;
+      }
+
+      Vector X; /*!< state vector */
+
+      double weight; /*!< particle weight */
+  
+   };
+
+   /*! \class ParticleSet
+   *   \brief This class describe a set of particles \n
+   *   A set of particle is reprented by a vector of particles \n
+   *   somes methods can be applied to the set of particles like : \n
+   *   estimate computation, resampling scheme or normalization method \n
+   */
+
+  template<class P=Particle> class ParticleSet {
+    public :
+    
+     std::vector<P> particles;  /*!< vector of particles */
+
+    
+     std::vector<P> particles_; /*!< temporary vector of particles used in resample scheme */
+
+
+     /*!
+      * \brief Allocate the set of paticles  
+      * \param nparticle : number of particles
+      */
+     void Allocator(const size_t &nparticle);
+
+     /*!
+      *  \brief Resample the set of particles  \n
+      *  \param threshold : threshold parameter  \n
+      *  The resampling scheme is the reasmpling scheme proposed by Kitawaga \n 
+      *  This can be overloaded to use an another resampling scheme  \n 
+      */
+     virtual void Resample(const double & threshold=1.0);
+   
+     /*!
+      * \brief Compute the number of effective samples in the particle set 
+      * \return number of effective samples
+      */ 
+     double Ness();
+
+    /*! 
+     *  \brief Get the number of particles 
+     *  \return number of particles 
+     */
+    size_t ParticlesNo(){ return particles.size(); }
+
+    /*!
+     * \brief Compute the estimate
+     * \return a vector double describing the estimate 
+     */
+    Vector Estimate ();   
+
+    /*!
+     * \brief Normalize the weights of each particles
+     */
+    void NormalizeWeights();
+
+    /*!
+     * \brief Destructor
+     */
+    virtual ~ParticleSet(){};
+
+    protected :
+
+    /*!
+    * \brief Compute the cumulative sum of the weight of each particles
+    * \return a vector of double describing this cumulative sum 
+    */ 
+      std::vector<double> WeightCumSum();
+
+    /*!
+    * \brief Create the a random cumulative sum  
+    * \return a vector of double describing this cumulative sum 
+    */  
+    std::vector<double> RandomCumSum();
+
+  };
+
+
+   //Particle set memeber functions 
+  template<class P> void ParticleSet<P>::Allocator(const size_t &nparticles){
+     particles.resize(nparticles); 
+     particles_.resize(nparticles);
+   }
+
+   template<class P> double ParticleSet<P>::Ness(){
+     double ness =0;
+     for(typename std::vector<P>::iterator I=particles.begin();I!=particles.end();I++) 
+        ness+=(*I).weight*(*I).weight;
+
+     if(ness==0)throw filter_error("In particle filter :: number effective sample computation ->  ness is equal to infinity"); 
+
+     return 1/ness;
+   }
+
+
+   template<class P> std::vector<double> ParticleSet<P>::WeightCumSum(){
+       double sum=0;
+       std::vector<double> cumsum(particles.size());
+       for(size_t i=0;i<particles.size();i++){ 
+         sum+=particles[i].weight;
+         cumsum[i]=sum; 
+       }
+       return cumsum;
+   }
+
+   template<class P> void ParticleSet<P>::NormalizeWeights(){
+     
+    double sum=0;
+    for(typename std::vector<P>::iterator I=particles.begin();I!=particles.end();I++)
+       sum+=(*I).weight;
+
+
+    if(sum==0) throw filter_error("In particle filter :: normalization of weight ->  weight sum is equal to 0"); 
+
+    for(typename std::vector<P>::iterator I=particles.begin();I!=particles.end();I++)
+        (*I).weight=(*I).weight/sum;
+
+   }
+
+   template<class P> std::vector<double> ParticleSet<P>::RandomCumSum(){
+       double sum=0;
+       std::vector<double> cumsum(particles.size());
+       uniform_rng UD;
+       for(size_t i=0;i<particles.size();i++){ 
+         sum+=UD();
+         cumsum[i]=sum; 
+       }
+       
+       //normalization 
+       for(size_t i=0;i<particles.size();i++)cumsum[i]=cumsum[i]/sum;
+
+       return cumsum;
+   }
+
+
+  template<class P> void ParticleSet<P>::Resample(const double & threshold){
+     size_t N=ParticlesNo();
+     if(Ness()<=N*threshold){ 
+       // resample method by Carpenter
+       std::vector<double> Q=WeightCumSum();
+       std::vector<double> T=RandomCumSum();
+
+       // select the best particle
+       std::vector <size_t> ind(N);
+       unsigned int j=0;
+       for(unsigned int i=0; i <N; i++){
+         do{
+ 	  if(T[i] < Q[j]){ind[i] = j;break;}
+ 	  j++;
+         }while(j<N);
+       }
+
+       // build the new particle set  
+       for(unsigned int i=0; i <N; i++){
+         particles_[i]=particles[ind[i]];
+         particles_[i].weight=1.0/static_cast<double>(N);
+       }
+
+       // swap the particle set
+       particles.swap(particles_);
+     }    
+  }
+ 
+ 
+
+   template<class P> Vector ParticleSet<P>::Estimate(){
+     Vector estimate = ZeroVector(particles[0]->X.size());
+     for(typename std::vector<P>::iterator I=particles.begin();I!=particles.end();I++)
+       estimate+=(*I).X*(*I).weight;
+     return estimate;
+   }
+
+
+   /*!
+    * \class DynamicEquation
+    * \brief This class describe a basic dynamic equation for particle filtering \n
+    * where : class  S is  a set particle \n
+    *       : class  I is a particle \n
+    *       : class  D is a random generator used to draw input data \n 
+    */ 
+  template <class D, template <class> class S=ParticleSet, class P=Particle> class DynamicEquation:public BayesDynamicEquation< S<P>, P >{
+   public :
+
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector of each particle
+        * \param data_size : the size of the input vector 
+        */  
+       virtual void Allocator(const size_t &state_size,const size_t &data_size)=0;
+
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be  evaluated 
+        * \param s : set of particles at time k-1
+        *
+        */
+       virtual void EvaluateParameters( P *s)=0;
+  
+       /*!
+        * \brief virtual method where the a priori state vector must be computed
+        * \param in : the set of particles at time k-1  
+        * \param out : the set of particles  at time k 
+        */
+       virtual void Predict(S<P> *in, S<P> *out)=0;
+ 
+
+       /*! 
+        * \brief Destructor 
+        */ 
+       virtual ~DynamicEquation(){}
+
+       /*!
+        * \brief Get/Set random generator used to draw input random U 
+        */ 
+       D & URNG(){return _URNG;}
+
+     protected :
+
+       D _URNG; /*!< Random generator used to drawing input data*/
+ 
+       Vector _Urand; /*!< Vector where random input data are stored */
+
+   };
+
+
+
+
+    /*!
+    * \class LinearDynamicEquation
+    * \brief This class describe a linear dynamic equation \n
+    *   X(k+1)(i) =A*X(k)(i)+B*U(k)(i) \n
+    *   X(.)(i) = the state of the particle i \n
+    *   A = state matrix \n
+    *   B = entrie matrix \n
+    *   U = input random vector \n
+    */
+    template <class D,template <class> class S=ParticleSet, class P=Particle> class LinearDynamicEquation : public DynamicEquation<D,S,P>{
+      public :
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector of each particle
+        * \param data_size : the size of the input vector 
+        */ 
+       void Allocator(const size_t &state_size,const size_t &data_size);
+      
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be  evaluated 
+        * \param s : set of particles at time k-1
+        */
+        virtual void EvaluateParameters(P *s)=0;
+
+       /*!
+        * \brief virtual method where the a priori state vector must be computed
+        * \param in : the set of particles at time k-1  
+        * \param out : the set of particles  at time k 
+        */
+        virtual void Predict(S<P> *in,S<P> *out);
+
+        /*!
+         * \brief Destructor 
+         */
+        virtual ~LinearDynamicEquation(){}
+
+        /*!
+         * \brief Get/Set a constant data in A matrix 
+         */ 
+        double & A(const int &row, const int &column){return _A(row,column);}
+
+        /*!
+         * \brief Get/Set a constant data in B matrix 
+         */ 
+        double & B(const int &row, const int &column){return _B(row,column);}
+
+     protected :  
+
+       Matrix _A; /*!< A matrix */
+
+       Matrix _B; /*!< A matrix */
+
+   };
+
+
+   // Particle linear dynamic equation member functions
+   template <class D, template <class> class S,class P> void LinearDynamicEquation<D,S,P>::Allocator(const size_t &state_size,const size_t &data_size){
+      DynamicEquation<D,S,P>::_Urand=ZeroVector(data_size);
+      _A=ZeroMatrix(state_size,state_size);
+      _B=ZeroMatrix(state_size,data_size);
+   }
+      
+
+   template <class D, template <class> class S,class P> void LinearDynamicEquation<D,S,P>::Predict(S<P> *in,S<P> *out){
+
+          for(size_t i=0;i<in->particles.size();i++){
+            EvaluateParameters(&in->particles[i]); 
+
+            out->particles[i]->X=_A*in->particles[i]->X+_B*DynamicEquation<D,S,P>::_Urand;
+            out->particles[i]->weight=in->particles[i]->weight;
+          }
+   }
+
+
+     /*!
+     * \class NonLinearDynamicEquation
+     * \brief  This class describe a linear dynamic equation 
+     *   \n 
+     *   X(k+1)(i) =f(X(k)(i)+U(k)(i))  \n
+     *   X(.)(i) = the state of the particle i \n 
+     *   A = state matrix \n
+     *   B = entrie matrix \n
+     *   U = input random vector \n
+     */
+    template <class D, template <class> class S,class P> class NonLinearDynamicEquation : public DynamicEquation<D,S,P>{
+       public :
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector of each particle
+        * \param data_size : the size of the input vector 
+        */ 
+       void Allocator(const size_t &state_size,const size_t &data_size);
+
+       /*!
+        * \brief virtual method where parameters of the dynamic equation must be  evaluated 
+        * \param s : set of particles at time k-1
+        * f=
+        */
+       virtual void EvaluateParameters(P *s)=0;
+      
+       /*!
+        * \brief virtual method where the a priori state vector must be computed
+        * \param in : the set of particles at time k-1  
+        * \param out : the set of particles  at time k 
+        */
+      virtual void Predict(S<P> *in,S<P> *out);
+
+      /*!
+       * \brief Destructor 
+       */
+      virtual ~NonLinearDynamicEquation(){}
+       
+
+      protected:   
+
+      Vector _f; /*!< Matrix f where result of (f(X,U)) is stored */  
+
+   };
+
+   // Particle non linear dynamic equation member functions
+   template <class D,template <class> class S,class P> void NonLinearDynamicEquation<D,S,P>::Allocator(const size_t &state_size,const size_t &data_size){
+      DynamicEquation<D,S,P>::_Urand=ZeroVector(data_size);
+      _f=ZeroVector(state_size);
+   }   
+
+ 
+
+    template <class D,template <class> class S,class P> void NonLinearDynamicEquation<D,S,P>::Predict(S<P> *in,S<P> *out){
+         for(size_t i=0;i<in->particles.size();i++){
+            EvaluateParameters(&in->particles[i]); 
+           
+            out->particles[i].X=_f;
+            out->particles[i].weight=in->particles[i].weight;
+
+         }
+   }
+
+   /*!
+    * \class MeasureEquation
+    * \brief This clas describe a basic measure equation particle filtering
+    * \n
+    * where : class  S is  a set particle \n
+    *       : class  I is a particle \n
+    *       : class  D is the distribution of probability of observation data \n
+    */
+   template <class D , template <class> class S=ParticleSet, class P=Particle> class MeasureEquation: public BayesMeasureEquation< S<P>, P >{
+   public :
+ 
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector of each particle
+        * \param data_size : the size of the input vector 
+        */ 
+       virtual void Allocator(const size_t &state_size,const size_t &data_size)=0;
+
+
+       /*!
+        * \brief virtual method where parameters of the measure equation must be  evaluated 
+        * \param s : set of particles at time k
+        */
+       virtual void EvaluateParameters(P *s)=0;
+
+      /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori set of particles at time k  
+        * \param out : the a posteriori set of particles at time k 
+        */   
+       virtual void Update(S<P> *in,S<P> *out)=0;
+ 
+       /*!
+        * \brief Destructor 
+        */ 
+       virtual ~MeasureEquation(){};
+
+       /*!
+        * \brief Get/Set the distribution of probability  of data observation Z 
+        */ 
+       D & ZDistribution(){return _ZDistribution;}
+     
+       protected :
+
+       D _ZDistribution; /*!< The distribution of probability of observation data Z*/
+   };
+
+
+
+    /*!
+    * \class LinearMeasureEquation
+    *  \brief This class describe a linear measure equation 
+    *   \n
+    *   X(k)(i)=H*Z(k) \n
+    *   Z(k) = observation data \n
+    *   => weigth update \n
+    *   w(k+1)(i)=p(Z|HX(i))w(k)(i) \n
+    *   w(.)(i)= weight of particle  i \n
+    */
+    template <class D, template <class> class S=ParticleSet, class P=Particle> class LinearMeasureEquation : public MeasureEquation< D,S,P >{
+      public :
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector of each particle
+        * \param data_size : the size of the input vector 
+        */ 
+       void Allocator(const size_t &state_size,const size_t &data_size);
+
+
+       /*!
+        * \brief virtual method where parameters of the measure equation must be  evaluated 
+        * \param s : set of particles at time k
+        */
+       virtual void EvaluateParameters(P *s)=0;
+
+       /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori set of particles at time k  
+        * \param out : the a posteriori set of particles at time k 
+        */   
+       virtual void Update(S<P> *in,S<P> *out);
+
+       /*!
+        * \brief Destructor 
+        */
+       virtual ~LinearMeasureEquation(){}
+
+       /*!
+        * \brief Get/Set a constant data in observation matrix H 
+        */ 
+       double & H(int row, int column){return _H(row,column);}
+
+      protected:  
+
+       Matrix _H;  /*!< Observation matrix */
+   };
+
+
+   // Particle linear measure equation member functions
+   template <class D,template <class> class S, class P> void LinearMeasureEquation<D,S,P>::Allocator(const size_t &state_size,const size_t &data_size){
+        _H=ZeroMatrix(data_size,state_size);
+   }
+
+   template <class D,template <class> class S, class P> void LinearMeasureEquation<D,S,P>::Update(S<P> *in,S<P> *out){
+         for(size_t i=0;i<in->particles.size();i++){
+            EvaluateParameters(&in->particles[i]); 
+           
+            out->particles[i].weight=pdf(MeasureEquation<D,S,P>::_ZDistribution, _H*in->particles[i].X)*in->particles[i].weight;
+
+         }
+        out->NormalizeWeights();
+   }
+
+
+
+    /*!
+    *  \class NonLinearMeasureEquation
+    *  \brief This class describe a non linear measure equation 
+    *   \n 
+    *   Z(k)=h(X)(i) \n
+    *   Z = observation data \n
+    *   => weigth update \n
+    *   w(k+1)(i)=p(Z|h(X(k)(i)))w(k)(i) \n
+    *   w(.)(i)= weight of particle  i \n
+    */
+    template <class D,template <class> class S=ParticleSet, class P=Particle> class NonLinearMeasureEquation : public MeasureEquation<D,S,P>{
+      public :
+       /*!
+        * \brief virtual method where matrices of state system must be allocated 
+        * \param state_size : the size of the state vector of each particle
+        * \param data_size : the size of the input vector 
+        */ 
+       void Allocator(const size_t &state_size,const size_t &data_size);
+
+       /*!
+        * \brief virtual method where parameters of the measure equation must be  evaluated 
+        * \param s : set of particles at time k
+        * h=    
+        * H=
+        */
+       virtual void EvaluateParameters(P *s )=0;
+
+       /*!
+        * \brief virtual method where the a posteriori state vector must be computed
+        * \param in : the a priori set of particles at time k  
+        * \param out : the a posteriori set of particles at time k 
+        */   
+       virtual void Update(S<P> *in,S<P> *out); 
+       
+        /*!
+         * \brief Destructor 
+         */
+       virtual ~NonLinearMeasureEquation(){}
+
+      protected :
+
+       Vector _h; /*!< vector where h(X) is stored */  
+
+   };
+
+    // Particle non linear measure equation member functions
+    template <class D,template <class> class S, class P>  void NonLinearMeasureEquation<D,S,P>::Allocator(const size_t &state_size,const size_t &data_size){
+        _h=ZeroVector(data_size);
+    }
+
+
+   template <class D,template <class> class S, class P> void NonLinearMeasureEquation<D,S,P>::Update(S<P> *in,S<P> *out){
+
+         for(size_t i=0;i<in->particles.size();i++){
+            EvaluateParameters(&in->particles[i]); 
+          
+            out->particles[i].weight=pdf(MeasureEquation<D,S,P>::_ZDistribution,_h)*in->particles[i].weight;
+
+         }
+
+        out->NormalizeWeights();
+   }
+
+} // namespace particle
+} // namespace filter
+
+
+#endif // __PARTICLE_FILTERING_BASE__
Index: tags/0.0.2/include/Pacpus/PacpusTools/geodesie.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/geodesie.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/geodesie.h	(revision 257)
@@ -0,0 +1,198 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %}
+/// @file
+/// @author  Jean Laneurit <firstname.surname@utc.fr>
+/// @date    April, 2010
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef GEODESIE_H
+#define GEODESIE_H
+
+#include <cmath>
+#include <iostream>
+#include <vector>
+
+namespace Geodesie {
+
+#ifndef M_PI
+#   define M_PI 3.14159265358979323846
+#endif
+#ifndef M_PI_2
+#   define M_PI_2 1.57079632679489661923
+#endif
+#ifndef M_PI_4
+#   define M_PI_4 0.78539816339744830962
+#endif
+
+/// 9x9 matrix ???
+///
+/// @todo Documentation
+/// @todo Rewrite!
+struct Matrice
+{
+    /// Copy ctor
+    Matrice(const Matrice & A);
+    /// Ctor
+    Matrice();
+    /// @todo Documentation
+    void Apply(double v0, double v1, double v2, double & Mv0, double & Mv1, double & Mv2);
+
+    /// @todo Documentation
+    double c0_l0;
+    /// @todo Documentation
+    double c1_l0;
+    /// @todo Documentation
+    double c2_l0;
+
+    /// @todo Documentation
+    double c0_l1;
+    /// @todo Documentation
+    double c1_l1;
+    /// @todo Documentation
+    double c2_l1;
+
+    /// @todo Documentation
+    double c0_l2;
+    /// @todo Documentation
+    double c1_l2;
+    /// @todo Documentation
+    double c2_l2;
+};
+
+Matrice TransMat(const Matrice A);
+
+Matrice ProdMat(const Matrice A,const Matrice B);
+void Write(const Matrice A,std::ostream& out);
+
+////////////////////////////////////////////////////////////////////////
+/// @todo Documentation
+class Raf98
+{
+public:
+    /// Ctor of Raf98 class.
+    Raf98() {}
+    /// Dtor of Raf98 class.
+    ~Raf98();
+    
+    /// @todo Documentation
+    /// @param s filepath
+    bool Load(const std::string & s);
+    
+    /// @todo Documentation
+    /// @param longitude [degrees]
+    /// @param latitude [degrees]
+    /// @param Hwgs84 Output: interpolated altitude using WGS84 geoid model [meters]
+    bool Interpol(double longitudeDegrees, double latitudeDegrees, double * heightMetersWgs84) const;
+    
+private:
+    std::vector<double> m_dvalues;
+    double LitGrille(unsigned int c,unsigned int l) const;
+};
+
+////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////
+inline double Deg2Rad(double deg) {return deg*M_PI/180.0;}
+inline double Rad2Deg(double rad) {return rad*180.0/M_PI;}
+////////////////////////////////////////////////////////////////////////
+
+const double a_Lambert93=6378137;
+const double f_Lambert93=1 / 298.257222101;
+const double e_Lambert93=sqrt(f_Lambert93*(2-f_Lambert93));
+const double lambda0_Lambert93=Deg2Rad(3.0);//degres
+const double phi0_Lambert93=Deg2Rad(46.5);
+const double phi1_Lambert93=Deg2Rad(44.0);
+const double phi2_Lambert93=Deg2Rad(49.0);//degres
+const double X0_Lambert93=700000;//
+const double Y0_Lambert93=6600000;//
+const double n_Lambert93 = 0.7256077650;
+const double c_Lambert93 = 11754255.426;
+const double xs_Lambert93 = 700000;
+const double ys_Lambert93 = 12655612.050;
+
+const double GRS_a = 6378137;
+const double GRS_f = 1/298.257222101;
+const double GRS_b = GRS_a*(1-GRS_f);
+const double GRS_e = sqrt((pow(GRS_a,2) - pow(GRS_b,2)) / pow(GRS_a,2));
+
+////////////////////////////////////////////////////////////////////////
+void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,Matrice in,double& E,double& N,double& h,Matrice& out);
+void Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,double& E,double& N,double& h);
+void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,double& lambda,double& phi,double& he);
+void Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,Matrice in,double& lambda,double& phi,double& he,Matrice& out);
+/// Convert from geographique to ECEF.
+/// @param[in] longitude Longitude in radian.
+/// @param[in] latitude Latitude in radian.
+/// @param[in] he Height in meter.
+void Geographique_2_ECEF(double longitude, double latitude, double he, double& x, double& y, double& z);
+/// Convert from ECEF two ENU.
+/// @param[in] lon0 Longitude of the origin in radian.
+/// @param[in] lat0 Latitude of the origin in radian.
+/// @param[in] he0 Height of the origin in radian.
+void ECEF_2_ENU(double x,double y,double z,double& e,double& n,double& u,double lon0,double lat0,double he0);
+////////////////////////////////////////////////////////////////////////
+
+///ALGO0001
+/// @todo Rename
+double LatitueIsometrique(double latitude,double e);
+///ALGO0002
+/// @todo Rename
+double LatitueIsometrique2Lat(double latitude_iso,double e,double epsilon);
+
+///ALGO0003
+void Geo2ProjLambert(
+    double lambda,double phi,
+    double n, double c,double e,
+    double lambdac,double xs,double ys,
+    double& X,double& Y);
+///ALGO0004
+void Proj2GeoLambert(
+    double X,double Y,
+    double n, double c,double e,
+    double lambdac,double xs,double ys,
+    double epsilon,
+    double& lambda,double& phi);
+
+double ConvMerApp(double longitude);
+
+/// Converts Cartesian (x, y) coordinates to polar coordinates (r, theta)
+template <typename _T1, typename _T2>
+void cartesianToPolar(const _T1 x, const _T1 y, _T2 & r, _T2 & theta) {
+    r = std::sqrt(x*x + y*y);
+    theta = std::atan2(x, y);
+}
+
+/// Converts polar coordinates (r, theta) to Cartesian (x, y) coordinates
+template <typename _T1, typename _T2>
+void polarToCartesian(const _T1 r, const _T1 theta, _T2 & x, _T2 & y) {
+    x = r * std::cos(theta);
+    y = r * std::sin(theta);
+}
+
+/// Converts Cartesian (x, y, z) coordinates to spherical coordinates (r, theta, phi)
+/// Angles expressed in radians.
+template <typename _T1, typename _T2>
+void cartesianToSpherical(const _T1 x, const _T1 y, const _T1 z, _T2 & r, _T2 & theta, _T2 & phi) {
+    r = std::sqrt(x*x + y*y + z*z);
+    theta = std::acos(z / r);
+    phi = std::atan2(y, x);
+}
+
+/// Converts spherical coordinates (r, theta, phi) to Cartesian (x, y, z) coordinates.
+/// Angles expressed in radians.
+template <typename _T1, typename _T2>
+void sphericalToCartesian(const _T1 r, const _T1 theta, const _T1 phi, _T2 & x, _T2 & y, _T2 & z) {
+    x = r * std::sin(theta) * std::cos(phi);
+    y = r * std::sin(theta) * std::sin(phi);
+    z = r * std::cos(theta);
+}
+
+} // namespace Geodesie
+
+#endif // GEODESIE_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/math/distributions.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/math/distributions.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/math/distributions.hpp	(revision 257)
@@ -0,0 +1,228 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __DISTRIBUTIONS_HPP__
+#define __DISTRIBUTIONS_HPP__
+
+#include "ublas.hpp"
+#include <boost/math/distributions.hpp>
+
+namespace math{
+namespace distributions{
+
+
+template <class RealType> 
+inline RealType pdf(const boost::math::normal_distribution<RealType> & dist , boost::numeric::ublas::vector<RealType> & v){
+ return pdf(dist,v[0]);
+} 
+
+template <class RealType> 
+inline RealType pdf(const boost::math::uniform_distribution<RealType> & dist , boost::numeric::ublas::vector<RealType> & v){
+ return pdf(dist,v[0]);
+} 
+
+
+/*!
+ *\class multivariate_normal_distribution
+ *\brief This clas describes a multivariate normal distribution
+ */
+template < class RealType =double >
+class multivariate_normal_distribution{
+public :
+ 
+ /*!
+  *\brief Default constructor
+  */
+  multivariate_normal_distribution(boost::numeric::ublas::vector<RealType> mean,boost::numeric::ublas::matrix<RealType> cov){
+
+    using namespace boost::numeric::ublas;
+
+    if(mean.size()==cov.size1() && mean.size()==cov.size2()){
+      m_mean=mean;
+      m_cov=cov;
+    }else throw math_error("Multivariate normal distribution : the mean vector of covariance matrix must have the same size");
+
+
+    typedef permutation_matrix<std::size_t> pmatrix;
+    // create a working copy of the input
+    matrix<RealType> A(m_cov);
+    // create a permutation matrix for the LU-factorization
+    pmatrix pm(A.size1());
+    // perform LU-factorization
+    int res = lu_factorize(A,pm);
+    if( res != 0 )  throw math_error("Pdf function : covariance matrix is a singular matrix");
+
+    // create identity matrix of "inverse"
+    m_invcov = identity_matrix<double>(A.size1());
+    // backsubstitute to get the inverse
+   lu_substitute(A, pm, invcov);
+
+   //compute determinant
+   m_detcov = 1.0;
+     for (std::size_t i=0; i < pm.size(); ++i) {
+       if (pm(i) != i)
+          m_detcov *= -1.0;
+       m_detcov *= A(i,i);
+     }
+
+  }
+
+ /*!
+  *\brief Get the inversion of covariance matrix 
+  */
+ boost::numeric::ublas::matrix<RealType> invcov() const {
+  return m_invcov;
+ }
+
+ /*!
+  *\brief Get determinant of covariance matrix
+  */
+ boost::numeric::ublas::matrix<RealType> detcov() const {
+  return m_detcov;
+ }
+
+
+ /*!
+  *\brief Get mean vector
+  */
+ boost::numeric::ublas::vector<RealType> mean() const {
+  return m_mean;
+ }
+
+ /*!
+  *\brief Get covariance matrix
+  */
+ boost::numeric::ublas::matrix<RealType> cov() const {
+  return m_cov;
+ }
+
+
+
+
+private :
+
+
+
+
+ /*!
+  *\brief mean vector
+  */
+ boost::numeric::ublas::vector<RealType> m_mean;
+
+ /*!
+  *\brief covariance matrix
+  */
+ boost::numeric::ublas::matrix<RealType> m_cov;
+
+
+ /*!
+  *\brief covar
+  */
+ boost::numeric::ublas::matrix<RealType> m_invcov;
+
+ /*!
+  *\brief cov matrix
+  */
+ double m_detcov;
+
+};
+
+typedef   multivariate_normal_distribution<double> mvnormal;
+
+
+/*!
+ *\fn inline RealType pdf(const multivariate_normal_distribution<RealType>& dist, const boost::numeric::ublas::vector<RealType> & x)
+ *\brief Compute probability density function for a multivariate normal distribution
+ */
+template <class RealType>
+inline RealType pdf(const multivariate_normal_distribution<RealType>& dist, const boost::numeric::ublas::vector<RealType> & x)
+{
+
+    boost::numeric::ublas::vector<RealType> mean = dist.mean();
+    boost::numeric::ublas::matrix<RealType> cov= dist.cov();
+    boost::numeric::ublas::matrix<RealType> invcov =dist.invcov();
+    double detcov= dist.detcov;
+
+
+   RealType exponent = - Dot(x-mean, invcov*(x-mean));
+   exponent /= 2 ;
+
+   RealType result = std::exp(exponent);
+   result /= std::sqrt(pow(2*M_PI,mean.size())*std::abs(detcov));
+
+   return result;
+} // pdf
+
+
+/*!
+ *\class multivariate_uniform_distribution
+ *\brief This clas describes a multivariate normal distribution
+ */
+template < class RealType =double >
+class multivariate_uniform_distribution{
+public :
+ 
+ /*!
+  *\brief Default constructor
+  */
+  multivariate_uniform_distribution(boost::numeric::ublas::vector<RealType> lower,boost::numeric::ublas::matrix<RealType> upper){
+
+    if(upper.size()!= lower.size()) throw math_error("Multivariate uniform distribution : the upper vector and the loxer vector must have the same size");
+    for (size_t i=0;i<upper.size();i++)
+      if(lower[i]>upper[i]) throw math_error("Multivariate uniform distribution : the lower vector is not lower than upper vector");
+
+    m_lower=lower;
+    m_upper=upper;
+  }
+ private :
+
+ /*!
+  *\brief Lower vector
+  */
+ boost::numeric::ublas::vector<RealType> m_lower;
+
+ /*!
+  *\brief Upper vector 
+  */
+ boost::numeric::ublas::matrix<RealType> m_upper;
+
+};
+
+typedef multivariate_normal_distribution<double> mvuniform;
+
+
+/*!
+ *\fn inline RealType pdf(const multivariate_uniform_distribution<RealType>& dist, const boost::numeric::ublas::vector<RealType> & x)
+ *\brief Compute probability density function for a multivariate uniform distribution
+ */
+template <class RealType>
+inline RealType pdf(const multivariate_uniform_distribution<RealType>& dist, const boost::numeric::ublas::vector<RealType> & x)
+{
+
+   double result =1;
+
+   boost::numeric::ublas::vector<RealType> upper = dist.upper();
+   boost::numeric::ublas::matrix<RealType> lower= dist.lower();
+
+
+   for(size_t i=0;i<upper.size();i++){
+     if(x<upper[i] && x[i]>lower[i]) result/=(upper[i]-lower[i]);
+     else {result=0; break;}
+  }
+
+  return result;
+} // pdf
+
+};
+};
+#endif
Index: tags/0.0.2/include/Pacpus/PacpusTools/math/geodesy.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/math/geodesy.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/math/geodesy.hpp	(revision 257)
@@ -0,0 +1,417 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __GEO_UTILITIES__
+#define __GEO_UTILITIES__
+
+#include <cmath>
+#include <iostream>
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+
+namespace math{
+
+   namespace geodesy {
+
+#ifndef M_PI
+       const double M_PI = std::atan(1.0)*4.0;
+#endif
+  
+   /*!
+    *  \enum CoordinateSystem
+    *  \brief coordinate system enumeration  
+    */
+   enum CoordinateSystem {_LLH_,_ECEF_,_LAMBERT93_,_ENU_,_NED_,_NONE_};
+	
+   /*!
+    * \def WGS84_a 
+    * \brief semi-major axis of WGS84 ellipsoid
+    */
+   const double WGS84_a = 6378137.0;
+   /*!
+    * \def WGS84_e 
+    * \brief eccentricity of WGS84 ellipsoid
+    */
+   const double WGS84_e = 0.0818191913108695;
+
+   /*!
+    * \def GRS80_a 
+    * \brief  semi-major axis of GRS80 ellipsoid
+    */
+   const double GRS80_a = 6378137.0;
+   /*!
+    * \def GRS80_a 
+    * \brief eccentricity of GRS80 ellipsoid
+    */
+   const double GRS80_e =0.0818191910428152;
+
+ 
+   /**Lambert93 conversion parameters */
+   const double LAMBERT93_n=0.725607765053267;
+   const double LAMBERT93_c = 11754255.4261;
+   const double LAMBERT93_Xs = 700000.0;
+   const double LAMBERT93_Ys = 12655612.0499;
+   const double LAMBERT93_lon0 = 0.0523598775598299;
+
+   /**Conversion functions*/
+
+   /*!
+    * \fn inline boost::numeric::ublas::vector<T> LLH2ECEF(const boost::numeric::ublas::vector<T> &llh, const T &a, const T &e)
+    * \brief convert an LLH position to a ECEF position
+    * \param llh : ublas vector describing a llh position (latitude, longitude,ellipsoidal height) 
+    * \param a : semi-major axis of ellipsoid (by default WGS84 value is used)
+    * \param e : ellipsoid eccentricity  (by default WGS84 value is used)
+    * \return  ublas vector describing a ecef position (x,y,z)
+    */
+   template<class T> inline boost::numeric::ublas::vector<T> LLH2ECEF(const boost::numeric::ublas::vector<T> &llh, const T &a=WGS84_a, const T &e=WGS84_e){
+
+    	T N=TranversalRadius(llh[0],a,e);
+	boost::numeric::ublas::vector<T> ecef(3);
+	ecef[0]=(N+llh[2])*std::cos(llh[0])*std::cos(llh[1]);
+	ecef[1]=(N+llh[2])*std::cos(llh[0])*std::sin(llh[1]);
+	ecef[2]=(N*(1-std::pow(e,2))+llh[2])*std::sin(llh[0]);
+
+	return ecef;
+   }
+
+   /*!
+    * \fn  inline boost::numeric::ublas::vector<T> ECEF2LLH(const boost::numeric::ublas::vector<T> &ecef,const T &a, const T &e)
+    * \brief convert an ECEF position to a LLH position
+    * \param ecef : ublas vector describing a ecef position (x,y,z)
+    * \param a : semi-major axis of ellipsoid (by default WGS84 value is used)
+    * \param e : ellipsoid eccentricity  (by default WGS84 value is used)
+    * \return  ublas vector describing a llh position (latitude, longitude,ellipsoidal height)
+    */
+   template<class T> inline boost::numeric::ublas::vector<T> ECEF2LLH(const boost::numeric::ublas::vector<T> &ecef,const T &a=WGS84_a, const T &e=WGS84_e){
+        boost::numeric::ublas::vector<T> lla(3);
+	T P= std::sqrt(pow(ecef[0],2) + pow(ecef[1],2));
+	T l0 =std::atan(ecef[2]/(P*(1-a*std::pow(e,2)/std::sqrt(std::pow(ecef[0],2) + std::pow(ecef[1],2) + std::pow(ecef[2],2)))));
+	lla[1]= std::atan(ecef[1]/ecef[0]);
+	lla[0]= std::atan((ecef[2]/P)/(1-a*std::pow(e,2)*std::cos(l0)/(P*std::sqrt(1-std::pow(e,2)*std::pow(sin(l0),2)))));
+	while(std::fabs(lla[0]*180/M_PI-l0*180/M_PI)>std::pow(10.0,-12.0)){
+		l0=lla[0];
+		lla[0]=std::atan((ecef[2]/P)/(1-a*std::pow(e,2)*std::cos(l0)/(P*sqrt(1-std::pow(e*std::sin(l0),2)))));
+	}
+	lla[2]=(P/std::cos(lla[0]))-(a/std::sqrt(1-pow(e*sin(lla[0]),2)));
+	return lla;
+   }
+
+   /*!
+    * \fn  inline boost::numeric::ublas::vector<T> ECEF2NTF(const boost::numeric::ublas::vector<T> &ecef)
+    * \brief convert an ECEF position to a NTF position
+    * \param ecef : ublas vector describing a ecef position (x,y,z)
+    * \return  ublas vector describing a ntf position (x,y,z)
+    */
+   template <class T> inline boost::numeric::ublas::vector<T> ECEF2NTF(const boost::numeric::ublas::vector<T> &ecef){      
+       boost::numeric::ublas::vector<T> ntf(3);
+       ntf[0]=ecef[0]+168;
+       ntf[1]=ecef[1]+60;
+       ntf[2]=ecef[2]-320;
+       return ntf;
+   }
+
+   /*!
+    * \fn  inline boost::numeric::ublas::vector<T> NTF2ECEF(const boost::numeric::ublas::vector<T> &ntf)
+    * \brief convert an ECEF position to a NTF position
+    * \param ntf : ublas vector describing a ntf position (x,y,z)
+    * \return  ublas vector describing a ecef position (x,y,z)
+    */
+    template <class T> inline boost::numeric::ublas::vector<T> NTF2ECEF(const boost::numeric::ublas::vector<T> &ntf){
+       boost::numeric::ublas::vector<T> ecef(3);
+       ecef[0]=ntf[0]-168;
+       ecef[1]=ntf[1]-60;
+       ecef[2]=ntf[2]+320;
+       return ecef;
+   }
+
+
+   /*!
+    * \fn  inline boost::numeric::ublas::matrix<T> C_ECEF2ENU(const T &lat0,const  T &lon0)
+    * \brief compute transformation matrix using to convert an ECEF position to a ENU position
+    * \param lat0 : reference latitude   
+    * \param lon0 : reference longitude 
+    * \return  ublas matrix 
+    */
+    template <class T> inline boost::numeric::ublas::matrix<T> C_ECEF2ENU(const T &lat0,const  T &lon0){
+     
+        T slat = std::sin(lat0);
+        T clat = std::cos(lat0);
+        T slon = std::sin(lon0);
+        T clon = std::cos(lon0);
+
+        boost::numeric::ublas::matrix<T> C(3,3);
+        C(0,0) = -slon;
+        C(0,1) = clon;
+        C(0,2) = 0.0;
+
+        C(1,0) = -clon * slat;
+        C(1,1) = -slon * slat;
+        C(1,2) = clat;
+
+        C(2,0) = clon * clat;
+        C(2,1) = slon * clat;
+        C(2,2) = slat;
+   
+       return C;
+   }
+
+   /*!
+    * \fn  inline boost::numeric::ublas::matrix<T> C_ENU2ECEF(const T &lat0, const T &lon0)
+    * \brief compute transformation matrix using to convert an ENU position to a ECEF position
+    * \param lat0 : reference latitude   
+    * \param lon0 : reference longitude 
+    * \return  ublas matrix 
+    */
+  template <class T> inline boost::numeric::ublas::matrix<T> C_ENU2ECEF(const T &lat0, const T &lon0){
+       T clat = std::cos(lat0);
+       T slat = std::sin(lat0);
+       T clon = std::cos(lon0);
+       T slon = std::sin(lon0);
+
+       boost::numeric::ublas::matrix<T> C(3,3);
+       C(0,0) = -slon;
+       C(0,1) = -clon * slat;
+       C(0,2) = clon * clat;
+
+       C(1,0) = clon;
+       C(1,1) = -slon * slat;
+       C(1,2) = slon * clat;
+
+       C(2,0) = 0.0;
+       C(2,1) = clat;
+       C(2,2) = slat;
+      
+      return C;
+   }
+
+   /*!
+    * \fn inline boost::numeric::ublas::matrix<T> C_ECEF2NED(const T &lat0,const  T &lon0)
+    * \brief compute transformation matrix using to convert an ECEF position to a NED position
+    * \param lat0 : reference latitude   
+    * \param lon0 : reference longitude 
+    * \return  ublas matrix 
+    */
+   template <class T> inline boost::numeric::ublas::matrix<T> C_ECEF2NED(const T &lat0,const T &lon0){
+    
+        T clat = std::cos(lat0);
+        T clon = std::cos(lon0);
+        T slat = std::sin(lat0);
+        T slon = std::sin(lon0);
+
+        boost::numeric::ublas::matrix<T> C(3,3);
+
+        C(0,0) = -slat * clon;
+        C(0,1) = -slat * slon;
+        C(0,2) = clat;
+
+        C(1,0) = -slon;
+        C(1,1) = clon;
+        C(1,2) = 0.0;
+
+        C(2,0) = -clat * clon;
+        C(2,1) = -clat * slon;
+        C(2,2) = -slat;
+
+       return C;
+    }
+ 
+   /*!
+    * \fn  inline boost::numeric::ublas::matrix<T> C_NED2ECEF(const T &lat0, const T &lon0)
+    * \brief compute transformation matrix using to convert NED position to a ECEF position
+    * \param lat0 : reference latitude   
+    * \param lon0 : reference longitude 
+    * \return  ublas matrix 
+    */
+    template <class T> inline boost::numeric::ublas::matrix<T> C_NED2ECEF(const T &lat0, const T &lon0){
+
+        T clat = std::cos(lat0);
+        T clon = std::cos(lon0);
+        T slat = std::sin(lat0);
+        T slon = std::sin(lon0);
+
+        boost::numeric::ublas::matrix<T> C(3,3);
+
+        C(0,0) = -slat * clon;
+        C(1,0) = -slat * slon;
+        C(2,0) = clat;
+
+        C(0,1) = -slon;
+        C(1,1) = clon;
+        C(2,1) = 0.0;
+
+        C(0,2) = -clat * clon;
+        C(1,2) = -clat * slon;
+        C(2,2) = -slat;
+
+      return C;
+    }
+
+   /*!
+    * \fn  inline boost::numeric::ublas::vector<T> ECEF2TANGENT (const boost::numeric::ublas::matrix<T> & C, const boost::numeric::ublas::vector<T> & P ,const boost::numeric::ublas::vector<T> Ref )
+    * \brief convert an ECEF position to a ENU or NED position
+    * \param C : transformation matrix 
+    * \param P : ECEF position  
+    * \param Ref : reference position in ECEF frame 
+    * \return  ublas vector 
+    */
+    template <class T> inline boost::numeric::ublas::vector<T> 
+    ECEF2TANGENT (const boost::numeric::ublas::matrix<T> & C, const boost::numeric::ublas::vector<T> & P ,const boost::numeric::ublas::vector<T> Ref ){
+      return   prod(C,(P-Ref));
+    }
+
+   /*!
+    * \fn inline boost::numeric::ublas::vector<T> TANGENT2ECEF (const boost::numeric::ublas::matrix<T> & C, const boost::numeric::ublas::vector<T> & P ,const boost::numeric::ublas::vector<T> Ref )
+    * \brief convert an ENU or NED position to an ECEF position
+    * \param C : transformation matrix 
+    * \param P : ENU or NED position  
+    * \param Ref : reference position in ECEF frame 
+    * \return  ublas vector 
+    */
+    template <class T> inline boost::numeric::ublas::vector<T> 
+    TANGENT2ECEF (const boost::numeric::ublas::matrix<T> & C, const boost::numeric::ublas::vector<T> & P ,const boost::numeric::ublas::vector<T> Ref ){
+      return Ref+prod(C,P);
+    }
+
+   /*!
+    * \fn inline boost::numeric::ublas::vector<T> ENU2NED(const boost::numeric::ublas::vector<T> &enu)
+    * \brief convert an ENU position to an NED position
+    * \param enu : ENU  position  
+    * \return  ublas vector 
+    */
+    template <class T> inline boost::numeric::ublas::vector<T> ENU2NED(const boost::numeric::ublas::vector<T> &enu){
+      boost::numeric::ublas::vector<T> ned(3);
+      ned[0]=enu[1];
+      ned[1]=enu[0];
+      ned[2]=-enu[2];
+      return ned;
+    } 
+
+   /*!
+    * \fn inline boost::numeric::ublas::vector<T> NED2ENU(const boost::numeric::ublas::vector<T> &ned)
+    * \brief convert an NED position to an ENU position
+    * \param ned : NED  position  
+    * \return  ublas vector 
+    */
+    template <class T> inline boost::numeric::ublas::vector<T> NED2ENU(const boost::numeric::ublas::vector<T> &ned){
+       return ENU2NED(ned);
+    }
+
+ 
+   /*!
+    * \fn inline boost::numeric::ublas::vector<T> LLH2LAMBERT(const boost::numeric::ublas::vector<T> &llh, T lon0 ,T e, T n, T c ,T Xs, T Ys)
+    * \brief convert an LLH position to a LAMBERT position
+    * \param llh : LLH position
+    * \param lon0 : reference longitude
+    * \param e : ellipsoid eccentricity
+    * \param n :
+    * \param c :
+    * \param Xs : false easting
+    * \param Ys : false northing
+    * \return  ublas vector 
+    */
+    template <class T> inline boost::numeric::ublas::vector<T> LLH2LAMBERT(const boost::numeric::ublas::vector<T> &llh, T lon0 ,T e, T n, T c ,T Xs, T Ys){; 
+       boost::numeric::ublas::vector<T> lambert(3);
+       T latiso= std::log(std::tan((M_PI / 4) + (llh[0] / 2)) * std::pow((1 - e * std::sin(llh[0])) / (1 + e * std::sin(llh[0])),e / 2));
+       lambert[0] = Xs + c*std::exp(-n*latiso)*std::sin(n*(llh[1]-lon0));
+       lambert[1] = Ys - c*std::exp(-n*latiso)*std::cos(n*(llh[1]-lon0));
+       return lambert;
+    }
+ 
+
+   /*!
+    * \fn inline boost::numeric::ublas::vector<T> LLH2LAMBERT93(const boost::numeric::ublas::vector<T> &llh)
+    * \brief convert an LLH position to a LAMBERT 93 position
+    * \param llh : llh position
+    * \return  ublas vector 
+    */
+   template <class T> inline boost::numeric::ublas::vector<T> LLH2LAMBERT93(const boost::numeric::ublas::vector<T> &llh){
+//      boost::numeric::ublas::vector<T> ecef=LLH2ECEF<T>(llh);
+//      boost::numeric::ublas::vector<T> ntf=ECEF2NTF<T>(ecef);
+//      boost::numeric::ublas::vector<T> llhntf=ECEF2LLH<T>(ntf,GRS80_a,GRS80_e);
+     return LLH2LAMBERT<T>(llh,LAMBERT93_lon0 ,GRS80_e, LAMBERT93_n, LAMBERT93_c , LAMBERT93_Xs, LAMBERT93_Ys);
+   } 
+
+
+   /*!
+    * \fn inline boost::numeric::ublas::vector <T> LAMBERT2LLH(const boost::numeric::ublas::vector<T> &lambert, T lon0, T e , T n, T c, T Xs ,T Ys )
+    * \brief convert an LLH position to a LAMBERT position
+    * \param lambert : lambert position
+    * \param lon0 : reference longitude
+    * \param e : ellipsoid eccentricity
+    * \param n :
+    * \param c :
+    * \param Xs : false easting
+    * \param Ys : false northing
+    * \return  ublas vector 
+    */
+    template <class T> inline boost::numeric::ublas::vector<T> LAMBERT2LLH(const boost::numeric::ublas::vector<T> &lambert, T lon0, T e , T n, T c, T Xs ,T Ys ){
+      boost::numeric::ublas::vector<T> llh(3);
+
+      T latiso=std::log(c/std::abs(std::sqrt(std::pow(lambert[0]-Xs,2)+std::pow(lambert[1]-Ys,2))))/n;
+      llh[0]=2*std::atan(std::exp(latiso))-M_PI/2;
+      llh[1]=lon0+std::atan(-(lambert[0]-Xs)/(lambert[1]-Ys))/n;
+      T l0=llh[0]+1;
+
+      while(std::abs(llh[0]-l0)>std::pow(10.0,-12.0)){
+        l0=llh[0];
+        llh[0]=2 * std::atan(std::pow((1 + e * std::sin(l0)) / (1 - e * std::sin(l0)), e / 2)*std::exp(latiso)) - M_PI / 2;
+      }
+      return llh;
+    }
+  
+   /*!
+    * \fn inline boost::numeric::ublas::vector<T> LAMBERT932LLH(const boost::numeric::ublas::vector<T> &lambert)
+    * \brief convert an LAMBERT93 position to a LLH position
+    * \param lambert : lmabert 9 position
+    * \return  ublas vector 
+    */
+    template <class T> inline boost::numeric::ublas::vector<T> LAMBERT932LLH(const boost::numeric::ublas::vector<T> &lambert){
+      return LAMBERT2LLH<T>(lambert, LAMBERT93_lon0 ,GRS80_e, LAMBERT93_n, LAMBERT93_c , LAMBERT93_Xs, LAMBERT93_Ys);
+      //boost::numeric::ublas::vector<T> llhntf=LAMBERT2LLHCARTO<T>(lambert, LAMBERT93_lon0 ,GRS80_e, LAMBERT93_n, LAMBERT93_c , LAMBERT93_Xs, LAMBERT93_Ys);
+      //boost::numeric::ublas::vector<T> ecefntf=LLH2ECEF<T>(llhntf);
+      //boost::numeric::ublas::vector<T> ecef=NTF2ECEF<T>(ecefntf);
+      //return ECEF2LLH<T>(ecef);
+    } 
+
+   /*!
+    * \fn inline T MeridionalRadius(const T &latitude,const T &a, const T &e)
+    * \brief compute the prime vertical curvature radius
+    * \param latitude : a latitude 
+    * \param a : semi-major axis of ellipsoid (by default WGS84 value is used)
+    * \param e : ellipsoid eccentricity  (by default WGS84 value is used)
+    * \return  ublas vector 
+    */
+   template<class T> inline T MeridionalRadius(const T &latitude,const T &a=WGS84_a, const T &e=WGS84_e){
+       return a/(std::pow(1-std::pow(e*std::sin(latitude),2),1.5));
+   }
+
+   /*!
+    * \fn inline T TranversalRadius(const T &latitude,const T &a, const T &e)
+    * \brief compute the prime horizontal curvature radius
+    * \param latitude : a latitude 
+    * \param a : semi-major axis of ellipsoid (by default WGS84 value is used)
+    * \param e : ellipsoid eccentricity  (by default WGS84 value is used)
+    * \return  ublas vector 
+    */
+   template<class T> inline T TranversalRadius(const T &latitude,const T &a=WGS84_a, const T &e=WGS84_e){
+      return a/std::sqrt(1-std::pow(e*std::sin(latitude),2));
+   }
+
+
+};
+};
+#endif
+
+
+
Index: tags/0.0.2/include/Pacpus/PacpusTools/math/math_exception.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/math/math_exception.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/math/math_exception.hpp	(revision 257)
@@ -0,0 +1,36 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef PACPUS_MATH_EXCEPTION_HPP
+#define PACPUS_MATH_EXCEPTION_HPP
+
+namespace math {
+
+/*!
+* \class math_error
+* \brief This class describes the math exception
+*/
+class math_error
+    : public std::logic_error
+{
+  public:
+    /*!
+     * \brief Constructor
+     * \param  what_arg : a string describing the math problem
+     */
+    math_error (const std::string& what_arg) : logic_error( what_arg) {}
+ };
+
+} // namespace math
+
+#endif // PACPUS_MATH_EXCEPTION_HPP
Index: tags/0.0.2/include/Pacpus/PacpusTools/math/rng.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/math/rng.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/math/rng.hpp	(revision 257)
@@ -0,0 +1,226 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Random number generators.
+///
+/// Detailed description.
+
+#ifndef __BOOST_RNG__
+#define __BOOST_RNG__
+
+#include <boost/random.hpp>
+#include <boost/math/distributions.hpp>
+#include <ctime>
+
+namespace math {
+
+namespace rng {
+
+/// This class is basic normal random number generator
+///
+/// @tparam RealType describe number precision, e.g. @c float, @c double
+/// @tparam PRNG describe pseudo random number generator
+/// @see boost::random
+template <class RealType, class PRNG>
+class normal_generator
+{
+public:
+    /// Default construtor
+    normal_generator()
+        : engine(time(NULL))
+        , generator(engine,boost::normal_distribution<RealType>(0,1))
+    {}
+
+    /// Construtor
+    ///
+    /// @param dist a normal distribution
+    /// @see boost::distributions
+    normal_generator(const boost::math::normal_distribution<RealType> & dist)
+        : engine(time(NULL))
+        , generator(engine,boost::normal_distribution<RealType>(dist.mean(),dist.sigma()))
+    {}
+
+    /// Constructor
+    ///
+    /// @param mean mean of the normal distribution 
+    /// @param sigma standard deviation of the normal distribution
+    normal_generator(const RealType & mean ,const RealType & sigma)
+        : engine(time(NULL))
+        , generator(engine,boost::normal_distribution<RealType>(mean(),sigma()))
+    {}
+
+    /// Get a random number
+    RealType operator()()
+    {
+        return generator();
+    }
+
+    /// Set normal distribution
+    ///
+    /// @param dist : a normal distribution
+    /// @see boost::distributions
+    void distribution( const boost::math::normal_distribution<RealType> & dist)
+    { 
+        generator.dist= boost::normal_distribution<RealType>(dist.mean(),dist.standard_deviation());
+    }
+
+    /// Set normal distrubution
+    ///
+    /// @param mean : mean of the normal distribution 
+    /// @param sigma : satndard deviation of the normal distribution
+    void distribution( const RealType & mean ,const RealType & sigma) { 
+        generator.distribution()= boost::normal_distribution<RealType>(mean,sigma);
+    }
+
+private:
+    /// pseudorandom number generator
+    PRNG engine; 
+
+    /// the normal random number generator
+    boost::variate_generator<PRNG, boost::normal_distribution<RealType> > generator;
+};
+
+/// Defines normal random number generator as a Mersenne Twister 19937 with double-precision numbers
+typedef class normal_generator<double, boost::mt19937> normal_rng;
+
+/// This class is basic uniform random number generator.
+///
+/// @tparam RealType describe number precision, e.g. @c float, @c double
+/// @tparam PRNG describe pseudo random number generator
+/// @see boost::random
+template <class RealType, class PRNG>
+class uniform_generator
+{
+public:
+    /// Default construtor
+    uniform_generator()
+        : engine(time(NULL))
+        , generator(engine, boost::uniform_real<RealType>(0,1))
+    {}
+
+    /// Construtor
+    /// @param dist a uniform distribution
+    /// @see boost::distributions
+    uniform_generator(const boost::math::uniform_distribution<RealType> & dist)
+        : engine(time(NULL))
+        , generator(engine, boost::uniform_real<RealType>(dist.lower(),dist.upper()))
+    {}
+    
+    /// Constructor
+    ///
+    /// @param lower the lower value of the uniform distribution
+    /// @param upper the upper value of the uniform distribution
+    uniform_generator(const RealType & lower , const RealType & upper)
+        : engine(time(NULL))
+        , generator(engine, boost::uniform_real<RealType>(lower,upper))
+    {}
+
+    /// Get a random number
+    RealType operator()()
+    {
+        return generator();
+    }
+
+    /// Set uniform distribution
+    ///
+    /// @param dist a normal distribution
+    /// @see boost::distributions
+    void distribution( const boost::math::uniform_distribution<RealType> & dist)
+    {
+        generator.dist()= boost::uniform_real<RealType>(dist.lower(),dist.upper());
+    }
+
+    /// Set uniform distribution
+    ///
+    /// @param lower the lower value of the uniform distribution
+    /// @param upper the upper value of the uniform distribution
+    void distribution( const RealType & lower , const RealType & upper)
+    {
+        generator.dist()= boost::uniform_real<RealType>(lower,upper);
+    }
+
+private:
+    /// @brief pseudo random number generator
+    PRNG engine;
+    /// @brief the uniform random number generator
+    boost::variate_generator<PRNG, boost::uniform_real<RealType> > generator;
+};
+
+/// Defines uniform random number generator as a Mersenne Twister 19937 with double-precision numbers
+typedef class uniform_generator<double, boost::mt19937> uniform_rng;
+
+/// This class is basic triangular random number generator
+///
+/// @tparam RealType describe number precision, e.g. @c float, @c double
+/// @tparam PRNG describe pseudo random number generator ( see boost random)
+template <class RealType, class PRNG>
+class triangle_generator
+{
+public: 
+    /// Default construtor
+    triangle_generator()
+        : engine(time(NULL))
+        , generator(engine, boost::triangle_distribution<RealType>(-1,0,1))
+    {}
+
+    /// Construtor
+    ///
+    /// @param dist : a traingle distribution
+    /// @see boost distributions
+    triangle_generator(const boost::math::triangular_distribution<RealType> & dist)
+        : engine(time(NULL))
+        ,generator(engine, boost::triangle_distribution<RealType>(dist.lower(),dist.upper()))
+    {}
+
+    /// Constructor
+    ///
+    /// @param lower the lower value of the uniform distribution 
+    /// @param mode the mode value of the uniform distribution 
+    /// @param upper the upper value of the uniform distribution
+    triangle_generator(const RealType & lower, const RealType & mode ,const RealType & upper)
+        : engine(time(NULL))
+        , generator(engine, boost::triangle_distribution<RealType>(lower,mode,upper))
+    {}
+
+    /// Get a random number
+    RealType operator()()
+    {
+        return generator();
+    }
+
+    /// Set triangle distribution
+    /// @param dist a normal distribution
+    /// @see boost::distributions
+    void distribution( const boost::math::triangular_distribution<RealType> & dist)
+    {
+        generator.dist()= boost::triangle_distribution<RealType>(dist.lower(),dist.mode(),dist.upper());
+    }
+
+    /// Set triangle distribution
+    /// @param lower    the lower value of the uniform distribution 
+    /// @param mode     the mode value of the uniform distribution 
+    /// @param upper    the upper value of the uniform distribution
+    void distribution( const RealType & lower, const RealType & mode ,const RealType & upper)
+    {
+        generator.dist()= boost::triangle_distribution<RealType>(lower,mode,upper);
+    }
+
+private :
+    /// pseudorandom number generator
+    PRNG engine;
+    /// the triangle random number generator
+    boost::variate_generator<PRNG, boost::triangle_distribution<RealType> > generator;
+};
+
+typedef class triangle_generator<double, boost::mt19937> triangle_rng;
+
+} // namespace rng
+} // namespace math
+
+#endif // __BOOST_RNG__
Index: tags/0.0.2/include/Pacpus/PacpusTools/math/ublas.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/math/ublas.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/math/ublas.hpp	(revision 257)
@@ -0,0 +1,405 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __BOOST_UBLAS__
+#define __BOOST_UBLAS__
+
+#include <boost/numeric/ublas/vector.hpp>
+#include <boost/numeric/ublas/matrix.hpp>
+
+#include <boost/numeric/ublas/lu.hpp>
+#include <boost/numeric/ublas/vector_proxy.hpp>
+#include <boost/numeric/ublas/triangular.hpp>
+#include <boost/numeric/ublas/lu.hpp>
+#include <boost/numeric/ublas/io.hpp>
+
+#include <cmath>
+#include "math_exception.hpp"
+
+namespace math {
+namespace ublas {
+
+/// Definition of a matrix using double precision
+typedef boost::numeric::ublas::matrix<double> Matrix;
+/// Definition of a vector using double precision
+typedef boost::numeric::ublas::vector<double> Vector;
+/// Definition of empty vector using double precision
+typedef boost::numeric::ublas::zero_vector<double> ZeroVector;
+/// Definition of empty matrix using double precision
+typedef boost::numeric::ublas::zero_matrix<double> ZeroMatrix;
+
+/// Multiplication of two matrices.
+///
+/// @tparam T @todo Documentation
+/// @param m1 ublas matrix
+/// @param m2 ublas matrix
+/// @returns ublas matrix
+template<class T>
+inline boost::numeric::ublas::matrix<T> operator *(const boost::numeric::ublas::matrix<T> & m1, const boost::numeric::ublas::matrix<T> & m2)
+{
+    return prod(m1,m2);
+}
+
+/// product of a vector by a matrix
+///
+/// @tparam T @todo Documentation
+/// @param m ublas matrix
+/// @param v ublas vector
+/// @returns ublas vector
+template<class T>
+inline boost::numeric::ublas::vector<T> operator *(const boost::numeric::ublas::matrix<T> & m, const boost::numeric::ublas::vector<T> & v)
+{
+    return prod(m,v);
+}
+
+/// addition of two vectors
+///
+/// @tparam T @todo Documentation
+/// @param v1 ublas vector
+/// @param v2 ublas vector
+/// @returns ublas vector
+template<class T>
+inline boost::numeric::ublas::vector<T> operator +(const boost::numeric::ublas::vector<T> & v1, const boost::numeric::ublas::vector<T> & v2)
+{
+    boost::numeric::ublas::vector<T> tmp = v1;
+    return tmp+=v2;
+}
+
+/// subtraction of two vectors
+///
+/// @tparam T @todo Documentation
+/// @param v1 ublas vector
+/// @param v2 ublas vector
+/// @returns ublas vector
+template<class T>
+inline boost::numeric::ublas::vector<T> operator -(const boost::numeric::ublas::vector<T> & v1, const boost::numeric::ublas::vector<T> & v2)
+{
+    boost::numeric::ublas::vector<T> tmp = v1;
+    return tmp-=v2;
+}
+
+/// Transposes a matrix
+///
+/// @tparam T @todo Documentation
+/// @param m ublas matrix
+/// @returns ublas matrix
+template<class T>
+inline boost::numeric::ublas::matrix<T> Trans(boost::numeric::ublas::matrix<T> &m)
+{
+    return trans(m);
+}
+
+/// Converts a vector to a matrix.
+///
+/// @param v ublas vector
+/// @returns ublas matrix
+template <class T>
+inline boost::numeric::ublas::matrix<T> vector2matrix(const boost::numeric::ublas::vector<T> &v)
+{
+    boost::numeric::ublas::matrix<T> tmp(v.size(),1);
+    for(size_t i=0;i<v.size();i++) {
+        tmp(i,0)=v[i];
+    }
+    return tmp;
+}
+
+/// compute the norm of a vector
+///
+/// @param v ublas vector
+/// @returns norm value
+template <class T>
+inline double Norm(const boost::numeric::ublas::vector<T> & v){
+    double norm =0;
+    for(typename boost::numeric::ublas::vector<T>::const_iterator I=v.begin(); I != v.end(); ++I) {
+        norm+=(*I)*(*I);
+    }
+    return std::sqrt(norm);
+}
+
+/// term by term multiplication of two vectors
+///
+/// @param v1 : ublas vector
+/// @param v2 : ublas vector
+/// @returns ublas vector
+template <class T>
+inline boost::numeric::ublas::vector<T> Mult(const boost::numeric::ublas::vector<T> & v1, const boost::numeric::ublas::vector<T> & v2)
+{
+    if(v1.size()!=v2.size()) {
+        throw math_error("Dot(v1,v2) : vectors must have the same size");
+    }
+    boost::numeric::ublas::vector<T> v(v1.size());
+    for(size_t i=0;i<v1.size();i++) {
+        v[i]=v1[i]*v2[i];
+    }
+    return v;
+}
+
+/// dot product
+///
+/// @param v1 ublas vector
+/// @param v2 ublas vector
+/// @returns dot product value
+template <class T>
+inline double Dot(const boost::numeric::ublas::vector<T> & v1, const boost::numeric::ublas::vector<T> & v2)
+{
+    if(v1.size()!=v2.size()) {
+        throw math_error("Dot(v1,v2) : vectors must have the same size");
+    }
+    double dot=0;
+    for(size_t i=0;i<v1.size();i++) {
+        dot+=v1[i]*v2[i];
+    }
+    return dot;
+}
+
+/// matrix inversion using LU decomposition
+/// @param m ublas matrix
+/// @returns ublas matrix
+inline Matrix InvLU(const Matrix &m)
+    throw(math_error)
+{
+    using namespace boost::numeric::ublas;
+    typedef permutation_matrix<std::size_t> pmatrix;
+
+    if(m.size1() != m.size2()) throw math_error("Inv(m): matrix must be square");
+
+    // create a working copy of the input
+    Matrix A(m);
+    // create a permutation matrix for the LU-factorization
+    pmatrix pm(A.size1());
+    // perform LU-factorization
+    int res = lu_factorize(A,pm);
+    if( res != 0 )  throw math_error("Inv(m) : singular matrix");
+    // create identity matrix of "inverse"
+    Matrix inverse = identity_matrix<double>(A.size1());
+    // backsubstitute to get the inverse
+    lu_substitute(A, pm, inverse);
+
+    return inverse;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+///////////////////////// QR  DECOMPOSITION ////////////////////////////////////
+///////////////////////////////////////////////////////////////////////////////
+
+/// @todo Documentation
+/// @tparam T @todo Documentation
+template<class T>
+bool InvertMatrix (const boost::numeric::ublas::matrix<T>& input, boost::numeric::ublas::matrix<T>& inverse)
+{
+    using namespace boost::numeric::ublas;
+    typedef permutation_matrix<std::size_t> pmatrix;
+    // create a working copy of the input
+    matrix<T> A(input);
+    // create a permutation matrix for the LU-factorization
+    pmatrix pm(A.size1());
+
+    // perform LU-factorization
+    int res = lu_factorize(A,pm);
+    if( res != 0 ) return false;
+
+    // create identity matrix of "inverse"
+    inverse.assign(boost::numeric::ublas::identity_matrix<T>(A.size1()));
+
+    // backsubstitute to get the inverse
+    lu_substitute(A, pm, inverse);
+
+    return true;
+}
+
+/// @todo Documentation
+/// @tparam T @todo Documentation
+template<class T>
+void TransposeMultiply(const boost::numeric::ublas::vector<T>& vector,
+    boost::numeric::ublas::matrix<T>& result,
+    size_t size)
+{
+    result.resize (size,size);
+    result.clear ();
+    for(unsigned int row=0; row< vector.size(); ++row)
+    {
+        for(unsigned int col=0; col < vector.size(); ++col)
+            result(row,col) = vector(col) * vector(row);
+
+    }
+}
+
+/// @todo Documentation
+/// @tparam T @todo Documentation
+template<class T>
+void HouseholderCornerSubstraction (boost::numeric::ublas::matrix<T>& LeftLarge,
+    const boost::numeric::ublas::matrix<T>& RightSmall)
+{
+    using namespace boost::numeric::ublas;
+    using namespace std;
+    if(
+        !(
+        (LeftLarge.size1() >= RightSmall.size1())
+        && (LeftLarge.size2() >= RightSmall.size2())
+        )
+        )
+    {
+        cerr << "invalid matrix dimensions" << endl;
+        return;
+    }
+
+    size_t row_offset = LeftLarge.size2() - RightSmall.size2();
+    size_t col_offset = LeftLarge.size1() - RightSmall.size1();
+
+    for(unsigned int row = 0; row < RightSmall.size2(); ++row )
+        for(unsigned int col = 0; col < RightSmall.size1(); ++col )
+            LeftLarge(col_offset+col,row_offset+row) -= RightSmall(col,row);
+}
+
+/// @todo Documentation
+/// @tparam T @todo Documentation
+template<class T>
+void QR (const boost::numeric::ublas::matrix<T>& M,
+    boost::numeric::ublas::matrix<T>& Q,
+    boost::numeric::ublas::matrix<T>& R)
+{
+    using namespace boost::numeric::ublas;
+    using namespace std;
+
+    if(
+        !(
+        (M.size1() == M.size2())
+        )
+        )
+    {
+        cerr << "invalid matrix dimensions" << endl;
+        return;
+    }
+    size_t size = M.size1();
+
+    // init Matrices
+    matrix<T> H, HTemp;
+    HTemp = identity_matrix<T>(size);
+    Q = identity_matrix<T>(size);
+    R = M;
+
+    // find Householder reflection matrices
+    for(unsigned int col = 0; col < size-1; ++col)
+    {
+        // create X vector
+        boost::numeric::ublas::vector<T> RRowView = boost::numeric::ublas::column(R,col);
+        vector_range< boost::numeric::ublas::vector<T> > X2 (RRowView, range (col, size));
+        boost::numeric::ublas::vector<T> X = X2;
+
+        // X -> U~
+        if(X(0) >= 0)
+            X(0) += norm_2(X);
+        else
+            X(0) += -1*norm_2(X);
+
+        HTemp.resize(X.size(),X.size(),true);
+
+        TransposeMultiply(X, HTemp, X.size());
+
+        // HTemp = the 2UUt part of H
+        HTemp *= ( 2 / inner_prod(X,X) );
+
+        // H = I - 2UUt
+        H = identity_matrix<T>(size);
+        HouseholderCornerSubstraction(H,HTemp);
+
+        // add H to Q and R
+        Q = prod(Q,H);
+        R = prod(H,R);
+    }
+}
+//////////////////////////////////////////////////////////////////////////////////////////::
+
+/// Matrix inversion using QR decomposition
+/// @param m ublas matrix
+/// @returns ublas matrix
+inline Matrix InvQR(const Matrix &m)
+    throw(math_error)
+{
+    using namespace boost::numeric::ublas;
+
+    if(m.size1() != m.size2()) throw math_error("Inv(m): matrix must be square");
+    Matrix Q(m), R(m), Rinv(m);
+    QR (m,Q,R);
+    for( int i = 0 ; i < R.size1() ; i++ )
+        for( int j = 0 ; j < R.size2() ; j++ )
+            if( R(i,j) < 1e-10 )
+                R(i,j) = 0;
+    InvertMatrix(R,Rinv);
+    return Rinv*Trans(Q);
+}
+
+
+/// compute matrix determinant using LU decomposition
+/// @param m ublas matrix
+/// @returns ublas matrix
+inline double DetLU(const Matrix & m)
+    throw(math_error)
+{
+    using namespace boost::numeric::ublas;
+    typedef permutation_matrix<std::size_t> pmatrix;
+
+
+    if(m.size1() != m.size2()) throw math_error("Determinant(m): matrix must be square");
+
+    // create a working copy of the input
+    Matrix A(m);
+    // create a permutation matrix for the LU-factorization
+    pmatrix pm(m.size1());
+    // perform LU-factorization
+    int res = lu_factorize(A, pm);
+    if( res != 0 )  throw math_error("Determinant(m) : singular matrix");
+    //compute determinant
+    double det = 1.0;
+    for (std::size_t i=0; i < pm.size(); ++i) {
+        if (pm(i) != i)
+            det *= -1.0;
+        det *= A(i,i);
+    }
+    return det;
+}
+
+
+/// output stream function
+inline std::ostream& operator << (std::ostream& ostrm, const Matrix & m)
+{
+    for (size_t i=0; i < m.size1(); i++)
+    {
+        ostrm << '['<<'\t';
+        for (size_t j=0; j < m.size2(); j++)
+        {
+            double x = m(i,j);
+            ostrm << x << '\t';
+        }
+        ostrm << ']'<< std::endl;
+    }
+    return ostrm;
+}
+
+/// output stream function
+inline std::ostream& operator << (std::ostream& ostrm, const Vector & v)
+{
+    for (size_t i=0; i < v.size(); i++)
+    {
+        ostrm << '['<<'\t';
+        double x = v(i);
+        ostrm << x << '\t';
+        ostrm << ']'<< std::endl;
+    }
+    return ostrm;
+}
+
+} // namespace ublas
+} // namespace math
+
+#endif // __BOOST_UBLAS__
Index: tags/0.0.2/include/Pacpus/PacpusTools/math/utilities.hpp
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/math/utilities.hpp	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/math/utilities.hpp	(revision 257)
@@ -0,0 +1,159 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef __UTILITIES_HPP__
+#define __UTILITIES_HPP__
+
+
+namespace math {
+
+ namespace utility {
+
+
+   /*!
+    * \fn inline  std::vector<T> LineCircleIntersection(const boost::numeric::ublas::vector<T> & A,const boost::numeric::ublas::vector<T> & B, const boost::numeric::ublas::vector<T> & C,const double R)
+    * \brief Compute points of intersection of circle and line defined  through two poinst A and B
+    * \param A : a point of the line
+    * \param B : a point of the line
+    * \param C : 
+    * \param R : circle radius
+    * \return  a list of abscissas with respect of point A
+    */
+    template <class T> inline  std::vector<T> LineCircleIntersection(const boost::numeric::ublas::vector<T> & A,    
+                                                                       const boost::numeric::ublas::vector<T> & B,
+                                                                       const boost::numeric::ublas::vector<T> & C,
+                                                                       const double R){
+           std::vector<T> intersection;
+           
+           double alpha = (B[0]-A[0])*(B[0]-A[0]) + (B[1]-A[1])*(B[1]-A[1]);
+           double norm = std::sqrt(alpha);
+           double beta = 2 *(B[0]-A[0])*(A[0]-C[0]) + (B[1]-A[1])*(A[1]-C[1]);
+           double gamma = A[0]*A[0] + A[1]*A[1] + C[0]*C[0] + C[1]*C[1] - 2*(A[0]*C[0] + A[1]*C[1] ) - R*R;
+           double delta = beta*beta - 4*alpha*gamma;
+
+           if(delta>0){
+              intersection.push_back( (-beta -sqrt(delta))/(2*norm) );
+              intersection.push_back( (-beta +sqrt(delta))/(2*norm) );
+           }
+
+           return intersection;
+    }
+
+   /*!
+    * \fn inline  std::vector<T> SegmentCircleIntersection(const boost::numeric::ublas::vector<T> & A,const boost::numeric::ublas::vector<T> & B, const boost::numeric::ublas::vector<T> & C,const double R)
+    * \brief Compute points of intersection of circle and segment defined  through two poinst A and B
+    * \param A : a point of the line
+    * \param B : a point of the line
+    * \param C : 
+    * \param R : circle radius
+    * \return  a list of abscissas with respect of point A and in taking account the hypothesis abscissas in [A,B]
+    */
+    template <class T> inline  std::vector<T> SegmentCircleIntersection(const boost::numeric::ublas::vector<T> & A,    
+                                                                       const boost::numeric::ublas::vector<T> & B,
+                                                                       const boost::numeric::ublas::vector<T> & C,
+                                                                       const double R){
+
+
+           std::vector<T> intersection;
+           double  alpha = (B[0] - A[0]) * (B[0] - A[0]) + (B[1] - A[1]) * (B[1] - A[1]);
+           double norm = std::sqrt(alpha);
+           double  beta  = 2 * ((B[0] - A[0]) * (A[0] - C[0]) + (B[1] - A[1]) * (A[1] - C[1]));
+           double  gamma = A[0] * A[0] + A[1] * A[1] + C[0] * C[0] + C[1] * C[1] - 2 * (A[0] * C[0] + A[1] * C[1]) - R * R;
+          
+           double delta = beta*beta - 4*alpha*gamma;
+
+           if(delta>0){
+              intersection.push_back( (-beta -sqrt(delta))/(2*norm) );
+              intersection.push_back( (-beta +sqrt(delta))/(2*norm) );
+
+               if(intersection[0]<1 && intersection[1]>0){
+                   if(intersection[0] <0 ) intersection[0]=0;
+                   if(intersection[1] >norm) intersection[1]=norm;
+               }else{
+                intersection.clear();
+              }
+           }
+
+
+          return intersection;
+    }
+
+   /*!
+    * \fn inline boost::numeric::ublas::vector<RealType> Cov2Ellipse(const RealType & pxx,const RealType & pxy,const RealType & pyy,const RealType &proba)
+    * \brief Convert 2D covariance to a ellipse parameters
+    * \param pxx : variance X
+    * \param pxy : covariance XY
+    * \param pyy : variance Y
+    * \param proba : percentage 
+    * \return  ublas vector  containing semi-major axis, semi-minor axis and orientation of the ellipse
+    */
+    template <class RealType> inline boost::numeric::ublas::vector<RealType> Cov2Ellipse(const RealType & pxx,const RealType & pxy,const RealType & pyy,const RealType &proba){
+
+        boost::numeric::ublas::vector<RealType> ellipse(3);
+
+        // le scalaire "k" definit l'ellipse avec l'equation :(x-mx)T*(1/P)*(x-mx)=k^2
+        double k=sqrt(-2*log(1-proba));
+  
+        // coeficient de correlation
+        double ro = pxy / sqrt(pxx * pyy);
+        if ( fabs( ro ) > 1 ) 
+	  {
+	    std::cout << "ro=" << ro << "pxx=" << pxx << "pxy=" << pxy << "pyy=" << pyy << std::endl; 
+	    throw math_error("Cov2Ellipse: correlation coefficient is not included between -1 and 1. Covariance matrix is not defined positive");
+	  }
+        double a = 1/(pxx*(1- ro * ro));
+        double b = -ro/(sqrt(pyy*pxx)*(1- ro * ro)); 
+        double c = 1/(pyy*(1- ro * ro));
+  
+        // calcul des deux valeurs propres
+        // la gde vp (lambda1) est associee au petit axe.
+        double delta = (a-c)*(a-c)+4*b*b;
+        double lambda1 = 0.5*(a+c+sqrt(delta));
+        double lambda2 = 0.5*(a+c-sqrt(delta));
+  
+        // vecteur directeur du grand axe
+        double aux = (lambda2-a)/b; 
+        double deno=sqrt(1+aux*aux);
+        double Ux = 1/deno;
+        double Uy = aux/deno;
+  
+        // longueur des axes dans le repere propre
+        double axeX = k/sqrt(lambda2); // demi axe
+        double axeY = k/sqrt(lambda1); // demi axe
+  
+        ellipse(2) = - atan2(Uy, Ux);//heading 
+        ellipse(0) = axeY * 2 * 3; // width    x3 (sigma) si PROBA = 0.4 ellipsoide a deux dimensions (test du khi2)
+        ellipse(1) = axeX * 2 * 3; //height
+
+        //   heading = - atan2(Uy, Ux); 
+        //   width = axeY * 2 * 3; // x3 (sigma) si PROBA = 0.4 ellipsoide a deux dimensions (test du khi2)
+        //   height = axeX * 2 * 3; 
+
+       return ellipse; 
+    }
+
+   /*!
+    * \fn inline boost::numeric::ublas::vector<RealType> Cov2Ellipse(boost::numeric::ublas::matrix<RealType> P,const RealType &proba)
+    * \brief Convert 2D covariance to a ellipse parameters
+    * \param P : 2D covariance matrix 
+    * \param proba : 
+    * \return  ublas vector  containing semi-major axis, semi-minor axis and orientation of the ellipse
+    */
+    template <class RealType> inline boost::numeric::ublas::vector<RealType> Cov2Ellipse(boost::numeric::ublas::matrix<RealType> P,const RealType &proba){
+        if(P.size1()==2 & P.size2()==2) throw math_error("Cov2Ellipse: covariance is not a 2D square matrix");
+        return Cov2Ellipse(P(0,0),P(0,1),P(1,1),proba);
+     }
+
+};
+};
+#endif
Index: tags/0.0.2/include/Pacpus/PacpusTools/matrice.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/matrice.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/matrice.h	(revision 257)
@@ -0,0 +1,111 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Jean Laneurit <firstname.surname@utc.fr>
+/// @date    April, 2010
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Matrix algebra functions.
+///
+/// Detailed description.
+
+#ifndef MATRIX_H
+#define MATRIX_H
+
+typedef enum
+{
+    ONES,
+    ZEROS,
+    IDENTITY
+} t_m;
+
+/// Simple matrix.
+/// @todo Documentation
+class matrice
+{
+    typedef double *ligne;
+    ligne *lignes;
+    unsigned short int n;   // Nombre de lignes (1erparamètre).
+    unsigned short int m;   // Nombre de colonnes (2èmeparamètre).
+
+public:
+    /// Ctor
+    matrice();
+    /// Ctor
+    matrice(unsigned short int nl, unsigned short int nc);
+    /// Ctor
+    matrice(unsigned short int nl, unsigned short int nc,t_m type);
+    /// Copy ctor
+    matrice(const matrice &source); //constructeur par copie
+    /// Dtor
+    virtual ~matrice(void);
+
+    /// Allocates matrix data
+    /// @todo Rename
+    void Alloue(unsigned short int nl, unsigned short int nc);
+
+    /// Assignment operator for matrix operand
+    matrice &operator=(const matrice &m);//m=m1
+    /// Assignment operator for scalar operand
+    matrice &operator=(double x); //m=x
+    /// Conversion operator to double
+    /// @todo FIXME
+    operator double() const
+    {
+        return **lignes;
+    }
+
+    /// @todo Documentation
+    matrice &operator+=(const matrice &m); //m+=m1
+    /// @todo Documentation
+    matrice &operator-=(const matrice &m); //m-=m1
+
+    /// @todo Documentation
+    matrice operator+(const matrice &m1) const; //m=m1+m2
+    /// @todo Documentation
+    matrice operator-(const matrice &m1) const; //m=m1-m2
+    /// @todo Documentation
+    matrice operator*(const matrice &m1) const; //m=m1*m2
+
+    /// @todo Documentation
+    matrice &operator+=(double x); //m+=x
+    /// @todo Documentation
+    matrice &operator-=(double x); //m-=x
+
+    /// @todo Documentation
+    matrice operator+(double x)const; //m+x
+    /// @todo Documentation
+    matrice operator-(double x)const; //m-x
+    /// @todo Documentation
+    matrice operator*(double x)const; //m*x
+    /// @todo Documentation
+    matrice operator/(double x)const; //m/x
+
+    /// @todo Documentation
+    friend matrice operator+(double x,matrice m1) {return m1+x ;} // x+m ;
+    /// @todo Documentation
+    friend matrice operator-(double x,matrice m1) {return m1-x ;} // x-m ;
+    /// @todo Documentation
+    friend matrice operator*(double x,matrice m1) {return m1*x ;} // x*m ;
+
+    /// Matrix transpose.
+    matrice T();
+    /// Matrix inverse.
+    matrice I();
+
+    /// @todo Documentation
+    double &operator()(unsigned short int i, unsigned short int j); // ecriture m(i,j)=x
+    /// @todo Documentation
+    double operator()(unsigned short int i, unsigned short int j) const; //lecture x=m(i,j)
+    /// @todo Documentation
+    double &operator()(unsigned short int i); // ecriture m(i)=x
+    /// @todo Documentation
+    double operator()(unsigned short int i) const; //lecture x=m(i)
+
+    /// @todo Documentation
+    void print(const char *nom);
+};
+
+#endif // MATRIX_H
Index: tags/0.0.2/include/Pacpus/PacpusTools/transf_lamb_93.h
===================================================================
--- tags/0.0.2/include/Pacpus/PacpusTools/transf_lamb_93.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/PacpusTools/transf_lamb_93.h	(revision 257)
@@ -0,0 +1,109 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#include <math.h>
+#define pi 3.141592653589793
+double atanh(double  z)
+{
+	return (0.5 * log((z+1)/(1-z)));
+}
+
+double  abs_me(double x)
+{
+	if(x<0) x=-x;
+	return x;
+}
+
+//transformation des longitudes tatitudes en Lambert93
+void lonlattolam(double lon, double lat, double & lam93x, double & lam93y)
+	{
+		double GRS_a = 6378137;
+		double GRS_f = 1./298.257222101;
+
+		double GRS_b = GRS_a*(1-GRS_f);
+		double GRS_bb= GRS_b*GRS_b;
+		double GRS_aa= 40680631590769.;
+		double GRS_e = sqrt((GRS_aa - GRS_bb) / (GRS_aa));
+
+		double n = 0.725607765053267;
+		double C = 11754255.4261;
+		double XS = 700000;
+		double YS = 12655612.0499;
+
+		double latiso;
+		latiso = atanh(sin(lat)) - GRS_e*atanh(GRS_e*sin(lat));
+		double gamma;
+		gamma = (lon - 0.0523598775598299)*n;
+		double R;
+		R = C * exp(-n*latiso);
+
+		lam93x = R *sin(gamma)+XS;
+		lam93y = -R *cos(gamma)+YS;
+		//printf("x: %.20lf\n y: %.20lf\n",lam93x,lam93y);
+
+	}
+
+
+
+//Transformation des coordonnees de Lambert93 en Longitude lattitude
+
+void lamtolonlat(double lamx, double lamy, double & lon, double & lat)
+{
+
+	double GRS_a = 6378137;
+	double GRS_f = 1./298.257222101;
+	double GRS_b = GRS_a*(1-GRS_f);
+	double GRS_bb= GRS_b*GRS_b;
+	double GRS_aa= 40680631590769.;
+	double GRS_e = sqrt((GRS_aa - GRS_bb) / (GRS_aa));
+
+	//double n = 0.725607765053267;
+	//double C = 11754255.4261;
+	//double XS = 700000;
+	//double YS = 12655612.0499;
+
+
+	//lamx = lamx-700000;
+	//lamy = lamy-12655612.0499;
+
+	double gamma;
+	gamma = atan(-(lamx-700000)/(lamy-12655612.0499));
+
+
+	lon = gamma/0.725607765053267 + 0.0523598775598299;
+	double R;
+	R = sqrt((lamx-700000) * (lamx-700000) + (lamy-12655612.0499) * (lamy-12655612.0499));
+
+	double latiso;
+	latiso = log((11754255.4261)/R)/(0.725607765053267);
+
+	double phiNew, phiOld;
+	phiOld =1;
+	phiNew= asin (tanh ( latiso + GRS_e * atanh(GRS_e * sin(phiOld))));
+	//printf("\nphiNew: %.20lf",phiNew);
+	while (abs_me(phiOld-phiNew) > 1e-10)
+	{
+
+		if(abs_me(phiOld-phiNew) > 1e-10)
+		{
+
+			phiOld = phiNew;
+			phiNew = asin(tanh(latiso+GRS_e*atanh(GRS_e*sin(phiOld))));
+		}
+		else
+			phiOld = phiNew;
+	}
+
+	lat = phiNew;
+
+}
Index: tags/0.0.2/include/Pacpus/kernel/ComponentBase.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/ComponentBase.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/ComponentBase.h	(revision 257)
@@ -0,0 +1,126 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dhermobez <firstname.surname@utc.fr>
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @author  Samuel Gosselin <firstname.surname@utc.fr>
+/// @date    February, 2006
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Generic ComponentBase class. This is an abstract class.
+///
+/// Detailed description.
+/// @todo        - see if some methods can be private with ComponentManager
+///              friendship
+///              - include the copy of Xml node in param here
+///              - see if there is a possibility to avoid the constraint
+///              on parameters in the constructor of derived class
+
+#ifndef DEF_PACPUS_COMPONENTBASE_H
+#define DEF_PACPUS_COMPONENTBASE_H
+
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/PacpusLibConfig.h>
+#include <Pacpus/kernel/XmlComponentConfig.h>
+
+#include <QString>
+
+namespace pacpus {
+
+// Forward declarations.
+class ComponentManager;
+
+/// Base class of a Pacpus component.
+class PACPUSLIB_API ComponentBase
+{
+    friend class ComponentManager;
+
+public:
+    /// Enumeration of the state that can take a component, the three last states suppose
+    /// that the component is started.
+    enum COMPONENT_STATE
+    {
+        STOPPED,
+        NOT_MONITORED,
+        MONITOR_OK,
+        MONITOR_NOK
+    };
+
+    /// Resulting state of a component after its configuration.
+    enum COMPONENT_CONFIGURATION
+    {
+        CONFIGURED_OK,
+        NOT_CONFIGURED,
+        CONFIGURATION_DELAYED,
+        CONFIGURED_FAILED
+    };
+
+    /// Ctor of ComponentBase.
+    /// @param name Name of your component.
+    ComponentBase(const QString & name);
+
+    /// Dtor of ComponentBase.
+    virtual ~ComponentBase();
+
+    /// @returns Value of the current state.
+    COMPONENT_STATE getState();
+
+    /// Checks whether the component if configurer or not.
+    /// @returns @b true if the component is configured, @b false otherwise.
+    bool isConfigured() const;
+
+protected:
+    /// Change the state of the component.
+    /// @param state New component state.
+    void setState(COMPONENT_STATE state);
+
+    /// Called when the component starts, you must override this function.
+    virtual void startActivity() = 0;
+
+    /// Called when the component stops, you must override this function.
+    virtual void stopActivity() = 0;
+
+    /// Called by the ComponentManager, it configure the component thanks a XML node.
+    /// @param config Component's XML node.
+    /// @returns State of the configuration.
+    /// @todo FIXME: 'config' should be const, but we can't change the prototype without breaking old stuff.
+    virtual COMPONENT_CONFIGURATION configureComponent(XmlComponentConfig config) = 0;
+
+protected:
+    /// The XML node that is got in the configureComponent method
+    XmlComponentConfig param;
+
+    /// the name of the component. It is this one in the XML config file
+    QString componentName;
+
+    /// is the component is recording data?
+    bool recording;
+
+    /// provided for compatibility with old DBITE framework
+    bool THREAD_ALIVE;
+
+    /// is the component active?
+    bool mIsActive;
+
+    /// a pointer to the manager of components
+    ComponentManager * mgr;
+
+private:
+    /// called by the ComponentManager to start the component
+    int startComponent();
+
+    /// called by the ComponentManager to stop the component
+    int stopComponent();
+
+    /// store the state of the component
+    COMPONENT_STATE componentState_;
+
+    /// is the component configured (ie configureComponent method was called)
+    COMPONENT_CONFIGURATION configuration_;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_COMPONENTBASE_H
Index: tags/0.0.2/include/Pacpus/kernel/ComponentFactory.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/ComponentFactory.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/ComponentFactory.h	(revision 257)
@@ -0,0 +1,98 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    February, 2006
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Purpose:    Template class ComponentFactory.
+///             Use it to interface your components with the application.
+
+#ifndef DEF_PACPUS_COMPONENTFACTORY_H
+#define DEF_PACPUS_COMPONENTFACTORY_H
+
+#include <cassert>
+
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+
+#include <Pacpus/kernel/ComponentFactoryBase.h>
+
+#include <QString>
+
+/// @def REGISTER_COMPONENT(className, factoryName)
+/// Registers a component to the factory.
+///
+/// @param className     Name of the class, without the quotes.
+/// @param factoryName   Name of the class in the factory.
+/// @example
+/// ~~~
+///     REGISTER_COMPONENT("DummyComponent", DummyComponent);
+/// ~~~
+/// @see pacpus::ComponentFactory
+#define REGISTER_COMPONENT(className, factoryName) \
+    static pacpus::ComponentFactory<className> sFactory(factoryName)
+
+namespace pacpus {
+
+/// Use it to interface your components with the application.
+///
+/// @tparam T   Component class
+/// @see #REGISTER_COMPONENT(className, factoryName)
+template <typename T>
+class ComponentFactory
+    : public ComponentFactoryBase
+{
+    BOOST_STATIC_ASSERT_MSG((boost::is_base_of<ComponentBase, T>::value), "T must inherit from ComponentBase");
+
+public:
+    /// Ctor of ComponentFactory, initialize the factory of the components of type @em T.
+    /// @param type Name of the type of the components.
+    ComponentFactory(const QString & type);
+
+    /// Dtor of ComponentFactory.
+    virtual ~ComponentFactory();
+
+    /// Gets the name of the type of the components.
+    /// @returns Name of the type of the components.
+    const QString & getType() const;
+
+protected:
+    virtual ComponentBase * instantiateComponent(const QString& name);
+
+private:
+    QString mType;
+};
+
+template <typename T>
+ComponentFactory<T>::ComponentFactory(const QString& type)
+    : mType(type)
+{
+    assert(!type.isEmpty());
+    addFactory(this, mType);
+}
+
+template<typename T>
+ComponentFactory<T>::~ComponentFactory()
+{
+}
+
+template <typename T>
+const QString& ComponentFactory<T>::getType() const
+{
+    return mType;
+}
+
+template<typename T>
+ComponentBase * ComponentFactory<T>::instantiateComponent(const QString & name)
+{
+    return new T(name);
+}
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_COMPONENTFACTORY_H
Index: tags/0.0.2/include/Pacpus/kernel/ComponentFactoryBase.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/ComponentFactoryBase.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/ComponentFactoryBase.h	(revision 257)
@@ -0,0 +1,64 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    February, 2006
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Purpose:    The ComponentFactoryBase class is used to provide an 
+///             abstract class to the template ComponentFactory
+
+#ifndef DEF_PACPUS_COMPONENTFACTORYBASE_H
+#define DEF_PACPUS_COMPONENTFACTORYBASE_H
+
+#include <Pacpus/kernel/PacpusLibConfig.h>
+
+class QString;
+
+namespace pacpus {
+
+class ComponentManager;
+class ComponentBase;
+
+/// ComponentFactoryBase
+/// @brief Provide an abstract class to the template ComponentFactory.
+class PACPUSLIB_API ComponentFactoryBase
+{
+    friend class ComponentManager;
+
+public:
+    /// Ctor of ComponentFactoryBase.
+    ComponentFactoryBase();
+    /// Dtor of ComponentFactoryBase.
+    virtual ~ComponentFactoryBase();
+
+protected:
+    /// Creates a new component having @em name as component name.
+    /// Caller becomes the owner of its lifetime
+    ///
+    /// @param name Name of the instantiated component.
+    /// @returns Pointer on the newly created component.
+    virtual ComponentBase * instantiateComponent(const QString& name) = 0;
+    
+    /// Registers a new factory.
+    ///
+    /// @param addr Address of the factory.
+    /// @param type Name of the type created by the factory.
+    void addFactory(ComponentFactoryBase* addr, const QString& type);
+    
+    /// Adds a new component.
+    ///
+    /// @param name Name of the new component.
+    void addComponent(const QString& name);
+
+private:
+    ComponentManager* mgr_;
+};
+
+} // namespace pacpus
+
+#endif
Index: tags/0.0.2/include/Pacpus/kernel/ComponentManager.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/ComponentManager.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/ComponentManager.h	(revision 257)
@@ -0,0 +1,151 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    January, 2006
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Purpose:     This class records the components and manages them
+///              This class is a singleton
+///              Use the static ComponentManager::create() function
+///              to get a pointer on this object.
+
+#ifndef DEF_PACPUS_COMPONENTMANAGER_H
+#define DEF_PACPUS_COMPONENTMANAGER_H
+
+#include <Pacpus/kernel/ComponentFactoryBase.h>
+#include <Pacpus/kernel/pacpus.h>
+#include <Pacpus/kernel/PacpusLibConfig.h>
+#include <Pacpus/kernel/PacpusPluginInterface.h>
+#include <Pacpus/kernel/XmlConfigFile.h>
+
+#include <cstddef>
+#include <QList>
+#include <QMap>
+#include <QPluginLoader>
+
+namespace pacpus {
+
+class ComponentBase;
+
+/// @todo Documentation
+typedef QMap<QString, ComponentBase *> ComponentMap;
+/// @todo Documentation
+typedef QMap<QString, ComponentFactoryBase *> FactoryMap;
+
+/// Singleton recording the components and managing them.
+class ComponentManager
+{
+    friend class ComponentBase;
+
+    // Allow 2 functions to access to private members of ComponentManager
+    friend void ComponentFactoryBase::addFactory(ComponentFactoryBase * addr, const QString & type);
+    friend void ComponentFactoryBase::addComponent(const QString & name);
+
+public:
+    /// @returns a pointer to the ComponentManager object
+    /// @deprecated Use getInstance()
+    PACPUS_DEPRECATED_MSG( static PACPUSLIB_API ComponentManager * create(), "use 'getInstance()'" );
+
+    /// Returns an instance of the singleton ComponentManager class.
+    /// @returns Pointer to the ComponentManager singleton.
+    static PACPUSLIB_API ComponentManager* getInstance();
+
+    /// Destroys the ComponentManager singleton.
+    ///
+    /// After this call, every pointer to the ComponentManager becomes invalid.
+    static PACPUSLIB_API void destroy();
+
+    /// Automatic deleter class.
+    struct destroyer {
+        /// Invokes ComponentManager::destroy() method if @b mgr pointer is not null.
+        void operator()(ComponentManager * mgr) const
+        {
+            if (!mgr) {
+                return;
+            }
+            mgr->destroy();
+        }
+    };
+
+    /// Loads the components included in the XML config file.
+    /// @param file Name of the XML file.
+    /// @returns Number of components loaded by the manager.
+    PACPUSLIB_API std::size_t loadComponents(const QString& file);
+
+    /// Starts all the components
+    /// @return @b true if all the component has been started, @b false otherwise.
+    PACPUSLIB_API bool start();
+
+    /// Starts only the component passed in parameter.
+    /// @param component Component to start.
+    /// @returns @b true if the component exists and has been started, @b false otherwise.
+    PACPUSLIB_API bool start(const QString& component);
+
+    /// Stops all the components
+    /// @returns @b true if all the component has been stopped, @b false otherwise.
+    PACPUSLIB_API bool stop();
+
+    /// Stops only the component passed in parameter.
+    /// @param component Component to stop.
+    /// @returns @b true if the component has been stopped, @b false otherwise.
+    PACPUSLIB_API bool stop(const QString& component);
+
+    /// Gets a pointer to the component referred by @em name.
+    ///
+    /// @param name Name of the component.
+    /// @returns Pointer to the component if it exists, @b NULL otherwise.
+    PACPUSLIB_API ComponentBase* getComponent(const QString& name);
+
+    /// Gets the list of all the names of the component known by the manager.
+    /// @returns List of all the component's name.
+    PACPUSLIB_API QStringList getAllComponentsName() const;
+
+    /// Loads a new plugin from the file filename (it may be a .so/.dll file)
+    /// @param filename Name of the shared object or the dll.
+    /// @returns @b true if the plugin has been loaded, @b false otherwise .
+    PACPUSLIB_API bool loadPlugin(const QString& filename);
+
+private:
+    /// Create a new component of type 'type' and with the name 'name'
+    bool createComponent(const QString& type, const QString& name);
+
+    bool registerComponent(ComponentBase* addr, const QString& name);
+    bool registerComponentFactory(ComponentFactoryBase * addr, const QString& type);
+
+    bool unRegisterComponent(const QString& name);
+    bool unRegisterComponentFactory(const QString& type);
+
+    /// private constructor accessible only via static create() function
+    ComponentManager();
+
+    /// private destructor accessible only via static destroy() function
+    ~ComponentManager();
+
+private:
+    /// The static pointer to this object (ComponentManager is a singleton)
+    static ComponentManager * mInstance;
+
+    /// The map of available factories of component
+    FactoryMap factoryMap_;
+
+    /// The map of loaded components
+    ComponentMap componentMap_;
+
+    /// a pointer on the xml interface
+    pacpus::XmlConfigFile * xmlTree_;
+
+    /// a list of QObject in which plugins are embedded
+    QObjectList pluginList_;
+
+    /// The object used to load the plugins
+    QPluginLoader pluginLoader_;
+};
+
+} // namespace pacpus
+
+#endif
Index: tags/0.0.2/include/Pacpus/kernel/DbiteException.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/DbiteException.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/DbiteException.h	(revision 257)
@@ -0,0 +1,40 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    Month, 2012
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_DBITEEXCEPTION_H
+#define DEF_PACPUS_DBITEEXCEPTION_H
+
+#include <Pacpus/kernel/FileLibConfig.h>
+#include <Pacpus/kernel/PacpusException.h>
+
+#include <exception>
+#include <string>
+
+namespace pacpus {
+
+/// Exception thrown when an error during manipulation a dbite file occurs.
+class FILELIB_API DbiteException
+    : virtual public PacpusException
+{
+public:
+    /// Ctor.
+    /// @param what Information about the exception.
+    DbiteException(const std::string & what);
+
+    /// Dtor.
+    virtual ~DbiteException() throw();
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_DBITEEXCEPTION_H
Index: tags/0.0.2/include/Pacpus/kernel/DbiteFile.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/DbiteFile.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/DbiteFile.h	(revision 257)
@@ -0,0 +1,273 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    June, 2012
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_DBITEFILE_H
+#define DEF_PACPUS_DBITEFILE_H
+
+#include <Pacpus/kernel/cstdint.h>
+#include <Pacpus/kernel/FileLibConfig.h>
+#include <Pacpus/kernel/hdfile_header_t.h>
+#include <Pacpus/kernel/road_time.h>
+
+#include <fstream>
+#include <iosfwd>
+#include <string>
+
+#ifdef _MSC_VER
+#   pragma warning(push)
+#   pragma warning(disable: 4251)
+#endif // _MSC_VER
+
+namespace pacpus {
+
+/// @todo Documentation
+struct FILELIB_API VariableDataSizeTag {};
+/// @todo Documentation
+FILELIB_API extern VariableDataSizeTag VariableDataSize;
+
+/// @todo Documentation
+struct FILELIB_API ReadModeTag {};
+/// @todo Documentation
+FILELIB_API extern ReadModeTag ReadMode;
+
+/// @todo Documentation
+struct FILELIB_API WriteModeTag {};
+/// @todo Documentation
+FILELIB_API extern WriteModeTag WriteMode;
+
+/// @todo Documentation
+struct FILELIB_API DiagnoseModeTag {};
+/// @todo Documentation
+FILELIB_API extern DiagnoseModeTag DiagnoseMode;
+
+/// @todo Documentation
+class FILELIB_API DbiteFile
+{
+public:
+    /// @todo Documentation
+    enum ReadDirection
+    {
+        ReadForward
+        , ReadBackward
+    };
+
+    /// @throws nothing
+    DbiteFile();
+    /// @throws nothing
+    ~DbiteFile();
+
+    /// Opens the file in read mode.
+    ///
+    /// @throws DbiteException on I/O error (read: cannot open the file)
+    /// @throws DbiteException on invalid file signature
+    void open(const std::string & path, ReadModeTag);
+
+    /// Opens the file in write mode using default settings.
+    /// It is necessary to set data type and data size afterwards.
+    ///
+    /// @throws DbiteException on I/O error (write: cannot write the header)
+    /// @see setRecordSize
+    /// @see setType
+    void open(const std::string & path, WriteModeTag);
+
+    /// Opens the file in write mode using given data type and data size.
+    ///
+    /// @code
+    ///     DbiteFile dbt;
+    ///     dbt.open(path, WriteMode, type, dataSize);
+    /// @endcode
+    /// is equivalent to
+    /// @code
+    ///     DbiteFile dbt;
+    ///     dbt.open(path, WriteMode)
+    ///     dbt.setRecordSize(dataSize);
+    ///     dbt.setType(type);
+    /// @endcode
+    ///
+    /// @throws DbiteException on I/O error (write: cannot write the header)
+    void open(const std::string & path, WriteModeTag, hdfile_header_t::DataTypeT type, hdfile_header_t::DataSizeT dataSize);
+
+    /// Opens the file in write mode using given data type and variable data size.
+    ///
+    /// @code
+    ///     DbiteFile dbt;
+    ///     dbt.open(path, WriteMode, type, VariableDataSize);
+    /// @endcode
+    /// is equivalent to
+    /// @code
+    ///     DbiteFile dbt;
+    ///     dbt.open(path, WriteMode)
+    ///     dbt.setRecordSize(VariableDataSize);
+    ///     dbt.setType(type);
+    /// @endcode
+    ///
+    /// @throws DbiteException on I/O error (write: cannot write the header)
+    void open(const std::string & path, WriteModeTag, hdfile_header_t::DataTypeT type, VariableDataSizeTag);
+
+    /// Tries to diagnose and repair the file.
+    /// @throws DbiteException on I/O error (write: cannot write the header)
+    //void open(const std::string & path, DiagnoseModeTag); // TODO
+
+    /// @throws nothing
+    void close();
+    /// @throws nothing
+    bool isOpen() const;
+
+    /// @throws DbiteException when file is not open
+    void goToFileBegin();
+    /// @throws DbiteException when file is not open
+    void goToFileEnd();
+    /// @throws DbiteException when file is not open
+    void goToDataBegin();
+
+    /// @throws nothing
+    const std::string & getPath() const;
+    /// @throws nothing
+    std::string getSignature() const;
+    /// @throws nothing
+    hdfile_header_t::DataTypeT getType() const;
+    /// @throws nothing
+    hdfile_header_t::VersionT getVersion() const;
+    /// @throws nothing
+    hdfile_header_t::DataOffsetT getDataOffset() const;
+    /// @throws nothing
+    hdfile_header_t::DataSizeT getRecordSize() const;
+    // FIXME: file size should be 64-bit long, have to change the hdfile_header_t structure as well
+    /// @throws nothing
+    hdfile_header_t::FileSizeT getFileSize() const;
+    /// @returns the real size of the written file in [bytes] as obtaine from system.
+    int64_t getRealFileSize();
+    /// @throws nothing
+    road_time_t getTimeMin() const;
+    /// @throws nothing
+    road_time_t getTimeMax() const;
+    /// @throws nothing
+    hdfile_header_t::RecordCountT getRecordCount() const;
+
+    /// @throws nothing
+    void setType(hdfile_header_t::DataTypeT type);
+    /// @throws nothing
+    void setRecordSize(hdfile_header_t::DataSizeT recordSize);
+    /// @throws nothing
+    void setRecordSize(VariableDataSizeTag tag);
+    /// @throws nothing
+    void setTimeMin(road_time_t time);
+    /// @throws nothing
+    void setTimeMax(road_time_t time);
+    /// @throws nothing
+    void setRecordCount(hdfile_header_t::RecordCountT recourdCount);
+
+    /// prints header
+    /// @throws nothing
+    operator std::string();
+
+    /// @throws nothing
+    bool isVariableDataSize() const;
+
+    /// @throws DbiteException on I/O error
+    bool readRecord(size_t recordIndex, road_time_t & time, road_timerange_t & timeRange, char * data);
+    /// @throws DbiteException on I/O error
+    bool readRecord(size_t recordIndex, road_time_t & time, road_timerange_t & timeRange, char * data, size_t & dataSize);
+    /// @throws DbiteException on I/O error
+    bool readRecord(road_time_t & time, road_timerange_t & timeRange, char * data, const ReadDirection & direction = ReadForward);
+    /// @throws DbiteException on I/O error
+    bool readRecord(road_time_t & time, road_timerange_t & timeRange, char * data, size_t & dataSize, const ReadDirection & direction = ReadForward);
+    /// Reads only time and time range and moves the file position to the beginning of the next record
+    /// @throws DbiteException on I/O error
+    bool readRecord(road_time_t & time, road_timerange_t & timeRange, const ReadDirection & direction = ReadForward);
+    /// @throws DbiteException on I/O error
+    bool writeRecord(const road_time_t & time, const road_timerange_t & timeRange, const char * data, const size_t dataSize);
+    /// @throws DbiteException on I/O error
+    template <typename T>
+    bool writeRecord(const road_time_t & time, const road_timerange_t & timeRange, const T* data);
+
+    /// @throws nothing
+    bool isEndOfFile();
+
+private:
+    /// @throws nothing
+    void setPath(const std::string & path);
+    /// @throws nothing
+    void setVersion(hdfile_header_t::VersionT version);
+    /// @throws nothing
+    void setDataOffset(hdfile_header_t::DataOffsetT dataOffset);
+    /// @throws nothing
+    void setFileSize(hdfile_header_t::FileSizeT fileSize);
+
+    void initializeHeader();
+
+    bool isSignatureCorrect() const;
+    void setSignature();
+
+    const hdfile_header_t & getHeader() const;
+    hdfile_header_t & header();
+    void writeHeader();
+
+    void openWriteMode(const std::string & path);
+    void openWriteMode(const std::string & path, hdfile_header_t::DataTypeT type);
+    void closeDbite();
+    void closeDbite(ReadModeTag);
+    void closeDbite(WriteModeTag);
+    void readHeader();
+    void verifyHeader();
+
+    /// @throws DbiteException when file is not open
+    int64_t getReadPosition();
+    /// @throws DbiteException when file is not open
+    int64_t getWritePosition();
+    /// @throws DbiteException when file is not open
+    void setReadPosition(int64_t offset, std::ios_base::seekdir direction);
+    /// @throws DbiteException when file is not open
+    void setReadPosition(int64_t position);
+    /// @throws DbiteException when file is not open
+    void setWritePosition(int64_t offset, std::ios_base::seekdir direction);
+    /// @throws DbiteException when file is not open
+    void setWritePosition(int64_t position);
+
+    /// @throws DbiteException on I/O error
+    bool readRecordNoBufferCheck(road_time_t & time, road_timerange_t & timeRange, char * data, size_t & dataSize, const ReadDirection & direction);
+    /// @throws DbiteException on I/O error
+    bool readRecordForward(road_time_t & time, road_timerange_t & timeRange, char * data, size_t & dataSize);
+    /// @throws DbiteException on I/O error
+    bool readRecordBackward(road_time_t & time, road_timerange_t & timeRange, char * data, size_t & dataSize);
+
+    /// @throws DbiteException on I/O error
+    void read(std::fstream::char_type * s, std::streamsize n);
+    /// @throws DbiteException on I/O error
+    void write(const std::fstream::char_type * s, std::streamsize n);
+
+    /// @throws DbiteException when file is not open
+    void checkFileOpen();
+
+private:
+    std::fstream mFile;
+    hdfile_header_t mHeader;
+    bool mIsWriting;
+    std::string mPath;
+
+    bool mIsVariableRecordSize;
+};
+
+template <typename T>
+bool DbiteFile::writeRecord(const road_time_t & time, const road_timerange_t & timeRange, const T* data)
+{
+  return writeRecord(time, timeRange, (const char*) data, sizeof(T));
+}
+
+} // namespace pacpus
+
+#ifdef _MSC_VER
+#   pragma warning(pop)
+#endif // _MSC_VER
+
+#endif // DEF_PACPUS_DBITEFILE_H
Index: tags/0.0.2/include/Pacpus/kernel/DbiteFileTypes.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/DbiteFileTypes.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/DbiteFileTypes.h	(revision 257)
@@ -0,0 +1,277 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    June, 2011
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_DBITEFILETYPES_H
+#define DEF_PACPUS_DBITEFILETYPES_H
+
+/// Basic file types
+enum BasicType
+{
+    FILE_IMAGE = 0
+    , FILE_CAN
+    , FILE_TEXT
+    , FILE_IMAGE3D
+    , FILE_DBT_UNKNOWN          ///< Unknown file type
+    , FILE_JPEG
+    , STREAM8POSITION = 100
+};
+
+enum ExtendedType
+{
+    SIGNAL_PPS = 511
+    , FILE_AUDIO
+    , AUDIO_WAV
+    , TYPE_DOUBLE = 518
+    , TYPE_FLOAT
+    , TYPE_INT
+    , TYPE_INT64
+    , DATA_PHYSIO = 600
+};
+
+enum UtcHeudiasycType
+{
+    WGS84_POSITION = 500
+    , GPS_SYNCHRO_FRAME
+    , TRAME_GGA = 514
+    , TRAME_VTG
+    , TRAME_GST
+    , TRAME_GGA_DBL = 614
+    , TRAME_HDT
+    , TRAME_ROT
+    , TRAME_GSV
+    , TRAME_GSA
+    , TRAME_RMC
+    , TRAME_ZDA
+    , DYNA_ROADYN
+    , DYNA_HT500
+    , DYNA_CUBE_RAWDATA
+    , DATA_ABS = 517
+    , GYRO_KVH = 522
+    , TELEM_SICK
+    , CORREVIT
+    , SIG
+    , LOC
+    , DATA_INS = 540
+    , DATA_ABS_CITROEN
+    , VOLANT
+    , DATA_3DMG
+    , DATA_COMODOS
+    , CROSSBOW_VG700
+    , CARMEN_CAN_RAW = 2200
+    , CARMEN_CAN_WHEELSPEED
+    , CARMEN_CAN_SUSPENSION
+    , CARMEN_CAN_RAWLATDYN
+    , CARMEN_CAN_ODOMETRY
+    , CARMEN_CAN_LATDYN
+    , CARMEN_CAN_STEERINGWHEEL
+    , FLUENCE_ZE_STEERINGWHEEL = 2300
+    , FLUENCE_ZE_KINEMATICS
+    , FLUENCE_ZE_GEARS
+    , FLUENCE_ZE_FRONT_WHEELSPEED
+    , FLUENCE_ZE_REAR_WHEELSPEED
+    , FLUENCE_ZE_LOWSPEED
+    , RADAR_TRW_AC20 = 3000
+    , SMS_RADAR = 4000          // by Arthur Miranda 2012-02-23 (PAMU Project)
+    , FILE_MJPEG = 4096
+    , TELEM_100 = 8192
+    , TELEM_180
+    , TELEM_360
+    , ALASCA_XT = 8200
+    , VELODYNE_RAW_SPHERIC_DATA = 8300
+};
+
+enum StereoCameraType
+{
+    STEREO_RIGHT_IMAGE = 1982
+    , STEREO_LEFT_IMAGE
+    , CARMEN_VISUAL_ODOMETRY
+    , CARMEN_LIDAR_DETECTION
+    , CARMEN_VISUAL_DETECTOR
+};
+
+/// for the Renault's Case study
+enum RenaultType
+{
+    FILE_FACELAB = 610
+    , DBT_T_HEADWAY = 1001
+    , DBT_PERC_T_HEADWAY
+    , DBT_D_O_C_F_DIST
+    , DBT_F_DIST
+    , DBT_S_INDICATOR
+    // Lane Changing
+    , DBT_L_CHANGE
+    , DBT_M_SPEED
+    , DBT_V_I_L_SPEED
+    , DBT_R_TIME
+    , DBT_B_R_TIME
+    , DBT_E_B_EPISOD
+    // state of the road
+    , DBT_R_STATE
+    // Comments from the ergonom
+    , DBT_COMMENTS
+    // State of the HVI of the ADAS
+    , DBT_ADAS
+    , DBT_R_SPEED
+    , DBT_TTC
+    , DBT_D_BRAKE_ACTUATION
+    , DBT_ACC_PED_RELEASE
+    , DBT_COV_DISTANCE
+    // classes of time headway: [2.0 2.5]  [1.5 2.0]  [1.0 1.5]  [0.5 1.0]  [0.0 0.5] -> c2
+    , DBT_T_HEADWAY_CLASSES
+};
+
+enum SbasType
+{
+    DBT_SBAS_MT1 = 10001
+    , DBT_SBAS_MT2 = 10002
+    , DBT_SBAS_MT3 = 10003
+    , DBT_SBAS_MT4 = 10004
+    , DBT_SBAS_MT5 = 10005
+    , DBT_SBAS_MT6 = 10006
+    , DBT_SBAS_MT7 = 10007
+    , DBT_SBAS_MT10 = 10010
+    , DBT_SBAS_MT18 = 10018
+    , DBT_SBAS_MT24 = 10024
+    , DBT_SBAS_MT25 = 10025
+    , DBT_SBAS_MT26 = 10026
+};
+
+enum UbloxType
+{
+    DBT_UBX_RXM_RAW = 10121
+    , DBT_UBX_RXM_SFRB = 10122
+    , DBT_UBX_NAV_CLOCK = 10110
+    , DBT_UBX_NAV_POSLLH = 10111
+    , DBT_UBX_NAV_POSUTM = 10112
+    , DBT_UBX_NAV_SBAS = 10113
+    , DBT_UBX_NAV_SOL = 10114
+    , DBT_UBX_NAV_SVINFO = 10115
+    , DBT_UBX_NAV_VELNED = 10116
+};
+
+enum SbfType
+{
+    DBT_SBF_FRAMERAW = 11000
+    , DBT_SBF_MEASEPOCH = 11889
+    , DBT_SBF_SHORTMEASEPOCH = 11890
+    , DBT_SBF_GENMEASEPOCH = 11944
+    , DBT_SBF_ENDOFMEAS = 11922
+
+    , DBT_SBF_GPSNAV = 11891
+    , DBT_SBF_GPSALM = 11892
+    , DBT_SBF_GPSION = 11893
+    , DBT_SBF_GPSUTC = 11894
+    , DBT_SBF_GPSRAW = 11895
+    , DBT_SBF_CNAVRAW = 11947
+
+    , DBT_SBF_GEOMT00 = 11925
+    , DBT_SBF_GEOPRNMASK = 11926
+    , DBT_SBF_GEOFASTCORR = 11927
+    , DBT_SBF_GEOINTEGRITY = 11928
+    , DBT_SBF_GEOFASTCORRDEGR = 11929
+    , DBT_SBF_GEONAV = 11896
+    , DBT_SBF_GEODEGRFACTORS = 11930
+    , DBT_SBF_GEONETWORKTIME = 11918
+    , DBT_SBF_GEOALM = 11897
+    , DBT_SBF_GEOIGPMASK = 11931
+    , DBT_SBF_GEOLONGTERMCORR = 11932
+    , DBT_SBF_GEOIONODELAY = 11933
+    , DBT_SBF_GEOSERVICELEVEL = 11917
+    , DBT_SBF_GEOCLOCKEPHCOVMATRIX = 11934
+    , DBT_SBF_GEORAW = 11898
+
+    , DBT_SBF_PVTCARTESIAN = 11903
+    , DBT_SBF_PVTGEODETIC = 11904
+    , DBT_SBF_POSCOVCARTESIAN = 11905
+    , DBT_SBF_POSCOVGEODETIC = 11906
+    , DBT_SBF_VELCOVCARTESIAN = 11907
+    , DBT_SBF_VELCOVGEODETIC = 11908
+    , DBT_SBF_DOP = 11909
+    , DBT_SBF_PVTRESIDUALS = 11910
+    , DBT_SBF_RAIMSTATISTICS = 11915
+    , DBT_SBF_GEOCORRECTIONS = 11935
+    , DBT_SBF_BASELINE = 11950
+    , DBT_SBF_ENDOFPVT = 11921
+
+    , DBT_SBF_ATTITUDEEULER = 11938
+    , DBT_SBF_ATTITUDECOVEULER = 11939
+    , DBT_SBF_ATTITUDEQUAT = 11940
+    , DBT_SBF_ATTITUDECOVQUAT = 11941
+    , DBT_SBF_AUXANTPOSITIONS = 11942
+    , DBT_SBF_ENDOFATTITUDE = 11943
+
+    , DBT_SBF_RECEIVERTIME = 11914
+    , DBT_SBF_XPPSOFFSET = 11911
+    , DBT_SBF_EXTEVENT = 11924
+
+    , DBT_SBF_DIFFCORRIN = 11919
+    , DBT_SBF_BASESTATION = 11949
+    , DBT_SBF_BASELINK = 11948
+
+    , DBT_SBF_TRACKINGSTATUS = 11912
+    , DBT_SBF_RECEIVERSTATUS = 11913
+    , DBT_SBF_RECEIVERSETUP = 11902
+
+    , DBT_SBF_COMMENT = 11936
+};
+
+enum NaviflowType
+{
+    TRAME_3DMGX1 = 12100
+    , TRAME_AVIONIQUE = 12101
+    , TRAME_UEYE_STEREO_INDEX = 12102
+};
+
+enum MobileyeType
+{
+    MOBILEYE_OBSTACLE_COUNT = 12200
+
+    , MOBILEYE_OBSTACLE_0_PART_1 = 12210
+    , MOBILEYE_OBSTACLE_1_PART_1 = 12211
+    , MOBILEYE_OBSTACLE_2_PART_1 = 12212
+    , MOBILEYE_OBSTACLE_3_PART_1 = 12213
+    , MOBILEYE_OBSTACLE_4_PART_1 = 12214
+    , MOBILEYE_OBSTACLE_5_PART_1 = 12215
+    , MOBILEYE_OBSTACLE_6_PART_1 = 12216
+    , MOBILEYE_OBSTACLE_7_PART_1 = 12217
+    , MOBILEYE_OBSTACLE_8_PART_1 = 12218
+    , MOBILEYE_OBSTACLE_9_PART_1 = 12219
+
+    , MOBILEYE_OBSTACLE_0_PART_2 = 12220
+    , MOBILEYE_OBSTACLE_1_PART_2 = 12221
+    , MOBILEYE_OBSTACLE_2_PART_2 = 12222
+    , MOBILEYE_OBSTACLE_3_PART_2 = 12223
+    , MOBILEYE_OBSTACLE_4_PART_2 = 12224
+    , MOBILEYE_OBSTACLE_5_PART_2 = 12225
+    , MOBILEYE_OBSTACLE_6_PART_2 = 12226
+    , MOBILEYE_OBSTACLE_7_PART_2 = 12227
+    , MOBILEYE_OBSTACLE_8_PART_2 = 12228
+    , MOBILEYE_OBSTACLE_9_PART_2 = 12229
+
+    , MOBILEYE_OBSTACLES = 12290
+
+    , MOBILEYE_CENTER_LANE = 12300
+    , MOBILEYE_RIGHT_LANE = 12301
+    , MOBILEYE_LEFT_LANE = 12302
+};
+
+enum SpanCptType
+{
+    TRAME_BESTGPSPOSA = 621
+    , TRAME_RAWIMUSA = 622
+    , TRAME_INSPVAA = 623
+    , TRAME_INSCOV = 624
+};
+
+#endif // DEF_PACPUS_DBITEFILETYPES_H
Index: tags/0.0.2/include/Pacpus/kernel/FileLibConfig.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/FileLibConfig.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/FileLibConfig.h	(revision 257)
@@ -0,0 +1,34 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    January, 2013
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DLL import/export macro definitions file.
+///
+/// DLL import/export macro definitions file.
+/// Declares \<library name\>_API macro as __declspec(dllexport) or __declspec(dllimport)
+/// on Windows system and as an empty macro on other systems.
+/// DLL exporting is performed when \<library name\>_EXPORTS is defined.
+
+#ifndef DEF_PACPUS_FILELIBCONFIG_H
+#define DEF_PACPUS_FILELIBCONFIG_H
+
+/// Export macro for FileLib DLL for Windows only
+#ifdef WIN32
+#   ifdef FILELIB_EXPORTS
+        // make DLL
+#       define FILELIB_API __declspec(dllexport)
+#   else
+        // use DLL
+#       define FILELIB_API __declspec(dllimport)
+#   endif
+#else
+    // On other platforms, simply ignore this 
+#   define FILELIB_API 
+#endif
+
+#endif // DEF_PACPUS_FILELIBCONFIG_H
Index: tags/0.0.2/include/Pacpus/kernel/GenericObservable.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/GenericObservable.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/GenericObservable.h	(revision 257)
@@ -0,0 +1,87 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Stephane Bonnet <firstname.surname@utc.fr>
+/// @date    October, 2012
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_GENERIC_OBSERVER_H
+#define DEF_PACPUS_GENERIC_OBSERVER_H
+
+#include <list>
+
+#include <Pacpus/kernel/GenericObserverInterface.h>
+#include <QMutex>
+
+namespace pacpus {
+
+/** Base class for te GenericObservable template.
+
+    The purpose of this class is to be able to take generic pointers on
+    GenericObservable class template instances.
+*/
+class GenericObservableBase
+{
+public:
+    /// @todo Documentation
+  virtual ~GenericObservableBase() {}
+};
+
+/** GenericObservable
+    Base class template for observable objects (see Observable/Observer
+    design pattern).
+
+    This class implements a simple subject able to notify a list of 
+    observers through calls to the notifyObservers protected method.
+*/
+template <typename T>
+class GenericObservable
+    : GenericObservableBase
+{
+public:
+    /// @todo Documentation
+  typedef GenericObserverInterface<T> ObserverType;
+
+    /// @todo Documentation
+  GenericObservable() {}
+    /// @todo Documentation
+  virtual ~GenericObservable() {}
+
+  /** Attaches a new observer to the observable.
+      @param observer A reference to a class obeying the GenericObserverInterface interface.
+  */
+  void attachObserver(ObserverType& observer) {
+    observers_.push_back(&observer);
+  }
+
+  /** Detaches an observer.
+
+      @param observer A reference to a class obeying the GenericObserverInterface interface.
+      @note Does nothing if the observer has not been previously attached
+  */
+  void detachObserver(ObserverType& observer) {
+    observers_.remove(&observer);
+  }
+
+  /** Notifies all observers about an observable event.
+  */
+  void notifyObservers() {
+    typename std::list<ObserverType*>::const_iterator it;
+    for (it = observers_.begin(); it != observers_.end(); ++it) {
+      (*it)->update(static_cast<T*>(this));
+    }
+  }
+
+private:
+  std::list<ObserverType*> observers_;
+};
+  
+} // namespace pacpus
+
+#endif // DEF_PACPUS_GENERIC_OBSERVER_H
Index: tags/0.0.2/include/Pacpus/kernel/GenericObserverInterface.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/GenericObserverInterface.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/GenericObserverInterface.h	(revision 257)
@@ -0,0 +1,53 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Stephane Bonnet <firstname.surname@utc.fr>
+/// @date    October, 2012
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+ 
+#ifndef DEF_PACPUS_GENERIC_OBSERVER_INTERFACE_H
+#define DEF_PACPUS_GENERIC_OBSERVER_INTERFACE_H
+
+namespace pacpus {
+
+/** Base class for te GenericObserverInterface template.
+
+    The purpose of this class is to be able to take generic pointers on
+    GenericObserverInterface<T> class template instances.
+*/
+class GenericObserverBase {
+public:
+  virtual ~GenericObserverBase() {}
+};
+
+/** Template interface for generic observers.
+  
+    This is a pure virtual class that should be used as a base to classes 
+    wishing to receive notifications from GenericObservable classes.
+*/
+template <typename T> 
+class GenericObserverInterface : public GenericObserverBase {
+public:
+  virtual ~GenericObserverInterface() {};
+
+  /** Update function.
+
+      This function is called each time the observables notifies its observers
+      of a change. It must be implemented by all classes obeying the 
+      GenericObserverInterface interface.
+
+      @param observable is a pointer to the observed object that was updated.
+  */
+  virtual void update(T* observable) = 0;
+};
+
+} // namespace pacpus
+
+
+#endif // DEF_PACPUS_GENERIC_OBSERVER_INTERFACE_H
Index: tags/0.0.2/include/Pacpus/kernel/Log.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/Log.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/Log.h	(revision 257)
@@ -0,0 +1,76 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    March, 2012
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Logging facility.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_LOG_H
+#define DEF_PACPUS_LOG_H
+
+#include <Pacpus/kernel/PacpusLibConfig.h>
+
+namespace pacpus {
+
+/// Static log facility initializer
+///
+/// Uses Schwarz counter (nifty counter) idiom to initialize the log before
+/// other static objects that could use the log.
+static class PACPUSLIB_API LogConfigurator
+{
+public:
+    LogConfigurator();
+    ~LogConfigurator();
+
+    static void configureLoggerWithFile(const char * configFilename);
+} initializer; // using Schwarz/nifty counter idiom for static initialization
+
+} // namespace pacpus
+
+#ifdef PACPUS_USE_LOG
+  #include <log4cxx/logger.h>
+
+  class QString;
+  
+  #define DECLARE_STATIC_LOGGER(name) \
+    static log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger(name))
+
+  // https://devel.hds.utc.fr/projects/pacpus/ticket/55
+  #define LOG_TRACE(message)          do{LOG4CXX_TRACE(logger, message);} while(false)
+  #define LOG_DEBUG(message)          do{LOG4CXX_DEBUG(logger, message);} while(false)
+  #define LOG_INFO(message)           do{LOG4CXX_INFO(logger, message);} while(false)
+  #define LOG_WARN(message)           do{LOG4CXX_WARN(logger, message);} while(false)
+  #define LOG_ERROR(message)          do{LOG4CXX_ERROR(logger, message);} while(false)
+  #define LOG_FATAL(message)          do{LOG4CXX_FATAL(logger, message);} while(false)
+
+  /// Output stream ::log4cxx::helpers::CharMessageBuffer operator for QString
+  PACPUSLIB_API ::log4cxx::helpers::CharMessageBuffer & operator<<(::log4cxx::helpers::CharMessageBuffer & os, const QString & s);
+  /// Output stream ::log4cxx::helpers::MessageBuffer operator for QString
+  PACPUSLIB_API ::log4cxx::helpers::CharMessageBuffer & operator<<(::log4cxx::helpers::MessageBuffer & os, const QString & s);
+
+#else
+  /// Declares a log4cxx logger
+  ///
+  /// @param name Name of the logger, displayed when logging a message.
+  #define DECLARE_STATIC_LOGGER(name)
+  /// Logs a message at TRACE level using default logger
+  #define LOG_TRACE(message)          do{;} while(false)
+  /// Logs a message at DEBUG level using default logger
+  #define LOG_DEBUG(message)          do{;} while(false)
+  /// Logs a message at INFO level using default logger
+  #define LOG_INFO(message)           do{;} while(false)
+  /// Logs a message at WARN level using default logger
+  #define LOG_WARN(message)           do{;} while(false)
+  /// Logs a message at ERROR level using default logger
+  #define LOG_ERROR(message)          do{;} while(false)
+  /// Logs a message at FATAL level using default logger
+  #define LOG_FATAL(message)          do{;} while(false)
+#endif // PACPUS_USE_LOG
+
+#endif // DEF_PACPUS_LOG_H
Index: tags/0.0.2/include/Pacpus/kernel/PacpusApplication.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/PacpusApplication.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/PacpusApplication.h	(revision 257)
@@ -0,0 +1,45 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    March, 2013
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Generic ComponentBase class. This is an abstract class.
+///
+/// Detailed description.
+
+#ifndef PACPUSAPPLICATION_H
+#define PACPUSAPPLICATION_H
+
+#include <QApplication>
+
+namespace pacpus {
+
+class PACPUSLIB_API PacpusApplication
+    : public QApplication
+{
+public:
+#ifndef qdoc
+    PacpusApplication(int &argc, char **argv, int = ApplicationFlags);
+    PacpusApplication(int &argc, char **argv, bool GUIenabled, int = ApplicationFlags);
+    PacpusApplication(int &argc, char **argv, Type, int = ApplicationFlags);
+#if defined(Q_WS_X11)
+    PacpusApplication(Display* dpy, Qt::HANDLE visual = 0, Qt::HANDLE cmap = 0, int = ApplicationFlags);
+    PacpusApplication(Display *dpy, int &argc, char **argv, Qt::HANDLE visual = 0, Qt::HANDLE cmap= 0, int = ApplicationFlags);
+#endif
+#if defined(Q_OS_SYMBIAN)
+    PacpusApplication(QApplication::QS60MainApplicationFactory factory, int &argc, char **argv, int = ApplicationFlags);
+#endif
+#endif
+
+    virtual	~PacpusApplication();
+
+    virtual bool notify(QObject * receiver, QEvent * ev);
+};
+
+} //namespace pacpus
+
+#endif // PACPUSAPPLICATION_H
Index: tags/0.0.2/include/Pacpus/kernel/PacpusException.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/PacpusException.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/PacpusException.h	(revision 257)
@@ -0,0 +1,58 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    June, 2013
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_PACPUSEXCEPTION_H
+#define DEF_PACPUS_PACPUSEXCEPTION_H
+
+#include <Pacpus/kernel/PacpusLibConfig.h>
+
+//#include <boost/exception/exception.hpp>
+#include <exception>
+#include <string>
+
+#ifdef _MSC_VER
+#   pragma warning(push)
+#   pragma warning(disable: 4251)
+#endif // _MSC_VER
+
+namespace pacpus {
+
+/// Base class for all exceptions in the framework
+class PACPUSLIB_API PacpusException
+    : virtual public std::exception
+    //, virtual public boost::exception
+{
+public:
+    /// Ctor.
+    /// @param what Information about the exception.
+    PacpusException(const std::string & what);
+
+    /// Dtor.
+    virtual ~PacpusException() throw();
+
+    /// Gets more information about the error.
+    ///
+    /// @returns Message containing information about the error.
+    virtual const char * what() const throw();
+
+protected:
+    std::string mWhat;
+};
+
+} // namespace pacpus
+
+#ifdef _MSC_VER
+#   pragma warning(pop)
+#endif // _MSC_VER
+
+#endif // DEF_PACPUS_PACPUSEXCEPTION_H
Index: tags/0.0.2/include/Pacpus/kernel/PacpusLibConfig.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/PacpusLibConfig.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/PacpusLibConfig.h	(revision 257)
@@ -0,0 +1,34 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    January, 2013
+/// @version $Id: FileLibConfig.h 76 2013-01-10 17:05:10Z kurdejma $
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DLL import/export macro definitions file.
+///
+/// DLL import/export macro definitions file.
+/// Declares \<library name\>_API macro as __declspec(dllexport) or __declspec(dllimport)
+/// on Windows system and as an empty macro on other systems.
+/// DLL exporting is performed when \<library name\>_EXPORTS is defined.
+
+#ifndef DEF_PACPUS_PACPUSLIBCONFIG_H
+#define DEF_PACPUS_PACPUSLIBCONFIG_H
+
+/// Export macro for PacpusLib DLL for Windows only
+#ifdef WIN32
+#   ifdef PACPUSLIB_EXPORTS
+//  make DLL
+#       define PACPUSLIB_API __declspec(dllexport)
+#   else
+//      use DLL
+#       define PACPUSLIB_API __declspec(dllimport)
+#   endif
+#else
+//  On other platforms, simply ignore this
+#   define PACPUSLIB_API
+#endif
+
+#endif // DEF_PACPUS_PACPUSLIBCONFIG_H
Index: tags/0.0.2/include/Pacpus/kernel/PacpusPluginInterface.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/PacpusPluginInterface.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/PacpusPluginInterface.h	(revision 257)
@@ -0,0 +1,34 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    Month, Year
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_PLUGININTERFACE_H
+#define DEF_PACPUS_PLUGININTERFACE_H
+
+#include <QObject>
+
+/** PacpusPluginInterface
+ * @brief Base class of a Pacpus plugin.
+ */
+class PacpusPluginInterface
+{
+public:
+  /** Dtor of PacpusPluginInterface. */
+  virtual ~PacpusPluginInterface(){} 
+  
+  /** Name of the plugin. */
+  virtual QString name() = 0;
+};
+
+Q_DECLARE_INTERFACE(PacpusPluginInterface, "pacpus.ComponentBaseInterface/1.0")
+
+#endif // DEF_PACPUS_PLUGININTERFACE_H
Index: tags/0.0.2/include/Pacpus/kernel/PacpusToolsConfig.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/PacpusToolsConfig.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/PacpusToolsConfig.h	(revision 257)
@@ -0,0 +1,34 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    June, 2013
+/// @version $Id:$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DLL import/export macro definitions file.
+///
+/// DLL import/export macro definitions file.
+/// Declares \<library name\>_API macro as __declspec(dllexport) or __declspec(dllimport)
+/// on Windows system and as an empty macro on other systems.
+/// DLL exporting is performed when \<library name\>_EXPORTS is defined.
+
+#ifndef __PACPUSTOOLSCONFIG_H__
+#define __PACPUSTOOLSCONFIG_H__
+
+// Export macro for FileLib DLL for Windows only
+#ifdef WIN32
+#   ifdef PACPUSTOOLS_EXPORTS
+        // make DLL
+#       define PACPUSTOOLS_API __declspec(dllexport)
+#   else
+        // use DLL
+#       define PACPUSTOOLS_API __declspec(dllimport)
+#   endif
+#else
+    // On other platforms, simply ignore this 
+#   define PACPUSTOOLS_API 
+#endif
+
+#endif // __PACPUSTOOLSCONFIG_H__
Index: tags/0.0.2/include/Pacpus/kernel/XmlComponentConfig.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/XmlComponentConfig.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/XmlComponentConfig.h	(revision 257)
@@ -0,0 +1,99 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    January, 2006
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Purpose:    This class manages a XML node corresponding to a PACPUS component.
+
+#ifndef DEF_PACPUS_XMLCOMPONENTCONFIG_H
+#define DEF_PACPUS_XMLCOMPONENTCONFIG_H
+
+#include <Pacpus/kernel/PacpusLibConfig.h>
+
+#include <QDomElement>
+
+namespace pacpus {
+    
+class XmlConfigFile;
+
+/// XmlComponentConfig
+/// @brief Defines the XML structure of a component.
+class PACPUSLIB_API XmlComponentConfig
+{
+    friend class ComponentManager;
+
+public:
+    /// Ctor of XmlComponentConfig.
+    /// @param name Name of the ComponentFactory, by convention equal to class name.
+    explicit XmlComponentConfig(const QString & name = QString::null);
+
+    /// Dtor of XmlComponentConfig.
+    ~XmlComponentConfig();
+
+    /// Adds the property @em name to the XML and set its value to @em 0 if it does not exist.
+    /// @param name Name of the property.
+    void addProperty(const QString& name);
+
+    /// Deletes property @em name from the XML.
+    /// 
+    /// @returns @b true if the property existed and was removed, @b false if the property did not exist or could not be removed.
+    int delProperty(const QString& name);
+
+    /// Gets the value of a property.
+    /// @param name Name of the property.
+    /// @param defaultValue Value returned if the property does not exist.
+    /// @return Value of the property, @em defaultValue otherwise.
+    QString getProperty(const QString& name, const QString& defaultValue = QString::null) const;
+
+    /// Gets the value of a property as a boolean.
+    /// @param name Name of the property.
+    /// @param defaultValue Value returned if the property does not exist.
+    /// @returns Value of the property, @em defaultValue otherwise.
+    bool getBoolProperty(const QString& name, bool defaultValue = false) const;
+
+    /// Get the value of a property as an integer.
+    /// @param name Name of the property.
+    /// @param defaultValue Value returned if the property does not exist.
+    /// @return Value of the property, @em defaultValue otherwise.
+    int getIntProperty(const QString& name, int defaultValue = 0) const;
+
+    /// Get the value of a property as a double.
+    /// @param name Name of the property.
+    /// @param defaultValue Value returned if the property does not exist.
+    /// @return Value of the property, @em defaultValue otherwise.
+    double getDoubleProperty(const QString& name, double defaultValue = 0.0) const;
+
+    /// Set the value of a property.
+    /// @param name Name of the property.
+    /// @param value Value to set.
+    void setProperty(const QString& name, const QString& value);
+
+    /// Check if a property exists.
+    /// @param name Name of the property.
+    /// @return True if the property exists, false otherwise.
+    bool hasProperty(const QString& name) const;
+
+private:
+    // Returns the local QDomElement.
+    QDomElement qDomElement() const;
+
+    // Copy internally the node in the internal QDomElement. 
+    void localCopy(const QDomElement& elementToCopy);
+
+    QString const getComponentName() const;
+    QString const getComponentType() const;
+
+private:
+    QDomElement component_;
+    XmlConfigFile * parentDocument_;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_XMLCOMPONENTCONFIG_H
Index: tags/0.0.2/include/Pacpus/kernel/XmlConfigFile.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/XmlConfigFile.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/XmlConfigFile.h	(revision 257)
@@ -0,0 +1,83 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    January, 2006
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Purpose:    Class that manages the XML file. This file is used to configure permettant d'enregistrer un fichier de 
+///             a PACPUS application.
+///             The XML file includes 2 sections : 
+///             - parameters : parameters of the application
+///             - components : a list of components to load
+
+#ifndef DEF_PACPUS_XMLCONFIGFILE_H
+#define DEF_PACPUS_XMLCONFIGFILE_H
+
+#include <Pacpus/kernel/PacpusLibConfig.h>
+#include <Pacpus/kernel/XmlComponentConfig.h>
+
+#include <QDomElement>
+#include <QMutex>
+#include <QStringList>
+
+class QFile;
+
+namespace pacpus {
+
+/// XML config properties:
+///     list            STRING(S)   name(s) of plugin files to be loaded, separated by pipe symbol '|'
+///         e.g. dbt="libDbtPlyGps.so|libDbtPlyVision.so
+class PACPUSLIB_API XmlConfigFile
+{
+    friend XmlComponentConfig::XmlComponentConfig(const QString&);
+    friend class ComponentManager;
+
+public:
+    /// @todo Documentation
+    static XmlConfigFile * create();
+    /// @todo Documentation
+    static void destroy();
+    /// @todo Documentation
+    QDomElement getComponent(QString name);
+    /// @returns a list of all names of components declared in the XML tree
+    QStringList getAllComponents();
+    /// @todo Documentation
+    QStringList getAllPlugins();
+    /// @todo Documentation
+    int loadFile(QString fileName);
+
+    /// @todo Documentation
+    /// not used
+    void saveFile(QString fileName);
+    /// @todo Documentation
+    /// not used
+    void addComponent(QDomElement component);
+    /// @todo Documentation
+    /// not used
+    void delComponent(QDomElement component);
+
+protected:
+private:
+    XmlConfigFile();
+    ~XmlConfigFile();
+
+    static XmlConfigFile * _xmlConfigFile;
+    
+    QDomElement createComponent(QString name);
+
+private:
+    QDomDocument _document;
+    QFile * _file;
+    QMutex _mutex;
+
+    int _numberOfComponents;
+};
+
+} // namespace pacpus
+
+#endif // DEF_PACPUS_XMLCONFIGFILE_H
Index: tags/0.0.2/include/Pacpus/kernel/cstdint.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/cstdint.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/cstdint.h	(revision 257)
@@ -0,0 +1,38 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    June, 2012
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Portable version of \<cstdint\> C99 header.
+///
+/// Portable version of \<cstdint\> C99 header.
+/// It is necessary due to the non-conformance of MSVC before version 2010 to the C99 standard.
+
+#ifndef DEF_PACPUS_CSTDINT_H
+#define DEF_PACPUS_CSTDINT_H
+
+#if defined(_MSC_VER) && _MSC_VER < 1600
+// MSVC before 2010 has not <stdint.h> header (is not C99-compatible)
+
+typedef __int8      int8_t;
+typedef __int16     int16_t;
+typedef __int32     int32_t;
+typedef __int64     int64_t;
+
+typedef unsigned __int8      uint8_t;
+typedef unsigned __int16    uint16_t;
+typedef unsigned __int32    uint32_t;
+typedef unsigned __int64    uint64_t;
+
+#else
+
+#include <stdint.h>
+
+#endif
+
+#endif // DEF_PACPUS_CSTDINT_H
+
Index: tags/0.0.2/include/Pacpus/kernel/hdfile_header_t.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/hdfile_header_t.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/hdfile_header_t.h	(revision 257)
@@ -0,0 +1,71 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Firstname Surname <firstname.surname@utc.fr>
+/// @date    June, 2011
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_HDFILE_HEADER_T_H
+#define DEF_HDFILE_HEADER_T_H
+
+#include <Pacpus/kernel/cstdint.h>
+#include <Pacpus/kernel/road_time.h>
+
+/// @todo Documentation
+#define HEADER_SIGNATURE_LENGTH 4
+/// @todo Documentation
+#define VERSION_NUMBER 2
+
+#pragma pack(push,4)
+/// @todo Documentation
+struct hdfile_header_t
+{
+    /// @todo Documentation
+    typedef  int8_t SignatureT;
+    /// @todo Documentation
+    typedef int32_t DataTypeT;
+    /// @todo Documentation
+    typedef int32_t VersionT;
+    /// @todo Documentation
+    typedef int32_t DataSizeT;
+    /// @todo Documentation
+    typedef int32_t DataOffsetT;
+    /// @todo Documentation
+    /// @todo FIXME: file size should be 64-bit long to support large (>2GB) files
+    typedef int32_t FileSizeT;
+    /// @todo Documentation
+    typedef int32_t RecordCountT;
+
+    /// @todo Documentation
+    static const DataSizeT kVariableRecordSize = -1;
+
+    /// @todo Documentation
+    SignatureT      Signature[HEADER_SIGNATURE_LENGTH];
+    /// Record data type.
+    /// Should default to ::FILE_DBT_UNKNOWN
+    /// @see DbiteFileTypes.h for more information about available types.
+    DataTypeT       Type;
+    /// File format version
+    VersionT        VersionNumber;
+    /// Offset indicating the start of the data [bytes]
+    DataOffsetT     DataOffset;
+    /// Current size of the data, without header [bytes]
+    DataSizeT       DataSize;
+    /// Current size of the file [bytes]
+    FileSizeT       FileSize;
+    /// @todo Documentation
+    road_time_t     TimeMin;
+    /// @todo Documentation
+    road_time_t     TimeMax;
+    /// Number of records already in the file
+    RecordCountT    NbRecords;
+};
+#pragma pack(pop)
+
+#endif // DEF_HDFILE_HEADER_T_H
Index: tags/0.0.2/include/Pacpus/kernel/pacpus.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/pacpus.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/pacpus.h	(revision 257)
@@ -0,0 +1,47 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    February, 2006
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef DEF_PACPUS_H
+#define DEF_PACPUS_H
+
+#include <Pacpus/kernel/PacpusLibConfig.h>
+#include <Pacpus/kernel/road_time.h>
+
+/// Pi math constant
+/// 
+/// @deprecated Use M_PI from \<cmath\>.
+#ifndef PACPUS_PI
+#   define PACPUS_PI       3.1415926
+#endif
+
+/// @def PACPUS_DEPRECATED(func)
+/// Develops to the function or method declaration @b func
+/// and marks it as deprecated.
+
+/// @def PACPUS_DEPRECATED_MSG(func, msg)
+/// Develops to the function or method declaration @b func
+/// and marks it as deprecated with a given comment @b msg.
+#ifdef __GNUC__
+#   define PACPUS_DEPRECATED(func)              func __attribute__ ((deprecated))
+#   define PACPUS_DEPRECATED_MSG(func, msg)     PACPUS_DEPRECATED(func)
+#elif defined(_MSC_VER)
+#   define PACPUS_DEPRECATED(func)              __declspec(deprecated) func
+#   define PACPUS_DEPRECATED_MSG(func, msg)     __declspec(deprecated("was declared deprecated: " msg)) func
+#else
+#   pragma message("WARNING: You need to implement PACPUS_DEPRECATED for this compiler")
+#   define PACPUS_DEPRECATED(func)              func
+#   define PACPUS_DEPRECATED_MSG(func, msg)     func
+#endif
+
+#endif // DEF_PACPUS_H
Index: tags/0.0.2/include/Pacpus/kernel/road_time.h
===================================================================
--- tags/0.0.2/include/Pacpus/kernel/road_time.h	(revision 257)
+++ tags/0.0.2/include/Pacpus/kernel/road_time.h	(revision 257)
@@ -0,0 +1,104 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+
+#ifndef DEF_PACPUS_ROAD_TIME_H
+#define DEF_PACPUS_ROAD_TIME_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif // __cplusplus
+
+#include <stddef.h>  // defines: NULL
+
+#include <Pacpus/kernel/cstdint.h>
+
+/// Export macro for ROAD_TIME DLL for Windows only
+#ifdef WIN32
+#   ifdef ROAD_TIME_EXPORTS
+#       define ROAD_TIME_API __declspec(dllexport)
+#   else
+#       define ROAD_TIME_API __declspec(dllimport)
+#   endif
+#else
+#   define ROAD_TIME_API /* nothing */
+#endif
+
+/// Timestamp type
+typedef uint64_t road_time_t;
+/// Timerange type
+typedef int32_t road_timerange_t;
+
+/// Timestamp difference type
+typedef int64_t road_time_diff_t;
+/// Timerange difference type
+typedef int32_t road_timerange_diff_t;
+
+#ifdef WIN32
+
+/// Structure exchanged to give the Initialization parameters. All these fields are filled when the
+/// first process attached to the DLL. It gives the Real Time and the value of the Performance Counter
+/// at the same time.
+/// Description of each field is provided inside the structure
+struct ROAD_TIME_API Initialisation_Time
+{
+    /// Time (extended to micro seconds precision)
+    /// that was given by the Real Time Clock of
+    /// windows (using ftime()) at the first time the DLL was called.
+    road_time_t    Real_Time;
+
+    /// Correpsonding number of cycles of the CPU Performance Counter,
+    /// if it is available. Normally it is the Multimedia Counter.
+    /// If the Performance Counter is not availaible, normally it
+    /// should return the Real Time Counter Value (accuracy of 10 ms)..
+    uint64_t	Multimedia_Counter;
+
+    /// Frequency of the Performance Counter, if it is available
+    /// This Frequency is given in Hertz.
+    uint64_t	Multimedia_Counter_Frequency;
+
+    /// Delta_t is used to have less work when asking time.
+    /// Delta_t is equal to Real_Time - (Multimedia_Counter/Multimedia_Counter_Frequancy)/1000000
+    road_time_t    delta_t;
+};
+
+/// This method just return the actual time using a method based on delta_t (1 less operation).
+/// Return a road_time_t: ellapsed time in microseconds since the 1/01/1970
+road_time_t ROAD_TIME_API road_time(void);
+
+/// This method just return the actual time using all the fields of the Initiaiztion_Time Structure.
+/// Return a road_time_t: ellapsed time in microseconds since the 1/01/1970
+road_time_t ROAD_TIME_API road_time2(void);
+
+/// This method just return the Initialization Parameter
+/// Return an Initialization_Time structure (see below)
+struct Initialisation_Time ROAD_TIME_API road_time_init(void);
+
+#else // WIN32
+
+// UNIX
+
+#include <sys/time.h>
+
+static road_time_t road_time(void)
+{
+    struct timeval t;
+    gettimeofday(&t, NULL);
+    return(road_time_t)((road_time_t)(t.tv_sec)*1000000 + (road_time_t)(t.tv_usec));
+}
+
+#endif // WIN32
+
+#ifdef __cplusplus
+}
+#endif // __cplusplus
+
+#endif // DEF_PACPUS_ROAD_TIME_H
Index: tags/0.0.2/scripts/build-igep.sh
===================================================================
--- tags/0.0.2/scripts/build-igep.sh	(revision 257)
+++ tags/0.0.2/scripts/build-igep.sh	(revision 257)
@@ -0,0 +1,66 @@
+#!/usr/bin/env bash
+
+echo "##########################################################"
+echo "#   ___________    ____ ______  __ __  _____             #"
+echo "#   \____ \__  \ _/ ___\\____ \^|  ^|  \/  ___/          #"
+echo "#   ^|  ^|_^> ^> __ \\  \___^|  ^|_^> ^>  ^|  /\___ \    #"
+echo "#   ^|   __(____  /\___  ^>   __/^|____//____  ^>        #"
+echo "#   ^|__^|       \/     \/^|__^|              \/         #"
+echo "#                                                        #"
+echo "##########################################################"
+echo ""
+echo "========================================"
+echo "          PACPUS BUILD IGEP            "
+echo "========================================"
+
+#recupere cmake
+if [ -f  ${OECORE_NATIVE_SYSROOT}/usr/bin/cmake ]; then
+	CMAKE_NATIVE=${OECORE_NATIVE_SYSROOT}/usr/bin/cmake
+else
+	echo "cross toolchain is not installed, please read https://devel.hds.utc.fr/projects/igep/wiki/toolchain/install"
+exit 1
+fi
+
+
+function usage {
+    echo Usage:
+    echo     build-linux.sh [install_dir]
+    echo     [install-dir] is optional
+    echo The script must be run in the build directory, which is 'trunk\build'
+    echo ""
+    echo Where:
+    echo     install_dir   is the installation directory of the library
+    echo ""
+    echo For instance, here is how to build Pacpus:
+    echo     ../scripts/build-igep.sh "/opt/Pacpus"
+    echo ""
+    exit 1
+}
+
+function build {
+    # Initialize the build
+    $CMAKE_NATIVE .. -DPACPUS_INSTALL_DIR=$1 -DPACPUS_INSTALL_3RD=TRUE \
+        -DPACPUS_USE_LOG=TRUE -DCMAKE_BUILD_TYPE=Release \
+        -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_CROSS_TOOLCHAIN}
+    make
+    sudo make install
+    $CMAKE_NATIVE .. -DPACPUS_INSTALL_DIR=$1 -DPACPUS_INSTALL_3RD=TRUE \
+        -DPACPUS_USE_LOG=TRUE -DCMAKE_BUILD_TYPE=Debug
+        -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE -DCMAKE_TOOLCHAIN_FILE=${OECORE_CMAKE_CROSS_TOOLCHAIN} \
+    make
+    sudo make install
+    echo "Build finished"
+    exit 0
+}
+
+#Check if the user is in the build directory
+if [ `basename $PWD` == "build" ]; then
+    if [ $# -ne 1 ]; then
+        INST_PATH="/opt/pacpus"
+    else
+        INST_PATH=$1
+    fi
+    build $INST_PATH
+else
+    usage
+fi
Index: tags/0.0.2/scripts/build-linux.sh
===================================================================
--- tags/0.0.2/scripts/build-linux.sh	(revision 257)
+++ tags/0.0.2/scripts/build-linux.sh	(revision 257)
@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+
+echo "##########################################################"
+echo "#   ___________    ____ ______  __ __  _____             #"
+echo "#   \____ \__  \ _/ ___\\____ \^|  ^|  \/  ___/          #"
+echo "#   ^|  ^|_^> ^> __ \\  \___^|  ^|_^> ^>  ^|  /\___ \    #"
+echo "#   ^|   __(____  /\___  ^>   __/^|____//____  ^>        #"
+echo "#   ^|__^|       \/     \/^|__^|              \/         #"
+echo "#                                                        #"
+echo "##########################################################"
+echo ""
+echo "========================================"
+echo "          PACPUS BUILD Linux            "
+echo "========================================"
+
+
+function usage {
+    echo Usage:
+    echo     build-linux.sh [install_dir]
+    echo     [install-dir] is optional
+    echo The script must be run in the build directory, which is 'trunk\build'
+    echo ""
+    echo Where:
+    echo     install_dir   is the installation directory of the library
+    echo ""
+    echo For instance, here is how to build Pacpus:
+    echo     ../scripts/build-linux.sh "/opt/Pacpus"
+    echo ""
+    exit 1
+}
+
+function build {
+    # Initialize the build
+    cmake .. -DPACPUS_INSTALL_DIR=$1 -DPACPUS_INSTALL_3RD=TRUE \
+        -DPACPUS_USE_LOG=TRUE -DCMAKE_BUILD_TYPE=Release \
+        -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE
+    make
+    sudo make install
+    cmake .. -DPACPUS_INSTALL_DIR=$1 -DPACPUS_INSTALL_3RD=TRUE \
+        -DPACPUS_USE_LOG=TRUE -DCMAKE_BUILD_TYPE=Debug
+        -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE \
+    make
+    sudo make install
+    echo "Build finished"
+    exit 0
+}
+
+#Check if the user is in the build directory
+if [ `basename $PWD` == "build" ]; then
+    if [ $# -ne 1 ]; then
+        INST_PATH="/opt/pacpus"
+    else
+        INST_PATH=$1
+    fi
+    build $INST_PATH
+else
+    usage
+fi
Index: tags/0.0.2/scripts/build-msvc-default-installdir.bat
===================================================================
--- tags/0.0.2/scripts/build-msvc-default-installdir.bat	(revision 257)
+++ tags/0.0.2/scripts/build-msvc-default-installdir.bat	(revision 257)
@@ -0,0 +1,50 @@
+@echo off
+
+echo #################################################
+echo #   ___________    ____ ______  __ __  _____    #
+echo #   \____ \__  \ _/ ___\\____ \^|  ^|  \/  ___/   #
+echo #   ^|  ^|_^> ^> __ \\  \___^|  ^|_^> ^>  ^|  /\___ \    #
+echo #   ^|   __(____  /\___  ^>   __/^|____//____  ^>   #
+echo #   ^|__^|       \/     \/^|__^|              \/    #
+echo #                                               #
+echo #################################################
+echo:
+
+echo ========================================
+echo           PACPUS BUILD MSVC             
+echo ========================================
+echo:
+
+:preamble
+:: Check if the user is in the build directory
+if not exist "%CD%\..\README.txt" goto usage
+:: Args ok, go to build
+goto build
+
+:usage
+echo Usage:
+echo     build-msvc.bat [install_dir]
+echo     [install-dir] is optional
+echo The script must be run in the build directory, which is 'trunk\build'
+echo:
+echo Where:
+echo     install_dir   is the installation directory of the library
+echo:
+echo For instance, here is how to build Pacpus:
+echo     ..\scripts\build-msvc.bat "D:\Libraries\Pacpus"
+echo:
+goto exit
+
+:build
+:: Initialize the build
+cmake .. -DPACPUS_INSTALL_3RD=TRUE -DPACPUS_USE_LOG=TRUE -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE
+:: Build in debug and release
+msbuild Pacpus.sln /p:Configuration=Debug
+msbuild Pacpus.sln /p:Configuration=Release
+:: Install
+msbuild INSTALL.vcxproj /p:Configuration=Debug
+msbuild INSTALL.vcxproj /p:Configuration=Release
+echo Build finished, do not forget to check the MSVC's output
+
+:exit
+pause
Index: tags/0.0.2/scripts/build-msvc.bat
===================================================================
--- tags/0.0.2/scripts/build-msvc.bat	(revision 257)
+++ tags/0.0.2/scripts/build-msvc.bat	(revision 257)
@@ -0,0 +1,51 @@
+@echo off
+
+echo #################################################
+echo #   ___________    ____ ______  __ __  _____    #
+echo #   \____ \__  \ _/ ___\\____ \^|  ^|  \/  ___/   #
+echo #   ^|  ^|_^> ^> __ \\  \___^|  ^|_^> ^>  ^|  /\___ \    #
+echo #   ^|   __(____  /\___  ^>   __/^|____//____  ^>   #
+echo #   ^|__^|       \/     \/^|__^|              \/    #
+echo #                                               #
+echo #################################################
+echo:
+
+echo ========================================
+echo           PACPUS BUILD MSVC             
+echo ========================================
+echo:
+
+:preamble
+:: Check the args
+if "%1" == "" goto usage
+:: Check if the user is in the build directory
+if not exist "%CD%\..\README.txt" goto usage
+:: Args ok, go to build
+goto build
+
+:usage
+echo Usage:
+echo     build-msvc.bat [install_dir]
+echo The script must be run in the build directory, which is 'trunk\build'
+echo:
+echo Where:
+echo     install_dir   is the installation directory of the library
+echo:
+echo For instance, here is how to build Pacpus:
+echo     ..\scripts\build-msvc.bat "D:\Libraries\Pacpus"
+echo:
+goto exit
+
+:build
+:: Initialize the build
+cmake .. -DPACPUS_INSTALL_DIR="%1" -DPACPUS_INSTALL_3RD=TRUE -DPACPUS_USE_LOG=TRUE -DPACPUS_INSTALL_WITH_VERSION_NUMBER=TRUE
+:: Build in debug and release
+rem msbuild Pacpus.sln /p:Configuration=Debug
+rem msbuild Pacpus.sln /p:Configuration=Release
+:: Install
+rem msbuild INSTALL.vcxproj /p:Configuration=Debug
+rem msbuild INSTALL.vcxproj /p:Configuration=Release
+rem echo Build finished, do not forget to check the MSVC's output
+
+:exit
+pause
Index: tags/0.0.2/scripts/change-all-licenses.bat
===================================================================
--- tags/0.0.2/scripts/change-all-licenses.bat	(revision 257)
+++ tags/0.0.2/scripts/change-all-licenses.bat	(revision 257)
@@ -0,0 +1,23 @@
+@echo off
+
+:parameters
+set SCRIPTS_DIR=%CD%
+set DIRECTORIES=..\include ..\src
+set FILES_TO_UPDATE=*.h *.c *.hpp *.cpp *.hxx *.cxx *.cc *.tcc
+
+:scan
+:: for all directories
+for %%D in (%DIRECTORIES%) do (
+    ::echo %%D
+    cd %SCRIPTS_DIR%
+    cd %%D
+    :: find source files
+    :: update each file
+    for /R %%E in (%FILES_TO_UPDATE%) do (
+        "%SCRIPTS_DIR%\update-license.bat" "%%E" "%SCRIPTS_DIR%"
+    )
+)
+
+:exit
+cd %SCRIPTS_DIR%
+pause
Index: tags/0.0.2/scripts/update-license.bat
===================================================================
--- tags/0.0.2/scripts/update-license.bat	(revision 257)
+++ tags/0.0.2/scripts/update-license.bat	(revision 257)
@@ -0,0 +1,26 @@
+@echo off
+
+:: You have to install `sed` first!
+
+:init
+:: get full path of the file
+set FILE=%~df1
+set SCRIPTS_DIR=%2
+set MV=move
+
+::echo %FILE%
+::echo %LICENSE_HEADER_FILE%
+
+:find
+:: remove license
+:: sed '/^%pacpus:license{/,/^%pacpuse:license}/d' %FILE%
+
+sed -nf %SCRIPTS_DIR%\update-license.sed "%FILE%" > update-license.tmp
+%MV% update-license.tmp "%FILE%"
+
+:: print lines from begin of file till begin of license
+::sed -n '0,/^%pacpus:license{/   p' %FILE%
+:: print new license
+
+:: print lines from end of license till end of file
+::sed -n '/^%pacpus:license}/,$   p' %FILE%
Index: tags/0.0.2/scripts/update-license.sed
===================================================================
--- tags/0.0.2/scripts/update-license.sed	(revision 257)
+++ tags/0.0.2/scripts/update-license.sed	(revision 257)
@@ -0,0 +1,17 @@
+:writefromstart
+0,/%pacpus:license{/ {
+    p           # print line
+    $b exit     # exit if the license not found (branch to exit if on on the last line)
+}
+
+# put license file after the line with %pacpus:license{
+/%pacpus:license{/ {
+    r ../LICENSE-header.txt
+}
+
+:writetillend
+/%pacpus:license}/,$ {
+    p           # print line
+}
+
+:exit
Index: tags/0.0.2/src/CMakeLists.txt
===================================================================
--- tags/0.0.2/src/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/src/CMakeLists.txt	(revision 257)
@@ -0,0 +1,20 @@
+# ========================================
+# Libraries, all platforms
+# ========================================
+add_subdirectory(FileLib)
+add_subdirectory(PacpusLib)
+add_subdirectory(PacpusTools)
+add_subdirectory(DBITEPlayerLib)
+
+# ========================================
+# Libraries, windows
+# ========================================
+if(WIN32)
+    add_subdirectory(RoadTime)
+endif()
+
+# ========================================
+# Executables
+# ========================================
+add_subdirectory(DBITEPlayer)
+add_subdirectory(PacpusSensor)
Index: tags/0.0.2/src/DBITEPlayer/CMakeLists.txt
===================================================================
--- tags/0.0.2/src/DBITEPlayer/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/src/DBITEPlayer/CMakeLists.txt	(revision 257)
@@ -0,0 +1,94 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+project(DBITEPlayer)
+
+# ========================================
+# Configure qt4
+# ========================================
+if(QT4_FOUND)
+  set(QT_USE_QTXML true)
+  set(QT_USE_QTNETWORK true)
+  include(${QT_USE_FILE})
+else()
+  message(ERROR "Qt4 needed")
+endif()
+
+# ========================================
+# Compiler definitions
+# ========================================
+add_definitions(
+    ${QT_DEFINITIONS}
+)
+
+# ========================================
+# Include directories
+# ========================================
+include_directories(
+    ${CMAKE_BINARY_DIR}/DBITEPlayer
+    ${QT_INCLUDE_DIR}
+)
+
+# ========================================
+# List of sources
+# ========================================
+set(
+    PROJECT_SRCS
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/cstdint.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus//kernel/ComponentBase.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactory.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactoryBase.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentManager.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/Log.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpus.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlComponentConfig.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlConfigFile.h
+    ./ComponentBase.cpp
+    ./ComponentFactoryBase.cpp
+    ./ComponentManager.cpp
+    ./Log.cpp
+    ./XmlComponentConfig.cpp
+    ./XmlConfigFile.cpp
+)
+
+# ========================================
+# Build an executable
+# ========================================
+pacpus_add_executable(
+    ${PROJECT_NAME}
+    ./src/main.cpp
+)
+
+# ========================================
+# Libraries & Dependencies
+# ========================================
+# All the platform
+target_link_libraries(
+    ${PROJECT_NAME}
+    ${QT_LIBRARIES}
+    dbiteplayerlib
+)
+# Windows
+if(WIN32)
+    target_link_libraries(
+        ${PROJECT_NAME}
+        ROAD_TIME
+        Winmm
+    )
+endif()
+
+# ========================================
+# Install
+# ========================================
+pacpus_install(${PROJECT_NAME})
+
+# ========================================
+# Folder
+# ========================================
+pacpus_folder(${PROJECT_NAME} "tools")
Index: tags/0.0.2/src/DBITEPlayer/src/main.cpp
===================================================================
--- tags/0.0.2/src/DBITEPlayer/src/main.cpp	(revision 257)
+++ tags/0.0.2/src/DBITEPlayer/src/main.cpp	(revision 257)
@@ -0,0 +1,70 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    April, 2007
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief DbitePlayer main function.
+///
+/// Detailed description.
+
+#include <Pacpus/DbitePlayer/DbtPlyEngine.h>
+#include <Pacpus/DbitePlayer/DbtPlyTrigger.h>
+#include <Pacpus/DbitePlayer/DbtPlyUserInterface.h>
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/ComponentFactory.h>
+#include <Pacpus/kernel/Log.h>
+#include <Pacpus/kernel/PacpusApplication.h>
+#include <Pacpus/kernel/PacpusPluginInterface.h>
+
+#include <cassert>
+#include <QApplication>
+
+using namespace pacpus;
+using namespace std;
+
+DECLARE_STATIC_LOGGER("pacpus.core.DbitePlayer");
+
+static const string kDefaultXmlConfigFilePath = "DbitePlayer.xml";
+
+int main(int argc, char * argv[])
+{
+    PacpusApplication app(argc, argv);
+    ComponentManager * mgr = ComponentManager::getInstance();
+
+    static ComponentFactory<DbtPlyEngine> factoryDbtPlyEngine("DbtPlyEngine");
+    Q_UNUSED(factoryDbtPlyEngine);
+    static ComponentFactory<DbtPlyTrigger> factoryDbtPlyTrigger("DbtPlyTrigger");
+    Q_UNUSED(factoryDbtPlyTrigger);
+    static ComponentFactory<DbtPlyUserInterface> factoryDbtPlyUserInterface("DbtPlyUserInterface");
+    Q_UNUSED(factoryDbtPlyUserInterface);
+
+    string configFilePath;
+    if (argc > 1) {
+        configFilePath = argv[1];
+    } else {
+        configFilePath = kDefaultXmlConfigFilePath;
+        LOG_WARN("no XML config file specified. Using default: " << configFilePath);
+    }
+    LOG_INFO("loading file '" << configFilePath << "'");
+    size_t componentCount = mgr->loadComponents(configFilePath.c_str());
+    if (componentCount == 0) {
+        LOG_FATAL("no components, exiting");
+        return EXIT_FAILURE;
+    }
+
+    // start all the components (engine, trigger, user interface and the DBT file managers)
+    mgr->start();
+    // save application exit status
+    int exitStatus = app.exec();
+    // stop all components before exiting app
+    mgr->stop();
+
+    mgr->destroy();
+
+    // return application exit status
+    return exitStatus;
+}
Index: tags/0.0.2/src/DBITEPlayerLib/CMakeLists.txt
===================================================================
--- tags/0.0.2/src/DBITEPlayerLib/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/src/DBITEPlayerLib/CMakeLists.txt	(revision 257)
@@ -0,0 +1,117 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+project(dbiteplayerlib)
+
+# ========================================
+# Configure qt4
+# ========================================
+if(QT4_FOUND)
+    set(QT_USE_QTXML true)
+    set(QT_USE_QTNETWORK TRUE)
+    include(${QT_USE_FILE})
+else()
+    message(ERROR "Qt4 needed")
+endif(QT4_FOUND)
+
+# ========================================
+# Compiler definitions
+# ========================================
+add_definitions(
+    -DDBITE_PLAYER_EXPORTS
+    ${QT_DEFINITIONS}
+)
+
+# ========================================
+# Include directories
+# ========================================
+include_directories(
+    ${CMAKE_BINARY_DIR}/DBITEPlayer
+    ${QT_INCLUDE_DIR}
+)
+
+# ========================================
+# List of sources
+# ========================================
+set(
+    PROJECT_SRCS
+    ./DbtPlyEngine.cpp
+    ./DbtPlyUserInterface.cpp
+    ./DbtPlyEngineStateChart.cpp
+    ./DbtPlyFileManager.cpp
+    ./DbtPlyTrigger.cpp
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngineStateChart.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
+)
+
+# ========================================
+# Files to MOC
+# ========================================
+set(
+    FILES_TO_MOC
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyEngine.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyFileManager.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyTrigger.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/DbitePlayer/DbtPlyUserInterface.h
+)
+
+# ========================================
+# Call MOC
+# ========================================
+qt4_wrap_cpp(
+    PROJECT_MOC_SRCS
+    ${FILES_TO_MOC}
+)
+
+# ========================================
+# Directories architecture
+# ========================================
+SOURCE_GROUP(Core FILES ${PROJECT_SRCS} )
+SOURCE_GROUP(moc FILES ${PROJECT_MOC_SRCS})
+
+# ========================================
+# Build a library
+# ========================================
+pacpus_add_library(
+    ${PROJECT_NAME} SHARED
+    ${PROJECT_SRCS}
+    ${PROJECT_MOC_SRCS}
+)
+
+# ========================================
+# Libraries
+# ========================================
+# All platform
+target_link_libraries(
+    ${PROJECT_NAME}
+	${PACPUS_DEPENDENCIES_LIB}
+    PacpusLib
+	FileLib
+    ${QT_LIBRARIES}
+)
+# Windows platform
+if(WIN32)
+    target_link_libraries(
+        ${PROJECT_NAME}
+        ROAD_TIME
+        Winmm
+    )
+endif()
+
+# ========================================
+# Install
+# ========================================
+pacpus_install(${PROJECT_NAME})
+
+# ========================================
+# Folder
+# ========================================
+pacpus_folder(${PROJECT_NAME} "libraries")
Index: tags/0.0.2/src/DBITEPlayerLib/DbtPlyEngine.cpp
===================================================================
--- tags/0.0.2/src/DBITEPlayerLib/DbtPlyEngine.cpp	(revision 257)
+++ tags/0.0.2/src/DBITEPlayerLib/DbtPlyEngine.cpp	(revision 257)
@@ -0,0 +1,337 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version $Id$
+
+#include <Pacpus/DbitePlayer/DbtPlyEngine.h>
+
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/Log.h>
+
+#include <cassert>
+#include <limits>
+#include <QDir>
+
+using namespace std;
+
+// Construction de la fabrique de composant DbtPlyEngine
+//static ComponentFactory<DbtPlyEngine> factory("DbtPlyEngine");
+
+namespace pacpus {
+
+DECLARE_STATIC_LOGGER("pacpus.core.DbtPlyEngine");
+
+static const string kPropertyDataDirectory = "datadir";
+
+static const string kPropertyLoggerConfiguration = "log-config-file";
+
+static const string kPropertyReplayMode = "replay_mode";
+static const string kPropertyReplayModeLastData = "1";
+static const string kPropertyReplayModeAllData = "2";
+
+typedef float SpeedType;
+static const SpeedType kInitialSpeed = 1.0;
+static const SpeedType kMinSpeed = 1.0 / 32;
+static const SpeedType kMaxSpeed = 32;
+
+////////////////////////////////////////////////////////////////////////////////
+/// Constructor
+DbtPlyEngine::DbtPlyEngine(QString name)
+    : ComponentBase(name)
+    , mCurrentState(StoppedState::getInstance())
+    , mSpeed(kInitialSpeed)
+    , mIsReverse(false)
+{
+    LOG_TRACE("constructor");
+
+    sync_ = new QSemaphore(1);
+    sync_->acquire();
+    direction_ = 1;
+    tMinMaxSem_ = new QSemaphore(1);
+    tMinMaxSem_->release();
+    tDbtMin_ = numeric_limits<road_time_t>::max();
+    tDbtMax_ = 0;
+    dataDir_ = QString::null;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Destructor.
+DbtPlyEngine::~DbtPlyEngine()
+{
+    LOG_TRACE("destructor");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Returns the directory where the data are stored.
+/// @return QString::null if directory is invalid.
+QString DbtPlyEngine::getDataDir()
+{
+    return dataDir_;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Slot.
+/// called when trigger reaches a new timer event
+void DbtPlyEngine::engReceiver()
+{
+    sync_->release();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// @returns @b true if the engine is in the PLAY_STATE, @b false otherwise
+bool DbtPlyEngine::isPlaying()
+{
+    return mCurrentState->isPlaying();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// main loop of the thread
+/// entry point for a new thread after the invocation of QThread::start()
+void DbtPlyEngine::run()
+{
+    LOG_DEBUG("run");
+
+    // We are waiting the first trigger signal to init some values
+    // before entering in the while loop
+    sync_->acquire();
+    lastTDbt_ = tDbtMin_;
+
+    // For statistics purpose
+    static const size_t kDeltaArraySize = 1000;
+    int deltaTDbtTab[kDeltaArraySize];
+    int i = 0;
+
+    while (THREAD_ALIVE) {
+        tNow_ = road_time();
+        float elapsedTime = tNow_ - lastTNow_;
+        int deltaTDbt = direction_ * elapsedTime * mSpeed;
+        tDbt_ = lastTDbt_ + deltaTDbt;
+        deltaTDbtTab[(i++) % kDeltaArraySize] = elapsedTime;
+
+        if ((tDbt_ <= tDbtMax_) && (tDbt_ >= tDbtMin_)) {
+            Q_EMIT play(tDbt_, tNow_, mIsReverse);
+            Q_EMIT curReplayTime(tDbt_);
+            lastTNow_ = tNow_ ;
+            lastTDbt_ = tDbt_ ;
+        } else {
+            lastTNow_ = tNow_ ;
+            lastTDbt_ = tDbt_ ;
+            LOG_INFO("Reading is finished.");
+
+            mCurrentState->stop(*this);
+        }
+
+        // The waiting is placed at the end due to the init before the while loop
+        sync_->acquire();
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Slot.
+/// change the direction of replaying : normal or reverse
+void DbtPlyEngine::changeDirection(bool reverse)
+{
+    if (reverse) {
+        direction_ = -1;
+        mIsReverse = true;
+    } else {
+        direction_ = +1;
+        mIsReverse = false;
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Configuration method of the engine
+/// called automatically by the component manager
+ComponentBase::COMPONENT_CONFIGURATION DbtPlyEngine::configureComponent(XmlComponentConfig /*config*/)
+{
+    // datadir
+    dataDir_ = param.getProperty(kPropertyDataDirectory.c_str());
+    LOG_INFO("property " << kPropertyDataDirectory.c_str() << "=\""
+             << dataDir_ << "\"");
+    if (dataDir_.isNull()) {
+        LOG_FATAL("The data directory '" << componentName << "' is invalid or unavailable!");
+    }
+
+    dataDir_ = QDir::toNativeSeparators(dataDir_);
+    if (!dataDir_.endsWith(QDir::separator())) {
+        dataDir_ += QDir::separator();
+    }
+
+    ////////////////////////////////////////////////////////////////////////////////
+    // logger configuration
+    QString loggerConfig = param.getProperty(kPropertyLoggerConfiguration.c_str());
+    LOG_INFO("property " << kPropertyLoggerConfiguration.c_str() << "=\""
+             << loggerConfig << "\"");
+    if (!loggerConfig.isNull()) {
+        LOG_INFO("configuring logger with file '" << loggerConfig << "'");
+        LogConfigurator::configureLoggerWithFile(loggerConfig.toStdString().c_str());
+    }
+
+    ////////////////////////////////////////////////////////////////////////////////
+    // Replay Mode
+    QString replayModeValue = param.getProperty(kPropertyReplayMode.c_str());
+    LOG_INFO("property " << kPropertyReplayMode.c_str() << "=\""
+             << replayModeValue << "\"");
+    if (replayModeValue.isNull()) {
+        LOG_INFO("property " << kPropertyReplayMode.c_str() << " unset."
+                 << " Set to default = 1.");
+        replayMode_ = PlayModeLastData;
+    } else {
+        if (kPropertyReplayModeLastData == replayModeValue.toStdString()) {
+            replayMode_ = PlayModeLastData;
+        } else if (kPropertyReplayModeAllData == replayModeValue.toStdString()) {
+            replayMode_ = PlayModeAllData;
+        } else {
+            LOG_WARN("unknown " << kPropertyReplayMode.c_str() << " '" << replayModeValue << "'."
+                     << " Set to default = 1.");
+            replayMode_ = PlayModeLastData;
+        }
+    }
+
+    return ComponentBase::CONFIGURED_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// The start function of the engine
+void DbtPlyEngine::startActivity()
+{
+    LOG_INFO("Starting...");
+
+    THREAD_ALIVE = true;
+    start();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// The stop function of the engine
+void DbtPlyEngine::stopActivity()
+{ 
+    LOG_TRACE("stopping activity...");
+
+    THREAD_ALIVE = false;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Slot.
+/// called by each file manager to provide min and max time of their data
+void DbtPlyEngine::tMinMax(road_time_t tMin, road_time_t tMax)
+{
+    tMinMaxSem_->acquire();
+    if (tDbtMin_>tMin) {
+        tDbtMin_= tMin;
+    }
+    if (tDbtMax_<tMax) {
+        tDbtMax_ = tMax;
+    }
+    Q_EMIT timeMinMax(tDbtMin_, tDbtMax_);
+    tMinMaxSem_->release();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Slot.
+/// called when the time slider is pressed
+void DbtPlyEngine::pauseEvent()
+{
+    LOG_DEBUG("Clicked: pause");
+    mCurrentState->pause(*this);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Slot.
+/// called when the time slider is released
+void DbtPlyEngine::playEvent()
+{
+    LOG_DEBUG("Clicked: play");
+
+    // get user interface
+    ComponentManager * mgr = ComponentManager::getInstance();
+    DbtPlyUserInterface * ui = dynamic_cast<DbtPlyUserInterface *>(mgr->getComponent("dbiteUserInterface"));
+    assert(ui);
+    // get time value from slider
+    lastTDbt_ = ui->getTime() + tDbtMin_;
+
+    mCurrentState->play(*this);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void DbtPlyEngine::stopEvent()
+{
+    LOG_DEBUG("Clicked: stop");
+    mCurrentState->stop(*this);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void DbtPlyEngine::speedUpEvent()
+{
+    LOG_DEBUG("Clicked: speed Up");
+    mCurrentState->speedUp(*this);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void DbtPlyEngine::speedDownEvent()
+{
+    LOG_DEBUG("Clicked: speed down");
+    mCurrentState->speedDown(*this);
+}
+
+////////////////////////////////////////////////////////////////////////////////
+const DbtPlyEngineState * DbtPlyEngine::getState()
+{
+    return mCurrentState;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void DbtPlyEngine::setState(DbtPlyEngineState * newState)
+{
+    assert(newState);
+    LOG_DEBUG(mCurrentState->toString() << " => " << newState->toString());
+    mCurrentState = newState;
+
+    Q_EMIT displayStateSig(mCurrentState, mSpeed);
+
+    LOG_DEBUG("tDbt = " << tDbt_ << "\tlastTDbt = " << lastTDbt_);
+    LOG_DEBUG("tNow = " << tNow_ << "\tlastTNow = " << lastTNow_);
+}
+
+void DbtPlyEngine::speedUp()
+{
+    mSpeed *= 2;
+    if (mSpeed > kMaxSpeed) {
+        mSpeed = kMaxSpeed;
+    }
+    assert(kMinSpeed <= mSpeed);
+    assert(mSpeed <= kMaxSpeed);
+    LOG_INFO("event: Speed Up, speed = " << mSpeed);
+    Q_EMIT displayStateSig(mCurrentState, mSpeed);
+}
+
+void DbtPlyEngine::speedDown()
+{
+    mSpeed /= 2;
+    if (mSpeed < kMinSpeed) {
+        mSpeed = kMinSpeed;
+    }
+    assert(kMinSpeed <= mSpeed);
+    assert(mSpeed <= kMaxSpeed);
+    LOG_INFO("event: Speed Up, speed = " << mSpeed);
+    Q_EMIT displayStateSig(mCurrentState, mSpeed);
+}
+
+void DbtPlyEngine::reset()
+{
+    lastTNow_ = road_time();
+    lastTDbt_ = tDbtMin_;
+    mSpeed = kInitialSpeed;
+    Q_EMIT stopfile();
+
+    // get user interface
+    ComponentManager * mgr = ComponentManager::getInstance();
+    DbtPlyUserInterface * ui = dynamic_cast<DbtPlyUserInterface *>(mgr->getComponent("dbiteUserInterface"));
+    assert(ui);
+    // reset time value of the slider
+    ui->resetTime();
+}
+
+} // namespace pacpus
Index: tags/0.0.2/src/DBITEPlayerLib/DbtPlyEngineStateChart.cpp
===================================================================
--- tags/0.0.2/src/DBITEPlayerLib/DbtPlyEngineStateChart.cpp	(revision 257)
+++ tags/0.0.2/src/DBITEPlayerLib/DbtPlyEngineStateChart.cpp	(revision 257)
@@ -0,0 +1,145 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version $Id$
+
+#include <Pacpus/DbitePlayer/DbtPlyEngineStateChart.h>
+
+#include <Pacpus/DbitePlayer/DbtPlyEngine.h>
+#include <Pacpus/kernel/Log.h>
+
+namespace pacpus {
+
+DECLARE_STATIC_LOGGER("pacpus.core.DbtPlyEngineStateChart");
+
+typedef float SpeedType;
+static const SpeedType kMinSpeed = 1.0 / 32;
+static const SpeedType kMaxSpeed = 32;
+
+////////////////////////////////////////////////////////////////////////////////
+DbtPlyEngineState::DbtPlyEngineState()
+{
+}
+
+DbtPlyEngineState::~DbtPlyEngineState()
+{
+}
+
+void DbtPlyEngineState::play(DbtPlyEngine & /*engine*/)
+{
+    // do nothing
+}
+
+void DbtPlyEngineState::pause(DbtPlyEngine & /*engine*/)
+{
+    // do nothing
+}
+
+void DbtPlyEngineState::stop(DbtPlyEngine & /*engine*/)
+{
+    // do nothing
+}
+
+void DbtPlyEngineState::speedUp(DbtPlyEngine & engine)
+{
+    engine.speedUp();
+}
+
+void DbtPlyEngineState::speedDown(DbtPlyEngine & engine)
+{
+    engine.speedDown();
+}
+
+bool DbtPlyEngineState::isPlaying()
+{
+    return false;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+PlayingState::PlayingState()
+{
+}
+
+void PlayingState::pause(DbtPlyEngine & engine)
+{
+    engine.setState(PausedState::getInstance());
+}
+
+void PlayingState::stop(DbtPlyEngine & engine)
+{
+    engine.reset();
+    engine.setState(StoppedState::getInstance());
+}
+
+bool PlayingState::isPlaying()
+{
+    return true;
+}
+
+QString PlayingState::toString() const
+{
+    return "Playing";
+}
+
+DbtPlyEngineState * PlayingState::getInstance()
+{
+    return &mInstance;
+}
+
+PlayingState PlayingState::mInstance;
+
+////////////////////////////////////////////////////////////////////////////////
+PausedState::PausedState()
+{
+}
+
+void PausedState::play(DbtPlyEngine & engine)
+{
+    engine.setLastTNow(road_time());
+    engine.setState(PlayingState::getInstance());
+}
+
+void PausedState::stop(DbtPlyEngine & engine)
+{
+    engine.reset();
+    engine.setState(StoppedState::getInstance());
+}
+
+QString PausedState::toString() const
+{
+    return "Paused";
+}
+
+DbtPlyEngineState * PausedState::getInstance()
+{
+    return &mInstance;
+}
+
+PausedState PausedState::mInstance;
+
+////////////////////////////////////////////////////////////////////////////////
+StoppedState::StoppedState()
+{
+}
+
+void StoppedState::play(DbtPlyEngine & engine)
+{
+    engine.setLastTNow(road_time());
+    engine.setState(PlayingState::getInstance());
+}
+
+QString StoppedState::toString() const
+{
+    return "Stopped";
+}
+
+DbtPlyEngineState * StoppedState::getInstance()
+{
+    return &mInstance;
+}
+
+StoppedState StoppedState::mInstance;
+
+} // namespace pacpus
Index: tags/0.0.2/src/DBITEPlayerLib/DbtPlyFileManager.cpp
===================================================================
--- tags/0.0.2/src/DBITEPlayerLib/DbtPlyFileManager.cpp	(revision 257)
+++ tags/0.0.2/src/DBITEPlayerLib/DbtPlyFileManager.cpp	(revision 257)
@@ -0,0 +1,333 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version $Id$
+
+#include <Pacpus/DbitePlayer/DbtPlyFileManager.h>
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/DbiteException.h>
+#include <Pacpus/kernel/Log.h>
+
+#include <cassert>
+#include <iostream>
+#include <limits>
+#include <QMetaType>
+#include <QSemaphore>
+
+using namespace pacpus;
+using namespace std;
+
+DECLARE_STATIC_LOGGER("pacpus.core.DbtPlyFileManager");
+
+const string kPropertyVerbose = "verbose";
+const int kPropertyVerboseDefaultValue = 1;
+
+const string kPropertyDbiteFileName = "dbt";
+
+// It is the maximum time elapsed between the computation of the tDbt and the data replay in microseconds
+static const int kMaxPendingTimeFromEngineMicrosecs = 10000;
+
+////////////////////////////////////////////////////////////////////////////////
+/// Constructor.
+DbtPlyFileManager::DbtPlyFileManager(QString name):ComponentBase(name)
+{
+    LOG_TRACE("constructor");
+
+    sync_ = new QSemaphore(1);
+    sync_->acquire();
+    tMin_ = numeric_limits<road_time_t>::max();
+    tMax_ = numeric_limits<road_time_t>::min();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Destructor.
+DbtPlyFileManager::~DbtPlyFileManager() 
+{
+    LOG_TRACE("destructor");
+
+    for (QList<dbtStructFile>::iterator it = dbt_.begin(), itend = dbt_.end(); it != itend; ++it) {
+        dbtStructFile & dbtFile = *it;
+
+        delete[] dbtFile.cur.buffer;
+        delete[] dbtFile.toProcess.buffer;
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Configures the file manager.
+ComponentBase::COMPONENT_CONFIGURATION DbtPlyFileManager::configureComponent(XmlComponentConfig config)
+{
+    ComponentManager * mgr = ComponentManager::getInstance();
+    mEngine = static_cast<DbtPlyEngine *>(mgr->getComponent("dbiteEngine"));
+    if (NULL == mEngine ) {
+        LOG_FATAL("cannot get a pointer of the 'dbiteEngine' component");
+        return CONFIGURED_FAILED;
+    }
+    if (!mEngine->isConfigured()) {
+        LOG_WARN("'dbiteEngine' component was not configured");
+        return CONFIGURATION_DELAYED;
+    }
+
+    // Qt Signal-Slot connections
+    // register the road_time_t type for the connection
+    qRegisterMetaType<road_time_t>("road_time_t");
+    connect(mEngine, SIGNAL(play(road_time_t,road_time_t, bool)),
+            this, SLOT(playData(road_time_t,road_time_t, bool)),
+            Qt::DirectConnection);
+    connect(this, SIGNAL(tMinMaxIs(road_time_t,road_time_t )),
+            mEngine, SLOT(tMinMax(road_time_t, road_time_t)));
+    connect(mEngine, SIGNAL(stopfile()),
+            this, SLOT (beginfile()));
+
+
+    // get the properties in the XML node
+    /////////////////////////////////////////
+    {
+        QString verbose = param.getProperty(kPropertyVerbose.c_str());
+        if (verbose.isNull()) {
+            LOG_INFO("property " << kPropertyVerbose << " not set."
+                     << " Set to default = " << kPropertyVerboseDefaultValue
+                     );
+            // default value
+            mVerbose = kPropertyVerboseDefaultValue;
+        } else {
+            verbose = verbose.toLower();
+            LOG_DEBUG("property " << kPropertyVerbose << "=\""
+                      << verbose.toStdString() << "\"");
+            mVerbose = verbose.toInt();
+            LOG_DEBUG("property interpreted as " << kPropertyVerbose << "=\""
+                      << mVerbose << "\"");
+        }
+    }
+
+    /////////////////////////////////////////
+    dbtProperty_ = param.getProperty(kPropertyDbiteFileName.c_str());
+    mShowGui = param.getProperty("ui").toInt();
+    mDbtDataPath = mEngine->getDataDir();
+
+    mDbtFilenameList = dbtProperty_.split("|");
+
+    for (int i = 0; i < mDbtFilenameList.size(); ++i) {
+        mDbtFilenameList[i] = mDbtDataPath + mDbtFilenameList.at(i);
+        LOG_INFO("opening DBT file \"" << mDbtFilenameList.at(i) << "\"");
+
+        // temporary dbt object
+        dbtStructFile dbt;
+        dbt.pfile = new DbiteFile();
+        assert(dbt.pfile);
+        try {
+            dbt.pfile->open(mDbtFilenameList.at(i).toStdString(), ReadMode);
+        } catch (DbiteException & e) {
+            LOG_ERROR("cannot open DBT file \"" << mDbtFilenameList.at(i) << "\"");
+            LOG_DEBUG("error: " << e.what());
+            return CONFIGURED_FAILED;
+        }
+        if (!dbt.pfile->isOpen()) {
+            LOG_ERROR("cannot open DBT file \"" << mDbtFilenameList.at(i) << "\"");
+            return CONFIGURED_FAILED;
+        }
+        cout << "Header: " << "\n"
+             << (string) *dbt.pfile << "\n";
+
+        // alloc buffer with the Data Size given in the header
+        dbt.cur.buffer = new char[dbt.pfile->getRecordSize()];
+        dbt.toProcess.buffer = new char[dbt.pfile->getRecordSize()];
+
+        dbt_.insert(i, dbt);
+
+        // Reading of the first data to put in the buffer_
+        dbt_[i].pfile->readRecord(dbt_[i].cur.t, dbt_[i].cur.tr, reinterpret_cast<char *>(dbt_[i].cur.buffer));
+
+        if (dbt_.at(i).pfile->getRecordCount() > 0) {
+            if (dbt_.at(i).pfile->getTimeMin() < tMin_) {
+                tMin_ = dbt_.at(i).pfile->getTimeMin();
+            }
+            if (dbt_.at(i).pfile->getTimeMax() > tMax_ ) {
+                tMax_ = dbt_.at(i).pfile->getTimeMax();
+            }
+            Q_EMIT tMinMaxIs(tMin_, tMax_);
+        }
+    }
+
+    return CONFIGURED_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Starts activity of the file manager
+void DbtPlyFileManager::startActivity()
+{ 
+    // graphical user interface
+    if (mShowGui) {
+        displayUI();
+    }
+
+    deltaTDbtTabLoop_ = 0;
+
+    mode_ = mEngine->replayMode();
+    LOG_INFO("replay mode " << mode_);
+    start();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Stops activity of the file manager
+void DbtPlyFileManager::stopActivity()
+{ 
+    deltaTDbtTabLoop_ = 0;
+}
+
+void DbtPlyFileManager::displayUI()
+{
+    //LOG_WARN("component '" << componentName << "' has no user interface. Please set ui property to 0 in your XML configuration");
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Goes back to the beginning of the file.
+/// Places the descriptor to the first data.
+void DbtPlyFileManager::beginfile()
+{
+    LOG_DEBUG("called beginfile()");
+    for (QList<dbtStructFile>::iterator it = dbt_.begin(), itend = dbt_.end(); it != itend; ++it) {
+        dbtStructFile & dbtFile = *it;
+
+        dbtFile.pfile->goToDataBegin();
+        // reinitialize buffer and times to the 1st value
+        dbtFile.pfile->readRecord(dbtFile.cur.t, dbtFile.cur.tr, reinterpret_cast<char *>(dbtFile.cur.buffer));
+    }
+}
+
+bool DbtPlyFileManager::processDbtFileHdfile(dbtStructFile & dbtFile, DbiteFile::ReadDirection direction)
+{
+    dbtFile.toProcess.t = dbtFile.cur.t;
+    dbtFile.toProcess.tr = dbtFile.cur.tr;
+    memcpy(dbtFile.toProcess.buffer, dbtFile.cur.buffer, dbtFile.pfile->getRecordSize());
+
+    if (!dbtFile.pfile->readRecord(dbtFile.cur.t, dbtFile.cur.tr, reinterpret_cast<char *>(dbtFile.cur.buffer), direction)) {
+        LOG_WARN("EOF or there was a problem in read function, no data read");
+        dbtFile.cur.t = tMax_;
+        return false;
+    }
+    return true;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// play mode 1
+/// the player replays only the last data that has not been yet replayed
+void DbtPlyFileManager::playMode1(road_time_t tDbt, bool reverse)
+{
+    DbiteFile::ReadDirection readDirection = DbiteFile::ReadForward;
+    if (reverse) {
+        readDirection = DbiteFile::ReadBackward;
+    }
+
+    dbtIndex_ = 0;
+    for (QList<dbtStructFile>::iterator it = dbt_.begin(), itend = dbt_.end(); it != itend; ++it) {
+        dbtStructFile & dbtFile = *it;
+
+        bool mustProcess = false;
+        if (reverse) {
+            // backward
+            while (dbtFile.cur.t > tDbt) {
+                mustProcess = true;
+                if (!processDbtFileHdfile(dbtFile, readDirection)) {
+                    break;
+                }
+            }
+        } else {
+            // forward
+            while (dbtFile.cur.t < tDbt) {
+                mustProcess = true;
+                if (!processDbtFileHdfile(dbtFile, readDirection)) {
+                    break;
+                }
+            }
+        }
+
+        if (mustProcess) {
+            processData(dbtFile.cur.t, dbtFile.toProcess.tr, dbtFile.cur.buffer);
+        }
+        ++dbtIndex_;
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// play mode 2
+// the player replays all the data that have not been yet replayed
+void DbtPlyFileManager::playMode2(road_time_t tDbt, bool reverse)
+{
+    DbiteFile::ReadDirection readDirection = DbiteFile::ReadForward;
+    if (reverse) {
+        readDirection = DbiteFile::ReadBackward;
+    }
+
+    dbtIndex_ = 0;
+    for (QList<dbtStructFile>::iterator it = dbt_.begin(), itend = dbt_.end(); it != itend; ++it) {
+        dbtStructFile & dbtFile = *it;
+
+        if (reverse) {
+            // backward
+            while (dbtFile.cur.t > tDbt) {
+                processDbtFileHdfile(dbtFile, readDirection);
+                processData(dbtFile.cur.t, dbtFile.toProcess.tr, dbtFile.cur.buffer);
+            }
+        } else {
+            // forward
+            while (dbtFile.cur.t < tDbt) {
+                processDbtFileHdfile(dbtFile, readDirection);
+                processData(dbtFile.cur.t, dbtFile.toProcess.tr, dbtFile.cur.buffer);
+            }
+        }
+        ++dbtIndex_;
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// slot 
+// Called by the player engine 
+// Before replaying data, this funtion verifies that the replayed time is  
+// included in the time interval of the data and that the time elapsed between  
+// the estimation of this replayed time is not too big
+void DbtPlyFileManager::playData(road_time_t tDbt,road_time_t tNow, bool reverse)
+{
+    // If tDbt is not included in the time interval of the data, we don't have any data to play
+    if ((tDbt>tMax_) || (tDbt<tMin_)) {
+        return;
+    }
+
+    // measure the difference between the current time and the tNow used to calculate the tDbt
+    int deltaT = road_time() - tNow;
+    deltaTDbtTab_[(deltaTDbtTabLoop_++)%1000] = deltaT;
+    if (deltaT > kMaxPendingTimeFromEngineMicrosecs) {
+        LOG_WARN(componentName << ": data not replayed: elapsed time since engine notification too big:" << deltaT << "us");
+        return;
+    }
+
+    timeToRead_ = tDbt;
+    reverse_ = reverse;
+    sync_->release();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Main loop of the thread.
+/// Only synchronize on the player engine and when activated call the correct
+/// replay method.
+void DbtPlyFileManager::run()
+{
+    for (;;) {
+        sync_->acquire();
+
+        switch (mode_) {
+        case 1:
+            playMode1(timeToRead_, reverse_);
+            break;
+
+        case 2:
+            playMode2(timeToRead_, reverse_);
+            break;
+
+        default:
+            break;
+        }
+    }
+}
Index: tags/0.0.2/src/DBITEPlayerLib/DbtPlyTrigger.cpp
===================================================================
--- tags/0.0.2/src/DBITEPlayerLib/DbtPlyTrigger.cpp	(revision 257)
+++ tags/0.0.2/src/DBITEPlayerLib/DbtPlyTrigger.cpp	(revision 257)
@@ -0,0 +1,77 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version $Id$
+
+#include <Pacpus/DbitePlayer/DbtPlyTrigger.h>
+
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/Log.h>
+
+namespace pacpus {
+
+DECLARE_STATIC_LOGGER("pacpus.core.DbtPlyTrigger");
+
+// Construction de la fabrique de composant DbtPlyTrigger
+//static ComponentFactory<DbtPlyTrigger> factory("DbtPlyTrigger");
+
+DbtPlyTrigger::DbtPlyTrigger(QString name)
+    : ComponentBase(name)
+    , mEngine(NULL)
+{
+    THREAD_ALIVE = false;
+}
+
+DbtPlyTrigger::~DbtPlyTrigger()
+{ 
+}
+
+ComponentBase::COMPONENT_CONFIGURATION DbtPlyTrigger::configureComponent(XmlComponentConfig /*config*/)
+{
+    ComponentManager * mgr = ComponentManager::getInstance();
+    // we get a pointer to the engine component
+    mEngine = dynamic_cast<DbtPlyEngine *>(mgr->getComponent("dbiteEngine"));
+    if (NULL == mEngine) {
+        LOG_FATAL("cannot get a pointer of the 'dbiteEngine' component");
+        return CONFIGURED_FAILED;
+    }
+    connect(this, SIGNAL(triggerSig()),
+            mEngine,SLOT(engReceiver()),
+            Qt::DirectConnection);
+
+    return CONFIGURED_OK;
+}
+
+void DbtPlyTrigger::startActivity()
+{   
+    THREAD_ALIVE = true;
+    start();
+}
+
+void DbtPlyTrigger::stopActivity()
+{ 
+    THREAD_ALIVE = false;
+}
+
+// The thread is started when the user press the play button
+void DbtPlyTrigger::run()
+{
+#ifdef WIN32
+    timeBeginPeriod(1);
+#endif
+
+    while(THREAD_ALIVE) {
+        if (mEngine->isPlaying()) {
+            Q_EMIT triggerSig();
+        }
+        msleep(1);
+    }
+
+#ifdef WIN32
+    timeEndPeriod(1);
+#endif 
+}
+
+} // namespace pacpus
Index: tags/0.0.2/src/DBITEPlayerLib/DbtPlyUserInterface.cpp
===================================================================
--- tags/0.0.2/src/DBITEPlayerLib/DbtPlyUserInterface.cpp	(revision 257)
+++ tags/0.0.2/src/DBITEPlayerLib/DbtPlyUserInterface.cpp	(revision 257)
@@ -0,0 +1,335 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version $Id$
+
+#include <Pacpus/DbitePlayer/DbtPlyUserInterface.h>
+
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/Log.h>
+
+#include <cassert>
+#include <cmath> // fabs
+#include <qapplication.h>   // quit()
+#include <qboxlayout.h>
+#include <qbuttongroup.h>
+#include <qcheckbox.h>
+#include <qgroupbox.h>
+#include <qlabel.h>
+#include <qpushbutton.h>
+#include <qslider.h>
+#include <qtablewidget.h>
+
+namespace pacpus {
+
+class DbtPlyEngineState;
+
+DECLARE_STATIC_LOGGER("pacpus.core.DbtPlyUserInterface");
+
+//static ComponentFactory<DbtPlyUserInterface> factory("DbtPlyUserInterface");
+
+////////////////////////////////////////////////////////////////////////////////
+DbtPlyUserInterface::DbtPlyUserInterface(QString name)
+    : ComponentBase(name)
+    , componentTableWidget(NULL)
+    , mEngine(NULL)
+{
+    relTime_ = absTime_ = tMin_ = tMax_ = 0;
+
+    setLayout(createMainLayout());
+
+    show();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+DbtPlyUserInterface::~DbtPlyUserInterface()
+{  
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ComponentBase::COMPONENT_CONFIGURATION DbtPlyUserInterface::configureComponent(XmlComponentConfig /*config*/)
+{
+    ComponentManager * mgr = ComponentManager::getInstance();
+    mEngine = dynamic_cast<DbtPlyEngine *>(mgr->getComponent("dbiteEngine"));
+    if (NULL == mEngine) {
+        LOG_FATAL("cannot get a pointer of the 'dbiteEngine' component");
+        return CONFIGURED_FAILED;
+    }
+
+    connectButtons();
+    connectDisplay();
+    connectSlider();
+
+    updateComponentList();
+
+    return ComponentBase::CONFIGURED_OK;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Starts activity.
+void DbtPlyUserInterface::startActivity()
+{ 
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Stops activity.
+void DbtPlyUserInterface::stopActivity()
+{ 
+}
+
+////////////////////////////////////////////////////////////////////////////////
+/// Overloaded.
+/// Invoked on close event.
+void DbtPlyUserInterface::closeEvent(QCloseEvent * /*event*/)
+{
+    qApp->quit();
+}
+
+void DbtPlyUserInterface::displayStateSlot(DbtPlyEngineState * state, float speed)
+{
+    LOG_DEBUG("displayStateSlot, state = " << state->toString() << ", speed = " << speed);
+
+    QString speedString;
+    if (fabs(speed) >= 1) {
+        speedString = speedString.setNum((int)speed);
+    } else {
+        speedString = "1/" + speedString.setNum((int)(1.0 / speed));
+    }
+
+    QString stateAndSpeedText;
+    stateAndSpeedText = state->toString() + " - speed : " + speedString;
+
+    lab->setText(stateAndSpeedText);
+    lab->adjustSize();
+}
+
+void DbtPlyUserInterface::displayMinMaxTime(road_time_t min, road_time_t max)
+{
+    timeMinValue->setText(QString::number(min));
+    tMin_ = min;
+    timeMaxValue->setText(QString::number(max));
+    tMax_ = max;
+    timeSlider->setMaximum(tMax_-tMin_);
+}
+
+void DbtPlyUserInterface::displayTime(road_time_t time)
+{
+    absTime_ = time;
+    if ((time - tMin_ - relTime_) > 40000 )
+    {
+        // refresh at 25Hz rate
+        relTime_ = (int)(time - tMin_);
+        timeCurValue->setText(QString::number(relTime_/1e6) + " - " + QString::number(absTime_));
+        timeSlider->setValue(relTime_);
+    }
+}
+
+int DbtPlyUserInterface::getTime()
+{
+    return timeSlider->value();
+}
+
+void DbtPlyUserInterface::resetTime()
+{
+    timeSlider->setValue(0);
+}
+
+QLayout * DbtPlyUserInterface::createMainLayout()
+{
+    QGroupBox * mainGroupBox = createControlGroupBox();
+    QGroupBox * componentListGroupBox = createComponentListGroupBox();
+
+    QGridLayout * generalLayout = new QGridLayout(this);
+    generalLayout->addWidget(mainGroupBox, /* row = */ 0, /* column = */ 0, /* rowSpan = */ 1, /* columnSpan = */ 3);
+    generalLayout->addWidget(componentListGroupBox, /* row = */ 1, /* column = */ 0, /* rowSpan = */ 1, /* columnSpan = */ 1);
+
+    return generalLayout;
+}
+
+QGroupBox * DbtPlyUserInterface::createControlGroupBox()
+{
+    const int kButtonWidthInPixels = 20;
+    const int kButtonHeightInPixels = 20;
+
+    QGridLayout * mainLayout = new QGridLayout(this);
+
+    butGroup = new QButtonGroup (this );
+    playBut = new QPushButton ("|>", this);
+    playBut->resize(kButtonWidthInPixels, kButtonHeightInPixels);
+    butGroup->addButton(playBut,1);
+    mainLayout->addWidget(playBut,0,0);
+
+    pauseBut = new QPushButton ("||", this);
+    pauseBut->resize(kButtonWidthInPixels, kButtonHeightInPixels);
+    butGroup->addButton(pauseBut,2);
+    mainLayout->addWidget(pauseBut,0,1);
+
+    stopBut = new QPushButton ("O", this);
+    stopBut->resize(kButtonWidthInPixels, kButtonHeightInPixels);
+    butGroup->addButton(stopBut,3);
+    mainLayout->addWidget(stopBut,0,2);
+
+    speedUpBut = new QPushButton ("+", this);
+    speedUpBut->resize(kButtonWidthInPixels, kButtonHeightInPixels);
+    butGroup->addButton(speedUpBut,4);
+    mainLayout->addWidget(speedUpBut,1,0);
+
+    speedDownBut = new QPushButton ("-", this);
+    speedDownBut->resize(kButtonWidthInPixels, kButtonHeightInPixels);
+    butGroup->addButton(speedDownBut,5);
+    mainLayout->addWidget(speedDownBut,1,1);
+
+    rev = new QCheckBox(tr("Reverse"), this);
+    mainLayout->addWidget(rev,1,2);
+
+    mainLayout->columnMinimumWidth(1);
+
+    lab = new QLabel (this);
+    lab->setText(tr("Player State"));
+    lab->adjustSize();
+    mainLayout->addWidget(lab,2,0,1,3);
+
+    timeMinTitle = new QLabel(this);
+    timeMinTitle->setText(tr("Min time"));
+    timeMinTitle->adjustSize();
+    mainLayout->addWidget(timeMinTitle,3,0);
+
+    timeMinValue = new QLabel(this);
+    timeMinValue->setText("0");
+    timeMinValue->adjustSize();
+    timeMinValue->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+    mainLayout->addWidget(timeMinValue,3,1,1,2);
+
+    timeMaxTitle = new QLabel(this);
+    timeMaxTitle->setText(tr("Max time"));
+    timeMaxTitle->adjustSize();
+    mainLayout->addWidget(timeMaxTitle,4,0);
+
+    timeMaxValue = new QLabel(this);
+    timeMaxValue->setText("0");
+    timeMaxValue->adjustSize();
+    timeMaxValue->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+    mainLayout->addWidget(timeMaxValue,4,1,1,2);
+
+    timeCurTitle = new QLabel(this);
+    timeCurTitle->setText(tr("Current time"));
+    timeCurTitle->adjustSize();
+    mainLayout->addWidget(timeCurTitle,5,0);
+
+    timeCurValue = new QLabel(this);
+    timeCurValue->setText("0 - 0");
+    timeCurValue->adjustSize();
+    timeCurValue->setFrameStyle(QFrame::Panel | QFrame::Sunken);
+    mainLayout->addWidget(timeCurValue,5,1,1,2);
+
+    timeSlider = new QSlider(Qt::Horizontal, this);
+    timeSlider->setMinimum(0);
+    timeSlider->adjustSize();
+    mainLayout->addWidget(timeSlider, /* row = */ 6, /* column = */ 0, /* rowSpan = */ 1, /* columnSpan = */ 3);
+
+    QGroupBox * mainGroupBox = new QGroupBox(tr("Control"));
+    mainGroupBox->setLayout(mainLayout);
+
+    return mainGroupBox;
+}
+
+QGroupBox * DbtPlyUserInterface::createComponentListGroupBox()
+{
+    QGroupBox * componentListGroupBox = new QGroupBox(tr("Component list"));
+
+    QBoxLayout * componentListLayout = new QBoxLayout(QBoxLayout::TopToBottom, this);
+    componentListGroupBox->setLayout(componentListLayout);
+
+    componentTableWidget = new QTableWidget(this);
+    componentListLayout->addWidget(componentTableWidget);
+
+    return componentListGroupBox;
+}
+
+void DbtPlyUserInterface::updateComponentList()
+{
+    ComponentManager * mgr = ComponentManager::getInstance();
+    QStringList componentNames = mgr->getAllComponentsName();
+
+    componentTableWidget->setRowCount(componentNames.size());
+    componentTableWidget->setColumnCount(2);
+    QStringList labels;
+    labels << tr("Name") << tr("State") << tr("Details");
+    componentTableWidget->setHorizontalHeaderLabels(labels);
+
+    int idx = 0;
+    for (QStringList::const_iterator it = componentNames.constBegin(), itend = componentNames.constEnd(); it != itend; ++it, ++idx) {
+        QString componentName = *it;
+        LOG_DEBUG("adding to component list: " << componentName);
+        componentTableWidget->setItem(idx, 0, new QTableWidgetItem(componentName));
+
+        ComponentBase * component = mgr->getComponent(componentName);
+        if (component) {
+            COMPONENT_STATE state = component->getState();
+
+            QString stateString;
+            switch (state) {
+            case STOPPED:
+                stateString = tr("Stopped");
+                break;
+            case NOT_MONITORED:
+                stateString = tr("Not monitored");
+                break;
+            case MONITOR_OK:
+                stateString = tr("Monitor OK");
+                break;
+            case MONITOR_NOK:
+                stateString = tr("Monitor wrong");
+                break;
+
+            default:
+                stateString = tr("UNKNOWN");
+                break;
+            }
+            componentTableWidget->setItem(idx, 1, new QTableWidgetItem(stateString));
+
+            // TODO: ADD component type and some detailed information (e.g. parameters)
+            //QString componentInfo = component->getDetails();
+            //componentTableWidget->setItem(idx, 2, new QTableWidgetItem(componentInfo));
+        }
+    }
+}
+
+void DbtPlyUserInterface::connectButtons()
+{
+    connect(playBut, SIGNAL(clicked()),
+        mEngine, SLOT(playEvent()));
+    connect(pauseBut, SIGNAL(clicked()),
+        mEngine, SLOT(pauseEvent()));
+    connect(stopBut, SIGNAL(clicked()),
+        mEngine, SLOT(stopEvent()));
+    connect(speedUpBut, SIGNAL(clicked()),
+        mEngine, SLOT(speedUpEvent()));
+    connect(speedDownBut, SIGNAL(clicked()),
+        mEngine, SLOT(speedDownEvent()));
+}
+
+void DbtPlyUserInterface::connectDisplay()
+{
+    connect(mEngine, SIGNAL(displayStateSig(DbtPlyEngineState *, float)),
+        this, SLOT(displayStateSlot(DbtPlyEngineState *, float)));
+
+    connect (mEngine, SIGNAL(timeMinMax(road_time_t, road_time_t)),
+        this, SLOT(displayMinMaxTime(road_time_t , road_time_t)));
+    connect (mEngine, SIGNAL(curReplayTime(road_time_t)),
+        this, SLOT(displayTime(road_time_t)));
+    connect (rev, SIGNAL(toggled(bool)),
+        mEngine, SLOT(changeDirection(bool)));
+}
+
+void DbtPlyUserInterface::connectSlider()
+{
+    connect (timeSlider, SIGNAL(sliderPressed()),
+        mEngine, SLOT(pauseEvent()));
+    connect (timeSlider, SIGNAL(sliderReleased()),
+        mEngine, SLOT(playEvent()));
+}
+
+} // namespace pacpus
Index: tags/0.0.2/src/FileLib/CMakeLists.txt
===================================================================
--- tags/0.0.2/src/FileLib/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/src/FileLib/CMakeLists.txt	(revision 257)
@@ -0,0 +1,58 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+project(FileLib)
+
+# ========================================
+# Compiler definitions
+# ========================================
+add_definitions(
+    -DFILELIB_EXPORTS
+)
+
+# ========================================
+# List of sources
+# ========================================
+set(
+    PROJECT_SRCS
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteException.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFile.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/DbiteFileTypes.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/FileLibConfig.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/hdfile_header_t
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
+    src/DbiteException.cpp
+    src/DbiteFile.cpp
+)
+
+# ========================================
+# Build a library
+# ========================================
+pacpus_add_library(
+    ${PROJECT_NAME} SHARED
+    ${PROJECT_SRCS}
+)
+
+# ========================================
+# Libraries
+# ========================================
+target_link_libraries(
+    ${PROJECT_NAME}
+        ${PACPUS_DEPENDENCIES_LIB}
+		PacpusLib
+)
+
+# ========================================
+# Install
+# ========================================
+pacpus_install(${PROJECT_NAME})
+
+# ========================================
+# Folder
+# ========================================
+pacpus_folder(${PROJECT_NAME} "libraries")
Index: tags/0.0.2/src/FileLib/src/DbiteException.cpp
===================================================================
--- tags/0.0.2/src/FileLib/src/DbiteException.cpp	(revision 257)
+++ tags/0.0.2/src/FileLib/src/DbiteException.cpp	(revision 257)
@@ -0,0 +1,19 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include <Pacpus/kernel/DbiteException.h>
+
+using namespace pacpus;
+
+DbiteException::DbiteException(const std::string& what)
+    : PacpusException(what)
+{
+}
+
+DbiteException::~DbiteException() throw()
+{
+}
Index: tags/0.0.2/src/FileLib/src/DbiteFile.cpp
===================================================================
--- tags/0.0.2/src/FileLib/src/DbiteFile.cpp	(revision 257)
+++ tags/0.0.2/src/FileLib/src/DbiteFile.cpp	(revision 257)
@@ -0,0 +1,801 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @version $Id$
+
+#include <Pacpus/kernel/DbiteFile.h>
+#include <Pacpus/kernel/DbiteException.h>
+#include <Pacpus/kernel/DbiteFileTypes.h>
+#include <Pacpus/kernel/Log.h>
+
+#include <cassert>
+#include <cmath>
+#include <iostream>
+#include <limits>
+#include <sstream>
+
+using namespace pacpus;
+using namespace std;
+
+// FIXME: record size is only 8-bit long!
+typedef int8_t VariableDataSizeT;
+
+DECLARE_STATIC_LOGGER("pacpus.core.DbiteFile");
+
+namespace pacpus
+{
+  VariableDataSizeTag VariableDataSize;
+  ReadModeTag ReadMode;
+  WriteModeTag WriteMode;
+  DiagnoseModeTag DiagnoseMode;
+}
+
+bool doesFileExist(const string & path);
+
+DbiteFile::DbiteFile()
+    : mIsWriting(false)
+{
+    setPath("");
+
+    (void) ReadMode; // unused
+    (void) WriteMode; // unused
+    (void) VariableDataSize; // unused
+    (void) DiagnoseMode; // unused
+}
+
+DbiteFile::~DbiteFile()
+{
+    if (isOpen()) {
+        close();
+    }
+}
+
+DbiteFile::operator string()
+{
+    static const int64_t kMicrosInSecond = 1000 * 1000;
+    stringstream os;
+
+    os << "Signature    : " << getSignature() << endl;
+    os << "Version      : " << getVersion() << endl;
+    os << "Header size  : " << getDataOffset() << " [bytes]" << endl;
+    os << "Record size  : " << getRecordSize() << " [bytes]" << endl;
+    os << "Data type    : " << getType() << endl;
+    os << "Time min.    : " << getTimeMin() << endl;
+    os << "Time max.    : " << getTimeMax() << endl;
+    os << "Duration     : " << (getTimeMax() - getTimeMin()) / kMicrosInSecond << " [seconds]" << endl;
+    os << "File size    : " << getFileSize() << " [bytes]" << endl;
+    os << "Record count : " << getRecordCount() << endl;
+
+    return os.str();
+}
+
+const string & DbiteFile::getPath() const
+{
+    return mPath;
+}
+
+void DbiteFile::setPath(const string & path)
+{
+    mPath = path;
+}
+
+void DbiteFile::open(const string & path, ReadModeTag)
+{
+    mIsWriting = false;
+    if (isOpen()) {
+        LOG_DEBUG("file is already open, closing...");
+        close();
+    }
+
+    setPath(path);
+
+    mFile.open(getPath().c_str(), ios_base::binary | ios_base::in);
+    try {
+        checkFileOpen();
+    } catch (DbiteException & e) {
+        LOG_ERROR("Dbite exception: " << e.what());
+        close();
+        throw DbiteException("cannot open file for reading");
+    }
+
+    try {
+        readHeader();
+    } catch (DbiteException & e) {
+        LOG_ERROR("Dbite exception: " << e.what());
+        // TODO: readAndDiagnoseHeader();
+        close();
+        throw DbiteException("cannot read header");
+    }
+    verifyHeader();
+    goToDataBegin();
+}
+
+void DbiteFile::open(const string & path, WriteModeTag)
+{
+    openWriteMode(path);
+}
+
+void DbiteFile::open(const string & path, WriteModeTag, hdfile_header_t::DataTypeT type, hdfile_header_t::DataSizeT dataSize)
+{
+    openWriteMode(path, type);
+    setRecordSize(dataSize);
+}
+
+void DbiteFile::open(const string & path, WriteModeTag, hdfile_header_t::DataTypeT type, VariableDataSizeTag tag)
+{
+    openWriteMode(path, type);
+    setRecordSize(tag);
+}
+
+void DbiteFile::openWriteMode(const string & path, hdfile_header_t::DataTypeT type)
+{
+    openWriteMode(path);
+    setType(type);
+}
+
+void DbiteFile::openWriteMode(const string & path)
+{
+    mIsWriting = true;
+    if (isOpen()) {
+        LOG_DEBUG("file is already open, closing...");
+        close();
+    }
+
+    setPath(path);
+    bool fileExists = doesFileExist(path);
+    ios_base::openmode openmode;
+    if (fileExists) {
+        openmode = ios_base::binary | ios_base::in | ios_base::out;
+    } else {
+        openmode = ios_base::binary | ios_base::out;
+    }
+    mFile.open(getPath().c_str(), openmode);
+    if (!isOpen()) {
+        LOG_ERROR("cannot open file for writing");
+        throw DbiteException("cannot open file for writing");
+    }
+
+    if (fileExists) {
+        // file exists
+        LOG_DEBUG("file already exists, appending");
+        try {
+            readHeader();
+            // TODO: check if same type and record size
+        } catch (DbiteException & e) {
+            LOG_ERROR("Dbite exception: " << e.what());
+            // TODO: readAndDiagnoseHeader();
+            close();
+            throw DbiteException("cannot read header");
+        }
+    } else {
+        // file does not exist
+        initializeHeader();
+        writeHeader();
+    }
+    //goToDataBegin();
+    goToFileEnd();
+}
+
+void DbiteFile::initializeHeader()
+{
+    setSignature();
+    setType(FILE_DBT_UNKNOWN);
+    setVersion(VERSION_NUMBER);
+    setDataOffset(sizeof(hdfile_header_t));
+    setRecordSize(0);
+    // same as header size
+    setFileSize(getDataOffset());
+    setTimeMin(numeric_limits<road_time_t>::max());
+    setTimeMax(numeric_limits<road_time_t>::min());
+    setRecordCount(0);
+}
+
+void DbiteFile::close()
+{
+    if (!isOpen()) {
+        LOG_WARN("file is not open");
+        return;
+    }
+    closeDbite();
+    setPath("");
+}
+
+void DbiteFile::closeDbite()
+{
+    if (mIsWriting) {
+        try {
+            writeHeader();
+        } catch (DbiteException & e) {
+            LOG_ERROR("cannot write header on close: " << e.what());
+        }
+    }
+    mFile.close();
+}
+
+bool DbiteFile::isOpen() const
+{
+    return mFile.is_open();
+}
+
+void DbiteFile::goToFileBegin()
+{
+    LOG_DEBUG("goToFileBegin()");
+    mFile.clear();
+    setReadPosition(0);
+    setWritePosition(0);
+}
+
+void DbiteFile::goToDataBegin()
+{
+    LOG_DEBUG("goToDataBegin()");
+    LOG_TRACE("getDataOffset() = " << getDataOffset());
+    mFile.clear();
+    setReadPosition(getDataOffset());
+    setWritePosition(getDataOffset());
+}
+
+void DbiteFile::goToFileEnd()
+{
+    LOG_TRACE("goToFileEnd()");
+    LOG_TRACE("getFileSize() = " << getFileSize());
+    mFile.clear();
+    // do not use fstream::seekg/seekp(0, ios_base::end),
+    // because in case of write failure,
+    // we should write at position=getFileSize() which can be before the actual file end
+    setReadPosition(getFileSize());
+    setWritePosition(getFileSize());
+}
+
+int64_t DbiteFile::getReadPosition()
+{
+    checkFileOpen();
+    return mFile.tellg();
+}
+
+int64_t DbiteFile::getWritePosition()
+{
+    checkFileOpen();
+    return mFile.tellp();
+}
+
+void DbiteFile::setReadPosition(int64_t offset, ios_base::seekdir direction)
+{
+    LOG_TRACE("set read position = " << offset << " direction = " << direction);
+    checkFileOpen();
+    mFile.seekg(offset, direction);
+    if (mFile.fail()) {
+        LOG_ERROR("failed to set write position");
+    }
+}
+
+void DbiteFile::setReadPosition(int64_t position)
+{
+    LOG_TRACE("set read position = " << position);
+    checkFileOpen();
+    mFile.seekg(position);
+    if (mFile.fail()) {
+        LOG_ERROR("failed to set read position");
+    }
+}
+
+void DbiteFile::setWritePosition(int64_t offset, ios_base::seekdir direction)
+{
+    LOG_TRACE("set write position = " << offset << " direction = " << direction);
+    checkFileOpen();
+    mFile.seekp(offset, direction);
+    if (mFile.fail()) {
+        LOG_ERROR("failed to set write position");
+    }
+}
+
+void DbiteFile::setWritePosition(int64_t position)
+{
+    LOG_TRACE("set write position = " << position);
+    checkFileOpen();
+    mFile.seekp(position);
+    if (mFile.fail()) {
+        LOG_ERROR("failed to set write position");
+    }
+}
+
+const hdfile_header_t & DbiteFile::getHeader() const
+{
+    return mHeader;
+}
+
+hdfile_header_t & DbiteFile::header()
+{
+    return mHeader;
+}
+
+void DbiteFile::readHeader()
+{
+    goToFileBegin();
+    checkFileOpen();
+    read((char *)(&mHeader), sizeof(mHeader));
+    LOG_DEBUG("file: " << getPath());
+    LOG_TRACE("header read:\n" << string(*this));
+}
+
+void DbiteFile::verifyHeader()
+{
+    // verify file size
+    const int64_t realFileSize = getRealFileSize();
+    const hdfile_header_t::FileSizeT fileSize = getFileSize();
+    if (realFileSize != fileSize) {
+        LOG_WARN("real file size different than header information");
+        LOG_INFO("real file size = " << realFileSize);
+        LOG_INFO("file size = " << fileSize);
+    }
+
+    if (getVersion() != VERSION_NUMBER) {
+        LOG_ERROR("bad version number");
+        throw DbiteException("bad version number");
+    }
+
+    if (!isSignatureCorrect()) {
+        LOG_ERROR("bad signature");
+        throw DbiteException("bad signature");
+    }
+
+    LOG_DEBUG("header verified");
+}
+
+void DbiteFile::writeHeader()
+{
+    LOG_DEBUG("writing header:\n" << string(*this));
+
+    goToFileBegin();
+
+    LOG_DEBUG("begin position=" << getWritePosition());
+
+    const size_t bytesToWrite = sizeof(mHeader);
+    write((char *)(&mHeader), bytesToWrite);
+    LOG_DEBUG("header written");
+
+    LOG_DEBUG("final position=" << getWritePosition());
+}
+
+string DbiteFile::getSignature() const
+{
+    const char signature[] = { getHeader().Signature[0], getHeader().Signature[1], getHeader().Signature[2], getHeader().Signature[3], '\0' };
+    return signature;
+}
+
+bool DbiteFile::isSignatureCorrect() const
+{
+    if ('R' != getHeader().Signature[0]) {
+        return false;
+    }
+    if ('O' != getHeader().Signature[1]) {
+        return false;
+    }
+    if ('A' != getHeader().Signature[2]) {
+        return false;
+    }
+    if ('D' != getHeader().Signature[3]) {
+        return false;
+    }
+    return true;
+}
+
+void DbiteFile::setSignature()
+{
+    header().Signature[0] = 'R';
+    header().Signature[1] = 'O';
+    header().Signature[2] = 'A';
+    header().Signature[3] = 'D';
+}
+
+hdfile_header_t::DataTypeT DbiteFile::getType() const
+{
+    return getHeader().Type;
+}
+
+void DbiteFile::setType(hdfile_header_t::DataTypeT type)
+{
+    header().Type = type;
+}
+
+hdfile_header_t::VersionT DbiteFile::getVersion() const
+{
+    return getHeader().VersionNumber;
+}
+
+void DbiteFile::setVersion(hdfile_header_t::VersionT version)
+{
+    header().VersionNumber = version;
+}
+
+hdfile_header_t::DataOffsetT DbiteFile::getDataOffset() const
+{
+    return getHeader().DataOffset;
+}
+
+void DbiteFile::setDataOffset(hdfile_header_t::DataOffsetT dataOffset)
+{
+    header().DataOffset = dataOffset;
+}
+
+hdfile_header_t::DataSizeT DbiteFile::getRecordSize() const
+{
+    return getHeader().DataSize;
+}
+
+void DbiteFile::setRecordSize(hdfile_header_t::DataSizeT recordSize)
+{
+    header().DataSize = recordSize;
+}
+
+void DbiteFile::setRecordSize(VariableDataSizeTag)
+{
+    header().DataSize = hdfile_header_t::kVariableRecordSize;
+}
+
+hdfile_header_t::FileSizeT DbiteFile::getFileSize() const
+{
+    if (getHeader().FileSize < getHeader().DataOffset) {
+        LOG_WARN("wrong header information: file size lesser than data offset");
+    }
+    return getHeader().FileSize;
+}
+
+void DbiteFile::setFileSize(hdfile_header_t::FileSizeT fileSize)
+{
+    header().FileSize = fileSize;
+}
+
+int64_t DbiteFile::getRealFileSize()
+{
+    checkFileOpen();
+
+    mFile.clear();
+    // save position
+    int64_t oldReadPosition = getReadPosition();
+    int64_t oldWritePosition = getWritePosition();
+
+    // go to file end and get position = file size
+    goToFileEnd();
+    int64_t fileSize = mFile.tellg();
+
+    // restore position
+    setReadPosition(oldReadPosition);
+    setWritePosition(oldWritePosition);
+    return fileSize;
+}
+
+road_time_t DbiteFile::getTimeMin() const
+{
+    return getHeader().TimeMin;
+}
+
+void DbiteFile::setTimeMin(road_time_t time)
+{
+    header().TimeMin = time;
+}
+
+road_time_t DbiteFile::getTimeMax() const
+{
+    return getHeader().TimeMax;
+}
+
+void DbiteFile::setTimeMax(road_time_t time)
+{
+    header().TimeMax = time;
+}
+
+hdfile_header_t::RecordCountT DbiteFile::getRecordCount() const
+{
+    return getHeader().NbRecords;
+}
+
+void DbiteFile::setRecordCount(hdfile_header_t::RecordCountT recourdCount)
+{
+    header().NbRecords = recourdCount;
+}
+
+bool DbiteFile::isVariableDataSize() const
+{
+    return hdfile_header_t::kVariableRecordSize == getRecordSize();
+}
+
+bool DbiteFile::readRecord(size_t recordIndex, road_time_t & time, road_timerange_t & timeRange, char * data, size_t & dataSize)
+{
+    LOG_DEBUG("reading record no. " << recordIndex);
+
+    if (isVariableDataSize()) {
+        LOG_ERROR("cannot read nth record in a variable");
+        throw DbiteException("cannot read nth record in a variable");
+    }
+
+    int64_t nthRecordPosition = getDataOffset() + recordIndex * (getRecordSize() + sizeof(road_time_t) + sizeof(road_timerange_t));
+    LOG_DEBUG(recordIndex << "th record position = " << nthRecordPosition);
+    if (getFileSize() < nthRecordPosition) {
+        LOG_WARN("wanted to read past the file end");
+        //throw DbiteException("wanted to read past the file end");
+    }
+    mFile.clear();
+    setReadPosition(nthRecordPosition);
+
+    return readRecord(time, timeRange, data, dataSize);
+}
+
+bool DbiteFile::readRecord(road_time_t & time, road_timerange_t & timeRange, char * buffer, size_t & bufferSize, const ReadDirection & direction)
+{
+    if (!buffer) {
+        LOG_WARN("data buffer must be a non-NULL pointer");
+        throw DbiteException("data buffer must be a non-NULL pointer");
+    }
+
+    return readRecordNoBufferCheck(time, timeRange, buffer, bufferSize, direction);
+}
+
+bool DbiteFile::readRecord(road_time_t & time, road_timerange_t & timeRange, char * buffer, const ReadDirection & direction)
+{
+    size_t bufferSize = getRecordSize();
+    return readRecord(time, timeRange, buffer, bufferSize, direction);
+}
+
+bool DbiteFile::readRecord(road_time_t & time, road_timerange_t & timeRange, const ReadDirection & direction)
+{
+    size_t bufferSize = 0;
+    return readRecordNoBufferCheck(time, timeRange, (char *) NULL, bufferSize, direction);
+}
+
+bool DbiteFile::readRecordNoBufferCheck(road_time_t & time, road_timerange_t & timeRange, char * buffer, size_t & bufferSize, const ReadDirection & direction)
+{
+    switch (direction) {
+    case ReadForward:
+        return readRecordForward(time, timeRange, buffer, bufferSize);
+        break;
+
+    case ReadBackward:
+        return readRecordBackward(time, timeRange, buffer, bufferSize);
+        break;
+
+    default:
+        assert(false && "wrong ReadDirection parameter");
+        return false;
+    }
+}
+
+bool DbiteFile::readRecordForward(road_time_t & time, road_timerange_t & timeRange, char * buffer, size_t & bufferSize)
+{
+    LOG_TRACE("reading record...");
+    checkFileOpen();
+
+    int64_t initialPosition = getReadPosition();
+    LOG_TRACE("initial position    = " << initialPosition);
+
+    ////////////////////////////////////////
+    // read acquisition time
+    mFile.read((char *)(&time), sizeof(time));
+    if (!mFile) {
+        if (isEndOfFile()) {
+            bufferSize = 0;
+            return false;
+        }
+        LOG_ERROR("cannot read acquisition time");
+        throw DbiteException("cannot read acquisition time");
+    }
+
+    ////////////////////////////////////////
+    // read acquisition time range
+    read((char *)(&timeRange), sizeof(timeRange));
+
+    ////////////////////////////////////////
+    // get data and record size
+    size_t dataSize = 0;
+    size_t recordSize = sizeof(time) + sizeof(timeRange);
+    if (isVariableDataSize()) {
+        recordSize += 2 * sizeof(VariableDataSizeT);
+
+        // read record size
+        VariableDataSizeT readVarDataSize = 0;
+        read((char *)(&readVarDataSize), sizeof(VariableDataSizeT));
+        dataSize = static_cast<size_t>(readVarDataSize);
+        LOG_DEBUG("variable record size = " << dataSize);
+    } else {
+        dataSize = getRecordSize();
+    }
+    recordSize += dataSize;
+
+    ////////////////////////////////////////
+    // read/skip data
+    if (buffer) {
+        if (bufferSize < dataSize) {
+            LOG_WARN("buffer is smaller than the record size");
+            LOG_INFO("buffer size = " << bufferSize);
+            LOG_INFO("data   size = " << dataSize);
+            throw DbiteException("buffer is smaller than the data size");
+            // TODO: don't throw exception, but read only as much data as possible
+        }
+
+        // read data
+        read(buffer, dataSize);
+
+        if (isVariableDataSize()) {
+            // read record size
+            VariableDataSizeT readVarDataSize = 0;
+            read((char *)(&readVarDataSize), sizeof(VariableDataSizeT));
+            size_t varDataSize = static_cast<size_t>(readVarDataSize);
+            LOG_TRACE("variable record size = " << varDataSize);
+
+            if (dataSize != varDataSize) {
+                LOG_WARN("corrupted data: data sizes differ");
+                LOG_INFO("data size (before) = " << dataSize);
+                LOG_INFO("data size (after)  = " << varDataSize);
+            }
+        }
+    } else {
+        // skip data
+        setReadPosition(dataSize, ios_base::cur);
+        if (isVariableDataSize()) {
+            setReadPosition(dataSize, ios_base::cur);
+        }
+    }
+
+    ////////////////////////////////////////
+    // check how many bytes were read/skipped
+    int64_t positionDifference = getReadPosition() - initialPosition;
+    if (positionDifference != recordSize) {
+        LOG_WARN("should be read   : " << recordSize << " [bytes]");
+        LOG_WARN("was actually read: " << positionDifference << " [bytes]");
+    }
+    return true;
+}
+
+bool DbiteFile::readRecordBackward(road_time_t & time, road_timerange_t & timeRange, char * buffer, size_t & bufferSize)
+{
+    int64_t initialPosition = getReadPosition();
+    LOG_TRACE("initial position    = " << initialPosition);
+
+    size_t dataSize = 0;
+    size_t recordSize = sizeof(time) + sizeof(timeRange);
+    if (isVariableDataSize()) {
+        recordSize += 2 * sizeof(VariableDataSizeT);
+
+        // go back sizeof(VariableDataSizeT)
+        setReadPosition(initialPosition - sizeof(VariableDataSizeT));
+
+        // read VariableDataSizeT
+        VariableDataSizeT readVarDataSize = 0;
+        read((char *)(&readVarDataSize), sizeof(VariableDataSizeT));
+        dataSize = static_cast<size_t>(readVarDataSize);
+        LOG_DEBUG("variable record size = " << dataSize);
+    } else {
+        dataSize = getRecordSize();
+    }
+    // recordSize = sizeof(time) + sizeof(timeRange) + dataSize + [2 * sizeof(VariableDataSizeT)]
+    recordSize += dataSize;
+
+    // go back to the beginning of the previous record
+    setReadPosition(initialPosition - recordSize);
+
+    bool readResult = false;
+    try {
+        // read forward
+        readResult = readRecordForward(time, timeRange, buffer, bufferSize);
+    } catch (DbiteException & e) {
+        setReadPosition(initialPosition);
+        throw e;
+    }
+
+    // go back to the beginning of the previous record
+    setReadPosition(initialPosition - recordSize);
+    return readResult;
+}
+
+bool DbiteFile::writeRecord(const road_time_t & time, const road_timerange_t & timeRange, const char * data, const size_t dataSize)
+{
+    LOG_DEBUG("writing record:" << "\t"
+              << "time=" << time << "\t"
+              << "time range=" << timeRange << "\t"
+              << "data size=" << dataSize);
+    checkFileOpen();
+
+    if (isVariableDataSize()) {
+        if (dataSize > static_cast<size_t>(numeric_limits<VariableDataSizeT>::max())) {
+            LOG_ERROR("variable data size too big");
+            throw DbiteException("variable data size too big");
+        }
+    }
+
+    int64_t initialPosition = getWritePosition();
+    LOG_TRACE("getFileSize() = " << getFileSize());
+    LOG_TRACE("getWritePosition() = " << getWritePosition());
+    assert(initialPosition == getFileSize());
+
+    size_t writtenBytes = 0;
+    try {
+        // write acquisition time, acquisition time range, data
+        // if variable size, then write record size before and after data
+
+        write((const char *)(&time), sizeof(time));
+        writtenBytes += sizeof(time);
+
+        write((const char *)(&timeRange), sizeof(timeRange));
+        writtenBytes += sizeof(timeRange);
+
+        if (isVariableDataSize()) {
+            write((const char *)(&dataSize), sizeof(VariableDataSizeT));
+            writtenBytes += sizeof(VariableDataSizeT);
+        }
+        write((const char *)(data), dataSize);
+        writtenBytes += dataSize;
+
+        if (isVariableDataSize()) {
+            write((const char *)(&dataSize), sizeof(VariableDataSizeT));
+            writtenBytes += sizeof(VariableDataSizeT);
+        }
+    } catch (DbiteException & e) {
+        LOG_ERROR("Dbite exception: " << e.what());
+        LOG_INFO("restoring initial write position");
+        
+        // on error, go back to record start
+        setWritePosition(- (int64_t) writtenBytes, ios_base::cur);
+        throw e;
+    }
+ 
+    // check how many bytes were written
+    int64_t finalPosition = getWritePosition();
+    int64_t positionDifference = finalPosition - initialPosition;
+    LOG_TRACE("position difference = " << positionDifference);
+    size_t totalRecordSize = dataSize + sizeof(time) + sizeof(timeRange);
+
+    setFileSize(finalPosition);     // FIXME: possible loss of data, conversion int64_t -> FileSizeT
+    setRecordCount(getRecordCount() + 1);
+    setTimeMin(min(getTimeMin(), time));
+    setTimeMax(max(getTimeMax(), time));
+
+    if (positionDifference != totalRecordSize) {
+        LOG_WARN("should be written   : " << totalRecordSize << " [bytes]");
+        LOG_WARN("was actually written: " << positionDifference << " [bytes]");
+    }
+    return true;
+}
+
+void DbiteFile::read(fstream::char_type * s, streamsize n)
+{
+    mFile.read(s, n);
+    if (!mFile) {
+        LOG_ERROR("cannot read data");
+        throw DbiteException("cannot read data");
+    }
+}
+
+void DbiteFile::write(const fstream::char_type * s, streamsize n)
+{
+    mFile.write(s, n);
+    if (!mFile) {
+        LOG_ERROR("cannot write data");
+        throw DbiteException("cannot write data");
+    }
+}
+
+bool DbiteFile::isEndOfFile()
+{
+    return mFile.eof();
+}
+
+void DbiteFile::checkFileOpen()
+{
+    if (!isOpen()) {
+        string errorMessage = "file is not open";
+        LOG_WARN(errorMessage);
+        throw DbiteException(errorMessage.c_str());
+    }
+}
+
+bool doesFileExist(const string & path)
+{
+    bool fileExist = false;
+    fstream f(path.c_str(), ios_base::in);
+    if (f.good()) {
+        fileExist = true;
+    }
+    f.close();
+    return fileExist;
+}
Index: tags/0.0.2/src/FileLib/test/TestFileLib.cpp
===================================================================
--- tags/0.0.2/src/FileLib/test/TestFileLib.cpp	(revision 257)
+++ tags/0.0.2/src/FileLib/test/TestFileLib.cpp	(revision 257)
@@ -0,0 +1,323 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @version    $Id$
+
+#ifdef _MSC_VER
+#   pragma warning(push)
+#   pragma warning(disable:4265 4365 4571 4640)
+#endif // _MSC_VER
+
+#define BOOST_TEST_MODULE TestFileLib
+#include <boost/test/unit_test.hpp>
+
+#ifdef _MSC_VER
+#   pragma warning(pop)
+#endif // _MSC_VER
+
+#include <boost/noncopyable.hpp>
+#include <cstdio>
+
+#include "kernel/DbiteException.h"
+#include "kernel/DbiteFile.h"
+#include "kernel/Log.h"
+
+DECLARE_STATIC_LOGGER("pacpus.core.TestFileLib");
+
+using namespace boost;
+using namespace pacpus;
+using namespace std;
+
+struct HasExceptionMessage
+        : noncopyable
+{
+    HasExceptionMessage(const string expectedMessage)
+        : mExpectedMessage(expectedMessage)
+    {
+    }
+
+    bool operator()(const DbiteException & ex)
+    {
+        BOOST_TEST_CHECKPOINT("what() =" << ex.what());
+        return mExpectedMessage == ex.what();
+    }
+
+private:
+    const string mExpectedMessage;
+};
+
+BOOST_AUTO_TEST_SUITE(suiteBasic)
+
+BOOST_AUTO_TEST_CASE(isNotOpenAfterConstruction)
+{
+    DbiteFile df;
+    BOOST_CHECK(!df.isOpen());
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE(suiteRead)
+
+BOOST_AUTO_TEST_CASE(opensFileWithoutData)
+{
+    DbiteFile df;
+    df.open("data/ok-empty-data.dbt", ReadMode);
+    
+    BOOST_CHECK_EQUAL(df.getDataOffset(), 48);
+    BOOST_CHECK_EQUAL(df.getPath(), "data/ok-empty-data.dbt");
+    BOOST_CHECK_EQUAL(df.getFileSize(), 48);
+    BOOST_CHECK_EQUAL(df.getFileSize(), df.getRealFileSize());
+    BOOST_CHECK_EQUAL(df.getRecordCount(), 0);
+    BOOST_CHECK_EQUAL(df.getRecordSize(), 32);
+    BOOST_CHECK_EQUAL(df.getSignature(), "ROAD");
+    BOOST_CHECK(df.getTimeMin() <= df.getTimeMax());
+    BOOST_CHECK_EQUAL(df.getType(), 12210);
+    BOOST_CHECK_EQUAL(df.getVersion(), 2);
+}
+
+BOOST_AUTO_TEST_CASE(readsFileSingleData)
+{
+    DbiteFile df;
+    df.open("data/ok-single-data.dbt", ReadMode);
+
+    BOOST_CHECK_EQUAL(df.getDataOffset(), 44);
+    BOOST_CHECK_EQUAL(df.getPath(), "data/ok-single-data.dbt");
+    BOOST_CHECK_EQUAL(df.getFileSize(), 64);
+    BOOST_CHECK_EQUAL(df.getFileSize(), df.getRealFileSize());
+    BOOST_CHECK_EQUAL(df.getRecordCount(), 1);
+    BOOST_CHECK_EQUAL(df.getRecordSize(), 8);
+    BOOST_CHECK_EQUAL(df.getSignature(), "ROAD");
+    BOOST_CHECK_EQUAL(df.getTimeMin(), df.getTimeMax());
+    BOOST_CHECK_EQUAL(df.getTimeMin(), static_cast<road_time_t>(1311847165023717));
+    BOOST_CHECK_EQUAL(df.getTimeMax(), static_cast<road_time_t>(1311847165023717));
+    BOOST_CHECK_EQUAL(df.getType(), 100);
+    BOOST_CHECK_EQUAL(df.getVersion(), 2);
+
+    road_time_t t;
+    road_timerange_t tr;
+    char data[8];
+
+    df.readRecord(t, tr, data);
+    BOOST_CHECK_EQUAL(t, static_cast<road_time_t>(1311847165023717));
+    BOOST_CHECK_EQUAL(tr, 0);
+
+    int64_t value = *((uint64_t *)data);
+    BOOST_CHECK_EQUAL(value, (int64_t) (static_cast<uint64_t>(15) << 32) + 0);
+}
+
+BOOST_AUTO_TEST_CASE(readsFileManyData)
+{
+    DbiteFile df;
+    df.open("data/ok-many-data.dbt", ReadMode);
+
+    BOOST_CHECK_EQUAL(df.getDataOffset(), 44);
+    BOOST_CHECK_EQUAL(df.getPath(), "data/ok-many-data.dbt");
+    BOOST_CHECK_EQUAL(df.getFileSize(), 344);
+    BOOST_CHECK_EQUAL(df.getFileSize(), df.getRealFileSize());
+    BOOST_CHECK_EQUAL(df.getRecordCount(), 15);
+    BOOST_CHECK_EQUAL(df.getRecordSize(), 8);
+    BOOST_CHECK_EQUAL(df.getSignature(), "ROAD");
+    BOOST_CHECK(df.getTimeMin() < df.getTimeMax());
+    BOOST_CHECK_EQUAL(df.getTimeMin(), static_cast<road_time_t>(1311847165023717));
+    BOOST_CHECK_EQUAL(df.getTimeMax(), static_cast<road_time_t>(1311847166112739));
+    BOOST_CHECK_EQUAL(df.getType(), 100);
+    BOOST_CHECK_EQUAL(df.getVersion(), 2);
+
+    for (uint64_t ir = 0; ir < df.getRecordCount(); ++ir) {
+        road_time_t t;
+        road_timerange_t tr;
+        char data[8];
+
+        df.readRecord(t, tr, data);
+        BOOST_CHECK(df.getTimeMin() <= t);
+        BOOST_CHECK(t <= df.getTimeMax());
+        BOOST_CHECK_EQUAL(tr, 0);
+
+        int64_t value = *((uint64_t *)data);
+        BOOST_CHECK_EQUAL(value, (int64_t) (ir << 32) + 0x01A0);
+    }
+}
+
+BOOST_AUTO_TEST_CASE(throwsDbiteExceptionOnEmptyFile)
+{
+    DbiteFile df;
+    BOOST_CHECK_THROW(
+        (df.open("data/bad-empty-file.dbt", ReadMode))
+        , DbiteException
+    );
+    BOOST_CHECK_EXCEPTION(
+        (df.open("data/bad-empty-file.dbt", ReadMode))
+        , DbiteException
+        , HasExceptionMessage("cannot read header")
+    );
+}
+
+BOOST_AUTO_TEST_CASE(throwsDbiteExceptionOnIncompleteHeader)
+{
+    DbiteFile df;
+    BOOST_CHECK_THROW(
+        (df.open("data/bad-incomplete-header.dbt", ReadMode))
+        , DbiteException
+    );
+    BOOST_CHECK_EXCEPTION(
+        (df.open("data/bad-incomplete-header.dbt", ReadMode))
+        , DbiteException
+        , HasExceptionMessage("cannot read header")
+    );
+}
+
+BOOST_AUTO_TEST_CASE(throwsDbiteExceptionOnBadSignature)
+{
+    DbiteFile df;
+    BOOST_CHECK_THROW(
+        (df.open("data/bad-signature.dbt", ReadMode))
+        , DbiteException
+    );
+    BOOST_CHECK_EXCEPTION(
+        (df.open("data/bad-signature.dbt", ReadMode))
+        , DbiteException
+        , HasExceptionMessage("bad signature")
+    );
+}
+
+BOOST_AUTO_TEST_CASE(throwsDbiteExceptionOnWrongVersion)
+{
+    DbiteFile df;
+    BOOST_CHECK_THROW(
+        (df.open("data/bad-wrong-version.dbt", ReadMode))
+        , DbiteException
+    );
+    BOOST_CHECK_EXCEPTION(
+        (df.open("data/bad-wrong-version.dbt", ReadMode))
+        , DbiteException
+        , HasExceptionMessage("bad version number")
+    );
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE(suiteWrite)
+
+BOOST_AUTO_TEST_CASE(throwsDbiteExceptionWhenFileDoesntExist)
+{
+    DbiteFile df;
+    const char * kInexistingFilename = "";
+    
+    BOOST_CHECK_THROW(
+        (df.open(kInexistingFilename, ReadMode))
+        , DbiteException
+    );
+    BOOST_CHECK_EXCEPTION(
+        (df.open(kInexistingFilename, ReadMode))
+        , DbiteException
+        , HasExceptionMessage("cannot open file for reading")
+    );
+}
+
+BOOST_AUTO_TEST_CASE(throwsDbiteExceptionWhenCannotCreateTheFile)
+{
+    DbiteFile df;
+    const char * kIllegalFilename = "";
+
+    BOOST_CHECK_THROW(
+        (df.open(kIllegalFilename, WriteMode))
+        , DbiteException
+    );
+    BOOST_CHECK_EXCEPTION(
+        (df.open(kIllegalFilename, WriteMode))
+        , DbiteException
+        , HasExceptionMessage("cannot open file for writing")
+    );
+}
+
+// TODO: creates file for writing when it doesn't exist
+// TODO: creates file for writing when it exists ??? warning?
+
+BOOST_AUTO_TEST_SUITE_END()
+
+BOOST_AUTO_TEST_SUITE(suiteWrite)
+    
+BOOST_AUTO_TEST_CASE(writesNormallyWhenTheFileDoesntExist)
+{
+    DbiteFile df;
+    const char * filename = "data/unexisting-file.dbt";
+
+    // delete file
+    ::remove(filename);
+
+    // create
+    df.open(filename, WriteMode, 0x4321, 0x1234);
+    BOOST_REQUIRE(df.isOpen());
+    df.close();
+    
+    df.open(filename, ReadMode);
+    BOOST_REQUIRE(df.isOpen());
+    BOOST_CHECK_EQUAL(df.getPath(), filename);
+    BOOST_CHECK_EQUAL(df.getFileSize(), df.getRealFileSize());
+    BOOST_CHECK_EQUAL(df.getRecordCount(), 0);
+    BOOST_CHECK_EQUAL(df.getRecordSize(), 0x1234);
+    BOOST_CHECK_EQUAL(df.getSignature(), "ROAD");
+    BOOST_CHECK_EQUAL(df.getType(), 0x4321);
+    BOOST_CHECK_EQUAL(df.getVersion(), 2);
+    df.close();
+}
+
+BOOST_AUTO_TEST_CASE(appendsAtEndWhenFileExists)
+{
+    DbiteFile df;
+    const hdfile_header_t::DataSizeT dataSize = 0x1234;
+    const hdfile_header_t::DataTypeT dataType = 0x4321;
+    const char * filename = "data/existing-file-no-data.dbt";
+    
+    road_time_t time = 0xAABBCCDD;
+    road_timerange_t tr = 0xABCD;
+    char data[dataSize];
+
+    // delete file
+    ::remove(filename);
+
+    // create
+    df.open(filename, WriteMode, dataType, 0x1234);
+    BOOST_REQUIRE(df.isOpen());
+    df.close();
+    BOOST_REQUIRE(!df.isOpen());
+
+    // append
+    df.open(filename, WriteMode, dataType, dataSize);
+    BOOST_REQUIRE(df.isOpen());
+    df.writeRecord(time++, tr, data, dataSize);
+    df.close();
+    BOOST_REQUIRE(!df.isOpen());
+
+    // check
+    df.open(filename, ReadMode);
+    BOOST_CHECK_EQUAL(df.getPath(), filename);
+    BOOST_CHECK_EQUAL(df.getFileSize(), df.getRealFileSize());
+    BOOST_CHECK_EQUAL(df.getRecordCount(), 1);
+    BOOST_CHECK_EQUAL(df.getRecordSize(), dataSize);
+    BOOST_CHECK_EQUAL(df.getSignature(), "ROAD");
+    BOOST_CHECK_EQUAL(df.getType(), dataType);
+    BOOST_CHECK_EQUAL(df.getVersion(), 2);
+    df.close();
+
+    // append
+    df.open(filename, WriteMode, dataType, dataSize);
+    BOOST_REQUIRE(df.isOpen());
+    df.writeRecord(time++, tr, data, dataSize);
+    df.close();
+    BOOST_REQUIRE(!df.isOpen());
+
+    // check
+    df.open(filename, ReadMode);
+    BOOST_CHECK_EQUAL(df.getPath(), filename);
+    BOOST_CHECK_EQUAL(df.getFileSize(), df.getRealFileSize());
+    BOOST_CHECK_EQUAL(df.getRecordCount(), 2);
+    BOOST_CHECK_EQUAL(df.getRecordSize(), dataSize);
+    BOOST_CHECK_EQUAL(df.getSignature(), "ROAD");
+    BOOST_CHECK_EQUAL(df.getType(), dataType);
+    BOOST_CHECK_EQUAL(df.getVersion(), 2);
+    df.close();
+}
+
+BOOST_AUTO_TEST_SUITE_END()
Index: tags/0.0.2/src/PacpusLib/CMakeLists.txt
===================================================================
--- tags/0.0.2/src/PacpusLib/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/src/PacpusLib/CMakeLists.txt	(revision 257)
@@ -0,0 +1,90 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+project(PacpusLib)
+
+# ========================================
+# Configure qt4
+# ========================================
+if(QT4_FOUND)
+    set(QT_USE_QTXML true)
+    include(${QT_USE_FILE})
+else()
+    message(ERROR "Qt4 needed")
+endif()
+
+# ========================================
+# Compiler definitions
+# ========================================
+add_definitions(
+    -DPACPUSLIB_EXPORTS
+    -DQT_NO_KEYWORDS
+    ${QT_DEFINITIONS}
+)
+
+# ========================================
+# Include directories
+# ========================================
+include_directories(
+    ${QT_INCLUDE_DIR}
+)
+
+# ========================================
+# List of sources
+# ========================================
+set(
+    PROJECT_SRCS
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/cstdint.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentBase.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactory.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentFactoryBase.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/ComponentManager.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/Log.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/pacpus.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusApplication.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusException.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/PacpusLibConfig.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/road_time.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlComponentConfig.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/kernel/XmlConfigFile.h
+    ./ComponentBase.cpp
+    ./ComponentFactoryBase.cpp
+    ./ComponentManager.cpp
+    ./Log.cpp
+    ./PacpusApplication.cpp
+    ./PacpusException.cpp
+    ./XmlComponentConfig.cpp
+    ./XmlConfigFile.cpp
+)
+
+# ========================================
+# Build a library
+# ========================================
+pacpus_add_library(
+    ${PROJECT_NAME} SHARED
+    ${PROJECT_SRCS}
+)
+
+# ========================================
+# Libraries
+# ========================================
+target_link_libraries(
+    ${PROJECT_NAME}
+    ${QT_LIBRARIES}
+    ${PACPUS_DEPENDENCIES_LIB}
+)
+
+# ========================================
+# Install
+# ========================================
+pacpus_install(${PROJECT_NAME})
+
+# ========================================
+# Folder
+# ========================================
+pacpus_folder(${PROJECT_NAME} "libraries")
Index: tags/0.0.2/src/PacpusLib/ComponentBase.cpp
===================================================================
--- tags/0.0.2/src/PacpusLib/ComponentBase.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusLib/ComponentBase.cpp	(revision 257)
@@ -0,0 +1,75 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version $Id$
+
+#include <Pacpus/kernel/ComponentBase.h>
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/Log.h>
+
+using namespace pacpus;
+
+DECLARE_STATIC_LOGGER("pacpus.core.ComponentBase");
+
+ComponentBase::ComponentBase(const QString& name)
+  : componentName(name)
+  , recording(true)
+  , THREAD_ALIVE(true)
+  , mIsActive(false)
+  , mgr(NULL)
+  , componentState_(NOT_MONITORED)
+{
+    LOG_TRACE("constructor");
+    // Get a pointer on the instance of ComponentManager.
+    mgr = ComponentManager::getInstance();
+    LOG_INFO("component " << componentName << " was created");
+}
+
+ComponentBase::~ComponentBase()
+{  
+    LOG_TRACE("destructor");
+}
+
+int ComponentBase::startComponent()
+{
+    if (mIsActive)
+      return false;
+      
+    mIsActive = true;
+    startActivity();
+    
+    return true;
+}
+
+int ComponentBase::stopComponent()
+{
+    if (!mIsActive)
+      return false;
+
+    mIsActive = false;
+    stopActivity();
+    
+    return true;
+}
+
+void ComponentBase::setState(const COMPONENT_STATE state)
+{
+    componentState_ = state;
+}
+
+// FIXME: this should be const.
+ComponentBase::COMPONENT_STATE ComponentBase::getState()
+{
+    COMPONENT_STATE state = componentState_;
+    if (ComponentBase::NOT_MONITORED != componentState_) {
+        componentState_ = ComponentBase::MONITOR_NOK;
+    }
+    return state;
+}
+
+bool ComponentBase::isConfigured() const
+{
+    return configuration_ == CONFIGURED_OK;
+}
Index: tags/0.0.2/src/PacpusLib/ComponentFactoryBase.cpp
===================================================================
--- tags/0.0.2/src/PacpusLib/ComponentFactoryBase.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusLib/ComponentFactoryBase.cpp	(revision 257)
@@ -0,0 +1,59 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include <Pacpus/kernel/ComponentFactoryBase.h>
+#include <Pacpus/kernel/ComponentBase.h>
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/Log.h>
+
+#include <cassert>
+#include <QString>
+
+using namespace pacpus;
+
+DECLARE_STATIC_LOGGER("pacpus.core.ComponentFactoryBase");
+
+ComponentFactoryBase::ComponentFactoryBase()
+    : mgr_(NULL)
+{
+    LOG_TRACE("constructor");
+    // get the adress of the ComponentManager instance
+    mgr_ = ComponentManager::getInstance();
+}
+
+ComponentFactoryBase::~ComponentFactoryBase()
+{
+    LOG_TRACE("destructor");
+}
+
+void ComponentFactoryBase::addFactory(ComponentFactoryBase* addr, const QString& type)
+{
+    LOG_DEBUG("addFactory(type="<< type << ")");
+
+    assert(mgr_);
+    if (!mgr_->registerComponentFactory(addr, type)) {
+        /*
+        // FIXME: delete in a secure manner (no double delete)
+        delete addr;
+        addr = NULL;
+        */
+    }
+}
+
+void ComponentFactoryBase::addComponent(const QString& name)
+{
+    LOG_DEBUG("addComponent(" << name << ")");
+
+    // FIXME: instantiated component is never deleted!
+    // who should do it? ComponentManager?
+    ComponentBase * addr = instantiateComponent(name);
+    assert(mgr_);
+    if (!mgr_->registerComponent(addr, name)) {
+        delete addr;
+        addr = NULL;
+    }
+}
Index: tags/0.0.2/src/PacpusLib/ComponentManager.cpp
===================================================================
--- tags/0.0.2/src/PacpusLib/ComponentManager.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusLib/ComponentManager.cpp	(revision 257)
@@ -0,0 +1,343 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include <Pacpus/kernel/ComponentFactoryBase.h>
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/ComponentBase.h>
+#include <Pacpus/kernel/Log.h>
+
+using namespace pacpus;
+
+DECLARE_STATIC_LOGGER("pacpus.core.ComponentManager");
+
+ComponentManager * ComponentManager::mInstance = NULL;
+
+ComponentManager * ComponentManager::create()
+{
+    return getInstance();
+}
+
+ComponentManager * ComponentManager::getInstance()
+{
+    LOG_TRACE("getInstance()");
+    LOG_TRACE("before:  mInstance = " << mInstance);
+
+    if (!mInstance)
+    {
+        LOG_INFO("creating new instance...");
+        mInstance = new ComponentManager();
+        LOG_DEBUG("mInstance = " << mInstance);
+    }
+
+    LOG_TRACE("after:   mInstance = " << mInstance);
+    return mInstance;
+}
+
+void ComponentManager::destroy()
+{
+    LOG_TRACE("destroy");
+
+    delete mInstance;
+    mInstance = NULL;
+}
+
+ComponentManager::ComponentManager()
+{
+    LOG_TRACE("constructor");
+
+    xmlTree_ = XmlConfigFile::create();
+    LOG_DEBUG("component manager was created");
+}
+
+ComponentManager::~ComponentManager()
+{
+    LOG_TRACE("destructor");
+
+    QMutableMapIterator<ComponentMap::key_type, ComponentMap::mapped_type> it(componentMap_);
+    while (it.hasNext())
+        unRegisterComponent(it.next().key());
+
+    LOG_DEBUG("component manager was deleted");
+}
+
+bool ComponentManager::registerComponentFactory(ComponentFactoryBase* addr, const QString& type)
+{
+    LOG_TRACE("registerComponentFactory(type="<< type << ")");
+
+    if (factoryMap_.contains(type))
+    {
+        LOG_WARN("cannot register a component factory of type '" << type << "'. It already belongs to the manager");
+        return false;
+    }
+
+    factoryMap_[type] = addr;
+    LOG_INFO("registered component factory '" << type << "'");
+
+    return true;
+}
+
+bool ComponentManager::unRegisterComponentFactory(const QString& type)
+{
+    LOG_TRACE("unRegisterComponentFactory(type="<< type << ")");
+
+    if (!factoryMap_.contains(type))
+    {
+        LOG_WARN("cannot unregister component factory '" << type << "'. It was not registered");
+        return false;
+    }
+
+    factoryMap_.remove(type);
+    LOG_INFO("unregistered component factory '" << type << "'");
+
+    return true;
+}
+
+bool ComponentManager::registerComponent(ComponentBase* addr, const QString& name)
+{
+    LOG_TRACE("registerComponent(name="<< name << ")");
+
+    if (componentMap_.contains(name))
+    {
+        LOG_WARN("cannot register component '" << name << "'. A component with the same name exists already");
+        return false;
+    }
+
+    componentMap_[name] = addr;
+    LOG_INFO("registered component " << name);
+
+    return true;
+}
+
+bool ComponentManager::unRegisterComponent(const QString& name)
+{
+    LOG_TRACE("unRegisterComponent(name="<< name << ")");
+
+    if (!componentMap_.contains(name))
+    {
+        LOG_WARN("cannot unregister component '" << name << "'. It was not registered");
+        return false;
+    }
+
+    // FIXME: delete component
+    //delete componentMap_[name];
+    componentMap_.remove(name);
+    LOG_INFO("unregistered component '" << name << "'");
+
+    return true;
+}
+
+bool ComponentManager::createComponent(const QString& type, const QString& name)
+{
+    LOG_TRACE("createComponent(type=" << type << ", " << "name="<< name << ")");
+
+    FactoryMap::iterator it = factoryMap_.find(type);
+    if (it != factoryMap_.end())
+    {
+      (*it)->addComponent(name);
+      return true;
+    }
+
+    LOG_WARN("cannot create component '" << name << "'"
+             << ". Component factory for type '" << type << "'"
+             << " does not exist or was not registered"
+             );
+    return false;
+}
+
+bool ComponentManager::loadPlugin(const QString& filename)
+{
+    LOG_TRACE("loadPlugin(filename=" << filename << ")");
+
+    pluginLoader_.setFileName(filename);
+
+    if (!pluginLoader_.load()) {
+        LOG_ERROR("cannot load plugin '" << filename << "'"
+                  << ". Plugin loader returned error: " << pluginLoader_.errorString()
+                  );
+        return false;
+    }
+
+    QObject * plugin = pluginLoader_.instance();
+    if (NULL == plugin) {
+        LOG_WARN("cannot create an instance of the plugin '" << filename << "'"
+                 << ". Plugin loader returned error: " << pluginLoader_.errorString()
+                 );
+        return false;
+    }
+    pluginList_.append(plugin);
+    LOG_INFO("loaded plugin '" << qobject_cast<PacpusPluginInterface*>(plugin)->name() << "'"
+             << " from file '" << pluginLoader_.fileName() << "'"
+             );
+    return true;
+}
+
+std::size_t ComponentManager::loadComponents(const QString& configFilename)
+{
+    LOG_TRACE("loadComponents(filename=" << configFilename << ")");
+
+    // load the components tree in memory
+    xmlTree_->loadFile(configFilename);
+
+    {
+        // Load the plugins containing the components
+        QStringList plugins = xmlTree_->getAllPlugins();
+        Q_FOREACH (QString plugin, plugins) {
+            if (!loadPlugin(plugin)) {
+                LOG_WARN("cannot load plugin '" << plugin << "'");
+            }
+        }
+    }
+
+    QStringList componentsNameList = xmlTree_->getAllComponents();
+    LOG_DEBUG("components in the config file: '" << componentsNameList.join("|") << "'");
+
+    XmlComponentConfig cfg;
+
+    // First, create all the components in the XML list
+    for (QStringList::iterator it = componentsNameList.begin(); it != componentsNameList.end(); ++it) {
+        LOG_DEBUG("try to create component '" << (*it) << "'");
+        cfg.localCopy(xmlTree_->getComponent(*it));
+        QString componentType = cfg.getComponentType();
+        QString componentName = cfg.getComponentName();
+        // create the component and automatically add it to the component manager list
+        if (!createComponent(componentType, componentName)) {
+            LOG_ERROR("cannot create component '" << componentName << "'");
+            continue;
+        }
+    }
+
+    int componentsToConfigureCount = componentMap_.count();
+
+    // Second, try to configure the components without regarding the dependencies
+    for (QStringList::iterator it = componentsNameList.begin(); it != componentsNameList.end(); ++it) {
+        LOG_DEBUG("try to configure component '" << (*it) << "'");
+        cfg.localCopy(xmlTree_->getComponent(*it));
+        QString componentName = cfg.getComponentName();
+
+        // copy locally the config parameters of the component
+        ComponentBase * component = getComponent(componentName);
+        if (NULL == component) {
+            LOG_WARN("component '" << componentName << "' does not exist");
+        } else {
+            component->param.localCopy(cfg.qDomElement());
+            component->configuration_ = component->configureComponent(cfg);
+
+        }
+    } // for
+
+    // Third, if some components requested a delayed configuration, retry
+    for (QStringList::iterator it = componentsNameList.begin(); it != componentsNameList.end() ; ++it) {
+        cfg.localCopy(xmlTree_->getComponent(*it));
+        QString componentName = cfg.getComponentName();
+
+        ComponentBase * component = getComponent(componentName);
+        if (NULL == component) {
+            LOG_WARN("component '" << componentName << "' does not exist");
+        } else {
+            if (component->configuration_ == ComponentBase::CONFIGURATION_DELAYED) {
+                LOG_DEBUG("try to configure component '" << (*it) << "'");
+
+                // copy locally the config parameters of the component
+                component->param.localCopy(cfg.qDomElement());
+                component->configuration_ = component->configureComponent(cfg);
+            }
+
+            if (component->configuration_ == ComponentBase::CONFIGURED_OK) {
+                --componentsToConfigureCount;
+            } else {
+                LOG_ERROR("cannot configure component '" << (*it) << "'"
+                          << ". Dependencies with other components are too complex"
+                          << ". It was not configured, please review your configuration and/or your component"
+                          );
+                component->configuration_ = ComponentBase::CONFIGURED_FAILED;
+            }
+        }
+    } // for
+
+    LOG_INFO(componentMap_.count() << " component(s) were loaded");
+    if (componentsToConfigureCount > 0) {
+        LOG_WARN(componentsToConfigureCount << " component(s) were not configured");
+    }
+
+    return componentMap_.count();
+}
+
+bool ComponentManager::start()
+{
+    LOG_TRACE("start()");
+
+    bool result = true;
+    for (ComponentMap::iterator it = componentMap_.begin(), itend = componentMap_.end(); it != itend; ++it )
+        result &= start(it.key());
+
+    return result;
+}
+
+bool ComponentManager::start(const QString& componentName)
+{
+    LOG_TRACE("start(component=" << componentName << ")");
+
+    ComponentBase* component = getComponent(componentName);
+    if (!component)
+    {
+        LOG_WARN("cannot start component '" << componentName << "'.  It does not exist!");
+        return false;
+    }
+
+    LOG_INFO("starting component '" << componentName << "'...");
+    if (!component->startComponent())
+        LOG_WARN("cannot start component '" << componentName << "'. It can already be started");
+
+    return true;
+}
+
+bool ComponentManager::stop()
+{
+    LOG_TRACE("stop()");
+
+    bool result = true;
+    for (ComponentMap::iterator it = componentMap_.begin(); it != componentMap_.end(); ++it)
+        result &= stop(it.key());
+
+    return result;
+}
+
+bool ComponentManager::stop(const QString& componentName)
+{
+    LOG_TRACE("stop(component=" << componentName << ")");
+
+    ComponentBase* component = getComponent(componentName);
+    if (!component)
+    {
+        LOG_WARN("cannot stop component '" << componentName << "'" << ". It does not exist");
+        return false;
+    }
+
+    LOG_INFO("stopping component '" << componentName << "'...");
+    if (!component->stopComponent())
+        LOG_WARN("cannot stop component '" << componentName << "'" << ". It can be already stopped");
+
+    return true;
+}
+
+ComponentBase* ComponentManager::getComponent(const QString& name)
+{
+    LOG_TRACE("getComponent(name=" << name << ")");
+
+    ComponentMap::iterator it = componentMap_.find(name);
+    if (it != componentMap_.end())
+      return *it;
+
+    LOG_WARN("cannot retrieve component '" << name << "'" << ". It does not exist");
+    return NULL;
+}
+
+QStringList ComponentManager::getAllComponentsName() const
+{
+    LOG_TRACE("getAllComponentsName()");
+    return xmlTree_->getAllComponents();
+}
Index: tags/0.0.2/src/PacpusLib/Log.cpp
===================================================================
--- tags/0.0.2/src/PacpusLib/Log.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusLib/Log.cpp	(revision 257)
@@ -0,0 +1,90 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include <Pacpus/kernel/Log.h>
+
+#ifdef PACPUS_USE_LOG
+
+#ifdef _MSC_VER
+#   pragma warning(push)
+#   pragma warning(disable: 4231 4251)
+#endif // _MSC_VER
+
+#include <log4cxx/basicconfigurator.h>
+#include <log4cxx/consoleappender.h>
+#include <log4cxx/patternlayout.h>
+#include <log4cxx/propertyconfigurator.h>
+#include <QString>
+
+#ifdef _MSC_VER
+#   pragma warning(pop)
+#endif // _MSC_VER
+
+using namespace log4cxx;
+
+namespace pacpus {
+
+static int niftyCounter;
+
+LogConfigurator::LogConfigurator()
+{
+    using namespace log4cxx;
+
+    if (0 == niftyCounter++) {
+        BasicConfigurator::resetConfiguration();
+
+        LayoutPtr lp(new PatternLayout(LOG4CXX_STR("%-6r [%-5p] %30.30c - %m%n")));
+        AppenderPtr ap(new ConsoleAppender(lp));
+        BasicConfigurator::configure(ap);
+        Logger::getRootLogger()->setLevel(log4cxx::Level::getInfo());
+    }
+}
+
+LogConfigurator::~LogConfigurator()
+{
+    if (0 == --niftyCounter) {
+        // clean up
+    }
+}
+
+void LogConfigurator::configureLoggerWithFile(const char * configFilename)
+{
+    BasicConfigurator::resetConfiguration();
+    PropertyConfigurator::configure(configFilename);
+}
+
+} // namespace pacpus
+
+helpers::CharMessageBuffer & operator<<(helpers::CharMessageBuffer & os, const QString & val)
+{
+    return os << val.toStdString();
+}
+
+helpers::CharMessageBuffer & operator<<(helpers::MessageBuffer & os, const QString & val)
+{
+    return os << val.toStdString();
+}
+
+#else // PACPUS_USE_LOG
+
+namespace pacpus {
+
+LogConfigurator::LogConfigurator()
+{
+}
+
+LogConfigurator::~LogConfigurator()
+{
+}
+
+void LogConfigurator::configureLoggerWithFile(const char * /*configFilename*/)
+{
+}
+
+} // namespace pacpus
+
+#endif // PACPUS_USE_LOG
Index: tags/0.0.2/src/PacpusLib/PacpusApplication.cpp
===================================================================
--- tags/0.0.2/src/PacpusLib/PacpusApplication.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusLib/PacpusApplication.cpp	(revision 257)
@@ -0,0 +1,91 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @file
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @date    March, 2013
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+
+#include <Pacpus/kernel/Log.h>
+#include <Pacpus/kernel/PacpusApplication.h>
+#include <Pacpus/kernel/PacpusException.h>
+
+using namespace pacpus;
+
+DECLARE_STATIC_LOGGER("pacpus.core.PacpusApplication");
+
+PacpusApplication::PacpusApplication(int & argc, char ** argv
+#ifndef Q_QDOC
+                                   , int _internal
+#endif
+                                   )
+    : QApplication(argc, argv, _internal)
+{
+}
+
+PacpusApplication::PacpusApplication(int & argc, char ** argv, bool GUIenabled
+#ifndef Q_QDOC
+                                   , int _internal
+#endif
+                                   )
+    : QApplication(argc, argv, GUIenabled, _internal)
+{
+}
+
+PacpusApplication::PacpusApplication(int & argc, char ** argv, Type type
+#ifndef Q_QDOC
+                                   , int _internal
+#endif
+                                   )
+    : QApplication(argc, argv, type, _internal)
+{
+}
+
+#if defined(Q_WS_X11)
+PacpusApplication::PacpusApplication(Display * display, Qt::HANDLE visual, Qt::HANDLE colormap
+#ifndef Q_QDOC
+                                   , int _internal
+#endif
+                                   )
+    : QApplication(display, visual, colormap, _internal)
+{
+}
+
+PacpusApplication::PacpusApplication(Display * display, int & argc, char ** argv, Qt::HANDLE visual , Qt::HANDLE colormap
+#ifndef Q_QDOC
+                                   , int _internal
+#endif
+                                   )
+    : QApplication(display, argc, argv, visual, colormap, _internal)
+{
+}
+#endif
+
+#if defined(Q_OS_SYMBIAN)
+PacpusApplication::PacpusApplication(QApplication::QS60MainApplicationFactory factory, int & argc, char ** argv
+#ifndef Q_QDOC
+                                   , int _internal
+#endif
+                                   )
+    : QApplication(factory, argc, argv, _internal)
+{
+}
+#endif
+
+PacpusApplication::~PacpusApplication()
+{
+}
+
+bool PacpusApplication::notify(QObject * receiver, QEvent * ev)
+{
+    try {
+        return QApplication::notify(receiver, ev);
+    } catch(PacpusException & e) {
+        LOG_ERROR("PacpusException thrown:" << e.what());
+    } catch(std::exception & e) {
+        LOG_ERROR("std::exception thrown:" << e.what());
+    }
+    return false;
+}
Index: tags/0.0.2/src/PacpusLib/PacpusException.cpp
===================================================================
--- tags/0.0.2/src/PacpusLib/PacpusException.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusLib/PacpusException.cpp	(revision 257)
@@ -0,0 +1,24 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Marek Kurdej <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include <Pacpus/kernel/PacpusException.h>
+
+using namespace pacpus;
+
+PacpusException::PacpusException(const std::string & what)
+    : mWhat(what)
+{
+}
+
+PacpusException::~PacpusException() throw()
+{
+}
+
+const char * PacpusException::what() const throw()
+{
+    return mWhat.c_str();
+}
Index: tags/0.0.2/src/PacpusLib/XmlComponentConfig.cpp
===================================================================
--- tags/0.0.2/src/PacpusLib/XmlComponentConfig.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusLib/XmlComponentConfig.cpp	(revision 257)
@@ -0,0 +1,138 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include <Pacpus/kernel/XmlComponentConfig.h>
+
+#include <Pacpus/kernel/Log.h>
+#include <Pacpus/kernel/XmlConfigFile.h>
+
+using namespace pacpus;
+using namespace std;
+
+DECLARE_STATIC_LOGGER("pacpus.core.XmlComponentConfig");
+
+static const string kPropertyComponentType = "type";
+
+XmlComponentConfig::XmlComponentConfig(const QString& name)
+{
+    LOG_TRACE("XmlComponentConfig(QString)");
+
+    // Get the pointer to the document and create the component.
+    parentDocument_ = XmlConfigFile::create();
+    if (name != QString::null)
+      component_ = parentDocument_->createComponent(name);
+}
+
+/// Destructor.
+XmlComponentConfig::~XmlComponentConfig()
+{
+    LOG_TRACE("~XmlComponentConfig()");
+}
+
+void XmlComponentConfig::addProperty(const QString& name)
+{
+    if (hasProperty(name))
+    {
+        LOG_ERROR("cannot add component property:"
+                  << " component '" << component_.tagName() << "'"
+                  << " already contains property '" << name << "'"
+                  << " and its value is '" << component_.attribute(name) << "'"
+                  );
+        return;
+    }
+
+    // The property does not exist, it can be added.
+    component_.setAttribute(name, 0);
+    LOG_INFO("property '" << name << "'"
+              << " was added to the component " << component_.tagName() << "'"
+              << " and set to '" << component_.attribute(name) << "'"
+              );
+}
+
+int XmlComponentConfig::delProperty(const QString& name)
+{
+    if (!hasProperty(name)) {
+        LOG_WARN("cannot delete component property '" << name << "'"
+                 << " of component '" << component_.tagName() << "'"
+                 << ". Component does not contain this property."
+                 );
+        return false;
+    }
+
+    // The property exists, it can be removed.
+    component_.removeAttribute(name);
+    LOG_INFO("property '" << name << "' "
+      << " of component '" << component_.tagName() << "'"
+      << " was deleted"
+      );
+
+    return true;
+}
+
+QString XmlComponentConfig::getProperty(const QString& name, const QString& defaultValue) const
+{
+    if (!hasProperty(name))
+    {
+        LOG_WARN("cannot retrieve component property '" << name << "'"
+                 << " of component '" << component_.tagName() << "'"
+                 << ". Component does not contain this property."
+                 );
+        return defaultValue;
+    }
+
+    // The property exists, the value can be retrieved.
+    return component_.attribute(name);
+}
+
+bool XmlComponentConfig::getBoolProperty(const QString& name, bool defaultValue) const
+{
+  return hasProperty(name) ? getProperty(name) == "true" : defaultValue;
+}
+
+int XmlComponentConfig::getIntProperty(const QString& name, int defaultValue) const
+{
+  return hasProperty(name) ? getProperty(name).toInt() : defaultValue;
+}
+
+double XmlComponentConfig::getDoubleProperty(const QString& name, double defaultValue) const
+{
+  return hasProperty(name) ? getProperty(name).toDouble() : defaultValue;
+}
+
+void XmlComponentConfig::setProperty(const QString& name, const QString& value)
+{
+    component_.setAttribute(name, value);
+    LOG_INFO("property " << name
+             << " of the component " << component_.tagName()
+             << " was set to : " << value
+             );
+}
+
+bool XmlComponentConfig::hasProperty(const QString& name) const
+{
+    return component_.hasAttribute(name);
+}
+
+QDomElement XmlComponentConfig::qDomElement() const
+{
+    return component_;
+}
+
+void XmlComponentConfig::localCopy(const QDomElement& elementToCopy)
+{
+    component_ = elementToCopy;
+}
+
+QString const XmlComponentConfig::getComponentName() const
+{
+    return component_.tagName();
+}
+
+QString const XmlComponentConfig::getComponentType() const
+{
+    return getProperty(kPropertyComponentType.c_str());
+}
Index: tags/0.0.2/src/PacpusLib/XmlConfigFile.cpp
===================================================================
--- tags/0.0.2/src/PacpusLib/XmlConfigFile.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusLib/XmlConfigFile.cpp	(revision 257)
@@ -0,0 +1,204 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include <Pacpus/kernel/XmlConfigFile.h>
+#include <Pacpus/kernel/Log.h>
+
+#include <QFile>
+#include <QTextStream>
+
+using namespace pacpus;
+using namespace std;
+
+DECLARE_STATIC_LOGGER("pacpus.core.XmlConfigFile");
+
+XmlConfigFile * XmlConfigFile::_xmlConfigFile = NULL;
+
+static const string kPropertyPluginList = "list";
+
+static const string kXmlConfigFilename = "pacpus_config.xml";
+
+#define componentSection "components"
+#define parameterSection "parameters"
+#define rootSection "pacpus"
+#define pluginsNode "plugins"
+
+XmlConfigFile::XmlConfigFile()
+    : _file(NULL)
+    , _numberOfComponents(0)
+{
+    LOG_TRACE("constructor");
+
+    // create the root of the XML tree
+    _document.appendChild(_document.createElement(rootSection));
+    // create the sections
+    _document.documentElement().appendChild(_document.createElement(parameterSection));
+    _document.documentElement().appendChild(_document.createElement(componentSection));
+    _file = new QFile(kXmlConfigFilename.c_str());
+    if (NULL != _file) {
+        LOG_INFO("XML document " << kXmlConfigFilename.c_str() << " was created");
+    } else {
+        LOG_WARN("cannot create XML document " << kXmlConfigFilename.c_str());
+    }
+}
+
+XmlConfigFile::~XmlConfigFile()
+{
+    LOG_TRACE("destructor");
+}
+
+XmlConfigFile * XmlConfigFile::create()
+{
+    if (NULL ==_xmlConfigFile) {
+        _xmlConfigFile = new XmlConfigFile();
+    }
+    return _xmlConfigFile;
+}
+
+void XmlConfigFile::destroy()
+{
+    delete _xmlConfigFile;
+    _xmlConfigFile = NULL;
+}
+
+void XmlConfigFile::addComponent(QDomElement component)
+{ 
+    _mutex.lock();
+
+    if (_document.documentElement().namedItem(componentSection).namedItem(component.tagName()).isNull()) {
+        LOG_WARN("component " << component.tagName() << " exists already in the document");
+    } else {
+        QDomNode node = _document.documentElement().namedItem(componentSection).appendChild(component);
+        ++_numberOfComponents;
+        LOG_INFO("component " << node.nodeName() << " has been added to the section "
+                 << _document.documentElement().namedItem(componentSection).nodeName());
+    }
+    _mutex.unlock();
+}
+
+void XmlConfigFile::delComponent(QDomElement component)
+{
+    _mutex.lock();
+
+    QDomNode node = _document.documentElement().namedItem(componentSection).removeChild(component);
+    if (node.isNull()) {
+        LOG_WARN("component " << component.tagName() << " doesn't exist in the document.");
+    } else {
+        LOG_INFO("component " << node.nodeName() << " has been removed from the section "
+                 << _document.documentElement().namedItem(componentSection).nodeName());
+        --_numberOfComponents;
+    }
+
+    _mutex.unlock();
+}
+
+QDomElement XmlConfigFile::createComponent(QString name)
+{
+    LOG_DEBUG("creating component " << name);
+
+    QMutexLocker mutexLocker(&_mutex);
+    Q_UNUSED(mutexLocker);
+    return _document.createElement(name);
+}
+
+void XmlConfigFile::saveFile(QString fileName)
+{
+    QMutexLocker mutexLocker(&_mutex);
+    Q_UNUSED(mutexLocker);
+
+    _file->setFileName(fileName);
+    {
+        _file->open(QIODevice::WriteOnly);
+        {
+            QTextStream ts(_file);
+            ts << "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" + _document.toString();
+        }
+        _file->close();
+    }
+    LOG_DEBUG("file \"" << _file->fileName() << "\" has been saved");
+}
+
+int XmlConfigFile::loadFile(QString fileName)
+{
+    QMutexLocker mutexLocker(&_mutex);
+    Q_UNUSED(mutexLocker);
+
+    int line = 0, col = 0;
+    QString errorMsg;
+
+    if (_numberOfComponents != 0) {
+        LOG_WARN("XML document contained " << _numberOfComponents << " components that will be lost!");
+    }
+
+    _file->setFileName(fileName);
+    if (!_file->open( QIODevice::ReadOnly )) {
+        LOG_ERROR("cannot open file " << fileName);
+        return 0;
+    }
+    if (!_document.setContent( _file, true, &errorMsg, &line, &col )) {
+        LOG_ERROR("cannot get data into the file " << fileName);
+        LOG_ERROR(errorMsg << " at position " << line << ":" << col << " (line:col)");
+        _file->close();
+        return 0;
+    }
+    _file->close();
+
+    // get the number of components in the loaded tree
+    _numberOfComponents = _document.documentElement().namedItem(componentSection).childNodes().count();
+
+    LOG_INFO("XML file \"" << fileName << "\" has been loaded. Number of components = " << _numberOfComponents);
+    LOG_DEBUG("XML file content:\n"
+              << "BEGIN============================================================================\n"
+              << _document.toString()
+              << "END==============================================================================\n"
+              );
+
+    return _numberOfComponents;
+}
+
+QDomElement XmlConfigFile::getComponent(QString componentName)
+{
+    LOG_DEBUG("getting component " << componentName);
+
+    QDomNode node = _document.documentElement().namedItem(componentSection).namedItem(componentName);
+    if (node.isNull()) {
+        LOG_WARN("cannot get component " << componentName << ": document does not contain the component");
+    }
+    return node.toElement();
+} 
+
+QStringList XmlConfigFile::getAllComponents()
+{
+    QStringList componentNameList;
+    QDomNode xmlNode;
+    xmlNode = _document.documentElement().namedItem(componentSection).firstChild();
+
+    for (int i = 0; i < _numberOfComponents; i++) {
+        componentNameList.append(xmlNode.toElement().tagName());
+        xmlNode = xmlNode.nextSibling();
+    }
+    return componentNameList;
+}
+
+QStringList XmlConfigFile::getAllPlugins()
+{
+    QDomElement node = _document.documentElement().namedItem(parameterSection).namedItem(pluginsNode).toElement();
+
+    if (!node.hasAttribute(kPropertyPluginList.c_str())) {
+        LOG_WARN("cannot retrieve plugins list, node 'plugins' may be misformed or attribute '" << kPropertyPluginList.c_str() << "' may be missing. "
+                 << "Use the character pipe '|' to separate the different plugins ");
+        return QStringList();
+    } else {
+        QString plugins = node.attribute(kPropertyPluginList.c_str());
+        if (plugins.isEmpty()) {
+            LOG_WARN("no plugins were specified");
+            return QStringList();
+        } else {
+            return plugins.split("|", QString::SkipEmptyParts);
+        }
+    }
+}
Index: tags/0.0.2/src/PacpusSensor/CMakeLists.txt
===================================================================
--- tags/0.0.2/src/PacpusSensor/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/src/PacpusSensor/CMakeLists.txt	(revision 257)
@@ -0,0 +1,97 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+project(PacpusSensor)
+
+# ========================================
+# Configure qt4
+# ========================================
+if(QT4_FOUND)
+  set(QT_USE_QTXML true)
+  set(QT_USE_QTNETWORK true)
+  include(${QT_USE_FILE})
+else()
+  message(ERROR "Qt4 needed")
+endif()
+
+# ========================================
+# Compiler definitions
+# ========================================
+add_definitions(
+  ${QT_DEFINITIONS}
+)
+
+# ========================================
+# Include directories
+# ========================================
+include_directories(
+  ${PROJECT_BINARY_DIR}
+  ${QT_INCLUDE_DIR}
+)
+
+# ========================================
+# List of sources
+# ========================================
+set(
+  PROJECT_SRCS
+  src/ui/pacpusmainwindow.cpp
+  src/ui/pacpusmainwindow.h
+  src/main.cpp
+)
+
+# ========================================
+# Qt4 stuff
+# ========================================
+set(SENSOR_UI_CLASSES src/ui/pacpusmainwindow.ui)
+set(SENSOR_MOC_CLASSES src/ui/pacpusmainwindow.h)
+qt4_wrap_ui(SENSOR_UI_SOURCES_H ${SENSOR_UI_CLASSES})
+qt4_wrap_cpp(SENSOR_MOC_SOURCES ${SENSOR_MOC_CLASSES})
+source_group(Main_ui FILES ${PROJECT_SRCS} )
+source_group(moc FILES ${SENSOR_MOC_SOURCES} ${SENSOR_UI_SOURCES_H} )
+
+# ========================================
+# Build an executable
+# ========================================
+pacpus_add_executable(
+    ${PROJECT_NAME}
+    ./src/main.cpp
+    ./src/ui/pacpusmainwindow.cpp
+    ./src/ui/pacpusmainwindow.h
+    ${SENSOR_MOC_SOURCES}
+    ${SENSOR_UI_CLASSES}
+)
+
+# ========================================
+# Libraries
+# ========================================
+# All the platform
+target_link_libraries(
+    ${PROJECT_NAME}
+	${PACPUS_DEPENDENCIES_LIB}
+    ${QT_LIBRARIES}
+	PacpusLib
+	FileLib
+)
+# Windows
+if(WIN32)
+    target_link_libraries(
+        ${PROJECT_NAME}
+        ROAD_TIME
+        Winmm
+    )
+endif()
+
+# ========================================
+# Install
+# ========================================
+pacpus_install(${PROJECT_NAME})
+
+# ========================================
+# Folder
+# ========================================
+pacpus_folder(${PROJECT_NAME} "tools")
Index: tags/0.0.2/src/PacpusSensor/src/main.cpp
===================================================================
--- tags/0.0.2/src/PacpusSensor/src/main.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusSensor/src/main.cpp	(revision 257)
@@ -0,0 +1,74 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include <QApplication>
+
+#include "ui/pacpusmainwindow.h"
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/Log.h>
+#include <Pacpus/kernel/PacpusApplication.h>
+
+#ifdef WIN32
+#   include <windows.h>
+#endif
+
+using namespace pacpus;
+using namespace std;
+
+DECLARE_STATIC_LOGGER("pacpus.core.Sensor");
+
+static const string kDefaultXmlConfigFilePath = "PACPUS.xml";
+
+int main(int argc, char * argv[])
+{
+    PacpusApplication app(argc, argv);
+
+    // faire une boucle pour charger tous les plugins
+    // il faudrait faire une classe supplementaire integree a PacpusLib  /home/gdherbom/dev/pacpus/pacpusbase/pacpusbin/trunk/
+    /*  QPluginLoader loader("libVelodyneHDL64S2.so");
+    qDebug() << loader.errorString();
+    qDebug() << loader.load();
+    qDebug() << loader.errorString();
+    QObject * plugin = loader.instance();
+
+    qDebug() << "Loading plugin:" << qobject_cast<PacpusPluginInterface*>(plugin)->name() << "associated to file:" << loader.fileName();
+    qDebug() << loader.errorString();
+    */
+    ComponentManager * mgr = ComponentManager::getInstance();
+    LOG_DEBUG("main : " << mgr);
+
+#ifdef WIN32
+    timeBeginPeriod(1);
+#endif
+
+    string configFilePath;
+    if (argc > 1) {
+        configFilePath = argv[1];
+    } else {
+        configFilePath = kDefaultXmlConfigFilePath;
+        LOG_WARN("no XML config file specified. Using default: " << configFilePath.c_str());
+    }
+    LOG_INFO("loading file '" << configFilePath.c_str() << "'");
+    mgr->loadComponents(configFilePath.c_str());
+
+    PacpusMainWindow window;
+    window.show();
+
+    // save application exit status
+    int exitStatus = app.exec();
+    // stop all components before exiting app
+    mgr->stop();
+
+    mgr->destroy();
+
+#ifdef WIN32
+    timeEndPeriod(1);
+#endif 
+
+    // return application exit status
+    return exitStatus;
+}
Index: tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.cpp
===================================================================
--- tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.cpp	(revision 257)
@@ -0,0 +1,184 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @version    $Id$
+
+#include "pacpusmainwindow.h"
+
+#include <iostream>
+#include <qapplication.h>
+#include <qgroupbox.h>
+#include <qlayout.h>
+#include <qpushbutton.h>
+#include <qradiobutton.h>
+#include <qstringlist.h>
+
+#include <Pacpus/kernel/ComponentBase.h>
+#include <Pacpus/kernel/Log.h>
+
+namespace pacpus {
+
+DECLARE_STATIC_LOGGER("pacpus.core.PacpusMainWindow");
+
+//////////////////////////////////////////////////////////////////////////
+PacpusMainWindow::PacpusMainWindow(QWidget * parent)
+    : QDialog(parent)
+{
+    setupUi(this);
+
+    componentManager_ = ComponentManager::getInstance();
+
+    // create the box that will display the components and add it to the main layout of the window
+    componentContainer_ = new QGroupBox( "Components" );
+    gridLayout->addWidget(componentContainer_);
+
+    // create the own vertical layout of the components list
+    layoutBox_ = new QVBoxLayout;
+    //create the logical container of the components
+    componentGroup_ = new QButtonGroup;
+    componentGroup_->setExclusive (false);
+
+    // insert the checkbox corresponding to the components
+    QStringList l = componentManager_->getAllComponentsName();
+    for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
+        ComponentCheckBox * chkBox = new ComponentCheckBox( *it, componentContainer_ );
+        layoutBox_->addWidget(chkBox);
+        componentGroup_->addButton(chkBox);
+        QObject::connect(chkBox, SIGNAL(activate(QString)),(QDialog*)this, SLOT(startComponent(QString)) );
+        QObject::connect(chkBox, SIGNAL(deactivate(QString)),(QDialog*)this, SLOT(stopComponent(QString)) );
+    }
+    componentContainer_->setLayout(layoutBox_);
+
+    connect(&monitoringTimer_, SIGNAL(timeout()), this, SLOT(monitoring()));
+    monitoringTimer_.start(1000);
+
+    nbActiveComponent_ = 0;
+}
+
+//////////////////////////////////////////////////////////////////////////
+PacpusMainWindow::~PacpusMainWindow()
+{
+    monitoringTimer_.stop();
+}
+
+//////////////////////////////////////////////////////////////////////////
+void PacpusMainWindow::startAcquisition()
+{
+    for (int i = 0; i < componentGroup_->buttons().size(); ++i) {
+        componentGroup_->buttons().at(i)->setChecked(true);
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+void PacpusMainWindow::stopAcquisition()
+{
+    for (int i = 0; i < componentGroup_->buttons().size(); ++i) {
+        componentGroup_->buttons().at(i)->setChecked(false);
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+void PacpusMainWindow::startComponent(QString component)
+{
+    componentManager_->start(component);
+    ++nbActiveComponent_;
+    if (nbActiveComponent_ == componentGroup_->buttons().size()) {
+        buttonStop->setEnabled(true);
+        buttonStart->setEnabled(false);
+    } else {
+        buttonStop->setEnabled(true);
+        buttonStart->setEnabled(true);
+    }
+    /*if (!isRunning()) {
+        continue_=true;
+        start();
+    }*/
+    //monitoringTimer_.start(100);
+}
+
+//////////////////////////////////////////////////////////////////////////
+void PacpusMainWindow::stopComponent(QString component)
+{
+    --nbActiveComponent_;
+    componentManager_->stop(component);
+    if (nbActiveComponent_ == 0) {
+        //msleep(200);
+        continue_ = false;
+        buttonStop->setEnabled(false);
+        buttonStart->setEnabled(true);
+    } else {
+        buttonStop->setEnabled(true);
+        buttonStart->setEnabled(true);
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+// Parallel loop of the graphical interface 
+// Monitor the component and display their state in the checkbox with the 
+// following color code: 
+//      state           color       box
+//      --------------------------------------
+//      stopped         white       unchecked
+//      not monitored   gray        checked
+//      monitor ok      green       checked 
+//      monitor nok     red         checked
+//////////////////////////////////////////////////////////////////////////
+
+/// @todo Voir si besoin de faire un thread : un timer est peut être suffisant ?? 
+void PacpusMainWindow::monitoring()
+{
+    /*
+    qDebug ("Component monitoring thread running");
+    while (continue_)
+    {
+    msleep(100); */
+    // Scan the states of each component and apply the corresponding color to the checkbox
+
+    //QPalette  palet = buttonStop->palette();
+    //palet.setColor(QPalette::Button,Qt::red);
+    //buttonStop->setPalette(palet);
+
+    for (int i = 0; i < componentGroup_->buttons().size(); ++i) {
+        QString componentName = componentGroup_->buttons().at(i)->text();
+        ComponentBase::COMPONENT_STATE state = componentManager_->getComponent(componentName)->getState();
+        QAbstractButton * b = componentGroup_->buttons()[i];
+        QPalette palette = b->palette();
+
+        switch(state) {
+        case ComponentBase::STOPPED :
+            palette.setColor(QPalette::Base, Qt::white);
+            b->setPalette(palette);
+            //qDebug() << "STOPPED";
+            break;
+
+        case ComponentBase::NOT_MONITORED :
+            palette.setColor(QPalette::Base, Qt::gray);
+            b->setPalette(palette);
+            //qDebug() << "NOT_MONITORED";
+            break;
+
+        case ComponentBase::MONITOR_OK :
+            palette.setColor(QPalette::Base, Qt::green);
+            b->setPalette(palette);
+            //qDebug() << "MONITOR_OK";
+            break;
+
+        case ComponentBase::MONITOR_NOK :
+            palette.setColor(QPalette::Base, Qt::red);
+            b->setPalette(palette);
+            //qDebug() << "MONITOR_NOK";
+            break;
+
+        default:
+            std::cerr << "Unkown state " << state << " of component: " << componentName.toStdString() << "\n";
+        }
+        //componentGroup_->buttons().at(i)->setPalette(palette);
+    }
+    repaint();
+    /*}
+    qDebug ("Component monitoring thread stopped"); */
+}
+
+} // namespace pacpus
Index: tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.h
===================================================================
--- tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.h	(revision 257)
+++ tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.h	(revision 257)
@@ -0,0 +1,119 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    June, 2006
+/// @version $Id$
+/// @copyright Copyright (c) UTC/CNRS Heudiasyc 2006 - 2013. All rights reserved.
+/// @brief Brief description.
+///
+/// Detailed description.
+
+#ifndef PACPUSMAINWINDOW_H
+#define PACPUSMAINWINDOW_H
+
+#include <qcheckbox.h>
+#include <qdialog.h>
+#include <qtimer.h>
+
+#include <Pacpus/kernel/ComponentManager.h>
+#include <Pacpus/kernel/XmlConfigFile.h>
+#include "ui_pacpusmainwindow.h"
+
+class QGroupBox;
+class QVBoxLayout;
+
+namespace pacpus {
+
+/// Overloaded class of the QCheckBox in order to get the text
+/// of the button when it is clicked.
+class ComponentCheckBox
+        : public QCheckBox
+{ 
+    Q_OBJECT
+
+public:
+    /// @todo Documentation
+    ComponentCheckBox(const QString & text, QWidget * parent, const char * /*name*/ = 0 )
+        : QCheckBox(text, parent)
+    {
+        connect(this, SIGNAL(toggled(bool)),
+                SLOT(change(bool)));
+    }
+
+    /// @todo Documentation
+    ~ComponentCheckBox()
+    {
+    }
+
+public Q_SLOTS:
+    /// @todo Documentation
+    void change(bool state)
+    {
+        if (state) {
+            Q_EMIT activate(text());
+        } else {
+            Q_EMIT deactivate(text());
+        }
+    }
+
+Q_SIGNALS:
+    /// @todo Documentation
+    void activate(QString);
+    /// @todo Documentation
+    void deactivate(QString);
+};
+
+////////////////////////////////////////////////////////////////////////////////
+/// @todo Documentation
+class PacpusMainWindow
+        : public QDialog
+        , public Ui::PacpusMainWindow
+{
+    Q_OBJECT
+
+public:
+    /// Constructor
+    PacpusMainWindow(QWidget * parent = 0);
+    /// Destructor
+	~PacpusMainWindow();
+
+public Q_SLOTS:
+    /// slot
+    /// Starts all the components and checks all the checkbox
+    void startAcquisition();
+    /// slot
+    /// called when a checkbox is checked 
+    /// start the corresponding component 
+    /// start the monitoring loop if not running 
+    void startComponent(QString component);
+    
+    /// slot
+    /// Stops all the components and unchecks all the checkbox
+    void stopAcquisition();
+    /// slot
+    /// called when a checkbox is unchecked
+    /// stop the corresponding component
+    /// eventually stop the monitoring loop if any other component is active
+    void stopComponent(QString component);
+
+    /// @todo Documentation
+    void monitoring();
+
+private:
+    ComponentManager * componentManager_;
+
+    QVBoxLayout * layoutBox_;
+    QGroupBox * componentContainer_;
+    QButtonGroup * componentGroup_;
+
+    QTimer monitoringTimer_;
+
+    bool continue_;
+    unsigned short nbActiveComponent_;
+};
+
+} // namespace pacpus
+
+#endif // PACPUSMAINWINDOW_H
Index: tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.ui
===================================================================
--- tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.ui	(revision 257)
+++ tags/0.0.2/src/PacpusSensor/src/ui/pacpusmainwindow.ui	(revision 257)
@@ -0,0 +1,82 @@
+<ui version="4.0" >
+ <class>PacpusMainWindow</class>
+ <widget class="QWidget" name="PacpusMainWindow" >
+  <property name="geometry" >
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>120</width>
+    <height>78</height>
+   </rect>
+  </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="windowTitle" >
+   <string>Pacpus</string>
+  </property>
+  <layout class="QGridLayout" >
+   <item row="0" column="0" >
+    <layout class="QGridLayout" >
+     <item row="2" column="0" >
+      <widget class="QPushButton" name="buttonStop" >
+       <property name="enabled" >
+        <bool>false</bool>
+       </property>
+       <property name="text" >
+        <string>Stop</string>
+       </property>
+      </widget>
+     </item>
+     <item rowspan="2" row="0" column="0" >
+      <widget class="QPushButton" name="buttonStart" >
+       <property name="text" >
+        <string>Start</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+  </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11" />
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>buttonStart</sender>
+   <signal>clicked()</signal>
+   <receiver>PacpusMainWindow</receiver>
+   <slot>startAcquisition()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>20</x>
+     <y>20</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>20</x>
+     <y>20</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>buttonStop</sender>
+   <signal>clicked()</signal>
+   <receiver>PacpusMainWindow</receiver>
+   <slot>stopAcquisition()</slot>
+   <hints>
+    <hint type="sourcelabel" >
+     <x>20</x>
+     <y>20</y>
+    </hint>
+    <hint type="destinationlabel" >
+     <x>20</x>
+     <y>20</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
Index: tags/0.0.2/src/PacpusTools/CMakeLists.txt
===================================================================
--- tags/0.0.2/src/PacpusTools/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/src/PacpusTools/CMakeLists.txt	(revision 257)
@@ -0,0 +1,119 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+project(PacpusTools)
+
+# ========================================
+# Configure qt4
+# ========================================
+if(QT4_FOUND)
+    set(QT_USE_QTXML true)
+    include(${QT_USE_FILE})
+else()
+    message(ERROR "Qt4 needed")
+endif(QT4_FOUND)
+
+# ========================================
+# Compiler definitions
+# ========================================
+add_definitions(
+	-DPACPUSTOOLS_EXPORTS
+    ${QT_DEFINITIONS}
+)
+
+# ========================================
+# Include directories
+# ========================================
+include_directories(
+    ${QT_INCLUDE_DIR}
+)
+
+# ========================================
+# List of sources
+# ========================================
+set(
+    PROJECT_SRCS
+    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/matrice.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/BinaryDecoder.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/ShMem.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/geodesie.h
+	${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
+	${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
+    ./src/matrice.cpp
+    ./src/geodesie.cpp
+    ./src/AsyncWorkerBase.cpp
+    ./src/PeriodicWorker.cpp
+)
+
+# ========================================
+# Files to MOC
+# ========================================
+set(
+    FILES_TO_MOC
+    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/AsyncWorkerBase.h
+    ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PeriodicWorker.h
+)
+
+# ========================================
+# Call MOC
+# ========================================
+qt4_wrap_cpp(
+    PROJECT_MOC_SRCS
+    ${FILES_TO_MOC}
+)
+
+# ========================================
+# Platform specific sources
+# ========================================
+# Unix
+if(UNIX)
+    list(
+        APPEND PROJECT_SRCS
+        ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/PosixShMem.h
+        src/PosixShMem.cpp
+    )
+endif()
+# Windows
+if(WIN32)
+    list(
+        APPEND PROJECT_SRCS
+        ${PACPUS_INCLUDE_DIR}/Pacpus/PacpusTools/Win32ShMem.h
+        src/Win32ShMem.cpp
+    )
+endif()
+
+# ========================================
+# Build a library
+# ========================================
+pacpus_add_library( 
+    ${PROJECT_NAME} SHARED
+    ${PROJECT_SRCS}
+    ${PROJECT_MOC_SRCS}
+)
+
+# ========================================
+# Libraries
+# ========================================
+target_link_libraries(
+    ${PROJECT_NAME}
+    ${QT_LIBRARIES}
+    ${PACPUS_DEPENDENCIES_LIB}
+	PacpusLib
+)
+
+
+# ========================================
+# Install
+# ========================================
+pacpus_install(${PROJECT_NAME})
+
+# ========================================
+# Folder
+# ========================================
+pacpus_folder(${PROJECT_NAME} "libraries")
Index: tags/0.0.2/src/PacpusTools/src/AsyncWorkerBase.cpp
===================================================================
--- tags/0.0.2/src/PacpusTools/src/AsyncWorkerBase.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusTools/src/AsyncWorkerBase.cpp	(revision 257)
@@ -0,0 +1,105 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+/// @author  Samuel Gosselin <firstname.surname@utc.fr>
+/// @date    December, 2012
+// %pacpus:license}
+
+#include <Pacpus/PacpusTools/AsyncWorkerBase.h>
+
+#include <Pacpus/kernel/Log.h>
+
+#include <QThread>
+
+using namespace pacpus;
+DECLARE_STATIC_LOGGER("pacpus.core.workers");
+
+AsyncWorkerBase::AsyncWorkerBase()
+  : active_(false)
+  , stopping_(false)
+{
+}
+
+AsyncWorkerBase::~AsyncWorkerBase()
+{
+}
+
+void
+AsyncWorkerBase::start()
+{
+  if (!isActive())
+  {
+    QThread* theThread = new QThread;
+
+    // Executes the setup() method as soon as theThread is started
+    connect(theThread, SIGNAL(started()), SLOT(doSetup()));
+
+    // Executes the finish() method as soon as theThread 
+
+    // Allows stopping requests to be handled withing the worker thread instead
+    // of the thread that made the stop() call.
+    connect(this, SIGNAL(stopped()), this, SLOT(doFinish()));
+
+    // Guarantees theThread is terminated and deleted once the worker has 
+    // stopped and is destroyed
+    connect(this, SIGNAL(finished()), theThread, SLOT(quit()));
+    connect(theThread, SIGNAL(finished()), theThread, SLOT(deleteLater()));
+    
+    active_ = true;
+    this->moveToThread(theThread);
+    theThread->start();
+  }
+}
+
+void
+AsyncWorkerBase::stop(bool autoDelete)
+{
+	if (isActive())
+  {
+    if (autoDelete)
+    {
+      // Guarantees deletion of this once all pending signals have been handled
+      connect(this, SIGNAL(finished()), this, SLOT(deleteLater()));
+    }
+		stopping_ = true;
+		emit stopped();
+	}
+  else
+  {
+    if (autoDelete)
+      delete this;
+  }
+}
+
+void AsyncWorkerBase::finish()
+{
+	if (isActive())
+  {
+    cleanup();
+		emit finished();
+		active_ = false;
+	}
+}
+
+void AsyncWorkerBase::setup()
+{
+}
+
+void AsyncWorkerBase::process()
+{
+}
+
+void AsyncWorkerBase::cleanup()
+{
+}
+
+void AsyncWorkerBase::doSetup()
+{
+  setup();
+  process();
+}
+
+void AsyncWorkerBase::doFinish()
+{ 
+  finish();
+}
Index: tags/0.0.2/src/PacpusTools/src/PeriodicWorker.cpp
===================================================================
--- tags/0.0.2/src/PacpusTools/src/PeriodicWorker.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusTools/src/PeriodicWorker.cpp	(revision 257)
@@ -0,0 +1,38 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+/// @author  Samuel Gosselin <firstname.surname@utc.fr>
+/// @date    December, 2012
+// %pacpus:license}
+
+#include <Pacpus/PacpusTools/PeriodicWorker.h>
+
+#include <QTimer>
+
+using namespace pacpus;
+
+PeriodicWorker::PeriodicWorker()
+  : AsyncWorkerBase()
+  , mHeartbeat(NULL)
+{
+  mHeartbeat = new QTimer(this);
+}
+
+PeriodicWorker::~PeriodicWorker()
+{
+}
+
+void
+PeriodicWorker::startWork(int msec)
+{
+  mHeartbeat->start(msec);
+  connect(mHeartbeat, SIGNAL(timeout()), this, SLOT(doWork()));
+  
+  this->start();
+}
+
+void
+PeriodicWorker::stopWork()
+{
+  disconnect(mHeartbeat, SIGNAL(timeout()), this, SLOT(doWork()));
+}
Index: tags/0.0.2/src/PacpusTools/src/PosixShMem.cpp
===================================================================
--- tags/0.0.2/src/PacpusTools/src/PosixShMem.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusTools/src/PosixShMem.cpp	(revision 257)
@@ -0,0 +1,162 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    January, 2007
+// %pacpus:license}
+
+#include <cassert>
+#include <cstdlib>
+#include <iomanip>
+
+#include <Pacpus/PacpusTools/PosixShMem.h>
+#include <Pacpus/kernel/Log.h>
+#include <Pacpus/kernel/cstdint.h>
+
+DECLARE_STATIC_LOGGER("pacpus.core.PosixShMem");
+
+using std::hex;
+
+//////////////////////////////////////////////////////////////////////////
+/// Constructor
+PosixShMem::PosixShMem(const char * name, int size)
+{
+    LOG_TRACE("constructor(" << name << ", " << size << ")");
+    LOG_INFO("creating shared memory" << "\t"
+             << "name=" << name << "\t"
+             << "size=" << size
+             );
+
+    {
+        QString memoryName = QString(name);
+        memory_ = new QSharedMemory(memoryName);
+    }
+    if (!memory_) {
+        LOG_FATAL("out of memory: cannot create shared memory object");
+        exit(-1);
+    }
+
+    bool result = false;
+    LOG_DEBUG("trying to create a memory segment");
+    if (!memory_->create(size)) {
+        if (QSharedMemory::AlreadyExists == memory_->error()) {
+            LOG_DEBUG("trying to attach to an existing memory segment");
+            if (!memory_->attach()) {
+                LOG_ERROR("cannot attach to an existing shared memory segment '" << name << "'"
+                          << ". error code: " << memory_->error()
+                          << ". error message:" << memory_->errorString().toStdString()
+                          );
+            } else {
+                LOG_INFO("attached shared memory segment '" << name << "'");
+                int attachedMemorySize = memory_->size();
+                LOG_INFO("attached memory size = " << attachedMemorySize);
+                if (attachedMemorySize < size) {
+                    LOG_ERROR("attached memory is smaller than requested, unexpected behaviour possible");
+                    LOG_INFO("use system tools like 'ipcs' and 'ipcrm' to remove shared memory and re-run");
+                }
+                result = true;
+            }
+        } else {
+            LOG_ERROR("cannot create shared memory segment '" << name << "'"
+                      << ". error code: " << memory_->error()
+                      << ". error message:" << memory_->errorString().toStdString()
+                      );
+        }
+    } else {
+        LOG_INFO("created shared memory segment '" << name << "'");
+        result = true;
+    }
+    
+    /////////////////////////////////////////
+    if (result) {
+        // create the equivalent Windows event (autoreset mode?)
+        QString eventName = "EvtShMem_" + QString(name);
+        LOG_DEBUG("creating event '" << eventName << "'...");
+        event_ = new QSystemSemaphore(eventName, 0, QSystemSemaphore::Create);
+        if (event_) {
+            LOG_DEBUG("created event '" << eventName << "'");
+        } else {
+            LOG_ERROR("cannot create event '" << eventName << "'"
+                      );
+        }
+
+        // get a pointer to the shared memory segment
+        shMem_ = memory_->data();
+    } else {
+        LOG_FATAL("cannot create shared memory segment '" << name << "'");
+        //throw MemoryCreationError();
+        exit(memory_->error());
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Destructor
+PosixShMem::~PosixShMem()
+{
+    LOG_TRACE("destructor");
+
+    // detach this process from the shared memory
+    memory_->detach();
+    // free shared memory
+    delete memory_;
+    // free event
+    delete event_;
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Use this method to get the data of the shared memory
+void * PosixShMem::read()
+{
+    return shMem_;
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Use this method to write data in shared memory. Offset is given in bytes
+void PosixShMem::write(void * data, int size, unsigned long offset)
+{
+    LOG_TRACE("writing " << size << " bytes to shared memory");
+
+    lockMemory();
+    uint32_t * dest = (uint32_t *) shMem_ + offset;
+
+    LOG_TRACE("adresses:"
+              << " shm = " << hex << shMem_
+              << " dst = " << hex << dest
+              << " src = " << hex << data
+              );
+
+    memcpy(dest, data, size);
+    unlockMemory();
+    event_->release();
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Function that locks access to the shared memory
+void PosixShMem::lockMemory()
+{
+    assert(memory_);
+    if (!memory_->lock()) {
+        LOG_ERROR("cannot lock memory '" << memory_->key().toStdString() << "'");
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Function that unlocks access to the shared memory
+void PosixShMem::unlockMemory()
+{
+    assert(memory_);
+    if (!memory_->unlock()) {
+        LOG_ERROR("cannot unlock memory '" << memory_->key().toStdString() << "'");
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Use this method to wait the incoming of new data
+/// you can specify a timeout in ms to avoid infinite blocking or 0 (infinite)
+/// return true if new data available before the timeout or else false
+bool PosixShMem::wait(unsigned long /*timeout*/)
+{
+    bool result = event_->acquire();
+    LOG_TRACE("event acquired: note that timeout doesn't work yet on linux platform");
+    return result;
+}
Index: tags/0.0.2/src/PacpusTools/src/Win32ShMem.cpp
===================================================================
--- tags/0.0.2/src/PacpusTools/src/Win32ShMem.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusTools/src/Win32ShMem.cpp	(revision 257)
@@ -0,0 +1,169 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+/// @author  Gerald Dherbomez <firstname.surname@utc.fr>
+/// @date    January, 2007
+// %pacpus:license}
+
+#include <Pacpus/PacpusTools/Win32ShMem.h>
+#include <Pacpus/kernel/Log.h>
+
+#include <sstream>
+#include <windows.h>
+
+DECLARE_STATIC_LOGGER("pacpus.core.Win32ShMem");
+
+using namespace pacpus;
+using namespace std;
+
+//////////////////////////////////////////////////////////////////////////
+/// Constructor
+Win32ShMem::Win32ShMem(const char * name, int size)
+{
+    // semaphore name
+    stringstream semaphoreNameSs;
+    semaphoreNameSs << (const char *) "SemShMem_" << name;
+    string semaphoreName = semaphoreNameSs.str();
+    // event name
+    stringstream eventNameSs;
+    eventNameSs << (const char *) "EvtShMem_" << name;
+    string eventName = eventNameSs.str();
+
+    LOG_DEBUG("semaphore name = " << semaphoreName);
+    LOG_DEBUG("event name = " << eventName);
+
+    semaphore_ = CreateSemaphore(NULL, /* lInitialCount = */ 1, /* lMaximumCount = */ 1, semaphoreName.c_str());
+    if (semaphore_ == NULL) {
+        LPVOID lpMsgBuf;
+        DWORD dw = GetLastError();
+
+        FormatMessage(
+            /* flags = */ FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+            /* source = */ NULL,
+            /* messageId = */ dw,
+            /* languageId = */ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+            /* out buffer = */ (LPTSTR) &lpMsgBuf,
+            /* size = */ 0,
+            /* args = */ NULL
+            );
+
+        LOG_FATAL("cannot create semaphore protection of shared memory segment '" << name << "'"
+            << ". Error: " << GetLastError()
+            << ". Message: " << (const char *) lpMsgBuf
+            << ". Program will exit"
+            ); 
+        ::exit(-1); 
+    }
+
+    // create the event - autoreset mode
+    event_ = CreateEvent(NULL, false, false, eventName.c_str()); 
+
+    // lock the semaphore and try to create the shared memory
+    lockMemory(); 
+    shMemHandle_ = CreateFileMapping(INVALID_HANDLE_VALUE, NULL,	PAGE_READWRITE,	0, size, name);  
+    if (shMemHandle_ == NULL) {
+        LOG_FATAL("cannot create shared memory segment '" << name << "'"
+            << ". Error: " << GetLastError()
+            << ". Program will exit"
+            ); 
+        ::exit(-1);
+    }
+
+    // Map the memory to a local pointer
+    shMem_ = MapViewOfFile(shMemHandle_, FILE_MAP_ALL_ACCESS, 0, 0, 0); 
+    if (shMem_ == NULL) {
+        LOG_FATAL("cannot map the view of file of the shared memory segment '" << name << "'"
+            << ". Error: " << GetLastError()
+            << ". Program will exit"
+            ); 
+        ::exit(-1);
+    }
+
+    LOG_INFO("created Win32 shared memory '" << name << "'"); 
+
+    unlockMemory(); 
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Destructor
+Win32ShMem::~Win32ShMem()
+{
+    // free the semaphore 
+    CloseHandle(semaphore_); 
+    UnmapViewOfFile(shMem_); 
+    CloseHandle(shMemHandle_); 
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Use this method to wait the incoming of new data
+/// you can specify a timeout in ms to avoid infinite blocking or 0 (infinite)
+/// @returns @b true if new data available before the timeout, @b false otherwise
+bool Win32ShMem::wait(unsigned long timeout /* = 0 */)
+{
+    if (timeout == 0) {
+        timeout = INFINITE; 
+    }
+
+    DWORD status = 0; 
+    status = WaitForSingleObject(event_, timeout); 
+
+    if (status == WAIT_OBJECT_0) {
+        return true; 
+    } else {
+        return false; 
+    }
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Use this method to get a pointer to data of the shared memory
+void * Win32ShMem::read()
+{
+    void * shMem; 
+    lockMemory(); 
+    shMem = shMem_; 
+    unlockMemory(); 
+    return shMem; 
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Use this method to get a pointer to data of the shared memory
+void Win32ShMem::read(void * mem, int size)
+{
+    lockMemory(); 
+    memcpy(mem,shMem_,size); 
+    unlockMemory(); 
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Return the event handle under Windows 
+void * Win32ShMem::getEventIdentifier()
+{
+    return event_; 
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Use this method to write data in shared memory. Offset is given in bytes
+void Win32ShMem::write(void *data, int size, unsigned long offset)
+{
+    lockMemory(); 
+    //unsigned long * dest = (unsigned long *)shMem_ + offset;
+    char * dest = (char *)shMem_ + offset;
+    //printf("adresses : shm : %x  dest : %x   offset : %x \n",shMem_, dest, offset); 
+    memcpy(dest, data, size);
+    unlockMemory();
+    SetEvent(event_); 
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Function that locks access to the shared memory
+void Win32ShMem::lockMemory()
+{
+    WaitForSingleObject(semaphore_, INFINITE); 
+}
+
+//////////////////////////////////////////////////////////////////////////
+/// Function that unlocks access to the shared memory
+void Win32ShMem::unlockMemory()
+{
+    ReleaseSemaphore(semaphore_, 1, NULL); 
+}
Index: tags/0.0.2/src/PacpusTools/src/geodesie.cpp
===================================================================
--- tags/0.0.2/src/PacpusTools/src/geodesie.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusTools/src/geodesie.cpp	(revision 257)
@@ -0,0 +1,346 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+/// @author  Jean Laneurit <firstname.surname@utc.fr>
+/// @date    April, 2010
+// %pacpus:license}
+
+#include <Pacpus/PacpusTools/geodesie.h>
+
+#include <fstream>
+
+#ifdef _MSC_VER
+#   pragma warning(disable:4244)
+#endif //_MSC_VER
+
+namespace Geodesie {
+/// ////////////////////////////////////////////////////////////////////
+Matrice::Matrice(const Matrice & A) {
+    c0_l0=A.c0_l0;c1_l0=A.c1_l0;c2_l0=A.c2_l0;
+    c0_l1=A.c0_l1;c1_l1=A.c1_l1;c2_l1=A.c2_l1;
+    c0_l2=A.c0_l2;c1_l2=A.c1_l2;c2_l2=A.c2_l2;
+}
+/// ////////////////////////////////////////////////////////////////////
+Matrice::Matrice() {
+    c0_l0=0.0;c1_l0=0.0;c2_l0=0.0;
+    c0_l1=0.0;c1_l1=0.0;c2_l1=0.0;
+    c0_l2=0.0;c1_l2=0.0;c2_l2=0.0;
+}
+/// ////////////////////////////////////////////////////////////////////
+void Matrice::Apply(double v0,double v1,double v2, double& Mv0,double& Mv1,double& Mv2) {
+    Mv0 = c0_l0*v0 + c1_l0*v1 + c2_l0*v2;
+    Mv1 = c0_l1*v0 + c1_l1*v1 + c2_l1*v2;
+    Mv2 = c0_l2*v0 + c1_l2*v1 + c2_l2*v2;
+}
+/// ////////////////////////////////////////////////////////////////////
+Matrice ProdMat(const Matrice A, const Matrice B) {
+    Matrice out;
+
+    out.c0_l0=A.c0_l0 * B.c0_l0 + A.c1_l0 * B.c0_l1 + A.c2_l0 * B.c0_l2;
+    out.c1_l0=A.c0_l0 * B.c1_l0 + A.c1_l0 * B.c1_l1 + A.c2_l0 * B.c1_l2;
+    out.c2_l0=A.c0_l0 * B.c2_l0 + A.c1_l0 * B.c2_l1 + A.c2_l0 * B.c2_l2;
+
+    out.c0_l1=A.c0_l1 * B.c0_l0 + A.c1_l1 * B.c0_l1 + A.c2_l1 * B.c0_l2;
+    out.c1_l1=A.c0_l1 * B.c1_l0 + A.c1_l1 * B.c1_l1 + A.c2_l1 * B.c1_l2;
+    out.c2_l1=A.c0_l1 * B.c2_l0 + A.c1_l1 * B.c2_l1 + A.c2_l1 * B.c2_l2;
+
+    out.c0_l2=A.c0_l2 * B.c0_l0 + A.c1_l2 * B.c0_l1 + A.c2_l2 * B.c0_l2;
+    out.c1_l2=A.c0_l2 * B.c1_l0 + A.c1_l2 * B.c1_l1 + A.c2_l2 * B.c1_l2;
+    out.c2_l2=A.c0_l2 * B.c2_l0 + A.c1_l2 * B.c2_l1 + A.c2_l2 * B.c2_l2;
+    return out;
+}
+
+/// ////////////////////////////////////////////////////////////////////
+Matrice TransMat(const Matrice A) {
+    Matrice out;
+    out.c0_l0=A.c0_l0 ; out.c1_l0 = A.c0_l1 ; out.c2_l0 = A.c0_l2 ; 
+    out.c0_l1=A.c1_l0 ; out.c1_l1 = A.c1_l1 ; out.c2_l1 = A.c1_l2 ; 
+    out.c0_l2=A.c2_l0 ; out.c1_l2 = A.c2_l1 ; out.c2_l2 = A.c2_l2 ; 
+    return out;
+}
+
+/// ////////////////////////////////////////////////////////////////////
+void Write(const Matrice A,std::ostream& out) {
+    out<< A.c0_l0<<"\t"<< A.c1_l0<<"\t"<< A.c2_l0<<"\n";
+    out<< A.c0_l1<<"\t"<< A.c1_l1<<"\t"<< A.c2_l1<<"\n";
+    out<< A.c0_l2<<"\t"<< A.c1_l2<<"\t"<< A.c2_l2<<"\n";
+}
+
+/// ////////////////////////////////////////////////////////////////////
+Raf98::~Raf98() {
+    m_dvalues.clear();
+}
+
+//-----------------------------------------------------------------------------
+bool Raf98::Interpol(double longitude, double latitude, double* Hwgs84) const {
+    *Hwgs84 = 0.0;
+    if (m_dvalues.size()==0)
+        return false;
+    const double longitude_min =  -5.5;
+    const double longitude_max =  8.5;
+    if (longitude < longitude_min)
+        return false;
+    if (longitude > longitude_max)
+        return false;
+
+    const double latitude_min =  42;
+    const double latitude_max =  51.5;
+    if (latitude < latitude_min)
+        return false;
+    if (latitude > latitude_max)
+        return false;
+
+    //conversion en position
+    double longPix = (longitude - longitude_min) * 30.;
+    double latPix  = (latitude_max - latitude) * 40.;
+
+    double RestCol,RestLig;      
+    double  ColIni,LigIni;     
+    RestCol = modf(longPix,&ColIni);
+    RestLig = modf(latPix,&LigIni);
+    
+    
+    double Zbd = (1.0-RestCol) * (1.0-RestLig) * LitGrille(ColIni  , LigIni  );
+    Zbd += RestCol * (1.0-RestLig) * LitGrille(ColIni+1, LigIni  );
+    Zbd += (1.0-RestCol) *   RestLig  * LitGrille(ColIni  , LigIni+1);
+    Zbd += RestCol * RestLig * LitGrille(ColIni+1, LigIni+1);
+    *Hwgs84 = Zbd;
+
+
+    return true;
+}
+/// ////////////////////////////////////////////////////////////////////
+double Raf98::LitGrille(unsigned int c,unsigned int l) const{
+    const unsigned int w=421;
+    //    const unsigned int h=381;
+    return m_dvalues.at(c+l*w);
+}
+/// ////////////////////////////////////////////////////////////////////
+bool Raf98::Load(const std::string & sin) {
+    std::ifstream in(sin.c_str());
+    unsigned int w = 421;
+    unsigned int h = 381;
+    
+    m_dvalues.reserve(w*h);
+
+    char entete[1024];//sur 3 lignes
+    in.getline(entete,1023);
+    in.getline(entete,1023);
+    in.getline(entete,1023);
+
+    char bidon[1024];
+    double val;
+    for (unsigned int i=0; i< h; ++i) {
+        for (unsigned int j=0; j< 52; ++j)  {
+            for (unsigned int k=0; k< 8; ++k) {
+                in >> val;
+                m_dvalues.push_back( val );
+            }
+            in.getline(bidon,1023);
+        }
+        for (unsigned int k=0; k< 5; ++k) {
+            in >> val;
+            m_dvalues.push_back( val );
+        }
+        in.getline(bidon,1023);
+        if (!in.good())         {
+            m_dvalues.clear();
+            return false;
+        }
+    }
+    return in.good();
+}
+
+} // namespace Geodesie
+
+/// ////////////////////////////////////////////////////////////////////
+/// ////////////////////////////////////////////////////////////////////
+
+/// ////////////////////////////////////////////////////////////////////
+//ALGO0001
+double Geodesie::LatitueIsometrique(double latitude,double e) {
+    double li;
+    li = log(tan(M_PI_4 + latitude/2.)) + e*log( (1-e*sin(latitude))/(1+e*sin(latitude)) )/2;
+    return li;
+}
+
+/// ////////////////////////////////////////////////////////////////////
+//ALGO0002
+double Geodesie::LatitueIsometrique2Lat(double latitude_iso,double e,double epsilon) {
+    double latitude_i=2*atan(exp(latitude_iso)) - M_PI_2;
+    double latitude_ip1=latitude_i+epsilon*2;
+    while (fabs(latitude_i-latitude_ip1)>epsilon) {
+        latitude_i=latitude_ip1;
+        latitude_ip1=2*atan(
+                    exp(e*0.5*
+                        log(
+                            (1+e*sin(latitude_i))/(1-e*sin(latitude_i))
+                            )
+                        )
+                    *exp(latitude_iso)
+                    ) - M_PI_2;
+    }
+    return latitude_ip1;
+}
+/// ////////////////////////////////////////////////////////////////////
+void Geodesie::Geo2ProjLambert(
+    double lambda,double phi,
+    double n, double c,double e,
+    double lambdac,double xs,double ys,
+    double& X,double& Y)
+{
+    double lat_iso=LatitueIsometrique(phi,e);
+    X=xs+c*exp(-n*lat_iso)*sin(n*(lambda-lambdac));
+    Y=ys-c*exp(-n*lat_iso)*cos(n*(lambda-lambdac));
+}
+/// ////////////////////////////////////////////////////////////////////
+//ALGO0004
+void Geodesie::Proj2GeoLambert(
+    double X,double Y,
+    double n, double c,double e,
+    double lambdac,double xs,double ys,
+    double epsilon,
+    double& lambda,double& phi)
+{
+    double X_xs=X-xs;
+    double ys_Y=ys-Y;
+    double R=sqrt(X_xs*X_xs+ys_Y*ys_Y);
+    double gamma=atan(X_xs/ys_Y);
+    lambda=lambdac+gamma/n;
+    double lat_iso=-1/n*log(fabs(R/c));
+    phi=LatitueIsometrique2Lat(lat_iso,e,epsilon);
+}
+/// ////////////////////////////////////////////////////////////////////
+double Geodesie::ConvMerApp(double longitude) {
+    double phi0_Lambert93 = Deg2Rad(46.5);
+    double lambda0_Lambert93 = Deg2Rad(3.0);
+    double conv=-sin(phi0_Lambert93)*(longitude-lambda0_Lambert93);
+    return  conv;
+}
+
+////////////////////////////////////////////////////////////////////
+void Geodesie::Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,Matrice in,double& E,double& N,double& h,Matrice& out) {
+    Matrice passage;
+    double conv=Geodesie::ConvMerApp(lambda);
+    double c_=cos(conv);
+    double s_=sin(conv);
+
+    passage.c0_l0 = c_;
+    passage.c0_l1 = s_;
+    passage.c0_l2 =  0.0;
+
+    passage.c1_l0 = -s_;
+    passage.c1_l1 = c_;
+    passage.c1_l2 =  0.0;
+
+    passage.c2_l0 =  0.0; 
+    passage.c2_l1 =  0.0; 
+    passage.c2_l2 =  1.0; 
+    
+    out=ProdMat(passage,in);
+    double diff_h;
+    raf98.Interpol(Rad2Deg(lambda),Rad2Deg(phi),&diff_h);
+    h=he-diff_h;
+    
+    Geodesie::Geo2ProjLambert(
+                lambda,phi,
+                n_Lambert93,c_Lambert93,e_Lambert93,
+                lambda0_Lambert93,xs_Lambert93,ys_Lambert93,
+                E,N);
+}
+////////////////////////////////////////////////////////////////////////
+void Geodesie::Geographique_2_Lambert93(const Raf98& raf98,double lambda,double phi,double he,double& E,double& N,double& h) {
+    Geodesie::Geo2ProjLambert(
+                lambda,phi,
+                n_Lambert93,c_Lambert93,e_Lambert93,
+                lambda0_Lambert93,xs_Lambert93,ys_Lambert93,
+                E,N);
+
+    double diff_h;
+    raf98.Interpol(Rad2Deg(lambda),Rad2Deg(phi),&diff_h);
+    h=he-diff_h;
+}
+/**
+    Converts Lambert93 coordinates (East, North, Height) into geographical coordinates in radians (Longitude = Rad2Deg(lambda), Latitude = Rad2Deg(phi), Height)
+*/
+void Geodesie::Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,double& lambda,double& phi,double& he) {
+    Geodesie::Proj2GeoLambert(
+                E,N,
+                n_Lambert93,c_Lambert93,e_Lambert93,
+                lambda0_Lambert93,xs_Lambert93,ys_Lambert93,
+                0.0000000000000001,
+                lambda,phi);
+
+    double diff_h;
+    raf98.Interpol(Rad2Deg(lambda),Rad2Deg(phi),&diff_h);
+    he=h+diff_h;
+}
+////////////////////////////////////////////////////////////////////////
+void Geodesie::Lambert93_2_Geographique(const Raf98& raf98,double E,double N,double h,Matrice in,double& lambda,double& phi,double& he,Matrice& out) {
+    Geodesie::Proj2GeoLambert(
+                E,N,
+                n_Lambert93,c_Lambert93,e_Lambert93,
+                lambda0_Lambert93,xs_Lambert93,ys_Lambert93,
+                0.0000000000000001,
+                lambda,phi);
+
+    Matrice passage;
+    double conv=Geodesie::ConvMerApp(lambda);
+    double c_=cos(conv);
+    double s_=sin(conv);
+
+    passage.c0_l0 = c_;
+    passage.c0_l1 = -s_;
+    passage.c0_l2 =  0.0;
+
+    passage.c1_l0 = s_;
+    passage.c1_l1 = c_;
+    passage.c1_l2 =  0.0;
+
+    passage.c2_l0 =  0.0; 
+    passage.c2_l1 =  0.0; 
+    passage.c2_l2 =  1.0; 
+    
+    out=ProdMat(passage,in);
+    
+    double diff_h;
+    raf98.Interpol(Rad2Deg(lambda),Rad2Deg(phi),&diff_h);
+    he=h+diff_h;
+}
+
+////////////////////////////////////////////////////////////////////////
+void Geodesie::Geographique_2_ECEF(double longitude,double latitude,double he,double& x,double& y,double& z) {
+    const double n = GRS_a / sqrt(1.0 - pow(GRS_e,2) * pow(sin(latitude),2));
+    x = (n + he) * cos(latitude) * cos(longitude);
+    y = (n + he) * cos(latitude) * sin(longitude);
+    z = (n * (1.0 - pow(GRS_e,2)) + he) * sin(latitude);
+}
+
+////////////////////////////////////////////////////////////////////////
+void Geodesie::ECEF_2_ENU(double x,double y,double z,double& e,double& n,double& u,double lon0,double lat0,double he0) {
+    double slat = std::sin(lat0);
+    double clat = std::cos(lat0);
+    double slon = std::sin(lon0);
+    double clon = std::cos(lon0);
+
+    Geodesie::Matrice C;
+    C.c0_l0 = -slon;
+    C.c1_l0 = clon;
+
+    C.c0_l1 = -clon * slat;
+    C.c1_l1 = -slon * slat;
+    C.c2_l1 = clat;
+
+    C.c0_l2 = clon * clat;
+    C.c1_l2 = slon * clat;
+    C.c2_l2 = slat;
+
+    double x0, y0, z0;
+    Geographique_2_ECEF(lon0,lat0,he0, x0,y0,z0);
+
+    x -= x0;
+    y -= y0;
+    z -= z0;
+
+    C.Apply(x,y,z, e,n,u);
+}
Index: tags/0.0.2/src/PacpusTools/src/matrice.cpp
===================================================================
--- tags/0.0.2/src/PacpusTools/src/matrice.cpp	(revision 257)
+++ tags/0.0.2/src/PacpusTools/src/matrice.cpp	(revision 257)
@@ -0,0 +1,405 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+/// @author  Jean Laneurit <firstname.surname@utc.fr>
+/// @date    April, 2010
+// %pacpus:license}
+
+#include <Pacpus/PacpusTools/matrice.h>
+
+#include <cstdlib>
+#include <iostream>
+
+using ::std::cout;
+using ::std::endl;
+
+// Le constructeur :
+matrice::matrice()
+{
+    n = 0;
+    m = 0;
+}
+matrice::matrice(unsigned short int nl, unsigned short int nc)
+{
+    n = nl;
+    m = nc;
+    lignes = new ligne[n];
+    for (unsigned short int i=0; i<n; ++i) {
+        lignes[i] = new double[m];
+    }
+}
+
+void matrice::Alloue(unsigned short int nl, unsigned short int nc)
+{
+    n = nl;
+    m = nc;
+    lignes = new ligne[n];
+    for (unsigned short int i=0; i<n; ++i)
+        lignes[i] = new double[m];
+}
+
+matrice::matrice(unsigned short int nl, unsigned short int nc, t_m type)
+{
+    n = nl;
+    m = nc;
+    lignes = new ligne[n];
+    for (unsigned short int i=0; i<n; ++i)
+        lignes[i] = new double[m];
+
+    switch(type)
+    {
+    case ONES :
+    {
+        for (unsigned short int i=0; i<n; ++i) // Initialisation avec des 1
+            for (unsigned short int j=0; j<m; ++j)
+                lignes[i][j] = 1;
+        break;
+    }
+    case ZEROS :
+    {
+        for (unsigned short int i=0; i<n; ++i) // Initialisation avec des 0
+            for (unsigned short int j=0; j<m; ++j)
+                lignes[i][j] = 0;
+        break;
+    }
+    case IDENTITY :
+    {
+        if (n==m)
+        {
+            for (unsigned short int i=0; i<n; ++i)
+            { // Initialisation en matrice identit�
+                for (unsigned short int j=0; j<m; ++j)
+                    lignes[i][j] = 0;
+                lignes[i][i] = 1;
+            }
+        }
+        else
+        {
+            cout<<"Matrice identit� doit �tre carr�";
+            exit(0);
+        }
+        break;
+    }
+    }
+}
+
+// Le constructeur de copie :
+matrice::matrice(const matrice &source)
+{
+    m = source.m;
+    n = source.n;
+    lignes = new ligne[n];   // Alloue.
+    for (unsigned short int i=0; i<n; ++i)
+    {
+        lignes[i] = new double[m];
+        for (unsigned short int j=0; j<m; ++j)  // Copie.
+            lignes[i][j] = source.lignes[i][j];
+    }
+}
+
+// Le destructeur :
+matrice::~matrice(void)
+{
+    if (n!=0 && m!=0) {
+        for (unsigned short int i=0; i<n; ++i)
+            delete[] lignes[i];
+        delete[] lignes;
+    }
+}
+
+// L'op�rateur d'affectation :
+matrice &matrice::operator=(const matrice &source)
+{
+    if (&source != this)
+    {
+        if (source.n!=n || source.m!=m)   // V�rifie lesdimensions.
+        {
+            if (n!=0 && m!=0) {
+                for (unsigned short int i=0; i<n; ++i)
+                    delete[] lignes[i];
+                delete[] lignes;              // D�truit...
+            }
+            m = source.m;
+            n = source.n;
+            lignes = new ligne[n];        // et r�alloue.
+            for (unsigned short i=0; i<n; ++i) lignes[i] = new double[m];
+        }
+        for (unsigned short int i=0; i<n; ++i) // Copie.
+            for (unsigned short int j=0; j<m; ++j)
+                lignes[i][j] = source.lignes[i][j];
+    }
+    return *this;
+}
+
+matrice &matrice::operator=(double x) {
+    if (!n && !m) {
+        cout << " =double : taille matrice inconnue";
+        exit(0);
+    }
+    for (unsigned short int i=0; i<n; ++i) // Copie.
+        for (unsigned short int j=0; j<m; ++j)
+            lignes[i][j] = x;
+    return *this;
+}
+
+
+// operateur m1 += m2;
+matrice &matrice::operator+=(const matrice &source) {
+    if (&source != this)
+    {
+        if (source.n!=n || source.m!=m)   // V�rifie lesdimensions.
+        {
+            cout << "addition : dimensions matrice incompatibles\n";
+            exit(0);
+        }
+        for (unsigned short int i=0; i<n; ++i) // Addition
+            for (unsigned short int j=0; j<m; ++j)
+                lignes[i][j] =  lignes[i][j]+source.lignes[i][j];
+    }
+    return *this;
+}
+
+// operateur m1 -= m2;
+matrice &matrice::operator-=(const matrice &source) {
+    if (&source != this)
+    {
+        if (source.n!=n || source.m!=m)   // V�rifie lesdimensions.
+        {
+            cout << "soustraction : dimensions matrice incompatibles\n";
+            exit(0);
+        }
+        for (unsigned short int i=0; i<n; ++i) // Addition
+            for (unsigned short int j=0; j<m; ++j)
+                lignes[i][j] =lignes[i][j]-source.lignes[i][j];
+    }
+    return *this;
+}
+
+// Addition :
+matrice matrice::operator+(const matrice &m1) const
+{
+
+    if (m1.n!=n || m1.m!=m)   // V�rifie lesdimensions.
+    {
+        cout << "addition : dimensions matrice incompatibles\n";
+        exit(0);
+    }
+    matrice tmp(n,m);
+    for (unsigned short int i=0; i<n; i++)   // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            tmp.lignes[i][j] = lignes[i][j]+m1.lignes[i][j];
+    return tmp;
+}
+
+// Soustraction :
+matrice matrice::operator-(const matrice &m1) const
+{  
+    if (m1.n!=n || m1.m!=m)   // V�rifie lesdimensions.
+    { 
+        cout << "soustraction : dimensions matrice incompatibles\n";
+        exit(0);
+    } 
+    matrice tmp(n,m);
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            tmp.lignes[i][j]=lignes[i][j]-m1.lignes[i][j];
+    return tmp;
+}
+
+// Multiplication :
+matrice matrice::operator*(const matrice &m1) const
+{  
+
+    if (m1.n!=m)   // V�rifie lesdimensions.
+    { 
+        cout << "multiplication : dimensions matrice incompatibles\n";
+        exit(0);
+    } 
+    matrice tmp(n,m1.m);
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m1.m; j++)
+        {
+            tmp.lignes[i][j]=0.;               // Produit scalaire.
+            for (unsigned short int k=0; k<m; k++)
+                tmp.lignes[i][j] += lignes[i][k]*m1.lignes[k][j];
+        }
+    return tmp;
+}
+
+//Addition avec un scalaire 
+matrice &matrice::operator+=(double x) { 
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            lignes[i][j] += x;
+    return *this;
+}
+
+//soustraction avec un scalaire 
+matrice &matrice::operator-=(double x) {
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            lignes[i][j] -= x;
+    return *this;
+}
+
+//Addition matrice avec scalaire
+matrice matrice::operator+(double x)const{ 
+    matrice tmp(n,m);
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            tmp.lignes[i][j]=lignes[i][j]+x;
+    return tmp;
+}
+
+//Soustraction matrice avec scalaire
+matrice matrice::operator-(double x)const{
+    matrice tmp(n,m);
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            tmp.lignes[i][j] = lignes[i][j]-x;
+    return tmp;
+}
+
+//Produit matrice avec scalaire
+matrice matrice::operator*(double x)const{
+    matrice tmp(n,m);
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            tmp.lignes[i][j] = lignes[i][j]*x;
+    return tmp;
+}
+
+//Division matrice par un scalaire
+matrice matrice::operator/(double x)const{
+    matrice tmp(n,m);
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            tmp.lignes[i][j] = lignes[i][j]/x;
+    return tmp;
+}
+
+//Transpose
+matrice matrice::T()
+{  
+    matrice tmp(m,n);
+    for (unsigned short int i=0; i<n; i++)  // Double boucle.
+        for (unsigned short int j=0; j<m; j++)
+            tmp.lignes[j][i]=lignes[i][j];
+    return tmp;
+}
+
+//Inversion
+//#define SWAP(a,b) {float temp=(a);(a)=(b);(b)=temp;}
+#define ABS(x) ((x)<0 ? (-(x)) : (x))
+matrice matrice::I()
+{  
+    matrice tmp = *this ;
+    unsigned short int   *indxc,*indxr,*ipiv;
+    unsigned short int    i,j,k,l,ll,icol=0,irow=0;
+    double   big,dum,pivinv;
+
+    indxc = new unsigned short int[n+1];
+    indxr = new unsigned short int[n+1];
+    ipiv  = new unsigned short int[n+1];
+
+    for (j=1;j<=n;j++) ipiv[j]=0;
+    for (i=1;i<=n;i++) {
+        big=0.0;
+        for (j=1;j<=n;j++) {
+            if (ipiv[j] != 1) {
+                for (k=1;k<=n;k++) {
+                    if (ipiv[k] == 0) {
+                        if (ABS(tmp.lignes[j-1][k-1]) >= big) {
+                            big=ABS(tmp.lignes[j-1][k-1]) ;
+                            irow=j;
+                            icol=k;
+                        }
+                    } else if (ipiv[k] > 1) cout << "inversion : matrice singuli�re -type 1-";
+                }
+            }
+        }
+        ++(ipiv[icol]);
+        if (irow != icol) {
+            for (l=1;l<=n;l++) {
+                std::swap(tmp.lignes[irow-1][l-1], tmp.lignes[icol-1][l-1]);
+            }
+        }
+        indxr[i]=irow;
+        indxc[i]=icol;
+        if (tmp.lignes[icol-1][icol-1] == 0.0) cout << "inversion : matrice signuli�re -type 2-";
+        pivinv=1.0/tmp.lignes[icol-1][icol-1];
+        tmp.lignes[icol-1][icol-1]=1.0;
+        for (l=1;l<=n;l++) tmp.lignes[icol-1][l-1] *= pivinv;
+        for (ll=1;ll<=n;ll++) {
+            if (ll != icol) {
+                dum=tmp.lignes[ll-1][icol-1];
+                tmp.lignes[ll-1][icol-1]=0.0;
+                for (l=1;l<=n;l++) tmp.lignes[ll-1][l-1] -= tmp.lignes[icol-1][l-1]*dum;
+            }
+        }
+    }
+    for (l=n;l>=1;l--) {
+        if (indxr[l] != indxc[l]) {
+            for (k=1;k<=n;k++) {
+                std::swap(tmp.lignes[k-1][indxr[l]-1],tmp.lignes[k-1][indxc[l]-1]);
+            }
+        }
+    }
+    delete []ipiv ;
+    delete []indxr ;
+    delete []indxc ;
+    return tmp ;
+}
+//#undef SWAP
+#undef ABS
+
+// Op�rateur d'acc�s en �criture:
+double &matrice::operator()(unsigned short int i,unsigned short int j)
+{  
+    if ((i-1<0) || (j-1<0) || (i-1>n) || (j-1>m)) { // v�rifie les indices
+        cout << "�criture : indice incorrect " << i << "x" << j << '\n' ;
+        exit(0);
+    }
+    return lignes[i-1][j-1];
+} 
+
+double &matrice::operator()(unsigned short int i)
+{  
+    if (i-1<0 || i-1>n*m) {
+        cout << "lecture : indice incorrect" << i <<'\n' ;
+        exit(0);
+    }
+    return **(lignes+i-1);
+}
+
+// Op�rateur d'acc�s en lecture:
+double matrice::operator()(unsigned short int i, unsigned short int j) const
+{  
+    if ((i-1<0) || (j-1<0) || (i-1>n) || (j-1>m)) { // v�rifie les indices
+        cout << "lecture : indice incorrect" << i << "x" << j<< '\n' ;
+        exit(0);
+    }
+    return lignes[i-1][j-1];
+} 
+
+double matrice::operator()(unsigned short int i) const
+{  
+    if (i-1<0 || i-1>n*m) {
+        cout << "lecture : indice incorrect" << i <<'\n' ;
+        exit(0);
+    }
+    return **(lignes+i-1);
+}
+
+// Affiche la matrice
+void matrice::print(const char *nom) {
+    cout << "" << nom << " est une matrice[" << n << "x" << m << "]" << endl  ;
+
+    for (unsigned short int i=0; i<n; ++i) {
+        for (unsigned short int j=0; j<m; ++j) {
+            cout << lignes[i][j] <<'\t';
+        }
+        cout << endl;
+    }
+    cout << endl ;
+}
Index: tags/0.0.2/src/RoadTime/CMakeLists.txt
===================================================================
--- tags/0.0.2/src/RoadTime/CMakeLists.txt	(revision 257)
+++ tags/0.0.2/src/RoadTime/CMakeLists.txt	(revision 257)
@@ -0,0 +1,42 @@
+#################################################
+#   ___________    ____ ______  __ __  _____    #
+#   \____ \__  \ _/ ___\\____ \|  |  \/  ___/   #
+#   |  |_> > __ \\  \___|  |_> >  |  /\___ \    #
+#   |   __(____  /\___  >   __/|____//____  >   #
+#   |__|       \/     \/|__|              \/    #
+#                                               #
+#################################################
+project(ROAD_TIME)
+
+# ========================================
+# Compiler definitions
+# ========================================
+add_definitions(
+    -DROAD_TIME_EXPORTS
+)
+
+# ========================================
+# List of sources
+# ========================================
+set(
+    PROJECT_SRCS
+    ./src/road_time.c
+)
+
+# ========================================
+# Build a library
+# ========================================
+pacpus_add_library(
+    ${PROJECT_NAME} SHARED
+    ${PROJECT_SRCS}
+)
+
+# ========================================
+# Install
+# ========================================
+pacpus_install(${PROJECT_NAME})
+
+# ========================================
+# Folder
+# ========================================
+pacpus_folder(${PROJECT_NAME} "libraries")
Index: tags/0.0.2/src/RoadTime/src/road_time.c
===================================================================
--- tags/0.0.2/src/RoadTime/src/road_time.c	(revision 257)
+++ tags/0.0.2/src/RoadTime/src/road_time.c	(revision 257)
@@ -0,0 +1,190 @@
+// %pacpus:license{
+// This file is part of the PACPUS framework distributed under the
+// CECILL-C License, Version 1.0.
+// %pacpus:license}
+
+#ifdef WIN32
+  #include <windows.h>
+#endif
+
+#include <Pacpus/kernel/road_time.h>
+
+#include <memory.h> 
+#include <sys/types.h>
+#include <sys/timeb.h>
+#include <malloc.h>
+
+
+
+#define SHMEMSIZE sizeof(struct Initialisation_Time) 
+ 
+static LPVOID lpvMem = NULL; // pointer to shared memory
+
+VOID SetSharedMem(struct Initialisation_Time * toto);
+VOID GetSharedMem(struct Initialisation_Time * toto);
+
+BOOL WINAPI DllMain( HANDLE hModule, 
+                       DWORD  ul_reason_for_call, 
+                       LPVOID lpReserved
+					 )
+{
+	HANDLE hMapObject = NULL;  // handle to file mapping
+    BOOL fInit, fIgnore; 
+	struct Initialisation_Time First_Launcher;
+	struct timeb timeptr;
+	LARGE_INTEGER tmp;
+
+    switch (ul_reason_for_call)
+	{
+		case DLL_THREAD_ATTACH:
+			break;
+		case DLL_PROCESS_ATTACH:
+			// Create a named file mapping object.
+            hMapObject = CreateFileMapping( 
+                INVALID_HANDLE_VALUE, // use paging file
+                NULL,                 // default security attributes
+                PAGE_READWRITE,       // read/write access
+                0,                    // size: high 32-bits
+                SHMEMSIZE,            // size: low 32-bits
+                "roadtimedllmemfilemap");     // name of map object
+            if (hMapObject == NULL) 
+                return FALSE; 
+ 
+            // The first process to attach initializes memory.
+ 
+            fInit = (GetLastError() != ERROR_ALREADY_EXISTS); 
+ 
+            // Get a pointer to the file-mapped shared memory.
+ 
+            lpvMem = MapViewOfFile( 
+                hMapObject,     // object to map view of
+                FILE_MAP_WRITE, // read/write access
+                0,              // high offset:  map from
+                0,              // low offset:   beginning
+                0);             // default: map entire file
+            if (lpvMem == NULL) 
+                return FALSE; 
+ 
+            // Initialize memory if this is the first process.
+            if (fInit) 
+				{
+					memset(lpvMem, '\0', SHMEMSIZE); 
+					
+					ftime(&timeptr );
+					First_Launcher.Real_Time=(road_time_t) timeptr.time * 1000000 +(road_time_t) timeptr.millitm * 1000;
+					if (!QueryPerformanceFrequency(&tmp))
+						{
+							MessageBox(NULL,"No Multimedia Counter Available","DLL Message",MB_OK);
+							First_Launcher.Multimedia_Counter_Frequency=(unsigned __int64) 0;
+							First_Launcher.Multimedia_Counter=(unsigned __int64)0;
+							First_Launcher.delta_t=First_Launcher.Real_Time;
+							SetSharedMem(&First_Launcher);
+							return FALSE;
+						}	
+					First_Launcher.Multimedia_Counter_Frequency=(unsigned __int64) tmp.QuadPart;
+					if (!QueryPerformanceCounter(&tmp))
+						{	
+							MessageBox(NULL,"Couldn't Get the value of Multimedia Counter","DLL Message",MB_OK);
+							First_Launcher.Multimedia_Counter_Frequency=(unsigned __int64) 0;
+							First_Launcher.Multimedia_Counter=(unsigned __int64)0;
+							First_Launcher.delta_t=First_Launcher.Real_Time;
+							SetSharedMem(&First_Launcher);
+							return FALSE;
+						}
+					First_Launcher.Multimedia_Counter=(unsigned __int64)tmp.QuadPart;
+					First_Launcher.delta_t=First_Launcher.Real_Time-(road_time_t) (First_Launcher.Multimedia_Counter*1000000/First_Launcher.Multimedia_Counter_Frequency);
+					//MessageBox(NULL,"You called Road_Time_2.DLL","DLL Message",MB_OK);
+					SetSharedMem(&First_Launcher);
+
+
+				}
+			break;
+		case DLL_THREAD_DETACH:
+			break;
+		case DLL_PROCESS_DETACH:
+			 // Unmap shared memory from the process's address space.
+			 // In the case of the last process, Windwos automatically clean up the memory.
+             fIgnore = UnmapViewOfFile(lpvMem); 
+             // Close the process's handle to the file-mapping object.
+             fIgnore = CloseHandle(hMapObject); 
+			break;
+    }
+    return TRUE;
+}
+
+
+// SetSharedMem sets the contents of shared memory. 
+VOID SetSharedMem(struct Initialisation_Time * toto) 
+{ 
+    // Copy the null-terminated string into shared memory.
+ 
+    memcpy(lpvMem,toto,sizeof(struct Initialisation_Time));
+} 
+ 
+// GetSharedMem gets the contents of shared memory. 
+VOID GetSharedMem(struct Initialisation_Time * toto) 
+{ 
+    memcpy(toto,lpvMem,sizeof(struct Initialisation_Time));
+}
+
+
+// This is an example of an exported function.
+road_time_t ROAD_TIME_API road_time2(void)
+{
+	struct Initialisation_Time First_Launcher;
+	road_time_t reply;
+	LARGE_INTEGER tmp;
+	struct timeb timeptr;
+	
+	GetSharedMem(&First_Launcher);
+
+	if (!QueryPerformanceCounter(&tmp))
+		{	
+			MessageBox(NULL,"Couldn't Get the value of Multimedia Counter","DLL Message",MB_OK);
+			ftime(&timeptr );
+			reply=(road_time_t) timeptr.time * 1000000 +(road_time_t) timeptr.millitm * 1000;
+		}
+					
+	else
+		{	
+			reply=(road_time_t) First_Launcher.Real_Time + (road_time_t) (((unsigned __int64) tmp.QuadPart - First_Launcher.Multimedia_Counter) * 1000000/First_Launcher.Multimedia_Counter_Frequency);
+		}
+	return(reply);
+
+}
+
+// This is an example of a second exported function.
+road_time_t ROAD_TIME_API road_time(void)
+{
+	struct Initialisation_Time First_Launcher;
+	road_time_t reply;
+	LARGE_INTEGER tmp;
+	struct timeb timeptr;
+	
+	GetSharedMem(&First_Launcher);
+	
+	if (!QueryPerformanceCounter(&tmp))
+		{	
+			MessageBox(NULL,"Couldn't Get the value of Multimedia Counter","DLL Message",MB_OK);
+			ftime(&timeptr );
+			reply=(road_time_t) timeptr.time * 1000000 +(road_time_t) timeptr.millitm * 1000;
+		}
+					
+	else
+		{	
+			reply=First_Launcher.delta_t+(road_time_t) ((tmp.QuadPart*1000000)/First_Launcher.Multimedia_Counter_Frequency);
+			
+		}
+	return(reply);
+
+}
+
+// This is an example of a second exported function.
+struct Initialisation_Time ROAD_TIME_API road_time_init(void)
+{
+	struct Initialisation_Time First_Launcher;
+	
+	GetSharedMem(&First_Launcher);
+	return(First_Launcher);
+
+}
