bioformats  5.1.8
AcquisitionMode.h
1 /*
2  * #%L
3  * OME-XML C++ library for working with OME-XML metadata structures.
4  * %%
5  * Copyright © 2006 - 2016 Open Microscopy Environment:
6  * - Massachusetts Institute of Technology
7  * - National Institutes of Health
8  * - University of Dundee
9  * - Board of Regents of the University of Wisconsin-Madison
10  * - Glencoe Software, Inc.
11  * %%
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions are met:
14  *
15  * 1. Redistributions of source code must retain the above copyright notice,
16  * this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright notice,
18  * this list of conditions and the following disclaimer in the documentation
19  * and/or other materials provided with the distribution.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * The views and conclusions contained in the software and documentation are
34  * those of the authors and should not be interpreted as representing official
35  * policies, either expressed or implied, of any organization.
36  * #L%
37  */
38 
39 /*─────────────────────────────────────────────────────────────────────────────
40  *
41  * THIS IS AUTOMATICALLY GENERATED CODE. DO NOT MODIFY.
42  *
43  *─────────────────────────────────────────────────────────────────────────────
44  */
45 
46 #ifndef OME_XML_MODEL_ENUMS_ACQUISITIONMODE_H
47 #define OME_XML_MODEL_ENUMS_ACQUISITIONMODE_H
48 
49 #include <ostream>
50 #include <map>
51 #include <string>
52 
53 #include <ome/common/log.h>
54 
55 #include <ome/xml/model/enums/EnumerationException.h>
56 
57 namespace ome
58 {
59  namespace xml
60  {
61  namespace model
62  {
63  namespace enums
64  {
65 
70  {
71  public:
74  {
115  };
116 
123 
138  AcquisitionMode (const std::string& name, bool strict = true);
139 
145  AcquisitionMode (const AcquisitionMode& original);
146 
151  inline AcquisitionMode&
153  {
154  this->value = rhs.value;
155  this->name = rhs.name;
156  return *this;
157  }
158 
164  inline
165  operator enum_value () const
166  {
167  return this->value;
168  }
169 
175  inline
176  operator const std::string& () const
177  {
178  return *this->name;
179  }
180 
182  typedef std::map<std::string, AcquisitionMode::enum_value> string_map_type;
184  typedef std::map<AcquisitionMode::enum_value, std::string> value_map_type;
185 
191  static const string_map_type&
192  strings();
193 
199  static const value_map_type&
200  values();
201 
202  private:
208  static const string_map_type&
210 
214  const std::string *name;
215  };
216 
224  inline bool
226  const AcquisitionMode& rhs)
227  {
228  return static_cast<AcquisitionMode::enum_value>(lhs) == static_cast<AcquisitionMode::enum_value>(rhs);
229  }
230 
238  inline bool
240  const AcquisitionMode::enum_value& rhs)
241  {
242  return static_cast<AcquisitionMode::enum_value>(lhs) == rhs;
243  }
244 
252  inline bool
254  const AcquisitionMode& rhs)
255  {
256  return lhs == static_cast<AcquisitionMode::enum_value>(rhs);
257  }
258 
266  inline bool
268  const std::string& rhs)
269  {
270  return static_cast<const std::string&>(lhs) == rhs;
271  }
272 
280  inline bool
281  operator== (const std::string& lhs,
282  const AcquisitionMode& rhs)
283  {
284  return lhs == static_cast<const std::string&>(rhs);
285  }
286 
294  inline bool
296  const AcquisitionMode& rhs)
297  {
298  return static_cast<AcquisitionMode::enum_value>(lhs) != static_cast<AcquisitionMode::enum_value>(rhs);
299  }
300 
308  inline bool
310  const AcquisitionMode::enum_value& rhs)
311  {
312  return static_cast<AcquisitionMode::enum_value>(lhs) != rhs;
313  }
314 
322  inline bool
324  const AcquisitionMode& rhs)
325  {
326  return lhs != static_cast<AcquisitionMode::enum_value>(rhs);
327  }
328 
336  inline bool
338  const std::string& rhs)
339  {
340  return static_cast<const std::string&>(lhs) != rhs;
341  }
342 
350  inline bool
351  operator!= (const std::string& lhs,
352  const AcquisitionMode& rhs)
353  {
354  return lhs != static_cast<const std::string&>(rhs);
355  }
356 
364  template<class charT, class traits>
365  inline std::basic_ostream<charT,traits>&
366  operator<< (std::basic_ostream<charT,traits>& os,
367  const AcquisitionMode& enumeration)
368  {
369  return os << static_cast<const std::string&>(enumeration);
370  }
371 
379  template<class charT, class traits>
380  inline std::basic_istream<charT,traits>&
381  operator>> (std::basic_istream<charT,traits>& is,
382  AcquisitionMode& enumeration)
383  {
384  std::string value;
385  is >> value;
386  if (is)
387  {
388  try
389  {
390  enumeration = AcquisitionMode(value, false);
391  }
392  catch (const EnumerationException&)
393  {
394  is.setstate(std::ios::failbit);
395  }
396  }
397 
398  return is;
399  }
400 
401  }
402  }
403  }
404 }
405 
406 #endif // OME_XML_MODEL_ENUMS_ACQUISITIONMODE_H
407 
408 /*
409  * Local Variables:
410  * mode:C++
411  * End:
412  */
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &is, AcquisitionMode &enumeration)
Set AcquisitionMode from input stream.
Definition: AcquisitionMode.h:381
bool operator!=(const AcquisitionMode &lhs, const AcquisitionMode &rhs)
Compare two AcquisitionMode objects for non-equality.
Definition: AcquisitionMode.h:295
static const string_map_type & lowercase_strings()
Get a map of valid lowercased string names and enum values.
Definition: AcquisitionMode.cpp:219
FluorescenceCorrelationSpectroscopy.
Definition: AcquisitionMode.h:96
enum_value value
Enumeration value.
Definition: AcquisitionMode.h:212
SpinningDiskConfocal.
Definition: AcquisitionMode.h:80
WideField.
Definition: AcquisitionMode.h:76
TotalInternalReflection.
Definition: AcquisitionMode.h:90
SpectralImaging.
Definition: AcquisitionMode.h:94
EnumerationException is thrown when an enumeration is invalid or not found.
Definition: EnumerationException.h:74
AcquisitionMode enumeration.
Definition: AcquisitionMode.h:69
std::map< std::string, AcquisitionMode::enum_value > string_map_type
String map type.
Definition: AcquisitionMode.h:182
FluorescenceLifetime.
Definition: AcquisitionMode.h:92
NearFieldScanningOpticalMicroscopy.
Definition: AcquisitionMode.h:98
std::map< AcquisitionMode::enum_value, std::string > value_map_type
Value map type.
Definition: AcquisitionMode.h:184
const std::string * name
Enumeration name.
Definition: AcquisitionMode.h:214
MultiPhotonMicroscopy.
Definition: AcquisitionMode.h:84
SecondHarmonicGenerationImaging.
Definition: AcquisitionMode.h:100
StructuredIllumination.
Definition: AcquisitionMode.h:86
SlitScanConfocal.
Definition: AcquisitionMode.h:82
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
PALM.
Definition: AcquisitionMode.h:102
bool operator==(const AcquisitionMode &lhs, const AcquisitionMode &rhs)
Compare two AcquisitionMode objects for equality.
Definition: AcquisitionMode.h:225
STED.
Definition: AcquisitionMode.h:106
FSM.
Definition: AcquisitionMode.h:110
SingleMoleculeImaging.
Definition: AcquisitionMode.h:88
AcquisitionMode(enum_value value)
Construct a AcquisitionMode enumeration by an enumeration value.
Definition: AcquisitionMode.cpp:75
static const value_map_type & values()
Get a map of valid enum values and string names.
Definition: AcquisitionMode.cpp:186
Other.
Definition: AcquisitionMode.h:114
STORM.
Definition: AcquisitionMode.h:104
enum_value
Enumeration values.
Definition: AcquisitionMode.h:73
TIRF.
Definition: AcquisitionMode.h:108
static const string_map_type & strings()
Get a map of valid string names and enum values.
Definition: AcquisitionMode.cpp:153
LaserScanningConfocalMicroscopy.
Definition: AcquisitionMode.h:78
Boost.Log compatibility.
AcquisitionMode & operator=(const AcquisitionMode &rhs)
Assignment operator.
Definition: AcquisitionMode.h:152
LCM.
Definition: AcquisitionMode.h:112
Xerces-C modern C++ wrapper.
Definition: Base.h:53