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

TOptionMap.hh

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

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