asmlib-opencv
an ASM(Active Shape Model) implementation by C++ & OpenCV
/media/Data/chenxing/myProj/asmlib-opencv/src/afreader.h
Go to the documentation of this file.
00001 #ifndef AFREADER_H
00002 #define AFREADER_H
00003 
00004 #include <cstdio>
00005 
00006 namespace StatModel {
00008 
00013 class AFReader
00014 {
00015 public:
00016     AFReader( const char *filename );
00017     ~AFReader();
00018 
00019     bool MoreNonWhiteSpaceOnLine();
00020 
00022     void Sync() { SkipWhiteSpace(); SkipComments(); }
00023 
00025     bool IsValid() { return fh!=NULL; }
00026 
00028     FILE *FH() { return fh; }
00029 private:
00030     FILE *fh;
00031     void SkipRestOfLine();
00032     void SkipComments();
00033     void SkipWhiteSpace();
00034     const char CR;
00035     const char LF;
00036     const char COMMENT_CHAR;
00037 };
00038 }
00039 #endif // AFREADER_H
 All Classes Namespaces Files Functions Variables Typedefs Defines