ome-xml 5.2.3

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 // All values in the AcquisitionMode enumeration.
58 #define OME_XML_MODEL_ENUMS_ACQUISITIONMODE_VALUES (WIDEFIELD)(LASERSCANNINGCONFOCALMICROSCOPY)(SPINNINGDISKCONFOCAL)(SLITSCANCONFOCAL)(MULTIPHOTONMICROSCOPY)(STRUCTUREDILLUMINATION)(SINGLEMOLECULEIMAGING)(TOTALINTERNALREFLECTION)(FLUORESCENCELIFETIME)(SPECTRALIMAGING)(FLUORESCENCECORRELATIONSPECTROSCOPY)(NEARFIELDSCANNINGOPTICALMICROSCOPY)(SECONDHARMONICGENERATIONIMAGING)(PALM)(STORM)(STED)(TIRF)(FSM)(LCM)(OTHER)(BRIGHTFIELD)(SWEPTFIELDCONFOCAL)(SPIM)
59
60 namespace ome
61 {
62 namespace xml
63 {
64 namespace model
65 {
66 namespace enums
67 {
68
72 class AcquisitionMode
73 {
74 public:
76 enum enum_value
77 {
79 WIDEFIELD,
81 LASERSCANNINGCONFOCALMICROSCOPY,
83 SPINNINGDISKCONFOCAL,
85 SLITSCANCONFOCAL,
87 MULTIPHOTONMICROSCOPY,
89 STRUCTUREDILLUMINATION,
91 SINGLEMOLECULEIMAGING,
93 TOTALINTERNALREFLECTION,
95 FLUORESCENCELIFETIME,
97 SPECTRALIMAGING,
99 FLUORESCENCECORRELATIONSPECTROSCOPY,
101 NEARFIELDSCANNINGOPTICALMICROSCOPY,
103 SECONDHARMONICGENERATIONIMAGING,
105 PALM,
107 STORM,
109 STED,
111 TIRF,
113 FSM,
115 LCM,
117 OTHER,
119 BRIGHTFIELD,
121 SWEPTFIELDCONFOCAL,
123 SPIM
124 };
125
131 AcquisitionMode (enum_value value);
132
147 AcquisitionMode (const std::string& name, bool strict = true);
148
154 AcquisitionMode (const AcquisitionMode& original);
155
160 inline AcquisitionMode&
161 operator= (const AcquisitionMode& rhs)
162 {
163 this->value = rhs.value;
164 this->name = rhs.name;
165 return *this;
166 }
167
173 inline
174 operator enum_value () const
175 {
176 return this->value;
177 }
178
184 inline
185 operator const std::string& () const
186 {
187 return *this->name;
188 }
189
191 typedef std::map<std::string, AcquisitionMode::enum_value> string_map_type;
193 typedef std::map<AcquisitionMode::enum_value, std::string> value_map_type;
194
200 static const string_map_type&
201 strings();
202
208 static const value_map_type&
209 values();
210
211 private:
217 static const string_map_type&
218 lowercase_strings();
219
221 enum_value value;
223 const std::string *name;
224 };
225
233 inline bool
234 operator== (const AcquisitionMode& lhs,
235 const AcquisitionMode& rhs)
236 {
237 return static_cast<AcquisitionMode::enum_value>(lhs) == static_cast<AcquisitionMode::enum_value>(rhs);
238 }
239
247 inline bool
248 operator== (const AcquisitionMode& lhs,
249 const AcquisitionMode::enum_value& rhs)
250 {
251 return static_cast<AcquisitionMode::enum_value>(lhs) == rhs;
252 }
253
261 inline bool
262 operator== (const AcquisitionMode::enum_value& lhs,
263 const AcquisitionMode& rhs)
264 {
265 return lhs == static_cast<AcquisitionMode::enum_value>(rhs);
266 }
267
275 inline bool
276 operator== (const AcquisitionMode& lhs,
277 const std::string& rhs)
278 {
279 return static_cast<const std::string&>(lhs) == rhs;
280 }
281
289 inline bool
290 operator== (const std::string& lhs,
291 const AcquisitionMode& rhs)
292 {
293 return lhs == static_cast<const std::string&>(rhs);
294 }
295
303 inline bool
304 operator!= (const AcquisitionMode& lhs,
305 const AcquisitionMode& rhs)
306 {
307 return static_cast<AcquisitionMode::enum_value>(lhs) != static_cast<AcquisitionMode::enum_value>(rhs);
308 }
309
317 inline bool
318 operator!= (const AcquisitionMode& lhs,
319 const AcquisitionMode::enum_value& rhs)
320 {
321 return static_cast<AcquisitionMode::enum_value>(lhs) != rhs;
322 }
323
331 inline bool
332 operator!= (const AcquisitionMode::enum_value& lhs,
333 const AcquisitionMode& rhs)
334 {
335 return lhs != static_cast<AcquisitionMode::enum_value>(rhs);
336 }
337
345 inline bool
346 operator!= (const AcquisitionMode& lhs,
347 const std::string& rhs)
348 {
349 return static_cast<const std::string&>(lhs) != rhs;
350 }
351
359 inline bool
360 operator!= (const std::string& lhs,
361 const AcquisitionMode& rhs)
362 {
363 return lhs != static_cast<const std::string&>(rhs);
364 }
365
373 template<class charT, class traits>
374 inline std::basic_ostream<charT,traits>&
375 operator<< (std::basic_ostream<charT,traits>& os,
376 const AcquisitionMode& enumeration)
377 {
378 return os << static_cast<const std::string&>(enumeration);
379 }
380
388 template<class charT, class traits>
389 inline std::basic_istream<charT,traits>&
390 operator>> (std::basic_istream<charT,traits>& is,
391 AcquisitionMode& enumeration)
392 {
393 std::string value;
394 is >> value;
395 if (is)
396 {
397 try
398 {
399 enumeration = AcquisitionMode(value, false);
400 }
401 catch (const EnumerationException&)
402 {
403 is.setstate(std::ios::failbit);
404 }
405 }
406
407 return is;
408 }
409
410 }
411 }
412 }
413 }
414
415 #endif // OME_XML_MODEL_ENUMS_ACQUISITIONMODE_H
416
417 /*
418 * Local Variables:
419 * mode:C++
420 * End:
421 */
ome::xml::model::enums::operator>>
std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &is, AcquisitionMode &enumeration)
Set AcquisitionMode from input stream.
Definition: AcquisitionMode.h:390
ome::xml::model::enums::operator!=
bool operator!=(const AcquisitionMode &lhs, const AcquisitionMode &rhs)
Compare two AcquisitionMode objects for non-equality.
Definition: AcquisitionMode.h:304
ome::xml::model::enums::AcquisitionMode::lowercase_strings
static const string_map_type & lowercase_strings()
Get a map of valid lowercased string names and enum values.
Definition: AcquisitionMode.cpp:225
ome::xml::model::enums::AcquisitionMode::FLUORESCENCECORRELATIONSPECTROSCOPY
FluorescenceCorrelationSpectroscopy.
Definition: AcquisitionMode.h:99
ome::xml::model::enums::AcquisitionMode::value
enum_value value
Enumeration value.
Definition: AcquisitionMode.h:221
ome::xml::model::enums::AcquisitionMode::SPINNINGDISKCONFOCAL
SpinningDiskConfocal.
Definition: AcquisitionMode.h:83
ome::xml::model::enums::AcquisitionMode::WIDEFIELD
WideField.
Definition: AcquisitionMode.h:79
ome::xml::model::enums::AcquisitionMode::TOTALINTERNALREFLECTION
TotalInternalReflection.
Definition: AcquisitionMode.h:93
ome::xml::model::enums::AcquisitionMode::SPECTRALIMAGING
SpectralImaging.
Definition: AcquisitionMode.h:97
ome::xml::model::enums::EnumerationException
EnumerationException is thrown when an enumeration is invalid or not found.
Definition: EnumerationException.h:74
ome::xml::model::enums::AcquisitionMode
AcquisitionMode enumeration.
Definition: AcquisitionMode.h:72
ome::xml::model::enums::AcquisitionMode::string_map_type
std::map< std::string, AcquisitionMode::enum_value > string_map_type
String map type.
Definition: AcquisitionMode.h:191
ome::xml::model::enums::AcquisitionMode::FLUORESCENCELIFETIME
FluorescenceLifetime.
Definition: AcquisitionMode.h:95
ome::xml::model::enums::AcquisitionMode::NEARFIELDSCANNINGOPTICALMICROSCOPY
NearFieldScanningOpticalMicroscopy.
Definition: AcquisitionMode.h:101
ome::xml::model::enums::AcquisitionMode::value_map_type
std::map< AcquisitionMode::enum_value, std::string > value_map_type
Value map type.
Definition: AcquisitionMode.h:193
ome::xml::model::enums::AcquisitionMode::name
const std::string * name
Enumeration name.
Definition: AcquisitionMode.h:223
ome::xml::model::enums::AcquisitionMode::MULTIPHOTONMICROSCOPY
MultiPhotonMicroscopy.
Definition: AcquisitionMode.h:87
ome::xml::model::enums::AcquisitionMode::SECONDHARMONICGENERATIONIMAGING
SecondHarmonicGenerationImaging.
Definition: AcquisitionMode.h:103
ome::xml::model::enums::AcquisitionMode::STRUCTUREDILLUMINATION
StructuredIllumination.
Definition: AcquisitionMode.h:89
ome::xml::model::enums::AcquisitionMode::SLITSCANCONFOCAL
SlitScanConfocal.
Definition: AcquisitionMode.h:85
ome::xml::model::enums::AcquisitionMode::SPIM
SPIM.
Definition: AcquisitionMode.h:123
ome::xml::model::enums::AcquisitionMode::SWEPTFIELDCONFOCAL
SweptFieldConfocal.
Definition: AcquisitionMode.h:121
ome
Open Microscopy Environment C++ implementation.
ome::xml::model::enums::AcquisitionMode::PALM
PALM.
Definition: AcquisitionMode.h:105
ome::xml::model::enums::operator==
bool operator==(const AcquisitionMode &lhs, const AcquisitionMode &rhs)
Compare two AcquisitionMode objects for equality.
Definition: AcquisitionMode.h:234
ome::xml::model::enums::AcquisitionMode::STED
STED.
Definition: AcquisitionMode.h:109
ome::xml::model::enums::AcquisitionMode::FSM
FSM.
Definition: AcquisitionMode.h:113
ome::xml::model::enums::AcquisitionMode::SINGLEMOLECULEIMAGING
SingleMoleculeImaging.
Definition: AcquisitionMode.h:91
ome::xml::model::enums::AcquisitionMode::AcquisitionMode
AcquisitionMode(enum_value value)
Construct a AcquisitionMode enumeration by an enumeration value.
Definition: AcquisitionMode.cpp:75
ome::xml::model::enums::AcquisitionMode::values
static const value_map_type & values()
Get a map of valid enum values and string names.
Definition: AcquisitionMode.cpp:189
ome::xml::model::enums::AcquisitionMode::OTHER
Other.
Definition: AcquisitionMode.h:117
ome::xml::model::enums::AcquisitionMode::BRIGHTFIELD
BrightField.
Definition: AcquisitionMode.h:119
ome::xml::model::enums::AcquisitionMode::STORM
STORM.
Definition: AcquisitionMode.h:107
ome::xml::model::enums::AcquisitionMode::enum_value
enum_value
Enumeration values.
Definition: AcquisitionMode.h:76
ome::xml::model::enums::AcquisitionMode::TIRF
TIRF.
Definition: AcquisitionMode.h:111
ome::xml::model::enums::AcquisitionMode::strings
static const string_map_type & strings()
Get a map of valid string names and enum values.
Definition: AcquisitionMode.cpp:153
ome::xml::model::enums::AcquisitionMode::LASERSCANNINGCONFOCALMICROSCOPY
LaserScanningConfocalMicroscopy.
Definition: AcquisitionMode.h:81
log.h
ome::xml::model::enums::AcquisitionMode::operator=
AcquisitionMode & operator=(const AcquisitionMode &rhs)
Assignment operator.
Definition: AcquisitionMode.h:161
ome::xml::model::enums::AcquisitionMode::LCM
LCM.
Definition: AcquisitionMode.h:115