00001 //-------------------------------------------------- 00012 //--------------------------------------------------- 00013 00014 #ifndef IMEDGINE_DATA_IO_FACTORY_H 00015 #define IMEDGINE_DATA_IO_FACTORY_H 00016 00017 #include "data_io.h" 00018 #include "../exceptions/format_not_supported_exception.h" 00019 00020 #include <string> 00021 #include <map> 00022 00023 namespace imedgine 00024 { 00025 //-------------------------------------------------- 00043 //-------------------------------------------------- 00044 00045 class DataIOFactory 00046 { 00047 public: 00048 00049 //--------------------------------------------------- 00052 00053 typedef boost::shared_ptr<DataIO> data_io_type; 00054 00055 //--------------------------------------------------- 00058 00059 DataIOFactory(); 00060 00061 //--------------------------------------------------- 00064 00065 ~DataIOFactory(); 00066 00067 //-------------------------------------------------- 00074 00075 data_io_type createDataIO(std::string extension) 00076 throw(FormatNotSupportedException); 00077 00078 protected: 00079 //-------------------------------------------------- 00082 00083 typedef std::map<std::string, data_io_type> data_io_map_type; 00084 00085 //-------------------------------------------------- 00088 00089 typedef std::pair<std::string, data_io_type> data_io_map_pair_type; 00090 00091 //-------------------------------------------------- 00094 00095 data_io_map_type data_io_map_; 00096 }; 00097 } 00098 00099 #endif //IMEDGINE_DATA_IMPORTER_FACTORY_H