> > > This list of responsible being attached to alarm message strings ...
> > This is a great idea. But I think we do not need to artificially limit ourselves
> > to string and array lengths.
> > The code in alarm.c should be changes to use std::string and std::vector<std::string> (STRING_LIST
> > #define), db_get_record() should be replaced with individual ODB reads (that's what it does behind
> > the scenes, but in a non-type and -size safe way).
> > I think the web page code will work correctly, it does not care about string lengths.
> > K.O.
> Auto growing lists is an excellent plan. I am making decent progress and should have something to
> report soon
This has sent me down a little rabbit hole, and I'd like to check in with efforts to improve the efficiency and simplicity of the alarm code.
I can keep with the current 'C' style of the alarm.cxx code, replace struct read and writes to the odb with individual odb entries... put functions in alarm.cxx to create, read and write to the odb...
If we go this 'C' style route, then I'll have duplication of the 'users responsible' setters and getter functions for structs ALARM and PROGRAM_INFO
What would the MIDAS developers thing of creating classes for ALARM and PROGRAM_INFO (I am thinking for binary compatibilities of not touching ALARM and PROGRAM_INFO structs, and inheriting from them:
class Alarm: public ALARM, public UsersResponsible
class ProgramInfo: public PROGRAM_INFO, public UsersResponsible
Each of these three classes would have member to functions to Create, Read and Write to the ODB. We could get rid of the PROGRAM_INFO_STR precompiler macro and instead have a SetToDefault member function.
It seems clear we should set the ODB path in the constructor of Alarm and ProgramInfo