46 #ifndef OME_XML_MODEL_ENUMS_PULSE_H 47 #define OME_XML_MODEL_ENUMS_PULSE_H 55 #include <ome/xml/model/enums/EnumerationException.h> 58 #define OME_XML_MODEL_ENUMS_PULSE_VALUES (CW)(SINGLE)(QSWITCHED)(REPETITIVE)(MODELOCKED)(OTHER) 113 Pulse (
const std::string&
name,
bool strict =
true);
153 operator const std::string& ()
const 168 static const string_map_type&
176 static const value_map_type&
185 static const string_map_type&
205 return static_cast<Pulse::enum_value>(lhs) == static_cast<Pulse::enum_value>(rhs);
245 const std::string& rhs)
247 return static_cast<const std::string&
>(lhs) == rhs;
261 return lhs ==
static_cast<const std::string&
>(rhs);
275 return static_cast<Pulse::enum_value>(lhs) != static_cast<Pulse::enum_value>(rhs);
315 const std::string& rhs)
317 return static_cast<const std::string&
>(lhs) != rhs;
331 return lhs !=
static_cast<const std::string&
>(rhs);
341 template<
class charT,
class traits>
342 inline std::basic_ostream<charT,traits>&
343 operator<< (std::basic_ostream<charT,traits>& os,
344 const Pulse& enumeration)
346 return os << static_cast<const std::string&>(enumeration);
356 template<
class charT,
class traits>
357 inline std::basic_istream<charT,traits>&
367 enumeration =
Pulse(value,
false);
371 is.setstate(std::ios::failbit);
383 #endif // OME_XML_MODEL_ENUMS_PULSE_H std::basic_istream< charT, traits > & operator>>(std::basic_istream< charT, traits > &is, AcquisitionMode &enumeration)
Set AcquisitionMode from input stream.
Definition: AcquisitionMode.h:392
std::map< std::string, Pulse::enum_value > string_map_type
String map type.
Definition: Pulse.h:159
bool operator!=(const AcquisitionMode &lhs, const AcquisitionMode &rhs)
Compare two AcquisitionMode objects for non-equality.
Definition: AcquisitionMode.h:306
EnumerationException is thrown when an enumeration is invalid or not found.
Definition: EnumerationException.h:74
Pulse & operator=(const Pulse &rhs)
Assignment operator.
Definition: Pulse.h:129
CW.
Definition: Pulse.h:79
Pulse enumeration.
Definition: Pulse.h:72
Other.
Definition: Pulse.h:89
ModeLocked.
Definition: Pulse.h:87
Repetitive.
Definition: Pulse.h:85
static const string_map_type & strings()
Get a map of valid string names and enum values.
Definition: Pulse.cpp:145
QSwitched.
Definition: Pulse.h:83
Open Microscopy Environment C++ implementation.
enum_value value
Enumeration value.
Definition: Pulse.h:189
Single.
Definition: Pulse.h:81
static const value_map_type & values()
Get a map of valid enum values and string names.
Definition: Pulse.cpp:161
bool operator==(const AcquisitionMode &lhs, const AcquisitionMode &rhs)
Compare two AcquisitionMode objects for equality.
Definition: AcquisitionMode.h:236
const std::string * name
Enumeration name.
Definition: Pulse.h:191
static const string_map_type & lowercase_strings()
Get a map of valid lowercased string names and enum values.
Definition: Pulse.cpp:177
Pulse(enum_value value)
Construct a Pulse enumeration by an enumeration value.
Definition: Pulse.cpp:67
enum_value
Enumeration values.
Definition: Pulse.h:76
std::map< Pulse::enum_value, std::string > value_map_type
Value map type.
Definition: Pulse.h:161