#ifndef __GlobalConfigFile_h_ #define __GlobalConfigFile_h_ #include #include #include "MiscSupport.h" // This manages a very simple config file mechanism, matching names to values. // This has the simplest thread safety. You need to do all the adding in the // main thread before starting any other threads. Then you can read the config // items at any time from any thread. void addConfigItems(std::string encoded); bool addConfigItemsFromFile(std::string fileName); bool addConfigItemsFromCommandLine(char *argv[]); // All adding must be done before this call. All getting must be done after // this call. void configItemsComplete(); std::string getConfigItem(std::string name, std::string defaultValue=""); int64_t getConfigItem(std::string name, int64_t defaultValue); PropertyList const &getConfigItems(); #endif