Configuration Data

This chapter describes the data which is needed to configure OpenCAGE, and the mechanisms how data is given to the objects which need this data.

Introduction

OpenCAGE needs some sets of information about displaying different kind of data. For example, the colors of the edges is not hard-coded, but it can be changed according to your wishes. The configuration is hold in an external file called oc.xml which is in the same path as the executable file "oc". The structure of the file is plain wellformed XML which can be read by the xml-processor of your choice. At the startup of OpenCAGE this file is parsed and the parameters and the data are delieverd to objects which need them.

The following information is hold in the configuration file oc.xml:

Note:

Benefits

Adding new data to the configuration file

For an easy handling use paramter pots! First create an object which is initialized at startup before the reading of the XML will be done. Then adjust Init_XML in opencage-init and add a call of an appropriate method of this object and pass the read paramter pot to it.

Implementation

A part of the implementation is done. But the partitioning into program and project data is still missing. You can find some of these parameters in the file oc.xml, but here is a quick guide how you can implement and store the missing parameters:

Use a Parameter_Pot (Parameter Pot (PP), the Section called Parameter Pot (PP) in Chapter 10) to deserialize the XML file in which the parameters are stored. Then append this Parameter_Pot to every other Parameter_Pot which could eventually use a parameter from the presets. That's all.