comparison C++/Parser.cpp @ 209:706f861c4c6d

Little cleanup and rename getValue -> getOption
author David Demelier <markand@malikania.fr>
date Fri, 24 Jan 2014 09:17:06 +0100
parents 1ffe6d4937b7
children 3b0e276f0866
comparison
equal deleted inserted replaced
203:1ffe6d4937b7 209:706f861c4c6d
30 Section::Section() 30 Section::Section()
31 : m_allowed(true) 31 : m_allowed(true)
32 { 32 {
33 } 33 }
34 34
35 Section::Section(const std::string &name) 35 Section::Section(const std::string &name, bool allowed)
36 : m_name(name) 36 : m_name(name)
37 , m_allowed(true) 37 , m_allowed(allowed)
38 { 38 {
39 39
40 } 40 }
41 41
42 const std::string &Section::getName() const 42 const std::string &Section::getName() const
225 Parser::Parser(const std::string &path, int tuning, char commentToken) 225 Parser::Parser(const std::string &path, int tuning, char commentToken)
226 : m_path(path) 226 : m_path(path)
227 , m_tuning(tuning) 227 , m_tuning(tuning)
228 , m_commentChar(commentToken) 228 , m_commentChar(commentToken)
229 { 229 {
230 Section s(""); 230 m_sections.push_back(Section("", (tuning & DisableRootSection) ? false : true));
231
232 s.m_allowed = (tuning & DisableRootSection) ? false : true;
233
234 m_sections.push_back(s);
235 open(); 231 open();
236 } 232 }
237 233
238 Parser::~Parser() 234 Parser::~Parser()
239 { 235 {