text:
#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
        level 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 false 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 false too. See
                        the user manual for more details. */
                bool additive;

    protected:
        friend class DefaultLoggerFactory;

        /**
        This constructor created a new logger instance and
        sets its name.

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 newAppender to the list of appenders of this
        Logger instance.

If newAppender 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
        this.  If no appenders could be found, emit a
        warning.

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.

This method first checks if this logger is DEBUG
        enabled by comparing the level of this logger with the
        DEBUG level. If this logger is
        DEBUG 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.

This method first checks if this logger is DEBUG
        enabled by comparing the level of this logger with the
        DEBUG level. If this logger is
        DEBUG 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.

This method first checks if this logger is DEBUG
        enabled by comparing the level of this logger with the
        DEBUG level. If this logger is
        DEBUG 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.

This method first checks if this logger is DEBUG
        enabled by comparing the level of this logger with the
        DEBUG level. If this logger is
        DEBUG 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.

This method first checks if this logger is DEBUG
        enabled by comparing the level of this logger with the
        DEBUG level. If this logger is
        DEBUG 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.

This method first checks if this logger is DEBUG
        enabled by comparing the level of this logger with the
        DEBUG level. If this logger is
        DEBUG 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.

This method first checks if this logger is DEBUG
        enabled by comparing the level of this logger with the
        DEBUG level. If this logger is
        DEBUG 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.

This method first checks if this logger is DEBUG
        enabled by comparing the level of this logger with the
        DEBUG level. If this logger is
        DEBUG 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is FATAL
        enabled by comparing the level of this logger with the
        FATAL level. If this logger is
        FATAL 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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.

This method first checks if this logger is ERROR
        enabled by comparing the level of this logger with the
        ERROR level. If this logger is
        ERROR 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 name.

Return the appender with that name if in the list. Return
        NULL otherwise.  */
        AppenderPtr getAppender(const LogString& name) const;

        /**
        Starting from this logger, search the logger hierarchy for a
        non-null level and return it.

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
        Logger 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.

The root logger will return 0.
        */
        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
        factory parameter.

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
        factory parameter.

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
        factory parameter.

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
        factory parameter.

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
        factory parameter.

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 inherited 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 NULL is returned.
        */
        helpers::ResourceBundlePtr getResourceBundle() const;

        protected:
        /**
        Returns the string resource coresponding to key 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.

This method first checks if this logger is INFO
        enabled by comparing the level of this logger with the
        INFO level. If this logger is
        INFO 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.

This method first checks if this logger is INFO
        enabled by comparing the level of this logger with the
        INFO level. If this logger is
        INFO 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.

This method first checks if this logger is INFO
        enabled by comparing the level of this logger with the
        INFO level. If this logger is
        INFO 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.

This method first checks if this logger is INFO
        enabled by comparing the level of this logger with the
        INFO level. If this logger is
        INFO 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.

This method first checks if this logger is INFO
        enabled by comparing the level of this logger with the
        INFO level. If this logger is
        INFO 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.

This method first checks if this logger is INFO
        enabled by comparing the level of this logger with the
        INFO level. If this logger is
        INFO 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.

This method first checks if this logger is INFO
        enabled by comparing the level of this logger with the
        INFO level. If this logger is
        INFO 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 DEBUG
        *  Level.
        *
        *
 This function is intended to lessen the computational cost of
        *  disabled log debug statements.
        *
        *
 For some logger Logger object, when you write,
        *

        *      logger->debug("debug message");
        *

        *
        *
You incur the cost constructing the message, concatenation in
        *  this case, regardless of whether the message is logged or not.
        *
        *
If you are worried about speed, then you should write
        *

        *    if(logger->isDebugEnabled()) {
        *      logger->debug("debug message");
        *    }
        *

        *
        *
This way you will not incur the cost of parameter
        *  construction if debugging is disabled for logger. On
        *  the other hand, if the logger is debug enabled, you
        *  will incur the cost of evaluating whether the logger is debug
        *  enabled twice. Once in isDebugEnabled and once in
        *  the debug.  This is an insignificant overhead
        *  since evaluating a logger takes about 1%% of the time it
        *  takes to actually log.
        *
        *  @return bool - true if this logger is debug
        *  enabled, false 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 level.
        */
        bool isEnabledFor(const LevelPtr& level) const;

        /**
        Check whether this logger is enabled for the info Level.
        See also #isDebugEnabled.

        @return bool - true if this logger is enabled
        for level info, false otherwise.
        */
        bool isInfoEnabled() const;

         /**
        Check whether this logger is enabled for the warn Level.
        See also #isDebugEnabled.

        @return bool - true if this logger is enabled
        for level warn, false otherwise.
        */
        bool isWarnEnabled() const;

         /**
        Check whether this logger is enabled for the error Level.
        See also #isDebugEnabled.

        @return bool - true if this logger is enabled
        for level error, false otherwise.
        */
        bool isErrorEnabled() const;

         /**
        Check whether this logger is enabled for the fatal Level.
        See also #isDebugEnabled.

        @return bool - true if this logger is enabled
        for level fatal, false otherwise.
        */
        bool isFatalEnabled() const;

        /**
        Check whether this logger is enabled for the trace level.
        See also #isDebugEnabled.

        @return bool - true if this logger is enabled
        for level trace, false otherwise.
        */
        bool isTraceEnabled() const;

        /**
        Log a localized and parameterized message.

        First, the user supplied
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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 {0},
                      {1} 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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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
        key is searched in the resource bundle. Next, the resulting
        pattern is formatted using helpers::StringHelper::format method with the user
        supplied string array params.

        @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 wrapper 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 wrapper 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 wrapper 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 wrapper 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 wrapper 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 wrapper 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 wrapper 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 wrapper 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 wrapper 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.

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.

As in
    logger->setLevel(Level::getDebug());

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.

This method first checks if this logger is WARN
        enabled by comparing the level of this logger with the
        WARN level. If this logger is
        WARN 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.

This method first checks if this logger is WARN
        enabled by comparing the level of this logger with the
        WARN level. If this logger is
        WARN 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.

This method first checks if this logger is WARN
        enabled by comparing the level of this logger with the
        WARN level. If this logger is
        WARN 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.

This method first checks if this logger is WARN
        enabled by comparing the level of this logger with the
        WARN level. If this logger is
        WARN 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.

This method first checks if this logger is WARN
        enabled by comparing the level of this logger with the
        WARN level. If this logger is
        WARN 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.

This method first checks if this logger is WARN
        enabled by comparing the level of this logger with the
        WARN level. If this logger is
        WARN 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.

This method first checks if this logger is WARN
        enabled by comparing the level of this logger with the
        WARN level. If this logger is
        WARN 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.

This method first checks if this logger is WARN
        enabled by comparing the level of this logger with the
        WARN level. If this logger is
        WARN 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.

This method first checks if this logger is TRACE
        enabled by comparing the level of this logger with the
        TRACE level. If this logger is
        TRACE 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.

This method first checks if this logger is TRACE
        enabled by comparing the level of this logger with the
        TRACE level. If this logger is
        TRACE 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.

This method first checks if this logger is TRACE
        enabled by comparing the level of this logger with the
        TRACE level. If this logger is
        TRACE 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.

This method first checks if this logger is TRACE
        enabled by comparing the level of this logger with the
        TRACE level. If this logger is
        TRACE 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.

This method first checks if this logger is TRACE
        enabled by comparing the level of this logger with the
        TRACE level. If this logger is
        TRACE 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.

This method first checks if this logger is TRACE
        enabled by comparing the level of this logger with the
        TRACE level. If this logger is
        TRACE 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.

This method first checks if this logger is TRACE
        enabled by comparing the level of this logger with the
        TRACE level. If this logger is
        TRACE 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.

This method first checks if this logger is TRACE
        enabled by comparing the level of this logger with the
        TRACE level. If this logger is
        TRACE 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); } }

#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 10000
/**
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); }}
#else
#define LOG4CXX_DEBUG(logger, message)
#endif

#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 5000
/**
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); }}
#else
#define LOG4CXX_TRACE(logger, message)
#endif

#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 20000
/**
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); }}
#else
#define LOG4CXX_INFO(logger, message)
#endif

#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 30000
/**
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); }}
#else
#define LOG4CXX_WARN(logger, message)
#endif

#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 40000
/**
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); }}

#else
#define LOG4CXX_ERROR(logger, message)
#define LOG4CXX_ASSERT(logger, condition, message)
#endif

#if !defined(LOG4CXX_THRESHOLD) || LOG4CXX_THRESHOLD <= 50000
/**
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); }}
#else
#define LOG4CXX_FATAL(logger, message)
#endif

/**
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


text:
package at.ac.tuwien.oz.definitions.operation;

import java.util.ArrayList;
import java.util.List;

import org.antlr.v4.runtime.tree.ParseTree;
import org.antlr.v4.runtime.tree.ParseTreeProperty;
import org.stringtemplate.v4.ST;

import at.ac.tuwien.oz.datatypes.Declarations;
import at.ac.tuwien.oz.datatypes.ExpressionType;
import at.ac.tuwien.oz.datatypes.Idents;
import at.ac.tuwien.oz.datatypes.axioms.Axiom;
import at.ac.tuwien.oz.datatypes.axioms.AxiomReferences;
import at.ac.tuwien.oz.datatypes.postconditions.PostconditionFactory;
import at.ac.tuwien.oz.datatypes.postconditions.SimpleFunctionPostcondition;
import at.ac.tuwien.oz.datatypes.postconditions.SimplePostconditions;
import at.ac.tuwien.oz.datatypes.preconditions.PreconditionFactory;
import at.ac.tuwien.oz.datatypes.preconditions.SimplePreconditions;
import at.ac.tuwien.oz.datatypes.preconditions.interfaces.IPrecondition;
import at.ac.tuwien.oz.definitions.ozclass.ObjectZClass;
import at.ac.tuwien.oz.translator.templates.StringTemplateCloner;

public class SimpleFunction extends SimpleOperation{

	private SimplePreconditions  preconditions;
	private SimplePostconditions postconditions;

	public SimpleFunction(String operationName, Declarations declarations, AxiomReferences predicates, ObjectZClass definingClass, ParseTree operationCtx) {
		super(operationName, declarations, predicates, definingClass, operationCtx);
	}

	@Override
	public void createPreAndPostconditions(ParseTreeProperty<ExpressionType> typeTree){
		PreconditionFactory  preconditionFactory  = PreconditionFactory.getInstance();
		PostconditionFactory  postconditionFactory  = PostconditionFactory.getInstance();

		preconditions = new SimplePreconditions();
		postconditions = new SimplePostconditions();

		for(Axiom originalPrecondition: super.getOriginalPreconditions().asList()){
			IPrecondition simplePrecondition = preconditionFactory.createSimplePrecondition(originalPrecondition);
			preconditions.add(simplePrecondition);
		}

		List<ST> implicitPreconditions = new ArrayList<ST>();

		for (Axiom originalPredicate: super.getOriginalPostconditions().asList()){
			SimpleFunctionPostcondition functionPostcondition =
				postconditionFactory.createOutputVariablePredicate(originalPredicate, super.getOutputParameters());
			postconditions.add(functionPostcondition);

			// add existential quantification for all output variables combined with the used postcondition predicates
			StringTemplateCloner cloner = new StringTemplateCloner();
			ST postconditionClone = cloner.clone(originalPredicate.getPredicate());

			implicitPreconditions.add(postconditionClone);
		}

		this.preconditions.addAll(getVariableTypePreconditions().asList());

		preconditions.add(preconditionFactory.createImplicitFunctionPrecondition(this.getOutputParameters(), implicitPreconditions));

    	if (hasPreconditions()){
    		preconditionFunction = new PreconditionFunction(this, this.preconditions, this.definingClass);
    	}

	}

	@Override
	public boolean isBoolFunction() {
		return false;
	}

	@Override
	public boolean isFunction() {
		return true;
	}

	@Override
	public boolean isChangeOperation() {
		return false;
	}

	@Override
	public String getPostconditionFunctionName(){
		return getName();
	}

	@Override
	public List<String> getDeltalist() {
		return new ArrayList<String>();
	}

	@Override
	public SimplePreconditions getPreconditions() {
		return this.preconditions;
	}

	@Override
	public SimplePostconditions getPostconditions() {
		return this.postconditions;
	}

	@Override
	public Idents getChangedStateVariables() {
		return Idents.empty();
	}

	public static SimpleFunction createPostconditionFunction(String postconditionFunctionName, Declarations newDeclarations,
			SimplePostconditions postconditions2, ObjectZClass definingClass) {
		SimpleFunction postconditionFunction = new SimpleFunction(postconditionFunctionName, newDeclarations, AxiomReferences.empty(), definingClass, null);
		postconditionFunction.postconditions = postconditions2;
		return postconditionFunction;
	}

}

redpajama_set_name: RedPajamaGithub


text:
package es.tid.rsvp.constructs;

import es.tid.rsvp.*;

/**
 *
 * <p> A RSVP Construct is a rule that joins RSVP Objects and Constructions.
 * Each specific construct will have its elements </p>
 * @author Fernando Munoz del Nuevo
 *
 */

