validity.hpp

Go to the documentation of this file.
00001 #ifndef IOF_VALIDITY_HPP_
00002 #define IOF_VALIDITY_HPP_
00003 
00016 #include <string>
00017 
00018 
00019 namespace iof 
00020 {
00021 
00022 
00036 struct validity
00037 {
00038     int problemPos;  
00039     std::string fmt; 
00040     
00041     validity(): problemPos(-1) {}
00042     void set(const char* problemPos_, const std::string& fmtStr)
00043     {
00044         problemPos = (problemPos_ ? int(problemPos_ - fmtStr.c_str()) : -1);
00045         fmt = fmtStr;
00046     }
00047     
00049     operator bool()  const {return problemPos < 0;}
00050     bool operator!() const {return problemPos >= 0;}
00051 };
00052 
00053 
00054 } // namespace
00055 
00056 
00057 #endif // IOF_VALIDITY_HPP_

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