config library



how about somthing like:
in the file test.cfg

#filecfg.o
object1{
  object2{
    attribute1="something"
  }
  object3{
  }
  attribute2="something else"
  attribute3="more something"
}
attribute4="global somthing"


in the test program:

config=cfg_open("test");
objects=cfg_list_objects("/");
object_count=cfg_count_objects("/");
attribute_count=cfg_count_attributes("/object1");
attributes_of_object1=cfg_get_attributes("/object2");
attribute1_of_object1=cfg_get_attribute("/object2", "attribute1");
cfg_create_object("/object4");
cfg_set_attribute("/object4", "attribute4", "blar");
cfg_destroy_attribute("/object4", "attribute4");
cfg_destroy_object("/object4");

maby some other functions:
	cfg_set_cache_options();
	cfg_get_object_len();
	cfg_get_attribute_len();
	cfg_cache_object();
	cfg_cache_objects();
	cfg_cache_attribute();
	cfg_cache_attributes();
	cfg_uncache_object();
	cfg_uncache_objects();
	cfg_uncache_attribute();
	cfg_uncache_attributes();
	cfg_recache_object();
	cfg_recache_objects();
	cfg_recache_attribute();
	cfg_recache_attributes();
	cfg_dont_cache_object();
	cfg_dont_cache_objects();
	cfg_dont_cache_attribute();
	cfg_dont_cache_attributes();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]