Phil Dibowitz wrote:
> On 09/01/2010 03:30 AM, Stephen Warren wrote:
>> You'd have something like:
>>
>> update_config_get_step_count(?)
>> update_config_get_step_type(?, step_id)
>> update_config_get_...
>> backup_firmware_get_step_count(?)
>> backup_firmware_get_step_type(?, step_id)
>> backup_firmware_get_...
>> ...
>
> Ah, OK, I see now. Sorry, I feel dense.
>
> How about if the ParsedOperationFile told you how many steps (not the
> types), and then the callback noted the type?

Currently, congruity creates a text label for each step, before any of the
steps start. This would need to change if the only information was the
number of steps.

> So, how's this:
>
> ParsedOperationFile *pof = ReadAndParseFile(filename)
> int num_steps = num_steps(pof);
> int mode = file_type(pof);
>
> if (!mode) {
>    // figure out modes from not file, like
>    // dump-config, etc.
> }
>
> switch (mode) {
>   case UPDATE_CONFIG:
>     update_configuration();
>     break;
>   case DUMP_CONFIG:
>     dump_config()
>     break;
>   ...
> }
>
>
> BTW, I plan to implement ReadAndParseFile inside the CRemote* class
> hierarchy since different levels of it read files differently and it takes
> a
> whole lot of having to do trial-and-error out of code. Currently it's all
> in
> the upper-level libconcord.cpp, which would then just be thin wrapper.
>
>
> --
> Phil Dibowitz                             p...@ipom.com
> Open Source software and tech docs        Insanity Palace of Metallica
> http://www.phildev.net/                   http://www.ipom.com/
>
> "Be who you are and say what you feel, because those who mind don't matter
>  and those who matter don't mind."
>  - Dr. Seuss
>
>
>



------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to