[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Fastest way to load configuration files
- From: Jose Marin <jose_marin2@...>
- Date: Tue, 29 Jun 2004 08:58:08 -0300 (ART)
Hello.
I would like to know your oppinion on what's the
fastest way to load configuration files.
For example, if I have the structure in C++:
typedef struct{
string name;
int health;
... other fields...
}CMonster;
vector<CMonster> monsters;
Then in Lua I have the following table:
Monsters1 = {
{ name = "gollen", health = 100 };
{ name = "orc", health = 40 };
... and so on...
}
this table could be created like this:
Monsters2 = {}
Monsters2.gollen = {
health = 100;
... other fields...
}
Monsters2.orc = {
health = 40;
... other fields...
}
What's the fastest way of feed the C++ 'monster'
vector with the contents of the tables Monsters1 or
Monsters2?
The 'monster' record can have nested tables.
______________________________________________________________________
Yahoo! Mail - agora com 100MB de espaço, anti-spam e antivírus grátis!
http://br.info.mail.yahoo.com/