Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Configfile include
12-27-2010, 02:43 AM,
#11
 
I checked in some changes which include more error checking. Some thoughts:
  • came up with some error cases for sections and subsections but they turned out to be used in the game in different ways. they are commented out (config.cpp:186-213). i think that some of these things should be at least warnings, since users probably won't usually intend to duplicate a section, or other things like that.
  • it would be a pain to get loggers in CONFIG, since CONFIG objects are created in many different places (and owner objects don't always have loggers either), so i am going to work on that later (or maybe try to write a script to do it)
  • on sections, subsections, etc.: there is a way to find the children of a section (childrens' names are stored on config.cpp:201), but not to find a given section's parents. why store this hierarchy information, is it used anywhere?
  • would it make any sense to make SECTION a custom class instead of just a map<string, string>? this would make it easier to facilitate things like finding parents (and siblings, and root nodes, etc.) to support a proper hierarchy. if this was implemented, it wouldn't be difficult to refer to other values stored in the file by their names. (would that be useful?)
Reply


Messages In This Thread
Configfile include - by thelusiv - 12-22-2010, 02:35 AM
[No subject] - by NaN - 12-22-2010, 06:45 AM
[No subject] - by thelusiv - 12-22-2010, 10:17 AM
[No subject] - by NaN - 12-22-2010, 11:54 AM
[No subject] - by thelusiv - 12-22-2010, 01:12 PM
[No subject] - by NaN - 12-22-2010, 02:47 PM
[No subject] - by thelusiv - 12-23-2010, 08:40 AM
[No subject] - by NaN - 12-23-2010, 09:08 AM
[No subject] - by thelusiv - 12-23-2010, 11:18 AM
[No subject] - by NaN - 12-23-2010, 12:00 PM
[No subject] - by thelusiv - 12-27-2010, 02:43 AM
[No subject] - by joevenzon_phpbb2_import3 - 12-27-2010, 11:37 AM
[No subject] - by NaN - 12-27-2010, 08:10 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)