|
|
cfg_contents.hpp説明を見る。00001 /* 00002 * TOPPERS/FDMP Kernel 00003 * Toyohashi Open Platform for Embedded Real-Time Systems/ 00004 * Function Distributed Multiprocessor Kernel 00005 * 00006 * Copyright (C) 2005 by Takagi Nobuhisa 00007 * 00008 * 上記著作権者は,以下の (1)〜(4) の条件か,Free Software Foundation 00009 * によって公表されている GNU General Public License の Version 2 に記 00010 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア 00011 * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下, 00012 * 利用と呼ぶ)することを無償で許諾する. 00013 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作 00014 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー 00015 * スコード中に含まれていること. 00016 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使 00017 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用 00018 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記 00019 * の無保証規定を掲載すること. 00020 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使 00021 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ 00022 * と. 00023 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著 00024 * 作権表示,この利用条件および下記の無保証規定を掲載すること. 00025 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに 00026 * 報告すること. 00027 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損 00028 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること. 00029 * 00030 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お 00031 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も 00032 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直 00033 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない. 00034 * 00035 */ 00036 00046 #ifndef TOPPERS_ITRON_CFG_CONTENTS_HPP_ 00047 #define TOPPERS_ITRON_CFG_CONTENTS_HPP_ 00048 00049 #include "toppers/itron/cfg_group.hpp" 00050 #include <vector> 00051 #include <string> 00052 00053 namespace toppers 00054 { 00055 namespace itron 00056 { 00057 00058 class kernel_object; 00059 00065 class cfg_contents 00066 { 00067 public: 00068 typedef std::vector<boost::shared_ptr<cfg_group> > group_container; 00069 typedef const boost::shared_ptr<cfg_contents> ( *builder_type )( text::const_iterator&, text::const_iterator, bool, codeset_t ); 00070 00076 explicit cfg_contents( bool ucn = false, codeset_t codeset = ascii ) : ucn_( ucn ), codeset_( codeset ) {} 00083 explicit cfg_contents( const std::string& name, bool ucn = false, codeset_t codeset = ascii ) : name_( name ), ucn_( ucn ), codeset_( codeset ) {} 00087 virtual ~cfg_contents() {} 00088 00089 void swap( cfg_contents& other ) throw(); 00094 group_container& groups() { return groups_; } 00099 const group_container& groups() const { return groups_; } 00104 void groups( const group_container& container ) { groups_ = container; } 00109 void name( const std::string& str ) { name_ = str; } 00114 const std::string& name() const { return name_; } 00130 const boost::shared_ptr<std::vector<boost::shared_ptr<cfg_contents> > > classify() const { return do_classify( ucn_, codeset_ ); } 00136 bool parse( text::const_iterator& next, text::const_iterator last ); 00137 protected: 00138 virtual const boost::shared_ptr<std::vector<boost::shared_ptr<cfg_contents> > > do_classify( bool ucn, codeset_t codeset ) const; 00139 virtual bool do_parse( text::const_iterator& next, text::const_iterator last, bool ucn, codeset_t codeset ); 00140 private: 00141 group_container groups_; 00142 std::string name_; 00143 bool ucn_; 00144 codeset_t codeset_; 00145 }; 00146 00147 } 00148 } 00149 00150 #endif // ! TOPPERS_ITRON_CFG_CONTENTS_HPP_ Copyright © 2006 by TAKAGI Nobuhisa. このページは Wed Apr 12 16:31:56 2006 に Doxygen によって生成されました。 |