クラス toppers::itron::cfg_contentsコンフィギュレーションファイルのコンテンツを格納するためのクラス
[詳細]
#include "toppers/itron/cfg_contents.hpp"
toppers::itron::cfg_contentsに対する継承グラフ
[凡例]toppers::itron::cfg_contentsのコラボレーション図
[凡例]すべてのメンバ一覧
|
Public 型 |
typedef std::vector< boost::shared_ptr<
cfg_group > > | group_container |
typedef const boost::shared_ptr<
cfg_contents >(* | builder_type )(text::const_iterator &, text::const_iterator, bool, codeset_t) |
Public メソッド |
| cfg_contents (bool ucn=false, codeset_t codeset=ascii) |
| コンストラクタ
|
| cfg_contents (const std::string &name, bool ucn=false, codeset_t codeset=ascii) |
| コンストラクタ
|
virtual | ~cfg_contents () |
| デストラクタ
|
void | swap (cfg_contents &other) throw () |
| コンフィギュレーションデータの交換
|
group_container & | groups () |
| グループ列への参照の取得
|
const group_container & | groups () const |
| グループ列への参照の取得
|
void | groups (const group_container &container) |
| グループ列の設定
|
void | name (const std::string &str) |
| コンテンツ名の設定
|
const std::string & | name () const |
| コンテンツ名の取得
|
const boost::shared_ptr< std::vector<
boost::shared_ptr< cfg_contents > > > | classify () const |
| コンテンツ内容の分類
|
bool | parse (text::const_iterator &next, text::const_iterator last) |
| コンフィギュレーションファイルの構文解析
|
Protected メソッド |
virtual const boost::shared_ptr<
std::vector< boost::shared_ptr<
cfg_contents > > > | do_classify (bool ucn, codeset_t codeset) const |
| cfg_contents::classify 関数の実体
|
virtual bool | do_parse (text::const_iterator &next, text::const_iterator last, bool ucn, codeset_t codeset) |
| テキストデータの解析
|
説明
コンフィギュレーションファイルのコンテンツを格納するためのクラス
cfg_contents.hpp の 65 行で定義されています。
コンストラクタとデストラクタ
toppers::itron::cfg_contents::cfg_contents |
( |
bool |
ucn = false , |
|
|
codeset_t |
codeset = ascii |
|
) |
[inline, explicit] |
|
toppers::itron::cfg_contents::cfg_contents |
( |
const std::string & |
name, |
|
|
bool |
ucn = false , |
|
|
codeset_t |
codeset = ascii |
|
) |
[inline, explicit] |
|
関数
const boost::shared_ptr<std::vector<boost::shared_ptr<cfg_contents> > > toppers::itron::cfg_contents::classify |
( |
|
) |
const [inline] |
|
|
コンテンツ内容の分類
- 戻り値:
- 分類後のコンテンツ列へのスマートポインタを返す
この関数は、コンテンツ内のグループをカーネル種別に応じた規則にしたがって分類し、 その分類された単位を新たなコンテンツとして配列を生成します。
例えば、マルチプロセッサ向けカーネルの場合、ローカルクラスに対応した各グループ を新たなコンテンツとし、ベクタに格納します。
classify 関数が生成するコンテンツは、最終的には一組の kernel_id.h と kernel_cfg.c を生成するための情報となります。
したがって、メモリ保護拡張のドメインのように、複数のグループを持つコンテンツで あっても、最終的に一組の kernel_id.h と kerenl_cfg.c しか生成する必要がない場合は、 classify 関数で生成されるベクタの要素も1つだけになります。
cfg_contents.hpp の 130 行で定義されています。
参照先 do_classify().
関数の呼び出しグラフ:
|
const boost::shared_ptr< std::vector< boost::shared_ptr< cfg_contents > > > toppers::itron::cfg_contents::do_classify |
( |
bool |
ucn, |
|
|
codeset_t |
codeset |
|
) |
const [protected, virtual] |
|
bool toppers::itron::cfg_contents::do_parse |
( |
text::const_iterator & |
next, |
|
|
text::const_iterator |
last, |
|
|
bool |
ucn, |
|
|
codeset_t |
codeset |
|
) |
[protected, virtual] |
|
|
テキストデータの解析
- 引数:
-
| next | テキストデータの先頭位置および解析終了位置の格納先 |
| last | テキストデータに終端位置+1 |
| ucn | 国際文字名に対応する場合は true を指定 |
| codeset | 文字集合( ascii, shift_jis, euc_jp, utf8 ) |
- 戻り値:
- 解析に成功した場合は true を返す
toppers::itron::fdmp::cfg_contentsで再定義されています。
cfg_contents.cpp の 107 行で定義されています。
参照先 _・toppers::error()・toppers::get_text_line().
参照元 parse(). 00108 {
00109 text::const_iterator iter( next );
00110 if ( iter != last )
00111 {
00112 boost::shared_ptr<cfg_group> g( new cfg_group( "" ) );
00113 if ( !g->parse( iter, last, ucn, codeset ) )
00114 {
00115 return false;
00116 }
00117 if ( iter != last )
00118 {
00119 error( get_text_line( iter ), _( "syntax error" ) );
00120 }
00121 groups_.push_back( g );
00122 }
00123 next = iter;
00124 return true;
00125 }
関数の呼び出しグラフ:
|
void toppers::itron::cfg_contents::groups |
( |
const group_container & |
container |
) |
[inline] |
|
const group_container& toppers::itron::cfg_contents::groups |
( |
|
) |
const [inline] |
|
const std::string& toppers::itron::cfg_contents::name |
( |
|
) |
const [inline] |
|
void toppers::itron::cfg_contents::name |
( |
const std::string & |
str |
) |
[inline] |
|
bool toppers::itron::cfg_contents::parse |
( |
text::const_iterator & |
next, |
|
|
text::const_iterator |
last |
|
) |
|
|
|
コンフィギュレーションファイルの構文解析
- 引数:
-
| next | 解析対象の先頭位置 |
| last | 解析対象の終端位置+1 |
cfg_contents.cpp の 56 行で定義されています。
参照先 do_parse(). 00057 {
00058 text::const_iterator iter( next );
00059 if ( !do_parse( iter, last, ucn_, codeset_ ) )
00060 {
00061 return false;
00062 }
00063 next = iter;
00064 return true;
00065 }
関数の呼び出しグラフ:
|
void toppers::itron::cfg_contents::swap |
( |
cfg_contents & |
other |
) |
throw () |
|
|
コンフィギュレーションデータの交換
- 引数:
-
| other | 交換対象のコンフィギュレーションデータ |
cfg_contents.cpp の 71 行で定義されています。 00072 {
00073 groups_.swap( other.groups_ );
00074 name_.swap( other.name_ );
00075 std::swap( ucn_, other.ucn_ );
00076 std::swap( codeset_, other.codeset_ );
00077 }
|
このクラスの説明は次のファイルから生成されました:
Copyright © 2006 by TAKAGI Nobuhisa.
このページは Wed Apr 12 16:32:05 2006 に Doxygen によって生成されました。
|
|