24 #ifndef PXR_BASE_TF_OSTREAM_METHODS_H
25 #define PXR_BASE_TF_OSTREAM_METHODS_H
49 #include <type_traits>
51 #include <hboost/type_traits/has_left_shift.hpp>
57 return hboost::has_left_shift<
58 std::ostream &,
T, std::ostream &>
::value;
70 typename std::enable_if<PXR_NS::Tf_IsOstreamable<T>(), std::ostream &>::
type
71 operator<<(std::ostream &out,
const std::vector<T> &
v)
74 for (
auto const &
obj: v)
84 typename std::enable_if<PXR_NS::Tf_IsOstreamable<T>(), std::ostream &>::
type
85 operator<<(std::ostream &out,
const std::set<T> &v)
88 for (
auto const &
obj: v)
98 typename std::enable_if<PXR_NS::Tf_IsOstreamable<T>(), std::ostream &>::
type
99 operator<<(std::ostream &out,
const std::list<T> &
l)
102 for (
auto const &
obj: l)
111 template <
class K,
class M,
class H,
class C,
class A>
112 typename std::enable_if<
113 PXR_NS::Tf_IsOstreamable<K>() && PXR_NS::Tf_IsOstreamable<M>(), std::ostream &>
::type
114 operator<<(std::ostream &out, const PXR_NS::TfHashMap<K, M, H, C, A> &
h)
117 for (
auto const &
p:
h)
118 out <<
"<" <<
p.first <<
": " <<
p.second <<
"> ";
125 template <
class K,
class M>
126 typename std::enable_if<
127 PXR_NS::Tf_IsOstreamable<K>() && PXR_NS::Tf_IsOstreamable<M>(), std::ostream &>
::type
128 operator<<(std::ostream &out, const std::map<K, M> &
h)
131 for (
auto const &
p:
h)
132 out <<
"<" <<
p.first <<
": " <<
p.second <<
"> ";
139 #endif // PXR_BASE_TF_OSTREAM_METHODS_H
PXR_NAMESPACE_OPEN_SCOPE constexpr bool Tf_IsOstreamable()
GLfloat GLfloat GLfloat GLfloat h
GLuint GLuint GLsizei GLenum type
PXR_NAMESPACE_CLOSE_SCOPE PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
GLsizei const GLfloat * value