~ubuntu-branches/ubuntu/wily/openms/wily

« back to all changes in this revision

Viewing changes to source/METADATA/ChromatogramSettings.C

  • Committer: Package Import Robot
  • Author(s): Filippo Rusconi
  • Date: 2013-12-20 11:30:16 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20131220113016-wre5g9bteeheq6he
Tags: 1.11.1-3
* remove version number from libbost development package names;
* ensure that AUTHORS is correctly shipped in all packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- mode: C++; tab-width: 2; -*-
2
 
// vi: set ts=2:
3
 
//
4
 
// --------------------------------------------------------------------------
5
 
//                   OpenMS Mass Spectrometry Framework
6
 
// --------------------------------------------------------------------------
7
 
//  Copyright (C) 2003-2011 -- Oliver Kohlbacher, Knut Reinert
8
 
//
9
 
//  This library is free software; you can redistribute it and/or
10
 
//  modify it under the terms of the GNU Lesser General Public
11
 
//  License as published by the Free Software Foundation; either
12
 
//  version 2.1 of the License, or (at your option) any later version.
13
 
//
14
 
//  This library is distributed in the hope that it will be useful,
15
 
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
 
//  Lesser General Public License for more details.
18
 
//
19
 
//  You should have received a copy of the GNU Lesser General Public
20
 
//  License along with this library; if not, write to the Free Software
21
 
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
1
// --------------------------------------------------------------------------
 
2
//                   OpenMS -- Open-Source Mass Spectrometry
 
3
// --------------------------------------------------------------------------
 
4
// Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
 
5
// ETH Zurich, and Freie Universitaet Berlin 2002-2013.
 
6
//
 
7
// This software is released under a three-clause BSD license:
 
8
//  * Redistributions of source code must retain the above copyright
 
9
//    notice, this list of conditions and the following disclaimer.
 
10
//  * Redistributions in binary form must reproduce the above copyright
 
11
//    notice, this list of conditions and the following disclaimer in the
 
12
//    documentation and/or other materials provided with the distribution.
 
13
//  * Neither the name of any author or any participating institution
 
14
//    may be used to endorse or promote products derived from this software
 
15
//    without specific prior written permission.
 
16
// For a full list of authors, refer to the file AUTHORS.
 
17
// --------------------------------------------------------------------------
 
18
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 
19
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
20
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
21
// ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
 
