Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
File Class Reference

#include <elm/ini.h>

Classes

class  Iterator
 

Public Member Functions

 ~File (void)
 
SectiondefaultSection (void) const
 
Sectionget (const string &name) const
 
Sectionoperator[] (const string &name) const
 

Static Public Member Functions

static Fileload (const sys::Path &path)
 
static Fileload (io::InStream *in)
 

Detailed Description

Repressents a ".INI" file made of sections. To get the default section, either use the defaultSection() method or get the section wit an empty name.

Constructor & Destructor Documentation

◆ ~File()

Member Function Documentation

◆ defaultSection()

Section * defaultSection ( void  ) const
inline

Referenced by File::load().

◆ get()

Section* get ( const string name) const
inline

◆ load() [1/2]

File * load ( const sys::Path path)
static

Load the ".INI" file from the given path.

Parameters
pathPath to load ".INI" from.
Returns
Created INI file.
Exceptions
ExceptionFor any error (IO or format).

References SystemException::message(), and System::readFile().

◆ load() [2/2]

File * load ( io::InStream in)
static

Load the ".INI" file from the given input stream.

Parameters
instream to read file from.
Returns
Created INI file.
Exceptions
ExceptionFor any error (IO or format).

References elm::_, File::defaultSection(), String::indexOf(), String::length(), MessageException::message(), Section::name(), elm::io::p(), ListMap< K, T, C, E, A >::put(), Input::scanLine(), and String::substring().

◆ operator[]()

Section* operator[] ( const string name) const
inline

References File::get().


The documentation for this class was generated from the following files: