lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I could be useful to have a tool to auto-generate code for a lua based
configuration system,
and have played around with a very basic example that works something like this:

create a config table describing valid properties:

config = {
{name="foo", type="int", default=-1},
{name="bar", type="string", default="default"}
}

call:
generate(config)

And this creates a C++ class header and definiton:

class Config{
   public:
    void load_file(const char* fname);
    int get_foo();
    const char* get_bar();
};


I can send this to you if you like, but it is very basic, likely buggy
and not in use anywhere...

On 10/4/06, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
See page 14 of
        http://www.tecgraf.puc-rio.br/~lhf/ftp/doc/wjogos04.pdf

Just ignore the Portuguese explanation...
--lhf