config library (fixed)



Sorry, i left out the config options in the test program:

> -----Original Message-----
> From:	Fox, Kevin M [SMTP:kmfox@bhi010.bhi-erc.com]
> Sent:	Thursday, December 31, 1998 3:29 PM
> To:	'gnome-list@gnome.org'
> Subject:	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(config, "/");
> object_count=cfg_count_objects(config, "/");
> attribute_count=cfg_count_attributes(config, "/object1");
> attributes_of_object1=cfg_get_attributes(config, "/object2");
> attribute1_of_object1=cfg_get_attribute(config, "/object2", "attribute1");
> cfg_create_object(config, "/object4");
> cfg_set_attribute(config, "/object4", "attribute4", "blar");
> cfg_destroy_attribute(config, "/object4", "attribute4");
> cfg_destroy_object(config, "/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();
> 
> 
> -- 
>         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.



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