E
Ebenezer
I've recently made some changes to how I'm doing things. Previously
I
was using one .hh generated output file in all three of my tiers. The
first change I made was to introduce a .cc file and move the code that
could be in a .cc to that file. The second thing I did was to
separate
things between the tiers -- in other words, I now have a .hh and .cc
for between the "back" and "middle" tiers and separate .hh and
..cc for between the "middle" and "front" tiers. So that put me
at four files. The last change implied another change -- factoring
out some constants into a fifth file I call type_nums.hh. The first
four
files are named based on user input, but this file isn't. Here's an
example of type_nums.hh based on this input:
http://webEbenezer.net/misc/direct.mdl.
#ifndef type_nums_hh
#define type_nums_hh
uint16_t const File_num = 7001;
uint16_t const cmw_account_info_num = 7002;
uint16_t const cmw_user_input_num = 7003;
uint16_t const cmw_request_num = 7004;
#endif
Obviously, people could have a file with this name in their
code and I could inadvertently wipe out their file. I've
thought of adding a prefix to the type_nums name to
minimize this risk and also thought about isolating the generated
files in a subdirectory. Maybe I should do both. Thoughts?
Thanks in advance.
Brian Wood
Ebenezer Enterprises
http://webEbenezer.net
I
was using one .hh generated output file in all three of my tiers. The
first change I made was to introduce a .cc file and move the code that
could be in a .cc to that file. The second thing I did was to
separate
things between the tiers -- in other words, I now have a .hh and .cc
for between the "back" and "middle" tiers and separate .hh and
..cc for between the "middle" and "front" tiers. So that put me
at four files. The last change implied another change -- factoring
out some constants into a fifth file I call type_nums.hh. The first
four
files are named based on user input, but this file isn't. Here's an
example of type_nums.hh based on this input:
http://webEbenezer.net/misc/direct.mdl.
#ifndef type_nums_hh
#define type_nums_hh
uint16_t const File_num = 7001;
uint16_t const cmw_account_info_num = 7002;
uint16_t const cmw_user_input_num = 7003;
uint16_t const cmw_request_num = 7004;
#endif
Obviously, people could have a file with this name in their
code and I could inadvertently wipe out their file. I've
thought of adding a prefix to the type_nums name to
minimize this risk and also thought about isolating the generated
files in a subdirectory. Maybe I should do both. Thoughts?
Thanks in advance.
Brian Wood
Ebenezer Enterprises
http://webEbenezer.net