core/vnl/vnl_file_matrix.h
Go to the documentation of this file.
00001 // This is core/vnl/vnl_file_matrix.h
00002 #ifndef vnl_file_matrix_h_
00003 #define vnl_file_matrix_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Load vnl_matrix<double> from file
00010 // \author Andrew W. Fitzgibbon, Oxford RRG
00011 // \date   23 Dec 96
00012 //
00013 // \verbatim
00014 //  Modifications
00015 //   LSB (Manchester) 23/3/01 Documentation tidied
00016 // \endverbatim
00017 //
00018 //-----------------------------------------------------------------------------
00019 
00020 #include <vnl/vnl_matrix.h>
00021 
00022 //: Class to load a matrix from a file.
00023 export template <class T>
00024 class vnl_file_matrix : public vnl_matrix<T>
00025 {
00026   VCL_SAFE_BOOL_DEFINE;
00027  public:
00028   vnl_file_matrix(char const* filename);
00029 
00030   operator safe_bool () const
00031     { return (ok_)? VCL_SAFE_BOOL_TRUE : 0; }
00032   bool operator!() const
00033     { return !ok_; }
00034 
00035  private:
00036   bool ok_;
00037 };
00038 
00039 #endif // vnl_file_matrix_h_