diff --git a/modules/io/src/img/map_io_dat_handler.hh b/modules/io/src/img/map_io_dat_handler.hh index 25f5404e10c557e45d105bf370e080d8ca23c078..f501d0b2ee8e5b1112a6504fe22f7b857b3bdc6a 100644 --- a/modules/io/src/img/map_io_dat_handler.hh +++ b/modules/io/src/img/map_io_dat_handler.hh @@ -51,9 +51,9 @@ class DLLEXPORT_OST_IO DAT: public ImageFormatBase class DLLEXPORT_OST_IO MapIODatHandler: public MapIOHandler { public: - /// \brief Map IO handler to read/write Spider map files + /// \brief Map IO handler to read/write Dat map files /// - /// This map IO handler reads and writes Spider formatted map files. + /// This map IO handler reads and writes Dat formatted map files. virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; @@ -61,6 +61,8 @@ class DLLEXPORT_OST_IO MapIODatHandler: public MapIOHandler static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); + static String GetFormatName() { return String("Dat"); } + static String GetFormatDescription() {return String("Simple binary format for square images");} }; typedef MapIOHandlerFactory<MapIODatHandler> MapIODatHandlerFactory; diff --git a/modules/io/src/img/map_io_dm3_handler.cc b/modules/io/src/img/map_io_dm3_handler.cc index 395499d7f296e7750709fc69b7dff6bd8bacb9db..4c0816a3831f13b3b596dc325943e47228274d97 100644 --- a/modules/io/src/img/map_io_dm3_handler.cc +++ b/modules/io/src/img/map_io_dm3_handler.cc @@ -44,7 +44,7 @@ namespace ost { namespace io { -String DM3::FORMAT_STRING = "defined_spider"; +String DM3::FORMAT_STRING = "defined_dm3"; DM3::DM3(): ImageFormatBase(FORMAT_STRING) diff --git a/modules/io/src/img/map_io_dm3_handler.hh b/modules/io/src/img/map_io_dm3_handler.hh index e0bedce17f91fe35f3aee920c56b6e0531f21a4e..b1c5e09fc295ec4578857621d11750fe5292e9a5 100644 --- a/modules/io/src/img/map_io_dm3_handler.hh +++ b/modules/io/src/img/map_io_dm3_handler.hh @@ -39,9 +39,9 @@ class DLLEXPORT_OST_IO DM3: public ImageFormatBase class DLLEXPORT_OST_IO MapIODm3Handler: public MapIOHandler { public: - /// \brief Map IO handler to read/write Spider map files + /// \brief Map IO handler to read/write Dm3 map files /// - /// This map IO handler reads and writes Spider formatted map files. + /// This map IO handler reads and writes Dm3 formatted map files (Digital Micrograph). virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct); virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const; @@ -49,6 +49,9 @@ class DLLEXPORT_OST_IO MapIODm3Handler: public MapIOHandler static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); + static String GetFormatName() { return String("Dm3"); } + static String GetFormatDescription() {return String("Format used by Gatan Inc.'s Digital Micrograph software");} + }; typedef MapIOHandlerFactory<MapIODm3Handler> MapIODm3HandlerFactory; diff --git a/modules/io/src/img/map_io_dx_handler.hh b/modules/io/src/img/map_io_dx_handler.hh index ead4ea87b8e42350ac001c1a3178af4cbb476b12..f0933aa1cfb1a183121d6b710216600a1db04777 100644 --- a/modules/io/src/img/map_io_dx_handler.hh +++ b/modules/io/src/img/map_io_dx_handler.hh @@ -34,6 +34,8 @@ class DLLEXPORT_OST_IO DX: public ImageFormatBase bool GetNormalizeOnSave() const; void SetNormalizeOnSave(bool normalize_on_save); static String FORMAT_STRING; + static String FORMAT_NAME_STRING; + static String FORMAT_DESCRIPTION_STRING; private: @@ -61,6 +63,9 @@ class DLLEXPORT_OST_IO MapIODxHandler: public MapIOHandler static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); + static String GetFormatName() { return String("Dx"); }; + static String GetFormatDescription() { return String("Format used by the OpenDX software package"); }; + }; typedef MapIOHandlerFactory<MapIODxHandler> MapIODxHandlerFactory; diff --git a/modules/io/src/img/map_io_handler.hh b/modules/io/src/img/map_io_handler.hh index d90bf353eea1e2b52e278c0d464d3ab3c2092d98..295492b4d696790d0a5563a87a1a2e2f881bae6f 100644 --- a/modules/io/src/img/map_io_handler.hh +++ b/modules/io/src/img/map_io_handler.hh @@ -47,6 +47,9 @@ public: virtual bool MatchType(const ImageFormatBase& type) const = 0; virtual bool MatchSuffix(const String& suffix) const =0 ; virtual MapIOHandlerPtr Create() const = 0 ; + virtual String GetFormatName() const =0; + virtual String GetFormatDescription() const =0; + }; typedef boost::shared_ptr<MapIOHandlerFactoryBase> MapIOHandlerFactoryBasePtr; @@ -67,6 +70,14 @@ class MapIOHandlerFactory: public MapIOHandlerFactoryBase return HANDLER::MatchSuffix(suffix); } + virtual String GetFormatName() const { + return HANDLER::GetFormatName(); + } + + virtual String GetFormatDescription() const { + return HANDLER::GetFormatDescription(); + } + virtual MapIOHandlerPtr Create() const { return MapIOHandlerPtr(new HANDLER); } diff --git a/modules/io/src/img/map_io_jpk_handler.cc b/modules/io/src/img/map_io_jpk_handler.cc index 8bf3b2bf026f28f72c76d0dfd2d3f20481e65cb5..5122ab3c346bcc315236f6be4c4e119490f9fb1b 100644 --- a/modules/io/src/img/map_io_jpk_handler.cc +++ b/modules/io/src/img/map_io_jpk_handler.cc @@ -42,7 +42,7 @@ namespace ost { namespace io { String JPK::FORMAT_STRING = "defined_jpk"; - JPK::JPK(boost::logic::tribool normalize_on_save, Format bit_depth, bool sign, bool phasecolor, int subimage): +JPK::JPK(boost::logic::tribool normalize_on_save, Format bit_depth, bool sign, bool phasecolor, int subimage): TIF(FORMAT_STRING,normalize_on_save,bit_depth,sign,phasecolor,subimage) {} diff --git a/modules/io/src/img/map_io_jpk_handler.hh b/modules/io/src/img/map_io_jpk_handler.hh index 8cb5bfbcef554f9b1911c8a43070acf6228b5baf..1191924a4a05c7b68456c85c7ad66d38d4f757be 100644 --- a/modules/io/src/img/map_io_jpk_handler.hh +++ b/modules/io/src/img/map_io_jpk_handler.hh @@ -30,6 +30,8 @@ class DLLEXPORT_OST_IO JPK: public TIF public: JPK(boost::logic::tribool normalize_on_save = true, Format bit_depth = OST_DEFAULT_FORMAT, bool sign = false, bool phasecolor = false, int subimage = -1); static String FORMAT_STRING; + static String FORMAT_NAME_STRING; + static String FORMAT_DESCRIPTION_STRING; }; @@ -47,6 +49,9 @@ class DLLEXPORT_OST_IO MapIOJpkHandler: public MapIOTiffHandler static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); + static String GetFormatName() { return String("Jpk");} + static String GetFormatDescription() { return String("Format used by JPK Instruments AG's software (Customized Tiff format)"); } + }; typedef MapIOHandlerFactory<MapIOJpkHandler> MapIOJpkHandlerFactory; diff --git a/modules/io/src/img/map_io_mrc_handler.cc b/modules/io/src/img/map_io_mrc_handler.cc index 4858491bd603d06cf936a57e87f05061856d502b..0dc4681c8d4fb134ff752ac24c2af0a0a4a623ce 100644 --- a/modules/io/src/img/map_io_mrc_handler.cc +++ b/modules/io/src/img/map_io_mrc_handler.cc @@ -84,6 +84,7 @@ namespace ost { namespace io { String MRC::FORMAT_STRING = "defined_mrc"; + MRC::MRC(bool normalize_on_save, Subformat subformat,Endianess endianess_on_save): ImageFormatBase(FORMAT_STRING) { diff --git a/modules/io/src/img/map_io_mrc_handler.hh b/modules/io/src/img/map_io_mrc_handler.hh index 32b28c3c5c49efb73858a41c8cadd17a5090c75a..d5f96b6f9e0a692a17d5d80cac30167f1ad85f2f 100644 --- a/modules/io/src/img/map_io_mrc_handler.hh +++ b/modules/io/src/img/map_io_mrc_handler.hh @@ -75,6 +75,8 @@ public: static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); + static String GetFormatName() { return String("Mrc"); }; + static String GetFormatDescription() { return String("Format used by the MRC software package"); }; private: diff --git a/modules/io/src/img/map_io_nanoscope_handler.hh b/modules/io/src/img/map_io_nanoscope_handler.hh index f6103066bc2d24a0f7f52c0064a9698ac385c788..e9dda75c7de18827e318071c3d3a04a623c88ae1 100644 --- a/modules/io/src/img/map_io_nanoscope_handler.hh +++ b/modules/io/src/img/map_io_nanoscope_handler.hh @@ -30,6 +30,8 @@ class DLLEXPORT_OST_IO Nanoscope: public ImageFormatBase Nanoscope(int subimage = -1); static String FORMAT_STRING; + static String FORMAT_NAME_STRING; + static String FORMAT_DESCRIPTION_STRING; int GetSubimage () const; void SetSubimage (int subimage); @@ -46,10 +48,9 @@ class MapIONanoscopeHandler: public MapIOHandler { public: public: - /// \brief Map IO handler to read/write Situs map files + /// \brief Map IO handler to read/write Nanoscope map files /// - /// This map IO handler reads and writes MRC formatted map files, as - /// generated by the MRC electron crystallography processing package + /// This map IO handler reads and writes Nanoscope formatted map files virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; @@ -57,7 +58,8 @@ public: static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); - + static String GetFormatName() { return String("Nanoscope"); } + static String GetFormatDescription() { return String("Format used by software from Veeco"); } }; typedef MapIOHandlerFactory<MapIONanoscopeHandler> MapIONanoscopeHandlerFactory; diff --git a/modules/io/src/img/map_io_png_handler.hh b/modules/io/src/img/map_io_png_handler.hh index 94f79fe9af30800ca542c044230a882220f2b398..0f3b5454370eb14c168f4a6348409d069cdf53f7 100644 --- a/modules/io/src/img/map_io_png_handler.hh +++ b/modules/io/src/img/map_io_png_handler.hh @@ -32,7 +32,7 @@ class DLLEXPORT_OST_IO PNG: public ImageFormatBase bool GetNormalizeOnSave() const; void SetNormalizeOnSave(bool normalize_on_save); - static String FORMAT_STRING;; + static String FORMAT_STRING; private: @@ -43,10 +43,9 @@ class MapIOPngHandler: public MapIOHandler { public: public: - /// \brief Map IO handler to read/write Situs map files + /// \brief Map IO handler to read/write png image files /// - /// This map IO handler reads and writes MRC formatted map files, as - /// generated by the MRC electron crystallography processing package + /// This map IO handler reads and writes PNG formatted image files, virtual void Import(img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct ); virtual void Import(img::MapHandle& sh, std::istream& loc, const ImageFormatBase& formatstruct); virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc, const ImageFormatBase& formatstruct) const; @@ -54,7 +53,8 @@ public: static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); - + static String GetFormatName() { return String("Png");} + static String GetFormatDescription() { return String("Portable Network Graphic image format");} }; typedef MapIOHandlerFactory<MapIOPngHandler> MapIOPngHandlerFactory; diff --git a/modules/io/src/img/map_io_situs_handler.hh b/modules/io/src/img/map_io_situs_handler.hh index 877741a0dd7d1030c7697ffb4258c29efc572c7c..05933c5528cf9ada58b7fdd06177091d3b9078ad 100644 --- a/modules/io/src/img/map_io_situs_handler.hh +++ b/modules/io/src/img/map_io_situs_handler.hh @@ -33,6 +33,8 @@ class DLLEXPORT_OST_IO Situs: public ImageFormatBase bool GetNormalizeOnSave() const; void SetNormalizeOnSave(bool normalize_on_save); static String FORMAT_STRING; + static String FORMAT_NAME_STRING; + static String FORMAT_ALIGNMENT_STRING; private: @@ -53,6 +55,8 @@ class DLLEXPORT_OST_IO MapIOSitusHandler: public MapIOHandler static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); + static String GetFormatName() { return "Situs"; }; + static String GetFormatDescription() { return "Format used by the Situs software package"; }; }; typedef MapIOHandlerFactory<MapIOSitusHandler> MapIOSitusHandlerFactory; diff --git a/modules/io/src/img/map_io_spi_handler.hh b/modules/io/src/img/map_io_spi_handler.hh index 6d93c04757aa584f292f1523c5f0168ccc4d4a5e..91eccb9799aa8dac4bd267c6556202d8735e16d1 100644 --- a/modules/io/src/img/map_io_spi_handler.hh +++ b/modules/io/src/img/map_io_spi_handler.hh @@ -43,6 +43,8 @@ class DLLEXPORT_OST_IO Spider: public ImageFormatBase void SetEndianessOnSave(Endianess end); static String FORMAT_STRING; + static String FORMAT_NAME_STRING; + static String FORMAT_DESCRIPTION_STRING; private: @@ -63,6 +65,9 @@ class DLLEXPORT_OST_IO MapIOSpiHandler: public MapIOHandler static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); + static String GetFormatName() { return String("Spider"); }; + static String GetFormatDescription() { return String("Format sued by the Spider software package"); }; + protected: void do_import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); }; diff --git a/modules/io/src/img/map_io_tiff_handler.cc b/modules/io/src/img/map_io_tiff_handler.cc index b2a5d4f9ee086ee6b3000a6f6814f9f3c6532fd0..d25d92eb8f26b34f40fdbe5976b2f41802dab30f 100644 --- a/modules/io/src/img/map_io_tiff_handler.cc +++ b/modules/io/src/img/map_io_tiff_handler.cc @@ -45,7 +45,7 @@ namespace ost { namespace io { String TIF::FORMAT_STRING="defined_tiff"; - TIF::TIF(boost::logic::tribool normalize_on_save, Format bit_depth, bool sign, bool phasecolor, int subimage): + TIF::TIF(boost::logic::tribool normalize_on_save, Format bit_depth, bool sign, bool phasecolor, int subimage): ImageFormatBase(FORMAT_STRING) { normalize_on_save_ = normalize_on_save; diff --git a/modules/io/src/img/map_io_tiff_handler.hh b/modules/io/src/img/map_io_tiff_handler.hh index 3351ff0313b2a3ce73a2db62c12f2c524ce308ec..2ae42d7f2bf578805149a32a6c2df09b06821320 100644 --- a/modules/io/src/img/map_io_tiff_handler.hh +++ b/modules/io/src/img/map_io_tiff_handler.hh @@ -61,6 +61,7 @@ class DLLEXPORT_OST_IO TIF: public ImageFormatBase static String FORMAT_STRING; + protected: TIF(String format_string, boost::logic::tribool normalize_on_save = boost::logic::indeterminate, Format bit_depth = OST_DEFAULT_FORMAT, bool sign = false, bool phasecolor = false, int subimage = -1); @@ -87,10 +88,11 @@ class DLLEXPORT_OST_IO MapIOTiffHandler: public MapIOHandler virtual void Import(img::MapHandle& sh, std::istream& loc,const ImageFormatBase& formatstruct); virtual void Export(const img::MapHandle& sh, const boost::filesystem::path& loc,const ImageFormatBase& formatstruct) const; virtual void Export(const img::MapHandle& sh, std::ostream& loc,const ImageFormatBase& formatstruct) const; - static bool MatchContent(unsigned char* header); static bool MatchType(const ImageFormatBase& type); static bool MatchSuffix(const String& suffix); + static String GetFormatName() { return String( "Tiff"); } + static String GetFormatDescription() { return String("Tagged Image File Format"); } protected: diff --git a/modules/io/src/mol/entity_io_crd_handler.cc b/modules/io/src/mol/entity_io_crd_handler.cc index d8fe1dcc2689ca3952acd5eecfeb8c3c5c87c845..194febcf7ac48fac35c02876670e37cc0aa83e0e 100644 --- a/modules/io/src/mol/entity_io_crd_handler.cc +++ b/modules/io/src/mol/entity_io_crd_handler.cc @@ -43,6 +43,9 @@ namespace ost { namespace io { using boost::format; +String FORMAT_NAME_STRING; +String FORMAT_DESCRIPTION_STRING; + CRDReader::CRDReader(const boost::filesystem::path& loc): sequential_atom_list_(), curr_chain_(), diff --git a/modules/io/src/mol/entity_io_crd_handler.hh b/modules/io/src/mol/entity_io_crd_handler.hh index 73dc9d16ea31a86da36787cab55ad044fc298a93..72984150e6684309972309f6fc19b36b520ff8f0 100644 --- a/modules/io/src/mol/entity_io_crd_handler.hh +++ b/modules/io/src/mol/entity_io_crd_handler.hh @@ -39,6 +39,7 @@ public: void Import(mol::EntityHandle& ent); std::vector<mol::AtomHandle> GetSequentialAtoms() const; + private: void ParseAndAddAtom(const String& line, mol::EntityHandle& h); @@ -69,6 +70,9 @@ public: static bool ProvidesExport(const boost::filesystem::path& loc, const String& format="auto"); virtual bool RequiresBuilder() const; + + static String GetFormatName() { return String("Crd"); } + static String GetFormatDescription() { return String("CARD format file used by the Charmm software package"); } }; diff --git a/modules/io/src/mol/entity_io_handler.hh b/modules/io/src/mol/entity_io_handler.hh index 91b0fbdf88c3daf56194092174a654b9a37a9a64..8885a1d91ee752cd57a888701d94d97a73ff2136 100644 --- a/modules/io/src/mol/entity_io_handler.hh +++ b/modules/io/src/mol/entity_io_handler.hh @@ -61,6 +61,8 @@ public: virtual bool ProvidesImport(const boost::filesystem::path& loc, const String& type) const = 0; virtual bool ProvidesExport(const boost::filesystem::path& loc, const String& type) const = 0; virtual EntityIOHandlerP Create() const = 0; + virtual String GetFormatName() const =0; + virtual String GetFormatDescription() const =0; }; typedef boost::shared_ptr<EntityIOHandlerFactoryBase> EntityIOHandlerFactoryBaseP; @@ -76,6 +78,14 @@ class EntityIOHandlerFactory: public EntityIOHandlerFactoryBase return HANDLER::ProvidesExport(loc,type); } + virtual String GetFormatName() const { + return HANDLER::GetFormatName(); + } + + virtual String GetFormatDescription() const { + return HANDLER::GetFormatDescription(); + } + virtual EntityIOHandlerP Create() const { return EntityIOHandlerP(new HANDLER); } diff --git a/modules/io/src/mol/entity_io_pdb_handler.hh b/modules/io/src/mol/entity_io_pdb_handler.hh index 19f9fc3cff1ed132bca564e12a16ad6c6798b49a..64529c22eec2f31f56b7b7eddd76e1883d48de57 100644 --- a/modules/io/src/mol/entity_io_pdb_handler.hh +++ b/modules/io/src/mol/entity_io_pdb_handler.hh @@ -46,6 +46,9 @@ public: static bool ProvidesExport(const boost::filesystem::path& loc, const String& format="auto"); virtual bool RequiresBuilder() const; + + static String GetFormatName() { return String("Pdb"); } + static String GetFormatDescription() { return String("Protein Data Bank file format"); } }; diff --git a/modules/io/src/mol/entity_io_sdf_handler.hh b/modules/io/src/mol/entity_io_sdf_handler.hh index aaa75a802f69fdffcd0500d04a2716bc58c86694..1baa629d4470fe979e7119b749fd391e2389d582 100644 --- a/modules/io/src/mol/entity_io_sdf_handler.hh +++ b/modules/io/src/mol/entity_io_sdf_handler.hh @@ -43,6 +43,9 @@ public: virtual bool RequiresBuilder() const; + static String GetFormatName() { return String("Sdf"); } + static String GetFormatDescription() { return String("Structure-data format from Molecular Design Limited"); } + private: void ClearState(); diff --git a/modules/io/src/mol/surface_io_handler.hh b/modules/io/src/mol/surface_io_handler.hh index 671ebde5a4b6fca3adafd47f9a31c255b3c7c62c..aeb84d53742f16f1cb75bad90b8e5b10930dc20a 100644 --- a/modules/io/src/mol/surface_io_handler.hh +++ b/modules/io/src/mol/surface_io_handler.hh @@ -41,6 +41,8 @@ public: virtual bool ProvidesImport(const boost::filesystem::path& loc, const String& type) const = 0; virtual bool ProvidesExport(const boost::filesystem::path& loc, const String& type) const = 0; virtual SurfaceIOHandlerPtr Create() const = 0; + virtual String GetFormatName() const =0; + virtual String GetFormatDescription() const =0; }; typedef boost::shared_ptr<SurfaceIOHandlerFactoryBase> SurfaceIOHandlerFactoryBasePtr; @@ -59,6 +61,15 @@ class SurfaceIOHandlerFactory: public SurfaceIOHandlerFactoryBase virtual SurfaceIOHandlerPtr Create() const { return SurfaceIOHandlerPtr(new HANDLER); } + + virtual String GetFormatName() const { + return HANDLER::GetFormatName(); + } + + virtual String GetFormatDescription() const { + return HANDLER::GetFormatDescription(); + } + }; diff --git a/modules/io/src/mol/surface_io_msms_handler.hh b/modules/io/src/mol/surface_io_msms_handler.hh index 9b7149ee40ec369d38129ccaee3d7a1514874561..4dc0bb456299712f4f5974a1f32dc512346badd1 100644 --- a/modules/io/src/mol/surface_io_msms_handler.hh +++ b/modules/io/src/mol/surface_io_msms_handler.hh @@ -34,6 +34,8 @@ class DLLEXPORT_OST_IO SurfaceIOMSMSHandler: public SurfaceIOHandler const String& format="auto"); static bool ProvidesExport(const boost::filesystem::path& loc, const String& format="auto"); + static String GetFormatName() { return String("Msms"); } + static String GetFormatDescription() { return String("Format used by the MSMS program"); } }; typedef SurfaceIOHandlerFactory<SurfaceIOMSMSHandler> SurfaceIOMSMSHandlerFactory; diff --git a/modules/io/src/seq/clustal_io_handler.hh b/modules/io/src/seq/clustal_io_handler.hh index 50837ac48d78aa3e5527d5e32da0cccdac2b0be8..9a41cb199e7bd823a017d77baf34e47252f4e171 100644 --- a/modules/io/src/seq/clustal_io_handler.hh +++ b/modules/io/src/seq/clustal_io_handler.hh @@ -44,6 +44,9 @@ public: const String& format="auto"); static bool ProvidesExport(const boost::filesystem::path& loc, const String& format="auto"); + static String GetFormatName() { return String("Clustal"); } + static String GetFormatDescription() { return String("Format used by the ClustalW2 software package"); } + }; typedef SequenceIOHandlerFactory<ClustalIOHandler> ClustalIOHandlerFactory; diff --git a/modules/io/src/seq/fasta_io_handler.hh b/modules/io/src/seq/fasta_io_handler.hh index 98817c0a8b187050c66d97278b2af960cad5cb2f..129ac4ea4bc3c11434de50c4ce08061666c49bea 100644 --- a/modules/io/src/seq/fasta_io_handler.hh +++ b/modules/io/src/seq/fasta_io_handler.hh @@ -44,6 +44,9 @@ public: const String& format="auto"); static bool ProvidesExport(const boost::filesystem::path& loc, const String& format="auto"); + static String GetFormatName() { return String("Fasta"); } + static String GetFormatDescription() { return String("Sequence format originally used by the Fasta suite of programs"); } + private: }; diff --git a/modules/io/src/seq/promod_io_handler.hh b/modules/io/src/seq/promod_io_handler.hh index 3515557886e8b2925cd10df4e9fe83143e87b6c1..f052c66418c20263407d8664399b0b3ce7161aa6 100644 --- a/modules/io/src/seq/promod_io_handler.hh +++ b/modules/io/src/seq/promod_io_handler.hh @@ -45,6 +45,9 @@ public: const String& format="auto"); static bool ProvidesExport(const boost::filesystem::path& loc, const String& format="auto"); + + static String GetFormatName() { return String("Fasta"); } + static String GetFormatDescription() { return String("Format used by the SwissModel modeling server"); } }; typedef SequenceIOHandlerFactory<PromodIOHandler> PromodIOHandlerFactory; diff --git a/modules/io/src/seq/sequence_io_handler.hh b/modules/io/src/seq/sequence_io_handler.hh index f8b5ac55a83b41b38755e3c794549c8a7df3d8a4..84249c4fc3a8cd3b3362afb522db9ae7002bd444 100644 --- a/modules/io/src/seq/sequence_io_handler.hh +++ b/modules/io/src/seq/sequence_io_handler.hh @@ -59,6 +59,8 @@ public: virtual bool ProvidesExport(const boost::filesystem::path& loc, const String& type) const = 0; virtual SequenceIOHandlerPtr Create() const = 0; + virtual String GetFormatName() const =0; + virtual String GetFormatDescription() const =0; }; typedef boost::shared_ptr<SequenceIOHandlerFactoryBase> SequenceIOHandlerFactoryBasePtr; @@ -78,6 +80,15 @@ class SequenceIOHandlerFactory: public SequenceIOHandlerFactoryBase { virtual SequenceIOHandlerPtr Create() const { return SequenceIOHandlerPtr(new HANDLER); } + + virtual String GetFormatName() const { + return HANDLER::GetFormatName(); + } + + virtual String GetFormatDescription() const { + return HANDLER::GetFormatDescription(); + } + };