diff options
Diffstat (limited to 'external/include/glm/gtx/io.inl')
-rw-r--r-- | external/include/glm/gtx/io.inl | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/external/include/glm/gtx/io.inl b/external/include/glm/gtx/io.inl index 9b70a5f..edb76bf 100644 --- a/external/include/glm/gtx/io.inl +++ b/external/include/glm/gtx/io.inl @@ -10,7 +10,7 @@ namespace glm{ namespace io { - template <typename CTy> + template<typename CTy> GLM_FUNC_QUALIFIER format_punct<CTy>::format_punct(size_t a) : std::locale::facet(a) , formatted(true) @@ -24,7 +24,7 @@ namespace io , order(column_major) {} - template <typename CTy> + template<typename CTy> GLM_FUNC_QUALIFIER format_punct<CTy>::format_punct(format_punct const& a) : std::locale::facet(0) , formatted(a.formatted) @@ -38,9 +38,9 @@ namespace io , order(a.order) {} - template <typename CTy> std::locale::id format_punct<CTy>::id; + template<typename CTy> std::locale::id format_punct<CTy>::id; - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER basic_state_saver<CTy, CTr>::basic_state_saver(std::basic_ios<CTy, CTr>& a) : state_(a) , flags_(a.flags()) @@ -50,7 +50,7 @@ namespace io , locale_(a.getloc()) {} - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER basic_state_saver<CTy, CTr>::~basic_state_saver() { state_.imbue(locale_); @@ -60,14 +60,14 @@ namespace io state_.flags(flags_); } - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER basic_format_saver<CTy, CTr>::basic_format_saver(std::basic_ios<CTy, CTr>& a) : bss_(a) { a.imbue(std::locale(a.getloc(), new format_punct<CTy>(get_facet<format_punct<CTy> >(a)))); } - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER basic_format_saver<CTy, CTr>::~basic_format_saver() {} @@ -80,7 +80,7 @@ namespace io : value(a) {} - template <typename CTy> + template<typename CTy> GLM_FUNC_QUALIFIER delimeter<CTy>::delimeter(CTy a, CTy b, CTy c) : value() { @@ -93,7 +93,7 @@ namespace io : value(a) {} - template <typename FTy, typename CTy, typename CTr> + template<typename FTy, typename CTy, typename CTr> GLM_FUNC_QUALIFIER FTy const& get_facet(std::basic_ios<CTy, CTr>& ios) { if(!std::has_facet<FTy>(ios.getloc())) @@ -102,35 +102,35 @@ namespace io return std::use_facet<FTy>(ios.getloc()); } - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER std::basic_ios<CTy, CTr>& formatted(std::basic_ios<CTy, CTr>& ios) { const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(ios)).formatted = true; return ios; } - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER std::basic_ios<CTy, CTr>& unformatted(std::basic_ios<CTy, CTr>& ios) { const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(ios)).formatted = false; return ios; } - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, precision const& a) { const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).precision = a.value; return os; } - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, width const& a) { const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).width = a.value; return os; } - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, delimeter<CTy> const& a) { format_punct<CTy> & fmt(const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os))); @@ -142,7 +142,7 @@ namespace io return os; } - template <typename CTy, typename CTr> + template<typename CTy, typename CTr> GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<(std::basic_ostream<CTy, CTr>& os, order const& a) { const_cast<format_punct<CTy>&>(get_facet<format_punct<CTy> >(os)).order = a.value; @@ -152,17 +152,17 @@ namespace io namespace detail { - template <typename CTy, typename CTr, template <typename, precision> class V, typename T, precision P> + template<typename CTy, typename CTr, typename V> GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& - print_vector_on(std::basic_ostream<CTy, CTr>& os, V<T,P> const& a) + print_vector_on(std::basic_ostream<CTy, CTr>& os, V const& a) { typename std::basic_ostream<CTy, CTr>::sentry const cerberus(os); if(cerberus) { - io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); + io::format_punct<CTy> const& fmt(io::get_facet<io::format_punct<CTy> >(os)); - length_t const& components(type<V, T, P>::components); + length_t const& components(type<V>::components); if(fmt.formatted) { @@ -195,49 +195,49 @@ namespace detail } }//namespace detail - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tquat<T, Q> const& a) { return detail::print_vector_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec1<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, vec<1, T, Q> const& a) { return detail::print_vector_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec2<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, vec<2, T, Q> const& a) { return detail::print_vector_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec3<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, vec<3, T, Q> const& a) { return detail::print_vector_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tvec4<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, vec<4, T, Q> const& a) { return detail::print_vector_on(os, a); } namespace detail { - template <typename CTy, typename CTr, template <typename, precision> class M, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& print_matrix_on(std::basic_ostream<CTy, CTr>& os, M<T,P> const& a) + template<typename CTy, typename CTr, template<length_t, length_t, typename, qualifier> class M, length_t C, length_t R, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& print_matrix_on(std::basic_ostream<CTy, CTr>& os, M<C, R, T, Q> const& a) { typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); if(cerberus) { - io::format_punct<CTy> const & fmt(io::get_facet<io::format_punct<CTy> >(os)); + io::format_punct<CTy> const& fmt(io::get_facet<io::format_punct<CTy> >(os)); - length_t const& cols(type<M, T, P>::cols); - length_t const& rows(type<M, T, P>::rows); + length_t const& cols(type<M<C, R, T, Q> >::cols); + length_t const& rows(type<M<C, R, T, Q> >::rows); if(fmt.formatted) { @@ -313,74 +313,74 @@ namespace detail } }//namespace detail - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x2<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<2, 2, T, Q> const& a) { return detail::print_matrix_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x3<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<2, 3, T, Q> const& a) { return detail::print_matrix_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat2x4<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<2, 4, T, Q> const& a) { return detail::print_matrix_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x2<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<3, 2, T, Q> const& a) { return detail::print_matrix_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x3<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr>& operator<<(std::basic_ostream<CTy,CTr>& os, mat<3, 3, T, Q> const& a) { return detail::print_matrix_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat3x4<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, mat<3, 4, T, Q> const& a) { return detail::print_matrix_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x2<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, mat<4, 2, T, Q> const& a) { return detail::print_matrix_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x3<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, mat<4, 3, T, Q> const& a) { return detail::print_matrix_on(os, a); } - template <typename CTy, typename CTr, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, tmat4x4<T,P> const& a) + template<typename CTy, typename CTr, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy,CTr> & operator<<(std::basic_ostream<CTy,CTr>& os, mat<4, 4, T, Q> const& a) { return detail::print_matrix_on(os, a); } namespace detail { - template <typename CTy, typename CTr, template <typename, precision> class M, typename T, precision P> - GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& print_matrix_pair_on(std::basic_ostream<CTy, CTr>& os, std::pair<M<T, P> const, M<T, P> const> const& a) + template<typename CTy, typename CTr, template<length_t, length_t, typename, qualifier> class M, length_t C, length_t R, typename T, qualifier Q> + GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& print_matrix_pair_on(std::basic_ostream<CTy, CTr>& os, std::pair<M<C, R, T, Q> const, M<C, R, T, Q> const> const& a) { typename std::basic_ostream<CTy,CTr>::sentry const cerberus(os); if(cerberus) { io::format_punct<CTy> const& fmt(io::get_facet<io::format_punct<CTy> >(os)); - M<T,P> const& ml(a.first); - M<T,P> const& mr(a.second); - length_t const& cols(type<M, T, P>::cols); - length_t const& rows(type<M, T, P>::rows); + M<C, R, T, Q> const& ml(a.first); + M<C, R, T, Q> const& mr(a.second); + length_t const& cols(type<M<C, R, T, Q> >::cols); + length_t const& rows(type<M<C, R, T, Q> >::rows); if(fmt.formatted) { @@ -409,7 +409,7 @@ namespace detail if(0 != i) os << fmt.space; - os << column(ml, i) << ((cols-1 != i) ? fmt.space : fmt.delim_right) << fmt.space << ((0 != i) ? fmt.space : fmt.delim_left) << column(mr, i); + os << column(ml, i) << ((cols-1 != i) ? fmt.space : fmt.delim_right) << fmt.space << ((0 != i) ? fmt.space : fmt.delim_left) << column(mr, i); if(cols-1 != i) os << fmt.newline; @@ -430,11 +430,11 @@ namespace detail } }//namespace detail - template <typename CTy, typename CTr, typename T, precision P> + template<typename CTy, typename CTr, typename T, qualifier Q> GLM_FUNC_QUALIFIER std::basic_ostream<CTy, CTr>& operator<<( std::basic_ostream<CTy, CTr> & os, - std::pair<tmat4x4<T, P> const, - tmat4x4<T, P> const> const& a) + std::pair<mat<4, 4, T, Q> const, + mat<4, 4, T, Q> const> const& a) { return detail::print_matrix_pair_on(os, a); } |