public abstract class RSVPConstruct implements RSVPElement{

	protected byte[] bytes;
	protected int length;

	public byte[] getBytes() {
		return bytes;
	}
	public void setBytes(byte[] bytes) {
		this.bytes = bytes;
	}
	public int getLength() {
		return length;
	}
	public void setLength(int length) {
		this.length = length;
	}

	/**
	 * Decode the Element based on the bytes passed, starting in the offset position
	 * @param bytes Bytes of the RSVP Construct
	 * @param offset offset in bytes where the construct starts
	 * @throws RSVPProtocolViolationException Exception thrown when the bytes decoded do not lead to a valid RSVP Message
	 */
	public abstract void decode(byte[] bytes, int offset) throws RSVPProtocolViolationException;

}


text:
'''
This script polls usefull github data from github
Author: Emre Berge Ergenekon, Petter Eriksson
'''

#Import from std lib
from time import localtime, strftime

#import own classes
from SplunkAPI import SplunkAPI
from GithubAPI import GithubAPI
import splunkgit_settings

def fetch_single_github_repo_data(github_user, github_repo, github_repo_address):
    github_api = GithubAPI(github_user, github_repo)
    time_stamp = strftime("%Y-%m-%d %H:%M:%S %z", localtime())

    repo = github_api.repo()
    if repo is not None:
        print '[{0}] github_watcher_count={1}'.format(time_stamp, repo['watchers'])
        print '[{0}] github_forks_count={1}'.format(time_stamp, repo['forks'])

    splunk_api = SplunkAPI(splunkgit_settings.splunk_user_name(), splunkgit_settings.splunk_password())
    since = splunk_api.time_of_last_updated_issue(github_repo_address)
    if since is None:
        since = '1900-01-01T00:00:01Z'
    all_issues =  github_api.issues_since(since)
    for issue in all_issues :
        print u'[{0}] github_issue_number={1} github_issue_state="{2}" github_issue_comment_count={3} github_issue_reporter="{4}" github_issue_title="{5}" github_issue_close_time="{6}" github_issue_update_time="{7}" github_issue_creation_time="{8}" repository="{9}"'.format(time_stamp, issue['number'], issue['state'], issue['comments'], issue['user']['login'], issue['title'], issue['closed_at'], issue['updated_at'], issue['created_at'], github_repo_address)

