# PIP: src/io/piconfig.h File Reference

piconfig.h File Reference

Configuration parser and writer. More...

## Classes

class | PIConfig
| Configuration file. More...
class | PIConfig::Branch
| Branch is a list of entries of configuration file More...
class | PIConfig::Entry
| Entry of configuration file More...

## Functions

template<typename T >
T | readDeviceSetting (const PIString &name, const T &def, const PIConfig::Entry *em, const PIConfig::Entry *ep)
| Service function. useful for configuring devices. More...

## Detailed Description

Configuration parser and writer.

## Function Documentation

template<typename T >

T readDeviceSetting | ( | const PIString & | name,
|  | const T & | def,
|  | const PIConfig::Entry * | em,
|  | const PIConfig::Entry * | ep
| ) |  |

Service function. useful for configuring devices.

Function takes entry name "name", default value "def" and two PIConfig::Entry sections: "em" and their parent "ep". If there is no parent ep = 0. If "ep" is not null and entry "name" exists in "ep" function returns this value. Else returns value of entry "name" in section "em" or "def" if entry doesn`t exists.
This function useful to read settings from configuration file in implementation PIIODevice::configureDevice() function