File: main.cpp

package info (click to toggle)
explorer 0.72-2.1
  • links: PTS
  • area: contrib
  • in suites: hamm, slink
  • size: 1,556 kB
  • ctags: 1,203
  • sloc: cpp: 10,226; makefile: 384; sh: 206; ansic: 106; lex: 95; csh: 6
file content (43 lines) | stat: -rw-r--r-- 953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43


#include "m_config.h"

/*---------------------------------------------------------------------------*/
main (void)
{
 float red  =0.5,
       green=0.5,
       blue =0.5;

 int path_max=1024;

 char last_model [256]="/home/vvelsen/sgi_fonts.3ds";

 ConfigClass *temp_config=new ConfigClass (".mindseyerc","MindsEye");


 //>--------- group [kernel]

 temp_config->insert_group ("kernel");
 temp_config->insert_entry ("path_max","i",&path_max);
 temp_config->insert_entry ("rgb_values","fff",&red,&green,&blue);


 //>--------- group [modeler]

 temp_config->insert_group ("modeler");
 temp_config->insert_entry ("last_model","s",&last_model);


 //>--------- group [plugins]

 temp_config->insert_group ("plugins");

 //>--------- modify some variables

 red=0.10; // you should see this value in the config file  

 temp_config->write_config ();
 delete (temp_config);
}
/*---------------------------------------------------------------------------*/