Feature #220
open
Feature #78: Output system improvements
Support #include in output definition files
Added by Ole Hansen over 7 years ago.
Updated almost 7 years ago.
Description
Allow including other files in output definition files via #include directives. In this way, one can create "master" output definitions that care composed of smaller definition files specific to individual detectors and spectrometers.
- Status changed from New to In Progress
- % Done changed from 0 to 20
- % Done changed from 20 to 80
Added preliminary support for #include in odef files. Commit 8c87c95 in hansenjo/analyzer.
Still needs testing. Also, include path is not supported yet.
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
Tested #include functionality & tweaked error messages. Working version is in commit b9df86c on hansenjo/removing-vfrom branch
- Status changed from Closed to In Progress
- % Done changed from 100 to 60
I guess I closed this prematurely. Still to do:
- Prevent infinite recursion if a file refers to a previously included file. In C++, we can use guard definitions. But we don't have logicals yet, and defining macros isn't on the to-do list and would get too complex. Could we use the C preprocessor to handle all this?
- Support searching an include path via an environment variable
- % Done changed from 60 to 70
Add support for searching various directories for files given in #include statements. The directories are specified as colon-separated strings in the $ANALYZER_CONFIGPATH environment variable, similar to $PATH.
In addition, direct expansion of environment variables in the #include file name is supported, so one can specify things like
#include "$LHRS/variables.odef"
#include "$RHRS/variables.odef"
Added a backport of this feature to the master branch (commit 8ed3305
) on 8/30/2017.
Still to do:
- Protect against infinite recursion, include loops
- Add #include capability to cut definition files
- Target version changed from 1.6 to 1.7
- % Done changed from 70 to 80
Added support for #include in cut definition files. To avoid duplicating code, I moved the support functions GetIncludeFileName
and CheckIncludeFilePath
into new files, FileInclude.[Ch]
.
Also available in: Atom
PDF