メインページ   モジュール   名前空間一覧   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ    

TOptionMap.hh

解説を見る。
00001 // =====================================================================
00021 // =====================================================================
00022 #ifndef CLDAQ__TOPTIONMAP_HH
00023 #define CLDAQ__TOPTIONMAP_HH
00024 
00025 #include "Tglobals.h"
00026 #include "TOption.hh"
00027 #include "TOptionList.hh"
00028 
00029 
00049 class TOptionMap
00050 {
00051 
00052   private:
00053     TOptionList theOptionList;
00054     TstringList theParameterList;
00055 
00056   public:
00057     TOptionMap();
00058     TOptionMap( const TOptionMap& right );
00059     ~TOptionMap();
00060 
00061   public:
00062     const TOptionMap& operator=( const TOptionMap& right );
00063 
00064   public:
00065     friend Tostream& operator<<( Tostream& tos, const TOptionMap& right );
00066 
00067   public:
00068     Tvoid AddOption( const TOption& option, const Tstring& param = "" );
00069     Tbool HasOption( const TOption& option ) const;
00070     Tbool HasOption( const Tstring& option ) const;
00071     Tstring GetParameter( Tint index ) const;
00072     Tstring GetParameter( const Tstring& optionname ) const;
00073     Tstring GetParameter( const TOption& option ) const;
00074 
00075   public:
00076     const TOptionList& GetOptionList() const;
00077     TOptionList& GetOptionList();
00078     const TstringList& GetParameterList() const;
00079     TstringList GetParameterList();
00080     Tvoid SetOptionList( const TOptionList& options );
00081     Tvoid SetParameterList( const TstringList& params );
00082 
00083 };
00084 
00085 inline const TOptionList& TOptionMap::GetOptionList() const
00086 {
00087   return theOptionList;
00088 }
00089 
00090 inline TOptionList& TOptionMap::GetOptionList()
00091 {
00092   return theOptionList;
00093 }
00094 
00095 inline const TstringList& TOptionMap::GetParameterList() const
00096 {
00097   return theParameterList;
00098 }
00099 
00100 inline TstringList TOptionMap::GetParameterList()
00101 {
00102   return theParameterList;
00103 }
00104 
00105 inline Tvoid TOptionMap::SetOptionList( const TOptionList& options )
00106 {
00107   theOptionList = options;
00108   return;
00109 }
00110 
00111 inline Tvoid TOptionMap::SetParameterList( const TstringList& params )
00112 {
00113   theParameterList = params;
00114   return;
00115 }
00116 
00117 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.12.0)
Go IWAI <goiwai@users.sourceforge.jp>