10 #define RMF_NULLABLE_H
12 #include "RMF/config.h"
30 typename Traits<T>::ReturnType v_;
31 std::string get_string()
const {
35 std::ostringstream oss;
42 Nullable(
const Nullable& o) : v_(o.v_) {}
44 Nullable(
typename Traits<T>::ReturnType v) : v_(v) {}
49 RMF_USAGE_CHECK(!get_is_null(),
"Can't convert null value.");
66 #if !defined(RMF_DOXYGEN) && !defined(SWIG)
67 void show(std::ostream& out)
const { out << get_string(); }
71 #if !defined(SWIG) && !defined(RMF_DOXYGEN)
72 template <
class Traits>
73 inline std::ostream& operator<<(std::ostream& out, Nullable<Traits> null) {
const T * get_ptr() const
Handle read/write of Model data from/to files.
Declarations of the various exception types.
Various general useful macros for IMP.
Traits classes describing how RMF uses types for storing data.