Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <usAny.h>
Public Member Functions | |
Any () | |
template<typename ValueType > | |
Any (const ValueType &value) | |
Any (const Any &other) | |
~Any () | |
Any & | Swap (Any &rhs) |
template<typename ValueType > | |
Any & | operator= (const ValueType &rhs) |
Any & | operator= (const Any &rhs) |
bool | Empty () const |
std::string | ToString () const |
std::string | ToJSON () const |
const std::type_info & | Type () const |
Friends | |
template<typename ValueType > | |
ValueType * | any_cast (Any *) |
template<typename ValueType > | |
ValueType * | unsafe_any_cast (Any *) |
An Any class represents a general type and is capable of storing any type, supporting type-safe extraction of the internally stored data.
Code taken from the Boost 1.46.1 library. Original copyright by Kevlin Henney. Modified for CppMicroServices.
|
inline |
|
inline |
|
inline |
returns true if the Any is empty
Definition at line 246 of file usAny.h.
Referenced by QmitkServiceListWidget::CreateCaptionForService(), mitk::FileWriterSelector::Item::GetBaseDataType(), mitk::FileReaderSelector::Item::GetDescription(), mitk::FileWriterSelector::Item::GetDescription(), mitk::FileReaderWriterBase::GetRegisteredMimeType(), us::ServiceReferenceBase::operator<(), QmitkFileReaderWriterOptionsWidget::QmitkFileReaderWriterOptionsWidget(), and mitk::FileReaderWriterBase::SetOption().
|
inline |
|
inline |
Returns a JSON representation for the content.
Custom types should specialize the any_value_to_json template function for meaningful output.
Definition at line 267 of file usAny.h.
Referenced by us::any_value_to_json().
|
inline |
Returns a string representation for the content.
Custom types should either provide a std::ostream& operator<<(std::ostream& os, const CustomType& ct)
function or specialize the any_value_to_string template function for meaningful output.
Definition at line 257 of file usAny.h.
Referenced by us::any_value_to_string(), us::LDAPProp::Approx(), QmitkServiceListWidget::CreateCaptionForService(), mitk::FileWriterSelector::Item::GetBaseDataType(), mitk::FileWriterSelector::Item::GetDescription(), mitk::FileReaderSelector::Item::GetDescription(), mitk::IGTLMessageSource::GetMicroserviceID(), us::LDAPProp::operator!=(), us::operator<<(), us::LDAPProp::operator<=(), us::LDAPProp::operator==(), us::LDAPProp::operator>=(), QmitkAnyStringWidget::QmitkAnyStringWidget(), and QmitkFileReaderWriterOptionsWidget::QmitkFileReaderWriterOptionsWidget().
|
inline |
Returns the type information of the stored content. If the Any is empty typeid(void) is returned. It is suggested to always query an Any for its type info before trying to extract data via an any_cast/ref_any_cast.
Definition at line 278 of file usAny.h.
Referenced by us::any_cast(), GetAnyWidget(), us::ServiceReferenceBase::operator<(), QmitkInvalidAnyWidget::QmitkInvalidAnyWidget(), and us::ServiceRegistrationBase::SetProperties().
|
friend |
|
friend |