<commit_before>#ifndef COOLPROP_CONFIGURATION
#define COOLPROP_CONFIGURATION

#include "Exceptions.h"
#include "CoolPropTools.h"

#if !defined(SWIG) // Hide this for swig - Swig gets confused
#include "rapidjson/rapidjson_include.h"
#endif

/* See http://stackoverflow.com/a/148610
 * See http://stackoverflow.com/questions/147267/easy-way-to-use-variables-of-enum-types-as-string-in-c#202511
 * This will be used to generate an enum like:
 * enum configuration_keys {NORMALIZE_GAS_CONSTANTS, CRITICAL_SPLINES_ENABLED};
 * 
 * The values in this list are given by:
 * enum, string representation of enum, default value
 * 
 * The type of the default value specifies the only type that will be accepted for this parameter
 */
#define CONFIGURATION_KEYS_ENUM \
    X(NORMALIZE_GAS_CONSTANTS, "NORMALIZE_GAS_CONSTANTS", true) \
    X(CRITICAL_WITHIN_1UK, "CRITICAL_WITHIN_1UK", true) \
    X(CRITICAL_SPLINES_ENABLED, "CRITICAL_SPLINES_ENABLED", true) \
	X(ALTERNATIVE_REFPROP_PATH, "ALTERNATIVE_REFPROP_PATH", "") \
    X(ALTERNATIVE_REFPROP_HMX_BNC_PATH, "ALTERNATIVE_REFPROP_HMX_BNC_PATH", "") \

 // Use preprocessor to create the Enum
 enum configuration_keys{
  #define X(Enum, String, Default)       Enum,
   CONFIGURATION_KEYS_ENUM
  #undef X
 };

namespace CoolProp
{

/// Convert the configuration key to a string in a 1-1 representation.
std::string config_key_to_string(configuration_keys keys);
    
/// A class that contains one entry in configuration
/// Can be cast to yield the output value
class ConfigurationItem
{
    public:
        enum ConfigurationDataTypes {CONFIGURATION_NOT_DEFINED_TYPE = 0, 
                                     CONFIGURATION_BOOL_TYPE, 
                                     CONFIGURATION_DOUBLE_TYPE, 
                                     CONFIGURATION_INTEGER_TYPE, 
                                     CONFIGURATION_STRING_TYPE,
                                     CONFIGURATION_ENDOFLIST_TYPE};
        ConfigurationDataTypes type;
        <commit_msg>Add configuration key for maximum table directory size<commit_after>#ifndef COOLPROP_CONFIGURATION
#define COOLPROP_CONFIGURATION

#include "Exceptions.h"
#include "CoolPropTools.h"

#if !defined(SWIG) // Hide this for swig - Swig gets confused
#include "rapidjson/rapidjson_include.h"
#endif

/* See http://stackoverflow.com/a/148610
 * See http://stackoverflow.com/questions/147267/easy-way-to-use-variables-of-enum-types-as-string-in-c#202511
 * This will be used to generate an enum like:
 * enum configuration_keys {NORMALIZE_GAS_CONSTANTS, CRITICAL_SPLINES_ENABLED};
 * 
 * The values in this list are given by:
 * enum, string representation of enum, default value
 * 
 * The type of the default value specifies the only type that will be accepted for this parameter
 */
#define CONFIGURATION_KEYS_ENUM \
    X(NORMALIZE_GAS_CONSTANTS, "NORMALIZE_GAS_CONSTANTS", true) \
    X(CRITICAL_WITHIN_1UK, "CRITICAL_WITHIN_1UK", true) \
    X(CRITICAL_SPLINES_ENABLED, "CRITICAL_SPLINES_ENABLED", true) \
	X(ALTERNATIVE_REFPROP_PATH, "ALTERNATIVE_REFPROP_PATH", "") \
    X(ALTERNATIVE_REFPROP_HMX_BNC_PATH, "ALTERNATIVE_REFPROP_HMX_BNC_PATH", "") \
    X(MAXIMUM_TABLE_DIRECTORY_SIZE_IN_GB, "MAXIMUM_TABLE_DIRECTORY_SIZE_IN_GB", 1.0) \

 // Use preprocessor to create the Enum
 enum configuration_keys{
  #define X(Enum, String, Default)       Enum,
   CONFIGURATION_KEYS_ENUM
  #undef X
 };

namespace CoolProp
{

/// Convert the configuration key to a string in a 1-1 representation.
std::string config_key_to_string(configuration_keys keys);
    
/// A class that contains one entry in configuration
/// Can be cast to yield the output value
class ConfigurationItem
{
    public:
        enum ConfigurationDataTypes {CONFIGURATION_NOT_DEFINED_TYPE = 0, 
                                     CONFIGURATION_BOOL_TYPE, 
                                     CONFIGURATION_DOUBLE_TYPE, 
                                     CONFIGURATION_INTEGER_TYPE, 
                                     CONFIGURATION_STRING_TYPE,
                                     CONFIGURATION_ENDOFLIST_TYPE};
        ConfigurationDataTypes type;
        
{'fraction_non_alphanumeric': 0.07606589147286821, 'fraction_numerical': 0.011627906976744186, 'mean_word_length': 3.088118811881188, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4191273', 'n_tokens_mistral': 1317, 'n_tokens_neox': 1279, 'n_words': 302}