view gen/configfile.h @ 1350:15e9762bb620

Adds explicit alignment information for alloca instructions in general, there's a few cases that still needs to be looked at but this should catch the majority. Fixes ticket #293 .
author Tomas Lindquist Olsen <tomas.l.olsen gmail com>
date Thu, 14 May 2009 13:26:40 +0200
parents b30fe7e1dbb9
children 7d3b47852a7a
line wrap: on
line source

#ifndef LDC_CONF_CONFIGFILE_H
#define LDC_CONF_CONFIGFILE_H

#include <vector>

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(); }

private:
    libconfig::Config* cfg;

    s_vector switches;
};

#endif // LDC_CONF_CONFIGFILE_H