Vijay Samuel's Blog

Slap given a Boost ;)

Posted on: May 24, 2010

I ‘ve finally completed refactoring both command-line options and the configuration file processing and filed in my merge proposal. It was a long process and now that it ‘s finally done there are a lot of changes in drizzleslap. (Anyone whos currently working on slap would get a serious head ache when he re merges with trunk after my code is merged into trunk!!! πŸ˜‰ πŸ™‚ )

Some of the changes that have been incorporated are as follows:

1) The struct my_long_options[] has been removed and program_options::options_description is used to define an object long_options.

2) The command line parsing and configuration file processing is taken care of by the parse_command_line() and the parse_config_file() instead of using custom code and so one won’t be able to find the handle_options any more.

3) get_options() has been renamed to process_options since it job now is just to process option values and it now only takes void as a parameter.

4) The internal::load_defaults() is no longer used and is replaced by the parse_config_file from boost.

5) Drizzle will no longer use the single configuration file drizzle.cnf instead it will be using mulitple configuration files such as drizzleslap.cnf and client.cnf which will be found in ~/.drizzle and SYSCONFDIR/drizzle directories. The user configuration file over rides the system configuration file. The command line over rides both configuration files.

6) get_one_option() has been removed since it is of no use any more.

Similar changes will be implemented in the server side soon. Hopefully all the custom code used for command line and configuration file parsing will be replaced by standard boost:: program_options within 2 to 3 months. πŸ™‚


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

My Timeline

May 2010
« Apr   Jun »

I, Me and Myself

My Blog Stats

  • 6,969 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 4 other followers

%d bloggers like this: