Anonymous | Login | 2024-10-05 14:04 CDT |
My View | View Issues |
View Revisions: Issue #38 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0000038: Executable-defined options cannot be namespaced | ||
Revision | 2012-07-03 15:31 by smlewis | ||
Description | The option system allows you to define options in basic/options_rosetta.py. This works great. Options defined in this way have C++ namespaces, and "option namespaces" such that they are namespaced on command line (like the in and file in -in:file:s). The options system forbids you from definition options elsewhere, mostly. This works great. The options system allows you to define options in executable files that can be referenced only within the code in that same file (global variable, but scoped to that file). This only sort-of works. You CAN C++ namespace options, but they do NOT acquire "option namespace" options. Options created in an executable cannot have namespace prefixes when used, and as a consequence cannot name-clash with any other options already existing. If this is intended behavior, it may not be the best design choice, because it forces suboptimal option names in executable-defined options. If this is unintended, then it's a bug. Example: AnchoredPDBCreator's options. The code defining the options namespaces them in text and in C++: interface_design/anchored_design/AnchoredPDBCreator.cc 53-namespace basic{ namespace options{ namespace OptionKeys{ 54-namespace AnchoredPDBCreator{ 55:basic::options::FileOptionKey const scaffold_loop("AnchoredPDBCreator::scaffold_loop"); 56:basic::options::FileOptionKey const scaffold_pdb("AnchoredPDBCreator::scaffold_pdb"); 57:basic::options::FileOptionKey const anchor_pdb("AnchoredPDBCreator::anchor_pdb"); 58:basic::options::FileOptionKey const target_pdb("AnchoredPDBCreator::target_pdb"); 59:basic::options::IntegerOptionKey const APDBC_cycles("AnchoredPDBCreator::APDBC_cycles"); 60-}//AnchoredPDBCreator 61-}}}//basic::options::OptionKeys Despite this clear namespacing to an AnchoredPDBCreator "options namespace", ONLY -anchor_pdb is accepted by Rosetta; -AnchoredPDBCreator:anchor_pdb is not accepted as a valid option. The second consequence of this unnamespaceability is that executable-defined options cannot have their name conflict with other existing options, as the options system is unable to discriminate them properly. |
||
Revision | 2012-07-03 14:07 by smlewis | ||
Description | The option system allows you to define options in basic/options_rosetta.py. This works great. Options defined in this way have C++ namespaces, and "option namespaces" such that they are namespaced on command line (like the in and file in -in:file:s). The options system forbids you from definition options elsewhere, mostly. This works great. The options system allows you to define options in executable files that can be referenced only within the code in that same file (global variable, but scoped to that file). This only sort-of works. You CAN C++ namespace options, but they do NOT acquire "option namespace" options. Options created in an executable cannot have namespace prefixes when used, and as a consequence cannot name-clash with any other options already existing. |
Copyright © 2000 - 2012 MantisBT Group |