if __name__ == '__main__':
    for github_repository in splunkgit_settings.github_repositories():
        github_user = github_repository.get_user()
        github_repo = github_repository.get_repo()
        github_repo_address = github_repository.get_repo_address()
        fetch_single_github_repo_data(github_user, github_repo, github_repo_address)


text:
<title>ros::message_traits::MD5Sum< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > > Struct Template Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="search/search.css" rel="stylesheet" type="text/css"/>

Main Page

Namespaces

Classes

Files

          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)"
               onblur="searchBox.OnSearchFieldFocus(false)"
               onkeyup="searchBox.OnSearchFieldChange(event)"/>

Class List

Class Hierarchy

Class Members

 All Classes Namespaces Files Functions Variables Typedefs

ros

message_traits

MD5Sum< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >

Static Public Member Functions |
Static Public Attributes |
List of all members

ros::message_traits::MD5Sum< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > > Struct Template Reference

#include <FuzzyControl_IO.h>

Static Public Member Functions

static const char * 	value ()

static const char * 	value (const ::mofs::FuzzyControl_IORequest_< ContainerAllocator > &)

Static Public Attributes

static const uint64_t 	static_value1 = 0xea0b038bccdff67bULL

static const uint64_t 	static_value2 = 0xc1751623cde4aed3ULL

Detailed Description

template<class ContainerAllocator>

struct ros::message_traits::MD5Sum< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >

Definition at line 101 of file FuzzyControl_IO.h.

Member Function Documentation

template<class ContainerAllocator >

          static const char* ros::message_traits::MD5Sum< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >::value
          (
          	)

inlinestatic

Definition at line 102 of file FuzzyControl_IO.h.

template<class ContainerAllocator >

          static const char* ros::message_traits::MD5Sum< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >::value
          (
          const ::mofs::FuzzyControl_IORequest_< ContainerAllocator > &
          	)

inlinestatic

Definition at line 107 of file FuzzyControl_IO.h.

Member Data Documentation

template<class ContainerAllocator >

          const uint64_t ros::message_traits::MD5Sum< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >::static_value1 = 0xea0b038bccdff67bULL

static

Definition at line 108 of file FuzzyControl_IO.h.

template<class ContainerAllocator >

          const uint64_t ros::message_traits::MD5Sum< ::mofs::FuzzyControl_IORequest_< ContainerAllocator > >::static_value2 = 0xc1751623cde4aed3ULL

static

Definition at line 109 of file FuzzyControl_IO.h.

The documentation for this struct was generated from the following file:

FuzzyControl_IO.h

mofs

Author(s): Miguel A. Olivares-Mendez

