pyopenms-docs icon indicating copy to clipboard operation
pyopenms-docs copied to clipboard

Code that should be wrapped in PyOpenMS

Open oliveralka opened this issue 4 years ago • 4 comments

Wrapping:

  • [ ] ./src/openms/include/OpenMS/METADATA/IonSource.h
static const std::string NamesOfPolarity[SIZE_OF_POLARITY];
static const std::string NamesOfInletType[SIZE_OF_INLETTYPE];
static const std::string NamesOfIonizationMethod[SIZE_OF_IONIZATIONMETHOD];
  • [ ] ./src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.h:
static const std::string NamesOfDerivatizationAgent[static_cast<int>(DerivatizationAgent::SIZE_OF_DERIVATIZATIONAGENT)];
static const std::string NamesOfMassIntensityType[static_cast<int>(MassIntensityType::SIZE_OF_MASSINTENSITYTYPE)];
  • [ ] ./src/openms/include/OpenMS/CHEMISTRY/EnzymaticDigestion.h
static const std::string NamesOfSpecificity[SIZE_OF_SPECIFICITY];
  • [ ] ./src/openms/include/OpenMS/FORMAT/MSNumpressCoder.h
static const std::string NamesOfNumpressCompression[SIZE_OF_NUMPRESSCOMPRESSION];
  • [ ] ./src/openms/include/OpenMS/METADATA/DataProcessing.h
static const std::string NamesOfProcessingAction[SIZE_OF_PROCESSINGACTION];
  • [ ] ./src/openms/include/OpenMS/METADATA/Modification.h
static const std::string NamesOfSpecificityType[SIZE_OF_SPECIFICITYTYPE];
  • [ ] ./src/openms/include/OpenMS/METADATA/SourceFile.h
static const std::string NamesOfChecksumType[SIZE_OF_CHECKSUMTYPE];
  • [ ] ./src/openms/include/OpenMS/METADATA/Instrument.h
static const std::string NamesOfIonOpticsType[SIZE_OF_IONOPTICSTYPE];
  • [ ] ./src/openms/include/OpenMS/METADATA/SpectrumSettings.h
static const std::string NamesOfSpectrumType[SIZE_OF_SPECTRUMTYPE];
  • [ ] ./src/openms/include/OpenMS/METADATA/IonDetector.h
static const std::string NamesOfType[SIZE_OF_TYPE];
static const std::string NamesOfAcquisitionMode[SIZE_OF_ACQUISITIONMODE];
  • [ ] ./src/openms/include/OpenMS/METADATA/Tagging.h
static const std::string NamesOfIsotopeVariant[SIZE_OF_ISOTOPEVARIANT];
  • [ ] ./src/openms/include/OpenMS/METADATA/InstrumentSettings.h:
static const std::string NamesOfScanMode[SIZE_OF_SCANMODE];
  • [ ] ./src/openms/include/OpenMS/METADATA/Precursor.h
static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD];
static const std::string NamesOfActivationMethodShort[SIZE_OF_ACTIVATIONMETHOD];
  • [ ] ./src/openms/include/OpenMS/METADATA/MSQuantifications.h
static const std::string NamesOfQuantTypes[SIZE_OF_QUANT_TYPES];
  • [ ] ./src/openms/include/OpenMS/METADATA/MassAnalyzer.h
static const std::string NamesOfAnalyzerType[SIZE_OF_ANALYZERTYPE];
static const std::string NamesOfResolutionMethod[SIZE_OF_RESOLUTIONMETHOD];
static const std::string NamesOfResolutionType[SIZE_OF_RESOLUTIONTYPE];
static const std::string NamesOfScanDirection[SIZE_OF_SCANDIRECTION];
static const std::string NamesOfScanLaw[SIZE_OF_SCANLAW];
static const std::string NamesOfReflectronState[SIZE_OF_REFLECTRONSTATE];
  • [ ] ./src/openms/include/OpenMS/METADATA/Sample.h
static const std::string NamesOfSampleState[SIZE_OF_SAMPLESTATE];
  • [ ] ./src/openms/include/OpenMS/METADATA/ProteinIdentification.h
static const std::string NamesOfPeakMassType[SIZE_OF_PEAKMASSTYPE];
  • [ ] ./src/openms/include/OpenMS/KERNEL/BaseFeature.h
