Go to the documentation of this file.00001 #ifndef OPENTISSUE_CORE_MATH_INTERVAL_IO_INTERVAL_IO_H
00002 #define OPENTISSUE_CORE_MATH_INTERVAL_IO_INTERVAL_IO_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 #include <OpenTissue/core/math/interval/interval_fwd.h>
00013 #include <iosfwd>
00014
00015 namespace OpenTissue
00016 {
00017 namespace math
00018 {
00019 namespace interval
00020 {
00021
00030 template<typename T, class CharType, class CharTraits>
00031 std::basic_ostream<CharType,CharTraits> & operator<<(std::basic_ostream<CharType,CharTraits> & out, Interval<T> const &i )
00032 {
00033 out << "["
00034 << i.lower()
00035 << ","
00036 << i.upper()
00037 << "]";
00038 return out;
00039 }
00040
00049 template<typename T, class CharType, class CharTraits>
00050 std::basic_istream<CharType,CharTraits> & operator>>(std::basic_istream<CharType,CharTraits> & in, Interval<T> const &i)
00051 {
00052 char dummy;
00053 in >> dummy;
00054 in >> i.lower();
00055 in >> dummy;
00056 in >> i.upper();
00057 in >> dummy;
00058 return in;
00059 }
00060
00061 }
00062 }
00063 }
00064
00065
00066
00067 #endif