Overview
Features
Download
Documentation
Community
Add-Ons & Services

Lightweight version of configuration files

Discussion of ideas for features and new projects based on POCO.

Lightweight version of configuration files

Postby gregoire » 03 Aug 2010, 10:44

I like and use a lot Poco::Util::IniFileConfiguration and Poco::Util::PropertyFileConfiguration.

In some cases I would like to use them in a lightweight version: without AutoPtr, AbstractConfiguration, etc
So is it possible to extract code from Poco::Util::IniFileConfiguration to create Poco::Util::IniFile ?

Poco::Util::IniFile could be used in many cases, Poco::Util::IniFileConfiguration would be one of them.

What do you think ?
gregoire
 
Posts: 30
Joined: 27 Jan 2009, 19:23
Location: Grenoble, France

Re: Lightweight version of configuration files

Postby aderouineau » 03 Aug 2010, 17:39

What makes the use of AutoPtr "so heavy" ?
aderouineau
 
Posts: 163
Joined: 18 May 2009, 17:38

Re: Lightweight version of configuration files

Postby gregoire » 03 Aug 2010, 19:08

I will try not to feed the troll about AutoPtr, shared_ptr, etc: I like them, use them when I need them, etc.

However I think that there are times and places for smart pointers.

In my case, I developp an API which uses shared_pointer and weak_pointer to manage some inter-linked objects.
If I want to use and store a Poco::Util::IniFileConfiguration, I will somewhere have a shared_pointer of an AutoPtr that will never be duplicated. I think it would not be such a good design.

Other use case: I write a single threaded application on Linux. If I use AutoPtr I think that I will have to link my application to pthreads, since AtomicCounter will use a FastMutex.

I agree that most of the times, smart pointers is handy and usefull but why not let the user choose ?
gregoire
 
Posts: 30
Joined: 27 Jan 2009, 19:23
Location: Grenoble, France


Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest