Skip to content

Class: cIniProcessor

Properties | Events | Methods | Index of Classes

Class for processing ini files in memory

Hierarchy

cObject > cIniProcessor

Show full hierarchy and direct subclasses

Library: Common Class Library

Package: cIniFile.pkg

Description

The cIniProcessor class reads and parses an ini file into a memory structure, and then its functions work on the data in memory.

We recommend not mixing usage of cIniFile and cIniProcessor class members.

So SetValue only changes the value in memory, and not on disk.

To write the changes, use WriteToFile. cIniProcessor will be more optimal when reading / writing many values. When using the cIniFile class, you do not have to worry about when to read / write the file.

An INI file is a text file that stores data in logical groups called sections. Each section can contain multiple keys. Each key stores a single value. Section names must be unique within the file and Key names must be unique within each Section.

The format of an INI file is as follows:

[SectionName]
Key=Value
Key=Value
..
[SectionName]
Key=Value
Key=Value
..

INI files are convenient for storing application data, as an alternative to the system Registry, because they are physical files that can easily be copied. An example of an INI file would be a "Workspace file" that DataFlex uses to store information about a Workspace. Unlike the Registry, though, data does not have a data-type associated with it, and all data is assumed to be of type String.