Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
DoubleList.h
Go to the documentation of this file.
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.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: David Wojnar $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_DATASTRUCTURES_DOUBLELIST_H
36 #define OPENMS_DATASTRUCTURES_DOUBLELIST_H
37 
40 #include <OpenMS/CONCEPT/Types.h>
41 
42 #ifdef OPENMS_COMPILER_MSVC
43 #pragma warning( push )
44 #pragma warning( disable : 4251 ) // disable MSVC dll-interface warning
45 #endif
46 
47 namespace OpenMS
48 {
56  class OPENMS_DLLAPI DoubleList :
57  public std::vector<DoubleReal>
58  {
59 public:
60 
62 
63  DoubleList();
66  DoubleList(const DoubleList & rhs);
68  DoubleList(const std::vector<Real> & rhs);
70  DoubleList(const std::vector<DoubleReal> & rhs);
72  DoubleList & operator=(const DoubleList & rhs);
74  DoubleList & operator=(const std::vector<DoubleReal> & rhs);
76  DoubleList & operator=(const std::vector<Real> & rhs);
78 
80  template <typename DoubleType>
81  DoubleList & operator<<(DoubleType value)
82  {
83  this->push_back(value);
84  return *this;
85  }
86 
88  static DoubleList create(const String & list);
90  static DoubleList create(const StringList & list);
92  bool contains(DoubleReal s, DoubleReal tolerance = 0.00001) const;
93 
94 
96  friend OPENMS_DLLAPI std::ostream & operator<<(std::ostream & os, const DoubleList & p);
97 
98  };
99 
100 
101 } // namespace OPENMS
102 
103 #ifdef OPENMS_COMPILER_MSVC
104 #pragma warning( pop )
105 #endif
106 
107 #endif // OPENMS_DATASTRUCTURES_DOUBLELIST_H
A more convenient string class.
Definition: String.h:56
std::ostream & operator<<(std::ostream &os, const ItraqQuantifier::ItraqQuantifierStats &stats)
DoubleList & operator<<(DoubleType value)
Operator for appending entries with less code.
Definition: DoubleList.h:81
String list.
Definition: StringList.h:56
DoubleReal list.
Definition: DoubleList.h:56

OpenMS / TOPP release 1.11.1 Documentation generated on Thu Nov 14 2013 11:19:12 using doxygen 1.8.5