# Poco::Util

# class IniFileConfiguration

Library: Util
Package: Configuration
Header: Poco/Util/IniFileConfiguration.h

## Description

This implementation of a Configuration reads properties from a legacy Windows initialization (.ini) file.

The file syntax is implemented as follows.

- a line starting with a semicolon is treated as a comment and ignored
- a line starting with a square bracket denotes a section key [<key>]
- every other line denotes a property assignment in the form <value key> = <value>

The name of a property is composed of the section key and the value key, separated by a period (<section key>.<value key>).

Property names are not case sensitive. Leading and trailing whitespace is removed from both keys and values.

## Inheritance

Direct Base Classes: AbstractConfiguration

All Base Classes: Poco::RefCountedObject, AbstractConfiguration

## Member Summary

Member Functions: enumerate, getRaw, load, removeRaw, setRaw

Inherited Functions: createView, duplicate, enableEvents, enumerate, eventsEnabled, expand, getBool, getDouble, getInt, getInt64, getRaw, getRawString, getString, getUInt, getUInt64, has, hasOption, hasProperty, keys, parseBool, parseInt, parseInt64, parseUInt, parseUInt64, referenceCount, release, remove, removeRaw, setBool, setDouble, setInt, setInt64, setRaw, setRawWithEvent, setString, setUInt, setUInt64

## Constructors

### IniFileConfiguration

IniFileConfiguration();

Creates an empty IniFileConfiguration.

### IniFileConfiguration

IniFileConfiguration(
std::istream & istr
);

Creates an IniFileConfiguration and loads the configuration data from the given stream, which must be in initialization file format.

### IniFileConfiguration

IniFileConfiguration(
const std::string & path
);

Creates an IniFileConfiguration and loads the configuration data from the given file, which must be in initialization file format.

## Destructor

### ~IniFileConfiguration

~IniFileConfiguration();

## Member Functions

### load

void load(
std::istream & istr
);

Loads the configuration data from the given stream, which must be in initialization file format.

### load

void load(
const std::string & path
);

Loads the configuration data from the given file, which must be in initialization file format.

### enumerate

void enumerate(
const std::string & key,
Keys & range
) const;

See also: Poco::Util::AbstractConfiguration::enumerate()

### getRaw

bool getRaw(
const std::string & key,
std::string & value
) const;

See also: Poco::Util::AbstractConfiguration::getRaw()

### removeRaw

void removeRaw(
const std::string & key
);

See also: Poco::Util::AbstractConfiguration::removeRaw()

### setRaw

void setRaw(
const std::string & key,
const std::string & value
);

See also: Poco::Util::AbstractConfiguration::setRaw()