autogenerated on Wed Oct 16 2013 16:14:48


text:
title: Coisas que Ners precisam para Amar seu Emprego
---

Hoje como estou com pouca criatividade para escrever, vou colocar o link de um post que achei bastante interessante e de certa forma, tem algo haver com [um dos meus primeiros posts](/2007/03/03/inauguracao-oficial-deste-blog)

[Coisas que Nerds Precisam para Amar seu Emprego](http://renata.org/post/coisas-que-nerds-precisam-para-amar-seu-emprego/)


text:
require 'coveralls'
Coveralls.wear!

require 'rspec'
require 'rspec/mocks'
require 'tempfile'
# require 'simplecov'
# require 'simplecov-rcov'
# require 'byebug'
require 'net/http'
require 'rack/request'

# This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# Require this file using `require "spec_helper"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration

$:.unshift(File.join(File.dirname(__FILE__), '..', 'smaak'))
$:.unshift(File.join(File.dirname(__FILE__), '..'))

require 'lib/smaak.rb'
require 'lib/smaak/associate.rb'
require 'lib/smaak/server.rb'
require 'lib/smaak/client.rb'
require 'lib/smaak/auth_message.rb'
require 'lib/smaak/smaak_service.rb'

RSpec.configure do |config|
  config.run_all_when_everything_filtered = true
  config.filter_run :focus
  # config.expect_with(:rspec) { |c| c.syntax = :should }

  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = 'random'
end
RSpec::Expectations.configuration.warn_about_potential_false_positives = false

# SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
# SimpleCov.start do
#  add_filter "/spec/"
# end


text:
package com.russelarms.offsetanimatorsample;

import com.russelarms.offsetanimator.OffsetAnimator;

/**
 * Inheritance demonstration.
 */
public class AnotherOffsetAnimator extends OffsetAnimator {

    public AnotherOffsetAnimator(float x1, float x2) {
        super(x1, x2);
    }

    @Override
    public void animate(float positionOffset) {
        float duration = params.getDuration();
        super.animate(positionOffset);
    }
}


text:
<?php

namespace Instinct\Component\TypeAutoBoxing;

use Instinct\Component\TypeAutoBoxing\Memory\Memory;

/**
 * Extend it to enforce strong typing.
 *
 * @author Alexandre Quercia <alquerci@email.com>
 *
 * @api
 */
abstract class AutoBoxType extends Type
{
    /**
     * @var integer|string
     */
    private $memoryId;

    /**
     * Use strong typing to ensure a certain type.
     *
     * Declares a new pointer and assign it year object.
     *
     * @param NULL  $pointer
     * @param mixed $value [Optional]
     *
     * @throws \LogicException When trying to redefine a pointer.
     *
     * @api
     */
    final static public function create(&$pointer, $value = null)
    {
        if ($pointer !== null) {
            throw new \LogicException(sprintf(
                'The identifier of type "%s" is defined more than once. '.
                'The first argument of "%s()" must be null or undefined.',
                gettype($pointer),
                __METHOD__
            ));
        }

        if ($value instanceof static) {
            $pointer = clone $value;
        } else {
            $pointer = new static($value);
        }

        // Allocate the pointer.
        $pointer->memoryId = Memory::alloc($pointer);
    }

    /**
     * @api
     */
    final public function __destruct()
    {
        if ($this->memoryId === null) {
            return;
        }

        $pointer = &Memory::get($this->memoryId);
        $value = $pointer;

        if ($value !== $this && $value !== null) {
            $pointer = null;
            self::create($pointer, $value);
        }

        // Removing the obsolete pointer.
        Memory::free($this->memoryId);
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Aspekt.Contracts
{
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public class NotNull : Aspect
    {
        public string ArgumentName { get; set; }
        public int? ArgumentIndex { get; set; }

        public NotNull(int argumentIndex)
        {
            ArgumentIndex = argumentIndex;
        }
        public NotNull(string argumentName)
        {
            ArgumentName = argumentName;
        }

        public override void OnEntry(MethodArguments args)
        {
            object arg = null;
            if (ArgumentIndex != null)
            {
                arg = args.Arguments.GetArgumentByIndex(ArgumentIndex.Value);
            }
            else
            {
                arg = args.Arguments.GetArgumentValueByName(ArgumentName);
            }

            if (arg == null)
            {
                throw new ArgumentNullException(ArgumentName ?? ArgumentIndex.ToString());
            }
        }
    }
}


text:
package nl.homeserver.energie.standbypower;

import static java.math.RoundingMode.HALF_UP;

import java.math.BigDecimal;
import java.time.LocalDate;

import lombok.Getter;
import nl.homeserver.DatePeriod;
import nl.homeserver.energie.verbruikkosten.VerbruikKostenOverzicht;

class StandbyPowerInPeriod {

    @Getter
    private LocalDate fromDate;
    @Getter
    private LocalDate toDate;
    @Getter
    private BigDecimal percentageOfTotalPeriod;

    @Getter
    private Integer standbyPower;
    @Getter
    private BigDecimal costsOfStandByPower;
    @Getter
    private BigDecimal totalCostsOfPower;
    @Getter
    private BigDecimal percentageOfTotalCost;

    StandbyPowerInPeriod(final DatePeriod period,
                         final int standbyPower,
                         final BigDecimal percentageOfTotalPeriod,
                         final VerbruikKostenOverzicht standByPowerVko,
                         final VerbruikKostenOverzicht actualVko) {
        this.fromDate = period.getFromDate();
        this.toDate = period.getToDate();
        this.standbyPower = standbyPower;
        this.percentageOfTotalPeriod = percentageOfTotalPeriod;

        this.costsOfStandByPower = standByPowerVko.getTotaalStroomKosten();
        this.totalCostsOfPower = actualVko.getTotaalStroomKosten();

        if  (this.costsOfStandByPower != null && this.totalCostsOfPower != null) {
            percentageOfTotalCost = costsOfStandByPower.divide(totalCostsOfPower, 2, HALF_UP)
                                                       .multiply(BigDecimal.valueOf(100)).setScale(0, HALF_UP);

        }
    }

    private StandbyPowerInPeriod() {
        // Private zero args constructor
    }
}


text:
def can_build(env, platform):
    return True

def configure(env):
    env.use_ptrcall = True

def get_doc_classes():
    return [
        "ARVRInterfaceGDNative",
        "GDNative",
        "GDNativeLibrary",
        "MultiplayerPeerGDNative",
        "NativeScript",
        "PacketPeerGDNative",
        "PluginScript",
        "StreamPeerGDNative",
        "VideoStreamGDNative",
        "WebRTCPeerConnectionGDNative",
        "WebRTCDataChannelGDNative",
    ]

def get_doc_path():
    return "doc_classes"


text:
<?php

namespace Yosymfony\Spress\Scaffolding;

/**
 * Plugin generator.
 *
 * @author Victor Puertas <vpuertas@gmail.com>
 */
class PluginGenerator extends Generator
{
    protected $dirctoryName;
    protected $licenses = [
        'MIT' => 'plugin/MIT.twig',
        'APACHE-2.0' => 'plugin/Apache-2.0.twig',
        'BSD-2-CLAUSE' => 'plugin/BSD-2-Clause.twig',
        'GPL-3.0' => 'plugin/GPL-3.0.twig',
        'LGPL-3.0' => 'plugin/LGPL-3.0.twig',
    ];

    /**
     * Generates a plugin.
     *
     * @param $targetDir string
     * @param $name string
     * @param $namespace string
     * @param $author string
     * @param $email string
     * @param $description string
     * @param $license string
     *
     * @return array
     */
    public function generate($targetDir, $name, $namespace = '', $author = '', $email = '', $description = '', $license = 'MIT')
    {
        if (0 === strlen(trim($name))) {
            throw new \RuntimeException('Unable to generate the plugin as the name is empty.');
        }

        if (file_exists($targetDir)) {
            if (false === is_dir($targetDir)) {
                throw new \RuntimeException(sprintf('Unable to generate the plugin as the target directory "%s" exists but is a file.', $targetDir));
            }

            if (false === is_writable($targetDir)) {
                throw new \RuntimeException(sprintf('Unable to generate the plugin as the target directory "%s" is not writable.', $targetDir));
            }
        }

        $this->dirctoryName = $this->getPluginDir($name);

        $pluginDir = $targetDir.'/'.$this->dirctoryName;

        if (file_exists($pluginDir)) {
            throw new \RuntimeException(sprintf('Unable to generate the plugin as the plugin directory "%s" exists.', $pluginDir));
        }

        $model = [
            'name' => $name,
            'classname' => $this->getClassname($name),
            'namespace' => $namespace,
            'namespace_psr4' => $this->getNamespacePsr4($namespace),
            'author' => $author,
            'email' => $email,
            'description' => $description,
            'license' => $license,
        ];

        $this->cleanFilesAffected();

        $this->renderFile('plugin/plugin.php.twig', $pluginDir.'/'.$this->getPluginFilename($name), $model);
        $this->renderFile('plugin/composer.json.twig', $pluginDir.'/composer.json', $model);

        $licenseFile = $this->getLicenseFile($license);

        if ($licenseFile) {
            $model = [
                'author' => $author,
            ];

            $this->renderFile($licenseFile, $pluginDir.'/LICENSE', $model);
        }

        return $this->getFilesAffected();
    }

    /**
     * Gets the plugin directory.
     *
     * @return string
     */
    public function getPluginDirName()
    {
        return $this->dirctoryName;
    }

    /**
     * Gets the classname.
     *
     * @param string $name
     *
     * @return string
     */
    protected function getClassname($name)
    {
        // replace non letter or digits by empty string
        $result = preg_replace('/[^\\pL\d]+/u', '', $name);

        // trim
        $result = trim($result, '-');

        // transliterate
        $result = iconv('UTF-8', 'US-ASCII//TRANSLIT', $result);

        // lowercase
        $result = strtolower($result);

        // remove unwanted characters
        $result = preg_replace('/[^-\w]+/', '', $result);

        return ucfirst($result);
    }

    /**
     * Gets the plugin directory.
     *
     * @param string $name
     *
     * @return string
     */
    protected function getPluginDir($name)
    {
        return $this->getClassname($name);
    }

    /**
     * Gets the plugin filename.
     *
     * @param string $name
     *
     * @return string
     */
    protected function getPluginFilename($name)
    {
        return sprintf('%s.php', $this->getClassname($name));
    }

    /**
     * Gets the namepspace for PSR-4.
     *
     * @param string $namespace
     *
     * @return string
     */
    protected function getNamespacePsr4($namespace)
    {
        return str_replace('\\', '\\\\', $namespace).'\\\\';
    }

    /**
     * Gets the license filename.
     *
     * @param string $licenseName [description]
     *
     * @return string Filename or empty-string if not exists.
     */
    protected function getLicenseFile($licenseName)
    {
        return isset($this->licenses[strtoupper($licenseName)]) ? $this->licenses[strtoupper($licenseName)] : '';
    }
}


text:
namespace DAVA
{
class UIControlSystem;
class UIScreen;

class UIScreenManager final
{
public:
    UIScreenManager(UIControlSystem* uiControlSystem);
    ~UIScreenManager();

    DAVA_DEPRECATED(bool RegisterScreen(int32 screenId, UIScreen* screen));
    bool RegisterScreen(int32 screenId, const RefPtr<UIScreen>& screen);
    bool UnregisterScreen(int32 screenId);

    void SetFirst(int32 screenId);
    void SetScreen(int32 screenId);
    void ResetScreen();

    UIScreen* GetScreen(int32 screenId) const;
    UIScreen* GetScreen() const;
    int32 GetScreenId() const;

private:
    UIControlSystem* uiControlSystem = nullptr;
    UnorderedMap<int32, RefPtr<UIScreen>> screens;
    int32 activeScreenId = -1;
};
};


text:
Debouncer::Debouncer():previous_millis(0)
    , interval_millis(10)
    , state(0) {}

void Debouncer::interval(uint16_t interval_millis)
{
    this->interval_millis = interval_millis;
}

void Debouncer::begin() {
	 state = 0;
    if (readCurrentState()) {
        setStateFlag(DEBOUNCED_STATE | UNSTABLE_STATE);
    }

	#ifdef BOUNCE_LOCK_OUT
    previous_millis = 0;
#else
    previous_millis = millis();
#endif
}

bool Debouncer::update()
{

    unsetStateFlag(CHANGED_STATE);
#ifdef BOUNCE_LOCK_OUT

    // Ignore everything if we are locked out
    if (millis() - previous_millis >= interval_millis) {
        bool currentState = readCurrentState();
        if ( currentState != getStateFlag(DEBOUNCED_STATE) ) {
            previous_millis = millis();
            changeState();
        }
    }

#elif defined BOUNCE_WITH_PROMPT_DETECTION
    // Read the state of the switch port into a temporary variable.
    bool readState = readCurrentState();

    if ( readState != getStateFlag(DEBOUNCED_STATE) ) {
      // We have seen a change from the current button state.

      if ( millis() - previous_millis >= interval_millis ) {
	// We have passed the time threshold, so a new change of state is allowed.
	// set the STATE_CHANGED flag and the new DEBOUNCED_STATE.
	// This will be prompt as long as there has been greater than interval_misllis ms since last change of input.
	// Otherwise debounced state will not change again until bouncing is stable for the timeout period.
		 changeState();
      }
    }

    // If the readState is different from previous readState, reset the debounce timer - as input is still unstable
    // and we want to prevent new button state changes until the previous one has remained stable for the timeout.
    if ( readState != getStateFlag(UNSTABLE_STATE) ) {
	// Update Unstable Bit to macth readState
        toggleStateFlag(UNSTABLE_STATE);
        previous_millis = millis();
    }

#else
    // Read the state of the switch in a temporary variable.
    bool currentState = readCurrentState();

    // If the reading is different from last reading, reset the debounce counter
    if ( currentState != getStateFlag(UNSTABLE_STATE) ) {
        previous_millis = millis();
         toggleStateFlag(UNSTABLE_STATE);
    } else
        if ( millis() - previous_millis >= interval_millis ) {
            // We have passed the threshold time, so the input is now stable
            // If it is different from last state, set the STATE_CHANGED flag
            if (currentState != getStateFlag(DEBOUNCED_STATE) ) {
                previous_millis = millis();

                 changeState();
            }
        }

#endif

		return  changed();

}

// WIP HELD
unsigned long Debouncer::previousDuration() const {
	return durationOfPreviousState;
}

unsigned long Debouncer::currentDuration() const {
	return (millis() - stateChangeLastTime);
}

inline void Debouncer::changeState() {
	toggleStateFlag(DEBOUNCED_STATE);
	setStateFlag(CHANGED_STATE) ;
	durationOfPreviousState = millis() - stateChangeLastTime;
	stateChangeLastTime = millis();
}

bool Debouncer::read() const
{
    return  getStateFlag(DEBOUNCED_STATE);
}

bool Debouncer::rose() const
{
    return getStateFlag(DEBOUNCED_STATE) && getStateFlag(CHANGED_STATE);
}

bool Debouncer::fell() const
{
    return  !getStateFlag(DEBOUNCED_STATE) && getStateFlag(CHANGED_STATE);
}

////////////
// BOUNCE //
////////////

Bounce::Bounce()
    : pin(0)
{}

void Bounce::attach(int pin) {
    this->pin = pin;

    // SET INITIAL STATE
    begin();
}

void Bounce::attach(int pin, int mode){
    setPinMode(pin, mode);
    this->attach(pin);
}


text:
<objects>
</objects>


text:
package apple.audiotoolbox.enums;

import org.moe.natj.general.ann.Generated;

/**
 * Describes the type of a render event.
 */
@Generated
public final class AURenderEventType {
    @Generated public static final byte Parameter = 1;
    @Generated public static final byte ParameterRamp = 2;
    @Generated public static final byte MIDI = 8;
    @Generated public static final byte MIDISysEx = 9;

    @Generated
    private AURenderEventType() {
    }

    @Generated public static final byte MIDIEventList = 10;
}