ome-xml 5.2.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

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)
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
118 };
119
125 AcquisitionMode (enum_value value);
126
141 AcquisitionMode (const std::string& name, bool strict = true);
142
148 AcquisitionMode (const AcquisitionMode& original);
149
154 inline AcquisitionMode&
155 operator= (const AcquisitionMode& rhs)
156 {
157 this->value = rhs.value;
158 this->name = rhs.name;
159 return *this;
160 }
161
167 inline
168 operator enum_value () const
169 {
170 return this->value;
171 }
172
178 inline
179 operator const std::string& () const
180 {
181 return *this->name;
182 }
183
185 typedef std::map<std::string, AcquisitionMode::enum_value> string_map_type;
187 typedef std::map<AcquisitionMode::enum_value, std::string> value_map_type;
188
194 static const string_map_type&
195 strings();
196
202 static const value_map_type&
203 values();
204
205 private:
211 static const string_map_type&
212 lowercase_strings();
213
215 enum_value value;
217 const std::string *name;
218 };
219
227 inline bool
228 operator== (const AcquisitionMode& lhs,
229 const AcquisitionMode& rhs)
230 {
231 return static_cast<AcquisitionMode::enum_value>(lhs) == static_cast<AcquisitionMode::enum_value>(rhs);
232 }
233
241 inline bool
242 operator== (const AcquisitionMode& lhs,
243 const AcquisitionMode::enum_value& rhs)
244 {
245 return static_cast<AcquisitionMode::enum_value>(lhs) == rhs;
246 }
247
255 inline bool
256 operator== (const AcquisitionMode::enum_value& lhs,
257 const AcquisitionMode& rhs)
258 {
259 return lhs == static_cast<AcquisitionMode::enum_value>(rhs);
260 }
261
269 inline bool
270 operator== (const AcquisitionMode& lhs,
271 const std::string& rhs)
272 {
273 return static_cast<const std::string&>(lhs) == rhs;
274 }
275
283 inline bool
284 operator== (const std::string& lhs,
285 const AcquisitionMode& rhs)
286 {
287 return lhs == static_cast<const std::string&>(rhs);
288 }
289
297 inline bool
298 operator!= (const AcquisitionMode& lhs,
299 const AcquisitionMode& rhs)
300 {
301 return static_cast<AcquisitionMode::enum_value>(lhs) != static_cast<AcquisitionMode::enum_value>(rhs);
302 }
303
311 inline bool
312 operator!= (const AcquisitionMode& lhs,
313 const AcquisitionMode::enum_value& rhs)
314 {
315 return static_cast<AcquisitionMode::enum_value>(lhs) != rhs;
316 }
317
325 inline bool
326 operator!= (const AcquisitionMode::enum_value& lhs,
327 const AcquisitionMode& rhs)
328 {
329 return lhs != static_cast<AcquisitionMode::enum_value>(rhs);
330 }
331
339 inline bool
340 operator!= (const AcquisitionMode& lhs,
341 const std::string& rhs)
342 {
343 return static_cast<const std::string&>(lhs) != rhs;
344 }
345
353 inline bool
354 operator!= (const std::string& lhs,
355 const AcquisitionMode& rhs)
356 {
357 return lhs != static_cast<const std::string&>(rhs);
358 }
359
367 template<class charT, class traits>
368 inline std::basic_ostream<charT,traits>&
369 operator<< (std::basic_ostream<charT,traits>& os,
370 const AcquisitionMode& enumeration)
371 {
372 return os << static_cast<const std::string&>(enumeration);
373 }
374
382 template<class charT, class traits>
383 inline std::basic_istream<charT,traits>&
384 operator>> (std::basic_istream<charT,traits>& is,
385 AcquisitionMode& enumeration)
386 {
387 std::string value;
388 is >> value;
389 if (is)
390 {
391 try
392 {
393 enumeration = AcquisitionMode(value, false);
394 }
395 catch (const EnumerationException&)
396 {
397 is.setstate(std::ios::failbit);
398 }
399 }
400
401 return is;
402 }
403
404 }
405 }
406 }
407 }
408
409 #endif // OME_XML_MODEL_ENUMS_ACQUISITIONMODE_H
410
411 /*
412 * Local Variables:
413 * mode:C++
414 * End:
415 */
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:384
ome::xml::model::enums::operator!=
bool operator!=(const AcquisitionMode &lhs, const AcquisitionMode &rhs)
Compare two AcquisitionMode objects for non-equality.
Definition: AcquisitionMode.h:298
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:219
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:215
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:185
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:187
ome::xml::model::enums::AcquisitionMode::name
const std::string * name
Enumeration name.
Definition: AcquisitionMode.h:217
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
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:228
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:186
ome::xml::model::enums::AcquisitionMode::OTHER
Other.
Definition: AcquisitionMode.h:117
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:155
ome::xml::model::enums::AcquisitionMode::LCM
LCM.
Definition: AcquisitionMode.h:115