/* * Factory.hh * * Created on: Dec 11, 2010 * Author: lamikr */ #ifndef FACTORY_HH_ #define FACTORY_HH_ #include #include #include "DeviceConfig.hh" #include "DeviceData.hh" #include "W1Device.hh" #ifndef W1_SCAN_ROOTDIR #define W1_SCAN_ROOTDIR "/sys/bus/w1/devices" #endif namespace w1 { class Factory { public: Factory(); virtual ~Factory(); static W1Device *get_device(int family_code, std::string device_id, dirent *direntry_param); static std::list get_device_list(); static std::list get_device_data_list(); static DeviceConfig *get_device_config(std::string device_id); private: //int parse_family_code(std::string folder_name); static W1Device *create_device(dirent *direntry_param); }; } #endif /* FACTORY_HH_ */