クラス toppers::itron::fdmp::cfg_factory

コンフィギュレータ専用のファクトリークラス [詳細]

#include "toppers/itron/fdmp/cfg_factory.hpp"

toppers::itron::fdmp::cfg_factoryに対する継承グラフ

Inheritance graph
[凡例]
toppers::itron::fdmp::cfg_factoryのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Public メソッド

 cfg_factory (const cmdline::option_array &options, const std::string &version, long prid)
 コンストラクタ

Static Public メソッド

static const boost::shared_ptr<
itron::cfg_factory
build (const cmdline::option_array &options, const std::string &version)
 ファクトリ自体の生成

Protected メソッド

virtual const boost::shared_ptr<
itron::cfg_contents
do_create_cfg_contents (text::const_iterator &next, text::const_iterator last, bool ucn, codeset_t codeset) const
virtual const std::string do_get_cfg_file_name (const std::string &file) const
 設定ファイル名の取得
virtual const boost::shared_ptr<
std::vector< kernel_cfg_generator_type > > 
do_create_kernel_cfg_generators () const
 create_kernel_cfg_generators から呼び出される実際の処理
virtual const boost::shared_ptr<
std::vector< kernel_id_generator_type > > 
do_create_kernel_id_generators () const
 create_kernel_id_generators から呼び出される実際の処理
virtual const boost::shared_ptr<
std::vector< kernel_object::builder_type > > 
do_get_kernel_object_builders () const
 create_kernel_object 関数内で使用する生成関数群の取得
virtual const boost::shared_ptr<
std::vector< std::string > > 
do_get_kernel_object_names () const
virtual extra_initializer_type do_get_extra_initializer () const
virtual const boost::shared_ptr<
kernel_chk
do_create_kernel_chk () const

説明

コンフィギュレータ専用のファクトリークラス

cfg_factory.hpp58 行で定義されています。


コンストラクタとデストラクタ

toppers::itron::fdmp::cfg_factory::cfg_factory const cmdline::option_array options,
const std::string &  version,
long  prid
 

コンストラクタ

引数:
options コマンドラインオプション
version カーネルのバージョン文字列("JSP"等)
prid TKERNEL_PRID マクロの値

toppers::itron::cfg_factoryを再定義しています。

cfg_factory.cpp59 行で定義されています。

参照元 build().

00060         : itron::cfg_factory( options, version, prid )
00061       {
00062       }


関数

const boost::shared_ptr< itron::cfg_factory > toppers::itron::fdmp::cfg_factory::build const cmdline::option_array options,
const std::string &  version
[static]
 

ファクトリ自体の生成

引数:
options コマンドラインオプション
version バージョン文字列("FDMP"等)
cfg_factory クラスはSingletonというわけではないため、普通にコンストラクタを呼び 出して生成することもできますが、 build 関数を使用することで、 register_builder 関数を用いて登録した生成関数の中から、コマンドラインオプションやバージョン に適合するクラスを選択して生成することができるようになります。

toppers::itron::cfg_factoryを再定義しています。

cfg_factory.cpp74 行で定義されています。

参照先 toppers::itron::cfg_factory::build()cfg_factory()toppers::factory::options().

参照元 toppers::itron::fdmp::register_factory().

00075       {
00076         boost::shared_ptr<itron::cfg_factory> ptr;
00077         const char* ver = version.c_str();
00078         if ( std::strncmp( ver, "FDMP", 2 ) == 0 || std::strncmp( ver, "fdmp", 2 ) == 0 )
00079         {
00080           if ( ver[2] == '-' )
00081           {
00082             ver = ver + 3;
00083           }
00084           else
00085           {
00086             ver = "";
00087           }
00088           boost::shared_ptr<itron::cfg_factory> base( itron::cfg_factory::build( options, ver ) );
00089           if ( !!base )
00090           {
00091             ptr.reset( new cfg_factory( options, version, -1L ) );
00092             boost::static_pointer_cast<cfg_factory>( ptr )->base_factory_ = base;
00093           }    
00094         }
00095         return ptr;
00096       }

関数の呼び出しグラフ:

const boost::shared_ptr< std::vector< factory::kernel_cfg_generator_type > > toppers::itron::fdmp::cfg_factory::do_create_kernel_cfg_generators  )  const [protected, virtual]
 

create_kernel_cfg_generators から呼び出される実際の処理

戻り値:
kernel_cfg.c用の生成関数群を指すスマートポインタを返す

toppers::factoryを実装しています。

cfg_factory.cpp120 行で定義されています。

00121       {
00122         return base_factory_->create_kernel_cfg_generators();
00123       }

const boost::shared_ptr< std::vector< factory::kernel_id_generator_type > > toppers::itron::fdmp::cfg_factory::do_create_kernel_id_generators  )  const [protected, virtual]
 

create_kernel_id_generators から呼び出される実際の処理

戻り値:
kernel_id.h用の生成関数群を指すスマートポインタを返す

toppers::factoryを実装しています。

cfg_factory.cpp125 行で定義されています。

00126       {
00127         return base_factory_->create_kernel_id_generators();
00128       }

const std::string toppers::itron::fdmp::cfg_factory::do_get_cfg_file_name const std::string &  file  )  const [protected, virtual]
 

設定ファイル名の取得

引数:
file ファイル名
戻り値:
設定ファイル名を返す

toppers::factoryを再定義しています。

cfg_factory.cpp108 行で定義されています。

参照先 toppers::itron::cfg_factory::get_contents().

00109       {
00110         boost::filesystem::path path( file, boost::filesystem::native );
00111         boost::shared_ptr<itron::cfg_contents> contents( get_contents() );
00112         if ( !!contents && !contents->name().empty() )
00113         {
00114           boost::filesystem::path dir( contents->name(), boost::filesystem::native );
00115           path = dir/path;
00116         }
00117         return itron::cfg_factory::do_get_cfg_file_name( path.native_file_string() );
00118       }

関数の呼び出しグラフ:

const boost::shared_ptr< std::vector< kernel_object::builder_type > > toppers::itron::fdmp::cfg_factory::do_get_kernel_object_builders  )  const [protected, virtual]
 

create_kernel_object 関数内で使用する生成関数群の取得

戻り値:
生成関数群のベクターへのスマートポインタを返す

toppers::itron::cfg_factoryを実装しています。

cfg_factory.cpp130 行で定義されています。

00131       {
00132         return base_factory_->get_kernel_object_builders();
00133       }


このクラスの説明は次のファイルから生成されました:
Copyright © 2006 by TAKAGI Nobuhisa.
このページは Wed Apr 12 16:32:07 2006 に Doxygen によって生成されました。