7 #ifndef BALL_FORMAT_INIFILE_H
8 #define BALL_FORMAT_INIFILE_H
10 #ifndef BALL_DATATYPE_STRINGHASHMAP_H
14 #ifndef BALL_CONCEPT_PROCESSOR_H
38 MAX_LINE_LENGTH = 1048576
41 class IteratorTraits_;
58 bool operator == (
const Section& section)
const
60 return (name_ == section.
name_ &&
65 bool operator < (
const Section& section)
const
69 bool operator > (
const Section& section)
const
164 const String& getFilename()
const;
169 void setFilename(
const String& filename);
179 bool isValid()
const;
256 bool appendLine(
const String& section_name,
const String& line);
259 bool appendLine(
const String& line);
263 Size getNumberOfLines()
const;
271 bool hasSection(
const String& section_name)
const;
289 Size getNumberOfSections()
const;
315 Size getSectionLength(
const String& section_name)
const;
322 bool deleteSection(
const String& section);
327 bool appendSection(
const String& section);
341 bool hasEntry(
const String& section,
const String& key)
const;
390 bool operator == (
const INIFile& inifile)
const;
408 void setDuplicateKeyCheck(
bool mode);
412 bool duplicateKeyCheckEnabled()
const;
415 std::list<String> getContent()
const
419 bool setContent(
const std::list<String>& lines)
451 IteratorTraits_(const IteratorTraits_& traits);
454 virtual ~IteratorTraits_();
457 const IteratorTraits_& operator = (const IteratorTraits_ &traits);
460 std::list<
String>::iterator getPosition();
466 const
String& operator * () const;
469 IteratorTraits_& operator ++ ();
472 IteratorTraits_& operator -- ();
475 IteratorTraits_& getSectionNextLine();
478 bool operator == (const IteratorTraits_& traits) const;
481 bool operator != (const IteratorTraits_& traits) const;
484 bool operator + () const;
487 bool isValid() const;
490 void toSectionFirstLine();
493 void toSectionLastLine();
499 bool isSectionFirstLine() const;
502 bool isSectionLastLine() const;
505 bool isSectionEnd() const;
519 IteratorTraits_(std::list<
Section>& list,
521 std::list<
String>::iterator line);
524 const std::list<
Section>* getBound_() const;
527 void setLine_(const
String& line);
538 #endif // BALL_FORMAT_INIFILE_H