00001
00002
00003 #ifndef REFLECTIONFILETYPE_HEADER
00004 #define REFLECTIONFILETYPE_HEADER
00005
00006 #include <string>
00007
00008 #include <clipper/clipper.h>
00009
00010 #include "string_util.hh"
00011
00013 class ReflectionFileType {
00014 public:
00016 enum FileTypeCode {NOTSET, ABSENT, UNKNOWN,
00017 MTZ, SCA_MERGED, SCA_UNMERGED, SHELX,
00018 SAINT, XDS_INTEGRATE, XDS_ASCII};
00019
00020 ReflectionFileType() : file_type_code(NOTSET) {}
00022 ReflectionFileType(const std::string& fileName);
00024 void SetTypeCode(const FileTypeCode& code) {file_type_code = code;}
00025
00027 void SetType(const std::string& filetypename);
00028
00030 FileTypeCode FileType() const {return file_type_code;}
00032 bool IsTypeMTZ() const;
00034 bool IsTypeXDS() const;
00036 bool IsTypeSCA() const;
00038 bool IsTypeSHELX() const;
00040 bool IsTypeSAINT() const;
00041
00043 bool IsTypeSSS() const;
00044
00046 int Unmerged() const;
00047
00049 std::string format() const;
00050
00051 private:
00052 FileTypeCode file_type_code;
00053
00054
00055 bool CheckNumber(const std::string& s) const;
00056 };
00057
00058 #endif