view gen/configfile.h @ 1606:1b24e9c7cc26

Use just \n as end of line --- dmd/arraytypes.h | 102 ++++---- dmd/enum.c | 652 ++++++++++++++++++++++++++-------------------------- dmd/parse.h | 292 ++++++++++++------------ dmd/staticassert.c | 240 ++++++++++---------- 4 files changed, 643 insertions(+), 643 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:19 -0300
parents a048f31bf9f6
children
line wrap: on
line source

#ifndef LDC_CONF_CONFIGFILE_H
#define LDC_CONF_CONFIGFILE_H

#include <vector>
#include <string>

namespace libconfig
{
    class Config;
}

class ConfigFile
{
public:
    typedef std::vector<const char*>    s_vector;
    typedef s_vector::iterator          s_iterator;

public:
    ConfigFile();
    ~ConfigFile();

    bool read(const char* argv0, void* mainAddr, const char* filename);

    s_iterator switches_begin()   { return switches.begin(); }
    s_iterator switches_end()     { return switches.end(); }

    const std::string& path()     { return pathstr; }

private:
    bool locate(llvm::sys::Path& path, const char* argv0, void* mainAddr, const char* filename);

    libconfig::Config* cfg;
    std::string pathstr;

    s_vector switches;
};

#endif // LDC_CONF_CONFIGFILE_H