46 #ifndef OME_XML_MODEL_ENUMS_MEDIUM_H
47 #define OME_XML_MODEL_ENUMS_MEDIUM_H
55 #include <ome/xml/model/enums/EnumerationException.h>
109 Medium (
const std::string&
name,
bool strict =
true);
147 operator const std::string& ()
const
162 static const string_map_type&
170 static const value_map_type&
238 const std::string& rhs)
240 return static_cast<const std::string&
>(lhs) == rhs;
254 return lhs ==
static_cast<const std::string&
>(rhs);
308 const std::string& rhs)
310 return static_cast<const std::string&
>(lhs) != rhs;
324 return lhs !=
static_cast<const std::string&
>(rhs);
334 template<
class charT,
class traits>
335 inline std::basic_ostream<charT,traits>&
336 operator<< (std::basic_ostream<charT,traits>& os,
337 const Medium& enumeration)
339 return os << static_cast<const std::string&>(enumeration);
349 template<
class charT,
class traits>
350 inline std::basic_istream<charT,traits>&
360 enumeration =
Medium(value,
false);
364 is.setstate(std::ios::failbit);
376 #endif // OME_XML_MODEL_ENUMS_MEDIUM_H
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_string_map
Mapping of lowercase enumeration name to value.
Definition: Medium.h:182
EnumerationException is thrown when an enumeration is invalid or not found.
Definition: EnumerationException.h:74
std::map< Medium::enum_value, std::string > value_map_type
Value map type.
Definition: Medium.h:155
enum_value
Enumeration values.
Definition: Medium.h:74
enum_value value
Enumeration value.
Definition: Medium.h:175
static const value_map_type value_map
Mapping of enumeration value to name.
Definition: Medium.h:184
Oil.
Definition: Medium.h:79
static const value_map_type & values()
Get a map of valid enum values and string names.
Definition: Medium.cpp:74
Medium(enum_value value)
Construct a Medium enumeration by an enumeration value.
Definition: Medium.cpp:129
Medium & operator=(const Medium &rhs)
Assignment operator.
Definition: Medium.h:123
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
Glycerol.
Definition: Medium.h:83
bool operator==(const AcquisitionMode &lhs, const AcquisitionMode &rhs)
Compare two AcquisitionMode objects for equality.
Definition: AcquisitionMode.h:225
const std::string * name
Enumeration name.
Definition: Medium.h:177
Water.
Definition: Medium.h:81
static const string_map_type & strings()
Get a map of valid string names and enum values.
Definition: Medium.cpp:68
static const string_map_type string_map
Mapping of enumeration name to value.
Definition: Medium.h:180
std::map< std::string, Medium::enum_value > string_map_type
String map type.
Definition: Medium.h:153
Other.
Definition: Medium.h:85
Medium enumeration.
Definition: Medium.h:70
Air.
Definition: Medium.h:77
Xerces-C modern C++ wrapper.
Definition: Base.h:53