// =====================================================================
/*!
//
//  \file TRunInformation.hh
//  \brief This file contains the TRunInformation class.
//  \author Go IWAI <goiwai@users.sourceforge.jp>
//
//  $Id: TRunInformation.hh,v 1.6 2004/03/07 10:30:34 goiwai Exp $
//  $Name: CLDAQ-1-14-03 $
//  $Log: TRunInformation.hh,v $
//  Revision 1.6  2004/03/07 10:30:34  goiwai
//  ROOTに組みこむためのおまじないマクロを埋めこみました。
//  全てにおいて完全に動作するわけではありません。
//
//  Revision 1.5  2004/01/19 21:09:43  goiwai
//  プリプロセッサの接頭辞をCLDAQ__に変更しました.
//
//  Revision 1.4  2003/11/03 08:35:14  goiwai
//  Doxygen用のタグとコメントをうちこんでいく試みを開始しました.
//
//  Revision 1.3  2003/10/06 17:02:45  goiwai
//  *** empty log message ***
//
//  Revision 1.2  2003/07/30 16:20:30  goiwai
//  ファイルにコミットログをつけることにしました.
//
*/
// =====================================================================
#ifndef CLDAQ__TRUNINFORMATION_HH
#define CLDAQ__TRUNINFORMATION_HH

#include "Tglobals.h"

class TOutputHtmlFileStream;


/*!
// \example
//
// If example code exists.
//
*/

/*!
// \class TRunInformation
// \brief This is the TRunInformation class.
// \author Go IWAI <goiwai@users.sourceforge.jp>
//
// The TRunInformation class detail description.
// Write it down ASAP!
//
// \todo None?
// \bug None?
// \ingroup RunCategory
*/
class TRunInformation
{

  private:
    Truninfo_t theInformationType;
    Tstring theItem;
    Tstring theDefaultValue;
    Tstring theValue;
    TstringList theSelectableList;

  public:
    TRunInformation();
    TRunInformation( const Tstring& item );
    TRunInformation( const Tstring& item, Truninfo_t type );
    TRunInformation( const Tstring& item, const TstringList& list );
    TRunInformation( const Tstring& item, const Tstring& value );
    TRunInformation( const Tstring& item, const Tstring& value, Truninfo_t type );
    TRunInformation( const Tstring& item, const Tstring& value, const TstringList& list );
    TRunInformation( const TRunInformation& right );
    ~TRunInformation();

  public:
    const TRunInformation& operator=( const TRunInformation& right );
    Tbool operator==( const TRunInformation& right ) const;
    Tbool operator!=( const TRunInformation& right ) const;
    friend Tostream& operator<<( Tostream& tos, const TRunInformation& right );
    friend TOutputHtmlFileStream& operator<<( TOutputHtmlFileStream& html, const TRunInformation& right );
    friend Tvoid SetInformation( TRunInformation& info );

  public:
    Truninfo_t GetInformationType() const;
    const Tstring& GetItem() const;
    const Tstring& GetDefaultValue() const;
    const Tstring& GetValue() const;
    const TstringList& GetSelectableList() const;
    Tvoid SetInformationType( Truninfo_t info );
    Tvoid SetItem( const Tstring& item );
    Tvoid SetDefaultValue( const Tstring& value );
    Tvoid SetValue( const Tstring& value );
    Tvoid SetSelectableList( const TstringList& list );

  public:
    Tvoid Clear();

  private:
    Tvoid setFreeValue();
    Tvoid setSelectableValue();
    Tvoid setFreeText();
    Tvoid setInformation();

#ifdef __CLDAQ_ROOT_DLL
    ClassDef(TRunInformation,0)
#endif

};

inline Truninfo_t TRunInformation::GetInformationType() const
{
  return theInformationType;
}

inline const Tstring& TRunInformation::GetItem() const
{
  return theItem;
}

inline const Tstring& TRunInformation::GetDefaultValue() const
{
  return theDefaultValue;
}

inline const Tstring& TRunInformation::GetValue() const
{
  return theValue;
}

inline const TstringList& TRunInformation::GetSelectableList() const
{
  return theSelectableList;
}

inline Tvoid TRunInformation::SetInformationType( Truninfo_t info )
{
  theInformationType = info;
  return;
}

inline Tvoid TRunInformation::SetItem( const Tstring& item )
{
  theItem = item;
  return;
}

inline Tvoid TRunInformation::SetDefaultValue( const Tstring& value )
{
  theDefaultValue = value;
  return;
}

inline Tvoid TRunInformation::SetValue( const Tstring& value )
{
  theValue = value;
  return;
}

inline Tvoid TRunInformation::SetSelectableList( const TstringList& list )
{
  theSelectableList = list;
  theInformationType = tInfoSelectableValue;
  return;
}

#endif