22
// INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
23
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 
24
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 
25
// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 
26
// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 
27
// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 
28
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22
29
//
23
30
// --------------------------------------------------------------------------
24
31
// $Maintainer: Andreas Bertsch $
33
40
namespace OpenMS
34
41
{
35
42
 
36
 
        ChromatogramSettings::ChromatogramSettings()
37
 
                : MetaInfoInterface(),
38
 
                        native_id_(),
39
 
                        comment_(),
40
 
                        instrument_settings_(),
41
 
                        source_file_(),
42
 
                        acquisition_info_(),
43
 
                        precursor_(),
44
 
                        product_(),
45
 
                        data_processing_(),
46
 
                        type_(MASS_CHROMATOGRAM)
47
 
        {
48
 
        }
49
 
 
50
 
        ChromatogramSettings::ChromatogramSettings(const ChromatogramSettings& source)
51
 
                : MetaInfoInterface(source),
52
 
                        native_id_(source.native_id_),
53
 
                        comment_(source.comment_),
54
 
                        instrument_settings_(source.instrument_settings_),
55
 
                        source_file_(source.source_file_),
56
 
                        acquisition_info_(source.acquisition_info_),
57
 
                        precursor_(source.precursor_),
58
 
                        product_(source.product_),
59
 
                        data_processing_(source.data_processing_),
60
 
                        type_(source.type_)
61
 
        {
62
 
        }
63
 
        
64
 
        ChromatogramSettings::~ChromatogramSettings()
65
 
        {         
66
 
        }
67
 
        
68
 
        ChromatogramSettings& ChromatogramSettings::operator = (const ChromatogramSettings& source)
69
 
        {
70
 
          if (&source == this) return *this;
71
 
          
72
 
          MetaInfoInterface::operator=(source);
73
 
          native_id_ = source.native_id_;
 
43
  // keep this in sync with enum ChromatogramType
 
44
  const char * const ChromatogramSettings::ChromatogramNames[] = {"mass chromatogram", "total ion current chromatogram", "selected ion current chromatogram" ,"base peak chromatogram",
 
45
                                                                  "selected ion monitoring chromatogram" ,"selected reaction monitoring chromatogram" ,"electromagnetic radiation chromatogram",
 
46
                                                                  "absorption chromatogram", "emission chromatogram", "unknown chromatogram"}; // last entry should be "unknown", since this is the default in FileInfo.C
 
47
 
 
48
  ChromatogramSettings::ChromatogramSettings() :
 
49
    MetaInfoInterface(),
 
50
    native_id_(),
 
51
    comment_(),
 
52
    instrument_settings_(),
 
53
    source_file_(),
 
54
    acquisition_info_(),
 
55
    precursor_(),
 
56
    product_(),
 
57
    data_processing_(),
 
58
    type_(MASS_CHROMATOGRAM)
 
59
  {
 
60
  }
 
61
 
 
62
  ChromatogramSettings::ChromatogramSettings(const ChromatogramSettings & source) :
 
63
    MetaInfoInterface(source),
 
64
    native_id_(source.native_id_),
 
65
    comment_(source.comment_),
 
66
    instrument_settings_(source.instrument_settings_),
 
67
    source_file_(source.source_file_),
 
68
    acquisition_info_(source.acquisition_info_),
 
69
    precursor_(source.precursor_),
 
70
    product_(source.product_),
 
71
    data_processing_(source.data_processing_),
 
72
    type_(source.type_)
 
73
  {
 
74
  }
 
75
 
 
76
  ChromatogramSettings::~ChromatogramSettings()
 
77
  {
 
78
  }
 
79
 
 
80
  ChromatogramSettings & ChromatogramSettings::operator=(const ChromatogramSettings & source)
 
81
  {
 
82
    if (&source == this)
 
83
      return *this;
 
84
 
 
85
    MetaInfoInterface::operator=(source);
 
86
    native_id_ = source.native_id_;
74
87
    comment_ = source.comment_;
75
88
    instrument_settings_ = source.instrument_settings_;
76
89
    acquisition_info_ = source.acquisition_info_;
77
90
    source_file_ = source.source_file_;
78
91
    precursor_ = source.precursor_;
79
 
          product_ = source.product_;
80
 
          data_processing_ = source.data_processing_;
81
 
                type_ = source.type_;
82
 
                
83
 
          return *this;
84
 
        }
85
 
 
86
 
  bool ChromatogramSettings::operator== (const ChromatogramSettings& rhs) const
87
 
  {
88
 
        return
89
 
                MetaInfoInterface::operator==(rhs) &&
90
 
                        native_id_ == rhs.native_id_ &&
91
 
            comment_ == rhs.comment_ &&
92
 
            instrument_settings_ == rhs.instrument_settings_ &&
93
 
            acquisition_info_ == rhs.acquisition_info_ &&
94
 
                  source_file_ == rhs.source_file_ &&
95
 
            precursor_ == rhs.precursor_ &&
96
 
            product_ == rhs.product_ &&
97
 
                        data_processing_ == rhs.data_processing_ &&
98
 
                        type_ == rhs.type_
99
 
                ;
100
 
  }
101
 
  
102
 
  bool ChromatogramSettings::operator!= (const ChromatogramSettings& rhs) const
103
 
  {
104
 
        return !(operator==(rhs));
105
 
        }
106
 
 
107
 
        const String& ChromatogramSettings::getComment() const 
108
 
        {
109
 
          return comment_; 
110
 
        }
111
 
        
112
 
        void ChromatogramSettings::setComment(const String& comment)
113
 
        {
114
 
          comment_ = comment; 
115
 
        }
116
 
        
117
 
        const InstrumentSettings& ChromatogramSettings::getInstrumentSettings() const 
118
 
        {
119
 
          return instrument_settings_; 
120
 
        }
121
 
        
122
 
        InstrumentSettings&  ChromatogramSettings::getInstrumentSettings()
123
 
        {
124
 
          return instrument_settings_; 
125
 
        }
126
 
        
127
 
        void ChromatogramSettings::setInstrumentSettings(const InstrumentSettings& instrument_settings)
128
 
        {
129
 
          instrument_settings_ = instrument_settings; 
130
 
        }
131
 
        
132
 
        const AcquisitionInfo& ChromatogramSettings::getAcquisitionInfo() const 
133
 
        {
134
 
          return acquisition_info_; 
135
 
        }
136
 
        
137
 
        AcquisitionInfo&  ChromatogramSettings::getAcquisitionInfo()
138
 
        {
139
 
          return acquisition_info_; 
140
 
        }
141
 
        
142
 
        void ChromatogramSettings::setAcquisitionInfo(const AcquisitionInfo& acquisition_info)
143
 
        {
144
 
          acquisition_info_ = acquisition_info; 
145
 
        }
146
 
        
147
 
        const SourceFile& ChromatogramSettings::getSourceFile() const 
148
 
        {
149
 
          return source_file_; 
150
 
        }
151
 
        
152
 
        SourceFile&  ChromatogramSettings::getSourceFile()
153
 
        {
154
 
          return source_file_; 
155
 
        }
156
 
        
157
 
        void ChromatogramSettings::setSourceFile(const SourceFile& source_file)
158
 
        {
159
 
          source_file_ = source_file; 
160
 
        }
161
 
        
162
 
        const Precursor& ChromatogramSettings::getPrecursor() const 
163
 
        {
164
 
          return precursor_; 
165
 
        }
166
 
        
167
 
        Precursor&  ChromatogramSettings::getPrecursor()
168
 
        {
169
 
          return precursor_; 
170
 
        }
171
 
        
172
 
        void ChromatogramSettings::setPrecursor(const Precursor& precursor)
173
 
        {
174
 
          precursor_ = precursor; 
175
 
        }
176
 
 
177
 
        const Product& ChromatogramSettings::getProduct() const 
178
 
        {
179
 
          return product_; 
180
 
        }
181
 
        
182
 
        Product&  ChromatogramSettings::getProduct()
183
 
        {
184
 
          return product_; 
185
 
        }
186
 
        
187
 
        void ChromatogramSettings::setProduct(const Product& product)
188
 
        {
189
 
          product_ = product; 
190
 
        }
191
 
 
192
 
        std::ostream& operator << (std::ostream& os, const ChromatogramSettings& /*spec*/)
193
 
        {
194
 
                os << "-- CHROMATOGRAMSETTINGS BEGIN --"<<std::endl;
195
 
                os << "-- CHROMATOGRAMSETTINGS END --"<<std::endl;              
196
 
                return os;
197
 
        }
198
 
        
199
 
  const String& ChromatogramSettings::getNativeID() const
200
 
        {
201
 
                return native_id_;
202
 
        }
203
 
        
204
 
  void ChromatogramSettings::setNativeID(const String& native_id)
205
 
        {
206
 
                native_id_ = native_id;
207
 
        }
208
 
 
209
 
        const vector<DataProcessing>& ChromatogramSettings::getDataProcessing() const 
210
 
        {
211
 
          return data_processing_; 
212
 
        }
213
 
        
214
 
        vector<DataProcessing>&  ChromatogramSettings::getDataProcessing()
215
 
        {
216
 
          return data_processing_; 
217
 
        }
218
 
        
219
 
        void ChromatogramSettings::setDataProcessing(const vector<DataProcessing>& processing_method)
220
 
        {
221
 
          data_processing_ = processing_method; 
222
 
        }
223
 
 
224
 
        ChromatogramSettings::ChromatogramType ChromatogramSettings::getChromatogramType() const
225
 
        {
226
 
                return type_;
227
 
        }
228
 
 
229
 
        void ChromatogramSettings::setChromatogramType(ChromatogramType type)
230
 
        {
231
 
                type_ = type;
232
 
        }
 
92
    product_ = source.product_;
 
93
    data_processing_ = source.data_processing_;
 
94
    type_ = source.type_;
 
95
 
 
96
    return *this;
 
97
  }
 
98
 
 
99
  bool ChromatogramSettings::operator==(const ChromatogramSettings & rhs) const
 
100
  {
 
101
    return MetaInfoInterface::operator==(rhs) &&
 
102
           native_id_ == rhs.native_id_ &&
 
103
           comment_ == rhs.comment_ &&
 
104
           instrument_settings_ == rhs.instrument_settings_ &&
 
105
           acquisition_info_ == rhs.acquisition_info_ &&
 
106
           source_file_ == rhs.source_file_ &&
 
107
           precursor_ == rhs.precursor_ &&
 
108
           product_ == rhs.product_ &&
 
109
           data_processing_ == rhs.data_processing_ &&
 
110
           type_ == rhs.type_;
 
111
  }
 
112
 
 
113
  bool ChromatogramSettings::operator!=(const ChromatogramSettings & rhs) const
 
114
  {
 
115
    return !(operator==(rhs));
 
116
  }
 
117
 
 
118
  const String & ChromatogramSettings::getComment() const
 
119
  {
 
120
    return comment_;
 
121
  }
 
122
 
 
123
  void ChromatogramSettings::setComment(const String & comment)
 
124
  {
 
125
    comment_ = comment;
 
126
  }
 
127
 
 
128
  const InstrumentSettings & ChromatogramSettings::getInstrumentSettings() const
 
129
  {
 
130
    return instrument_settings_;
 
131
  }
 
132
 
 
133
  InstrumentSettings & ChromatogramSettings::getInstrumentSettings()
 
134
  {
 
135
    return instrument_settings_;
 
136
  }
 
137
 
 
138
  void ChromatogramSettings::setInstrumentSettings(const InstrumentSettings & instrument_settings)
 
139
  {
 
140
    instrument_settings_ = instrument_settings;
 
141
  }
 
142
 
 
143
  const AcquisitionInfo & ChromatogramSettings::getAcquisitionInfo() const
 
144
  {
 
145
    return acquisition_info_;
 
146
  }
 
147
 
 
148
  AcquisitionInfo & ChromatogramSettings::getAcquisitionInfo()
 
149
  {
 
150
    return acquisition_info_;
 
151
  }
 
152
 
 
153
  void ChromatogramSettings::setAcquisitionInfo(const AcquisitionInfo & acquisition_info)
 
154
  {
 
155
    acquisition_info_ = acquisition_info;
 
156
  }
 
157
 
 
158
  const SourceFile & ChromatogramSettings::getSourceFile() const
 
159
  {
 
160
    return source_file_;
 
161
  }
 
162
 
 
163
  SourceFile & ChromatogramSettings::getSourceFile()
 
164
  {
 
165
    return source_file_;
 
166
  }
 
167
 
 
168
  void ChromatogramSettings::setSourceFile(const SourceFile & source_file)
 
169
  {
 
170
    source_file_ = source_file;
 
171
  }
 
172
 
 
173
  const Precursor & ChromatogramSettings::getPrecursor() const
 
174
  {
 
175
    return precursor_;
 
176
  }
 
177
 
 
178
  Precursor & ChromatogramSettings::getPrecursor()
 
179
  {
 
180
    return precursor_;
 
181
  }
 
182
 
 
183
  void ChromatogramSettings::setPrecursor(const Precursor & precursor)
 
184
  {
 
185
    precursor_ = precursor;
 
186
  }
 
187
 
 
188
  const Product & ChromatogramSettings::getProduct() const
 
189
  {
 
190
    return product_;
 
191
  }
 
192
 
 
193
  Product & ChromatogramSettings::getProduct()
 
194
  {
 
195
    return product_;
 
196
  }
 
197
 
 
198
  void ChromatogramSettings::setProduct(const Product & product)
 
199
  {
 
200
    product_ = product;
 
201
  }
 
202
 
 
203
  std::ostream & operator<<(std::ostream & os, const ChromatogramSettings & /*spec*/)
 
204
  {
 
205
    os << "-- CHROMATOGRAMSETTINGS BEGIN --" << std::endl;
 
206
    os << "-- CHROMATOGRAMSETTINGS END --" << std::endl;
 
207
    return os;
 
208
  }
 
209
 
 
210
  const String & ChromatogramSettings::getNativeID() const
 
211
  {
 
212
    return native_id_;
 
213
  }
 
214
 
 
215
  void ChromatogramSettings::setNativeID(const String & native_id)
 
216
  {
 
217
    native_id_ = native_id;
 
218
  }
 
219
 
 
220
  const vector<DataProcessing> & ChromatogramSettings::getDataProcessing() const
 
221
  {
 
222
    return data_processing_;
 
223
  }
 
224
 
 
225
  vector<DataProcessing> & ChromatogramSettings::getDataProcessing()
 
226
  {
 
227
    return data_processing_;
 
228
  }
 
229
 
 
230
  void ChromatogramSettings::setDataProcessing(const vector<DataProcessing> & processing_method)
 
231
  {
 
232
    data_processing_ = processing_method;
 
233
  }
 
234
 
 
235
  ChromatogramSettings::ChromatogramType ChromatogramSettings::getChromatogramType() const
 
236
  {
 
237
    return type_;
 
238
  }
 
239
 
 
240
  void ChromatogramSettings::setChromatogramType(ChromatogramType type)
 
241
  {
 
242
    type_ = type;
 
243
  }
 
244
 
233
245
}
234
 
 
235
 
 
236
 
 
237