<commit_before>#ifndef SINGLETON_CONFIG_H
#define SINGLETON_CONFIG_H

#include "logger.h"
#include "libconfig.h++"
#include "pthread.h"

namespace watcher
{
    class SingletonConfig
    {
        public:
            static libconfig::Config &instance();

            static void lock();
            static void unlock();

        private:
            DECLARE_LOGGER();

            SingletonConfig();
            ~SingletonConfig();

            static pthread_mutex_t accessMutex;
    };
}

#endif // SINGLETON_CONFIG_H<commit_msg>Added comments. This class shuld be expanded to include single line load-from-file-or-use-default type functions.<commit_after>#ifndef SINGLETON_CONFIG_H
#define SINGLETON_CONFIG_H

#include "logger.h"
#include "libconfig.h++"
#include "pthread.h"

namespace watcher
{
    /**
     * @class SingletonConfig
     * @author <NAME> <<EMAIL>>
     * @date 2009-05-15
     *
     * A class that wraps a libconfig Config object.
     */
    class SingletonConfig
    {
        public:
            
            /** The underlaying Config object is directly accessible */
            static libconfig::Config &instance();

            /** Lock the configuration when writing */
            static void lock();

            /** Unlock the config when finished writing */
            static void unlock();

        private:
            DECLARE_LOGGER();

            SingletonConfig();
            ~SingletonConfig();

            static pthread_mutex_t accessMutex;
    };
}

#endif // SINGLETON_CONFIG_H
{'fraction_non_alphanumeric': 0.0968586387434555, 'fraction_numerical': 0.005235602094240838, 'mean_word_length': 2.159090909090909, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3688932', 'n_tokens_mistral': 439, 'n_tokens_neox': 422, 'n_words': 111}