|
|
factory.hpp説明を見る。00001 /* 00002 * TOPPERS/FDMP Kernel 00003 * Toyohashi Open Platform for Embedded Real-Time Systems/ 00004 * Function Distributed Multiprocessor Kernel 00005 * 00006 * Copyright (C) 2004 by Witz Corporation, JAPAN 00007 * Copyright (C) 2005 by Takagi Nobuhisa 00008 * 00009 * 上記著作権者は,以下の (1)〜(4) の条件か,Free Software Foundation 00010 * によって公表されている GNU General Public License の Version 2 に記 00011 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア 00012 * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下, 00013 * 利用と呼ぶ)することを無償で許諾する. 00014 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 00015 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 00016 * スコード中に含まれていること. 00017 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 00018 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 00019 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 00020 * の無保証規定を掲載すること. 00021 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 00022 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 00023 * と. 00024 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 00025 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 00026 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 00027 * 報告すること. 00028 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 00029 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 00030 * 00031 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 00032 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も 00033 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直 00034 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない. 00035 * 00036 */ 00037 00047 #ifndef TOPPERS_FACTORY_HPP_ 00048 #define TOPPERS_FACTORY_HPP_ 00049 00050 #include "toppers/cmdline.hpp" 00051 #include <vector> 00052 #include <iosfwd> 00053 00054 namespace toppers 00055 { 00056 00057 class kernel_id; 00058 class kernel_cfg; 00059 00064 class factory 00065 { 00066 public: 00070 typedef void ( *kernel_cfg_generator_type )( const kernel_cfg&, std::ostream& ); 00074 typedef void ( *kernel_id_generator_type )( const kernel_id&, std::ostream& ); 00075 00076 factory( const cmdline::option_array& options, const std::string& version ); 00080 virtual ~factory() {} 00081 const boost::shared_ptr<kernel_id> create_kernel_id() const; 00082 const boost::shared_ptr<kernel_cfg> create_kernel_cfg() const; 00083 const boost::shared_ptr<std::vector<kernel_cfg_generator_type> > create_kernel_cfg_generators() const; 00084 const boost::shared_ptr<std::vector<kernel_id_generator_type> > create_kernel_id_generators() const; 00085 const boost::shared_ptr<cmdline::option_array>& options() const; 00086 const std::string& version() const; 00087 protected: 00088 const std::string get_cfg_file_name( const std::string& file ) const { return do_get_cfg_file_name( file ); } 00089 const std::string get_cfg_file_name( const std::string& option, const std::string& default_name ) const; 00090 virtual const boost::shared_ptr<kernel_id> do_create_kernel_id( const std::string& file ) const = 0; 00091 virtual const boost::shared_ptr<kernel_cfg> do_create_kernel_cfg( const std::string& file, const std::string& id_file ) const = 0; 00092 virtual const boost::shared_ptr<std::vector<kernel_cfg_generator_type> > do_create_kernel_cfg_generators() const = 0; 00093 virtual const boost::shared_ptr<std::vector<kernel_id_generator_type> > do_create_kernel_id_generators() const = 0; 00094 virtual const std::string do_get_cfg_file_name( const std::string& file ) const; 00095 static void create_sub_directory( const std::string& dir ); 00096 private: 00097 boost::shared_ptr<cmdline::option_array> options_; 00098 std::string version_; 00099 }; 00100 00101 } 00102 00103 #endif // ! TOPPERS_FACTORY_HPP_ Copyright © 2006 by TAKAGI Nobuhisa. このページは Wed Apr 12 16:31:56 2006 に Doxygen によって生成されました。 |