-
- Downloads
Convert from dynamic (nodeMeta) to hard-coded (parDefs) parameter info
def user_edit_pair(fname_stem, th, tc): for i in range(10): ex = r'(\w+?)::\1(\([^\(\)]*?\)\s*?:\s*?)(I\w+)\(\s*?{"[^"]*?",\s*?("[^"]*?"),\s*?(({{.*?}}|{}))},\s*?(P|{})\)' m = re.search(ex, tc, flags=re.S) if m: cname = m.group(1) tooltip = m.group(4) arr = m.group(5) print(f"In source pair {fname_stem} amend class {cname}") tc = re.sub(ex, r'\1::\1\2\3(\7)', tc, count=1, flags=re.S) th = re.sub(r'(class ' + cname + r'.*?std::string className.*?"; }\n)', r'\1' +r' // const auto tooltip = ' + tooltip + r';\n' +r' std::vector<ParaMeta> parDefs() const final { return' +r' ' + arr + '; }\n', th, flags=re.S) th = re.sub(r'\(const NodeMeta& meta,\s+((const )?std::vector<double>&? PValues)\)', r'(\1)', th, flags=re.S) tc = re.sub(r'\(const NodeMeta& meta,\s+((const )?std::vector<double>&? PValues)\)', r'(\1)', tc, flags=re.S) tc = re.sub(r'\(meta, (PValues)\)', r'(\1)', tc) return th, tc et.ed_argfilepairs(user_edit_pair)
parent
d5d8d127
No related branches found
No related tags found
Showing
- Core/Background/ConstantBackground.cpp 1 addition, 5 deletionsCore/Background/ConstantBackground.cpp
- Core/Background/ConstantBackground.h 5 additions, 0 deletionsCore/Background/ConstantBackground.h
- Core/Background/IBackground.cpp 1 addition, 4 deletionsCore/Background/IBackground.cpp
- Core/Background/IBackground.h 1 addition, 1 deletionCore/Background/IBackground.h
- Core/Background/PoissonNoiseBackground.cpp 1 addition, 4 deletionsCore/Background/PoissonNoiseBackground.cpp
- Core/Background/PoissonNoiseBackground.h 2 additions, 0 deletionsCore/Background/PoissonNoiseBackground.h
- Device/Beam/FootprintGauss.cpp 1 addition, 6 deletionsDevice/Beam/FootprintGauss.cpp
- Device/Beam/FootprintGauss.h 5 additions, 0 deletionsDevice/Beam/FootprintGauss.h
- Device/Beam/FootprintSquare.cpp 1 addition, 6 deletionsDevice/Beam/FootprintSquare.cpp
- Device/Beam/FootprintSquare.h 5 additions, 0 deletionsDevice/Beam/FootprintSquare.h
- Device/Beam/IFootprintFactor.cpp 2 additions, 2 deletionsDevice/Beam/IFootprintFactor.cpp
- Device/Beam/IFootprintFactor.h 1 addition, 1 deletionDevice/Beam/IFootprintFactor.h
- Device/Resolution/IResolutionFunction2D.cpp 1 addition, 5 deletionsDevice/Resolution/IResolutionFunction2D.cpp
- Device/Resolution/IResolutionFunction2D.h 1 addition, 1 deletionDevice/Resolution/IResolutionFunction2D.h
- Param/Node/INode.cpp 2 additions, 2 deletionsParam/Node/INode.cpp
- Sample/Aggregate/IInterference.cpp 1 addition, 2 deletionsSample/Aggregate/IInterference.cpp
- Sample/Aggregate/IInterference.h 1 addition, 1 deletionSample/Aggregate/IInterference.h
- Sample/Correlations/FTDecay1D.cpp 6 additions, 23 deletionsSample/Correlations/FTDecay1D.cpp
- Sample/Correlations/FTDecay1D.h 23 additions, 1 deletionSample/Correlations/FTDecay1D.h
- Sample/Correlations/FTDecay2D.cpp 5 additions, 28 deletionsSample/Correlations/FTDecay2D.cpp
Loading
Please register or sign in to comment