Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Dealing with multiple inputfiles at runtime?

Reply
Thread Tools

Dealing with multiple inputfiles at runtime?

 
 
none
Guest
Posts: n/a
 
      05-04-2010
Maybe this is not directly a C++ question but since my app is written in C++ I will get it a try.

I have an application that reads jobs from a job container and process each job until the container
is empty. Each job has a unique id.

Now when a job is being processed one or more files needs to be read. Each file basically just
contains a list of floats (and the filename is prefixed with the jobId).

My current approach is to make one file for all the jobs where I write the path to the directory
containing the input files. This looks likes this:

coeff_dir = /home/bob/input/

When the application is run the current jobId is used to lookup the right file in the folder.


Are there any better way (maybe using xml) to do this kind of file input based application?
 
Reply With Quote
 
 
 
 
Alf P. Steinbach
Guest
Posts: n/a
 
      05-04-2010
On 04.05.2010 21:48, * none:
> Maybe this is not directly a C++ question but since my app is written in
> C++ I will get it a try.
>
> I have an application that reads jobs from a job container and process
> each job until the container is empty. Each job has a unique id.
>
> Now when a job is being processed one or more files needs to be read.
> Each file basically just contains a list of floats (and the filename is
> prefixed with the jobId).
>
> My current approach is to make one file for all the jobs where I write
> the path to the directory containing the input files. This looks likes
> this:
>
> coeff_dir = /home/bob/input/
>
> When the application is run the current jobId is used to lookup the
> right file in the folder.
>
>
> Are there any better way (maybe using xml) to do this kind of file input
> based application?


KISS -- Keep It Simple, Stupid.

I.e. current approach good.

XML needless complication + inefficiency.


Cheers & hth.,

- Alf

 
Reply With Quote
 
 
 
 
Öö Tiib
Guest
Posts: n/a
 
      05-04-2010
On 4 mai, 22:48, none <""mort\"@(none)"> wrote:
> Maybe this is not directly a C++ question but since my app is written in C++ I will get it a try.
>
> I have an application that reads jobs from a job container and process each job until the container
> is empty. Each job has a unique id.
>
> Now when a job is being processed one or more files needs to be read. Each file basically just
> contains a list of floats (and the filename is prefixed with the jobId).
>
> My current approach is to make one file for all the jobs where I write the path to the directory
> containing the input files. This looks likes this:
>
> coeff_dir = /home/bob/input/
>
> When the application is run the current jobId is used to lookup the right file in the folder.
>
> Are there any better way (maybe using xml) to do this kind of file input based application?


Best way is to keep simple application settings ints and strings in
ini file. Ini file has easy to read and to understand. It is simpler
to manually edit than xml. There is portable ini file parsers/writers
code lying all over everywhere. Also your own "file for all the jobs"
looks exactly like a line from ini file.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
TreeTop: dealing with Grammars in multiple files? Phil Tomson Ruby 3 02-29-2008 04:25 AM
Dealing with multiple excel sheets Rohan Python 2 08-07-2007 06:31 PM
Dealing with multiple encodings in the same app Isak Ruby 2 03-08-2007 02:21 PM
Dealing with multiple sets John Henry Python 6 10-26-2006 04:45 PM
Dealing with multiple versions of packages... Chris Barker Python 3 04-22-2004 10:42 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57