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

TOptionMap.hh

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

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