scans.hpp

Go to the documentation of this file.
00001 #ifndef IOF_SCAN_H
00002 #define IOF_SCAN_H
00003 
00016 #include "iof/fmtr.hpp"
00017 
00018 namespace iof 
00019 {
00020 
00021 
00023 template <typename TT> 
00024 inline
00025 bool scans(std::istream& in, TT& obj)
00026 {
00027     return in >> obj;
00028 }
00029 
00030 
00031 template <typename T1>
00032 inline
00033 bool scans(std::istream& in, const char* fmt, T1& obj)
00034 {
00035     return iof_private::fmtr_in(in, fmt) >> obj;
00036 }
00037 
00038 
00039 template <typename T1, typename T2>
00040 inline
00041 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2)
00042 {
00043     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2;
00044 }
00045 
00046 
00047 template <typename T1, typename T2, typename T3>
00048 inline
00049 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2, T3& obj3)
00050 {
00051     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2 >> obj3;
00052 }
00053 
00054 
00055 template <typename T1, typename T2, typename T3, typename T4>
00056 inline
00057 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2, T3& obj3, T4& obj4)
00058 {
00059     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2 >> obj3 >> obj4;
00060 }
00061 
00062 
00063 template <typename T1, typename T2, typename T3, typename T4, typename T5>
00064 inline
00065 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2, T3& obj3, T4& obj4, T5& obj5)
00066 {
00067     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2 >> obj3 >> obj4 >> obj5;
00068 }
00069 
00070 
00071 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6>
00072 inline
00073 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2, T3& obj3, T4& obj4, T5& obj5, T6& obj6)
00074 {
00075     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2 >> obj3 >> obj4 >> obj5 >> obj6;
00076 }
00077 
00078 
00079 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7>
00080 inline
00081 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2, T3& obj3, T4& obj4, T5& obj5, T6& obj6, T7& obj7)
00082 {
00083     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2 >> obj3 >> obj4 >> obj5 >> obj6 >> obj7;
00084 }
00085 
00086 
00087 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8>
00088 inline
00089 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2, T3& obj3, T4& obj4, T5& obj5, T6& obj6, T7& obj7, T8& obj8)
00090 {
00091     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2 >> obj3 >> obj4 >> obj5 >> obj6 >> obj7 >> obj8;
00092 }
00093 
00094 
00095 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
00096 inline
00097 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2, T3& obj3, T4& obj4, T5& obj5, T6& obj6, T7& obj7, T8& obj8, T9& obj9)
00098 {
00099     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2 >> obj3 >> obj4 >> obj5 >> obj6 >> obj7 
00100                                          >> obj8 >> obj9;
00101 }
00102 
00103 
00104 template <typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, 
00105     typename T7, typename T8, typename T9, typename T10>
00106 inline
00107 bool scans(std::istream& in, const char* fmt, T1& obj1, T2& obj2, T3& obj3, T4& obj4, 
00108     T5& obj5, T6& obj6, T7& obj7, T8& obj8, T9& obj9, T10& obj10)
00109 {
00110     return iof_private::fmtr_in(in, fmt) >> obj1 >> obj2 >> obj3 >> obj4 >> obj5 >> obj6 >> obj7 
00111                                          >> obj8 >> obj9 >> obj10;
00112 }
00113 
00114 
00115 } // namespace iof
00116 
00117 #endif // IOF_SCAN_H
00118 

Generated on Fri Nov 24 16:16:01 2006 for IOF Library by doxygen 1.5.1-p1
Thanks to SourceForge.net Logo for hosting