static const std::string NamesOfAnnotationState[SIZE_OF_ANNOTATIONSTATE];
  • [ ] ./src/openms_gui/include/OpenMS/VISUAL/LayerData.h
static const std::string NamesOfLabelType[SIZE_OF_LABEL_TYPE];

Examples:

  • [x] Add example to readthedocs as this has been requested by users

oliveralka avatar Sep 14 '21 09:09 oliveralka

TODO: search for SIZE_OF_ and check if wrapped in pxd files

timosachsenberg avatar Sep 14 '21 09:09 timosachsenberg

➜  OpenMS git:(develop) find . -name "*.h" -exec grep -H "SIZE_OF_*" {} \;
./src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.h:      SIZE_OF_DERIVATIZATIONAGENT
./src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.h:      SIZE_OF_MASSINTENSITYTYPE
./src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.h:    static const std::string NamesOfDerivatizationAgent[static_cast<int>(DerivatizationAgent::SIZE_OF_DERIVATIZATIONAGENT)];
./src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.h:    static const std::string NamesOfMassIntensityType[static_cast<int>(MassIntensityType::SIZE_OF_MASSINTENSITYTYPE)];
./src/openms/include/OpenMS/ANALYSIS/QUANTITATION/ItraqConstants.h:    enum ITRAQ_TYPES {FOURPLEX = 0, EIGHTPLEX, TMT_SIXPLEX, SIZE_OF_ITRAQ_TYPES};
./src/openms/include/OpenMS/ANALYSIS/ID/PeptideIndexing.h:      SIZE_OF_UNMATCHED
./src/openms/include/OpenMS/ANALYSIS/ID/PeptideIndexing.h:    static const std::array<std::string, (Size)Unmatched::SIZE_OF_UNMATCHED> names_of_unmatched;
./src/openms/include/OpenMS/ANALYSIS/ID/PeptideIndexing.h:      SIZE_OF_MISSING_DECOY
./src/openms/include/OpenMS/ANALYSIS/ID/PeptideIndexing.h:    static const std::array<std::string, (Size)MissingDecoy::SIZE_OF_MISSING_DECOY> names_of_missing_decoy;
./src/openms/include/OpenMS/ANALYSIS/TARGETED/TargetedExperimentHelper.h:        SIZE_OF_RTUNIT
./src/openms/include/OpenMS/ANALYSIS/TARGETED/TargetedExperimentHelper.h:        SIZE_OF_RTTYPE
./src/openms/include/OpenMS/ANALYSIS/TARGETED/TargetedExperimentHelper.h:        retention_time_unit(RTUnit::SIZE_OF_RTUNIT),
./src/openms/include/OpenMS/ANALYSIS/TARGETED/TargetedExperimentHelper.h:        retention_time_type(RTType::SIZE_OF_RTTYPE),
./src/openms/include/OpenMS/ANALYSIS/SEQUENCE/NeedlemanWunsch.h:      SIZE_OF_SCORINGMATRIX
./src/openms/include/OpenMS/ANALYSIS/OPENSWATH/PeakPickerMRM.h:	enum FLOATINDICES { IDX_FWHM = 0, IDX_ABUNDANCE = 1, IDX_LEFTBORDER = 2, IDX_RIGHTBORDER = 3, SIZE_OF_FLOATINDICES };
./src/openms/include/OpenMS/DATASTRUCTURES/OSWData.h:        SIZE_OF_VALUES
./src/openms/include/OpenMS/DATASTRUCTURES/OSWData.h:      static const char* LevelName[SIZE_OF_VALUES];
./src/openms/include/OpenMS/DATASTRUCTURES/OSWData.h:      OSWHierarchy::Level lowest = OSWHierarchy::Level::SIZE_OF_VALUES;
./src/openms/include/OpenMS/DATASTRUCTURES/OSWData.h:        return lowest != OSWHierarchy::Level::SIZE_OF_VALUES;
./src/openms/include/OpenMS/FILTERING/CALIBRATION/MZTrafoModel.h:    enum MODELTYPE { LINEAR, LINEAR_WEIGHTED, QUADRATIC, QUADRATIC_WEIGHTED, SIZE_OF_MODELTYPE };
./src/openms/include/OpenMS/FILTERING/CALIBRATION/MZTrafoModel.h:      Returns 'SIZE_OF_MODELTYPE' if string is unknown.
./src/openms/include/OpenMS/CHEMISTRY/EnzymaticDigestion.h:      SIZE_OF_SPECIFICITY = 10
./src/openms/include/OpenMS/CHEMISTRY/EnzymaticDigestion.h:    static const std::string NamesOfSpecificity[SIZE_OF_SPECIFICITY];
./src/openms/include/OpenMS/CHEMISTRY/WeightWrapper.h:    enum WEIGHTMODE {AVERAGE = 0, MONO, SIZE_OF_WEIGHTMODE};
./src/openms/include/OpenMS/IONMOBILITY/IMTypes.h:    SIZE_OF_DRIFTTIMEUNIT
./src/openms/include/OpenMS/IONMOBILITY/IMTypes.h:  OPENMS_DLLAPI extern const std::string NamesOfDriftTimeUnit[(size_t) DriftTimeUnit::SIZE_OF_DRIFTTIMEUNIT];
./src/openms/include/OpenMS/IONMOBILITY/IMTypes.h:  /// @throws Exception::InvalidValue if @p value is SIZE_OF_DRIFTTIMEUNIT
./src/openms/include/OpenMS/IONMOBILITY/IMTypes.h:    SIZE_OF_IMFORMAT
./src/openms/include/OpenMS/IONMOBILITY/IMTypes.h:  OPENMS_DLLAPI extern const std::string NamesOfIMFormat[(size_t) IMFormat::SIZE_OF_IMFORMAT];
./src/openms/include/OpenMS/IONMOBILITY/IMTypes.h:  /// @throws Exception::InvalidValue if @p value is SIZE_OF_IMFORMAT
./src/openms/include/OpenMS/FORMAT/FileTypes.h:      SIZE_OF_TYPE        ///< No file type. Simply stores the number of types
./src/openms/include/OpenMS/FORMAT/PercolatorOutfile.h:    enum ScoreType { QVALUE, POSTERRPROB, SCORE, SIZE_OF_SCORETYPE };
./src/openms/include/OpenMS/FORMAT/PercolatorOutfile.h:    static const std::string score_type_names[SIZE_OF_SCORETYPE];
./src/openms/include/OpenMS/FORMAT/MSNumpressCoder.h:      SIZE_OF_NUMPRESSCOMPRESSION
./src/openms/include/OpenMS/FORMAT/MSNumpressCoder.h:    static const std::string NamesOfNumpressCompression[SIZE_OF_NUMPRESSCOMPRESSION];
./src/openms/include/OpenMS/FORMAT/MSNumpressCoder.h:                                             NamesOfNumpressCompression + SIZE_OF_NUMPRESSCOMPRESSION, compression);
./src/openms/include/OpenMS/FORMAT/MSNumpressCoder.h:        if (match == NamesOfNumpressCompression + SIZE_OF_NUMPRESSCOMPRESSION) // == end()
./src/openms/include/OpenMS/FORMAT/MzTab.h:    SIZE_OF_MZTAB_CELLTYPE
./src/openms/include/OpenMS/FORMAT/OSWFile.h:      SIZE_OF_OSWLEVEL
./src/openms/include/OpenMS/FORMAT/OSWFile.h:    static const std::array<std::string, (Size)OSWLevel::SIZE_OF_OSWLEVEL> names_of_oswlevel;
./src/openms/include/OpenMS/METADATA/ChromatogramSettings.h:      SIZE_OF_CHROMATOGRAM_TYPE // last entry!
./src/openms/include/OpenMS/METADATA/ChromatogramSettings.h:    static const char * const ChromatogramNames[SIZE_OF_CHROMATOGRAM_TYPE+1]; // avoid string[], since it gets copied onto heap on initialization
./src/openms/include/OpenMS/METADATA/DataProcessing.h:      SIZE_OF_PROCESSINGACTION
./src/openms/include/OpenMS/METADATA/DataProcessing.h:    static const std::string NamesOfProcessingAction[SIZE_OF_PROCESSINGACTION];
./src/openms/include/OpenMS/METADATA/Modification.h:      , SIZE_OF_SPECIFICITYTYPE
./src/openms/include/OpenMS/METADATA/Modification.h:    static const std::string NamesOfSpecificityType[SIZE_OF_SPECIFICITYTYPE];
./src/openms/include/OpenMS/METADATA/SourceFile.h:      SIZE_OF_CHECKSUMTYPE
./src/openms/include/OpenMS/METADATA/SourceFile.h:    static const std::string NamesOfChecksumType[SIZE_OF_CHECKSUMTYPE];
./src/openms/include/OpenMS/METADATA/IonSource.h:      SIZE_OF_INLETTYPE
./src/openms/include/OpenMS/METADATA/IonSource.h:    static const std::string NamesOfInletType[SIZE_OF_INLETTYPE];
./src/openms/include/OpenMS/METADATA/IonSource.h:      SIZE_OF_IONIZATIONMETHOD
./src/openms/include/OpenMS/METADATA/IonSource.h:    static const std::string NamesOfIonizationMethod[SIZE_OF_IONIZATIONMETHOD];
./src/openms/include/OpenMS/METADATA/IonSource.h:      SIZE_OF_POLARITY
./src/openms/include/OpenMS/METADATA/IonSource.h:    static const std::string NamesOfPolarity[SIZE_OF_POLARITY];
./src/openms/include/OpenMS/METADATA/Instrument.h:      SIZE_OF_IONOPTICSTYPE
./src/openms/include/OpenMS/METADATA/Instrument.h:    static const std::string NamesOfIonOpticsType[SIZE_OF_IONOPTICSTYPE];
./src/openms/include/OpenMS/METADATA/SpectrumSettings.h:      SIZE_OF_SPECTRUMTYPE
./src/openms/include/OpenMS/METADATA/SpectrumSettings.h:    static const std::string NamesOfSpectrumType[SIZE_OF_SPECTRUMTYPE];
./src/openms/include/OpenMS/METADATA/IonDetector.h:      SIZE_OF_TYPE
./src/openms/include/OpenMS/METADATA/IonDetector.h:    static const std::string NamesOfType[SIZE_OF_TYPE];
./src/openms/include/OpenMS/METADATA/IonDetector.h:      SIZE_OF_ACQUISITIONMODE
./src/openms/include/OpenMS/METADATA/IonDetector.h:    static const std::string NamesOfAcquisitionMode[SIZE_OF_ACQUISITIONMODE];
./src/openms/include/OpenMS/METADATA/Tagging.h:    enum IsotopeVariant {LIGHT, HEAVY, SIZE_OF_ISOTOPEVARIANT};
./src/openms/include/OpenMS/METADATA/Tagging.h:    static const std::string NamesOfIsotopeVariant[SIZE_OF_ISOTOPEVARIANT];
./src/openms/include/OpenMS/METADATA/InstrumentSettings.h:      SIZE_OF_SCANMODE
./src/openms/include/OpenMS/METADATA/InstrumentSettings.h:    static const std::string NamesOfScanMode[SIZE_OF_SCANMODE];
./src/openms/include/OpenMS/METADATA/Precursor.h:      SIZE_OF_ACTIVATIONMETHOD
./src/openms/include/OpenMS/METADATA/Precursor.h:    static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD];
./src/openms/include/OpenMS/METADATA/Precursor.h:    static const std::string NamesOfActivationMethodShort[SIZE_OF_ACTIVATIONMETHOD];
./src/openms/include/OpenMS/METADATA/ID/MetaData.h:      SIZE_OF_MOLECULETYPE
./src/openms/include/OpenMS/METADATA/ID/MetaData.h:      SIZE_OF_MASSTYPE
./src/openms/include/OpenMS/METADATA/ID/MoleculeQueryMatch.h:        return MoleculeType::SIZE_OF_MOLECULETYPE; // this shouldn't happen
./src/openms/include/OpenMS/METADATA/MSQuantifications.h:    enum QUANT_TYPES {MS1LABEL = 0, MS2LABEL, LABELFREE, SIZE_OF_QUANT_TYPES};       // derived from processing applied
./src/openms/include/OpenMS/METADATA/MSQuantifications.h:    static const std::string NamesOfQuantTypes[SIZE_OF_QUANT_TYPES];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:      SIZE_OF_ANALYZERTYPE
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfAnalyzerType[SIZE_OF_ANALYZERTYPE];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:      SIZE_OF_RESOLUTIONMETHOD
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfResolutionMethod[SIZE_OF_RESOLUTIONMETHOD];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:      SIZE_OF_RESOLUTIONTYPE
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfResolutionType[SIZE_OF_RESOLUTIONTYPE];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:      SIZE_OF_SCANDIRECTION
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfScanDirection[SIZE_OF_SCANDIRECTION];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:      SIZE_OF_SCANLAW
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfScanLaw[SIZE_OF_SCANLAW];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:      SIZE_OF_REFLECTRONSTATE
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfReflectronState[SIZE_OF_REFLECTRONSTATE];
./src/openms/include/OpenMS/METADATA/Sample.h:    enum SampleState {SAMPLENULL, SOLID, LIQUID, GAS, SOLUTION, EMULSION, SUSPENSION, SIZE_OF_SAMPLESTATE};
./src/openms/include/OpenMS/METADATA/Sample.h:    static const std::string NamesOfSampleState[SIZE_OF_SAMPLESTATE];
./src/openms/include/OpenMS/METADATA/ProteinIdentification.h:      SIZE_OF_PEAKMASSTYPE
./src/openms/include/OpenMS/METADATA/ProteinIdentification.h:    static const std::string NamesOfPeakMassType[SIZE_OF_PEAKMASSTYPE];
./src/openms/include/OpenMS/QC/QCBase.h:      SIZE_OF_REQUIRES
./src/openms/include/OpenMS/QC/QCBase.h:      SIZE_OF_TOLERANCEUNIT
./src/openms/include/OpenMS/KERNEL/MassTrace.h:      SIZE_OF_MT_QUANTMETHOD
./src/openms/include/OpenMS/KERNEL/MassTrace.h:    static const std::string names_of_quantmethod[SIZE_OF_MT_QUANTMETHOD];
./src/openms/include/OpenMS/KERNEL/MassTrace.h:    /// converts a string to enum value; returns 'SIZE_OF_MT_QUANTMETHOD' upon error
./src/openms/include/OpenMS/KERNEL/BaseFeature.h:      SIZE_OF_ANNOTATIONSTATE
./src/openms/include/OpenMS/KERNEL/BaseFeature.h:    static const std::string NamesOfAnnotationState[SIZE_OF_ANNOTATIONSTATE];
./src/openms/thirdparty/seqan/include/seqan/modifier/modifier_alphabet_expansion.h:template <int SIZE_OF_SOURCE>
./src/openms_gui/include/OpenMS/VISUAL/MISC/GUIHelpers.h:          SIZE_OF_NAMES
./src/openms_gui/include/OpenMS/VISUAL/MISC/GUIHelpers.h:        const std::array<QColor, NAMES::SIZE_OF_NAMES> values = { { Qt::red,
./src/openms_gui/include/OpenMS/VISUAL/MISC/GUIHelpers.h:        if (index >= COLOR_CLASS::NAMES::SIZE_OF_NAMES) index = index % COLOR_CLASS::NAMES::SIZE_OF_NAMES;
./src/openms_gui/include/OpenMS/VISUAL/DataSelectionTabs.h:      SIZE_OF_TAB_INDEX    
./src/openms_gui/include/OpenMS/VISUAL/LayerData.h:      SIZE_OF_FLAGS
./src/openms_gui/include/OpenMS/VISUAL/LayerData.h:    std::bitset<SIZE_OF_FLAGS> flags;
./src/openms_gui/include/OpenMS/VISUAL/LayerData.h:      SIZE_OF_LABEL_TYPE
./src/openms_gui/include/OpenMS/VISUAL/LayerData.h:    static const std::string NamesOfLabelType[SIZE_OF_LABEL_TYPE];

Edit: A bit clearer

./src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.h:    static const std::string NamesOfDerivatizationAgent[static_cast<int>(DerivatizationAgent::SIZE_OF_DERIVATIZATIONAGENT)];
./src/openms/include/OpenMS/ANALYSIS/QUANTITATION/IsotopeLabelingMDVs.h:    static const std::string NamesOfMassIntensityType[static_cast<int>(MassIntensityType::SIZE_OF_MASSINTENSITYTYPE)];
./src/openms/include/OpenMS/CHEMISTRY/EnzymaticDigestion.h:    static const std::string NamesOfSpecificity[SIZE_OF_SPECIFICITY];
./src/openms/include/OpenMS/FORMAT/MSNumpressCoder.h:    static const std::string NamesOfNumpressCompression[SIZE_OF_NUMPRESSCOMPRESSION];
./src/openms/include/OpenMS/METADATA/DataProcessing.h:    static const std::string NamesOfProcessingAction[SIZE_OF_PROCESSINGACTION];
./src/openms/include/OpenMS/METADATA/Modification.h:    static const std::string NamesOfSpecificityType[SIZE_OF_SPECIFICITYTYPE];
./src/openms/include/OpenMS/METADATA/SourceFile.h:    static const std::string NamesOfChecksumType[SIZE_OF_CHECKSUMTYPE];
./src/openms/include/OpenMS/METADATA/IonSource.h:    static const std::string NamesOfInletType[SIZE_OF_INLETTYPE];
./src/openms/include/OpenMS/METADATA/IonSource.h:    static const std::string NamesOfIonizationMethod[SIZE_OF_IONIZATIONMETHOD];
./src/openms/include/OpenMS/METADATA/IonSource.h:    static const std::string NamesOfPolarity[SIZE_OF_POLARITY];
./src/openms/include/OpenMS/METADATA/Instrument.h:    static const std::string NamesOfIonOpticsType[SIZE_OF_IONOPTICSTYPE];
./src/openms/include/OpenMS/METADATA/SpectrumSettings.h:    static const std::string NamesOfSpectrumType[SIZE_OF_SPECTRUMTYPE];
./src/openms/include/OpenMS/METADATA/IonDetector.h:    static const std::string NamesOfType[SIZE_OF_TYPE];
./src/openms/include/OpenMS/METADATA/IonDetector.h:    static const std::string NamesOfAcquisitionMode[SIZE_OF_ACQUISITIONMODE];
./src/openms/include/OpenMS/METADATA/Tagging.h:    static const std::string NamesOfIsotopeVariant[SIZE_OF_ISOTOPEVARIANT];
./src/openms/include/OpenMS/METADATA/InstrumentSettings.h:    static const std::string NamesOfScanMode[SIZE_OF_SCANMODE];
./src/openms/include/OpenMS/METADATA/Precursor.h:    static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD];
./src/openms/include/OpenMS/METADATA/Precursor.h:    static const std::string NamesOfActivationMethodShort[SIZE_OF_ACTIVATIONMETHOD];
./src/openms/include/OpenMS/METADATA/MSQuantifications.h:    static const std::string NamesOfQuantTypes[SIZE_OF_QUANT_TYPES];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfAnalyzerType[SIZE_OF_ANALYZERTYPE];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfResolutionMethod[SIZE_OF_RESOLUTIONMETHOD];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfResolutionType[SIZE_OF_RESOLUTIONTYPE];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfScanDirection[SIZE_OF_SCANDIRECTION];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfScanLaw[SIZE_OF_SCANLAW];
./src/openms/include/OpenMS/METADATA/MassAnalyzer.h:    static const std::string NamesOfReflectronState[SIZE_OF_REFLECTRONSTATE];
./src/openms/include/OpenMS/METADATA/Sample.h:    static const std::string NamesOfSampleState[SIZE_OF_SAMPLESTATE];
./src/openms/include/OpenMS/METADATA/ProteinIdentification.h:    static const std::string NamesOfPeakMassType[SIZE_OF_PEAKMASSTYPE];
./src/openms/include/OpenMS/KERNEL/BaseFeature.h:    static const std::string NamesOfAnnotationState[SIZE_OF_ANNOTATIONSTATE];
./src/openms_gui/include/OpenMS/VISUAL/LayerData.h:    static const std::string NamesOfLabelType[SIZE_OF_LABEL_TYPE];

oliveralka avatar Sep 14 '21 09:09 oliveralka

Ok, it seems the wrapping of this array lookup is not straightforward:

.h static const std::string NamesOfPolarity[SIZE_OF_POLARITY]; .cpp const std::string IonSource::NamesOfPolarity[] = {"unknown", "positive", "negative"}; .pxd

cdef extern from "<OpenMS/METADATA/IonSource.h>" namespace "OpenMS::IonSource":

libcpp_string NamesOfPolarity[SIZE_OF_POLARITY] nogil except + # wrap-attach:IonSource # wrap-doc:Returns names of polarity of the ion source 

Error: Syntax error in C variable declaration

@hroest Do you have a suggestion?

oliveralka avatar Sep 14 '21 13:09 oliveralka

I think we might need some get*Name wrapper ala:

const std::string& getPolarityName(const IonSource::Polarity& p)

timosachsenberg avatar Sep 14 '21 13:09 timosachsenberg