comparison C++/Parser.cpp @ 210:3b0e276f0866

Parser: update and merge
author David Demelier <markand@malikania.fr>
date Mon, 03 Mar 2014 08:48:31 +0100
parents 9f22ce5f1b39 706f861c4c6d
children ca69910b1407
comparison
equal deleted inserted replaced
207:d859ed8bc815 210:3b0e276f0866
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
230 Parser::Parser(const std::string &path, int tuning, char commentToken) 230 Parser::Parser(const std::string &path, int tuning, char commentToken)
231 : m_path(path) 231 : m_path(path)
232 , m_tuning(tuning) 232 , m_tuning(tuning)
233 , m_commentChar(commentToken) 233 , m_commentChar(commentToken)
234 { 234 {
235 Section s(""); 235 m_sections.push_back(Section("", (tuning & DisableRootSection) ? false : true));
236
237 s.m_allowed = (tuning & DisableRootSection) ? false : true;
238
239 m_sections.push_back(s);
240 open(); 236 open();
241 } 237 }
242 238
243 Parser::~Parser() 239 Parser::~Parser()
244 { 240 {