/*!
  \file
  \brief 実行のタイプ管理

  \author Satofumi KAMIMURA

  $Id: ExecutionType.cpp 1198 2009-08-01 23:41:55Z satofumi $
*/

#include "ExecutionType.h"

using namespace qrk;


struct ExecutionType::pImpl
{
  Type type_;


  pImpl(void) : type_(RealDevice)
  {
  }
};


ExecutionType::ExecutionType(void) : pimpl(new pImpl)
{
}


ExecutionType* ExecutionType::object(void)
{
  static ExecutionType singleton_object;
  return &singleton_object;
}


ExecutionType::~ExecutionType(void)
{
}


void ExecutionType::setType(Type type)
{
  if (pimpl->type_ == RealDevice) {
    pimpl->type_ = type;
  }
}


ExecutionType::Type ExecutionType::type(void) const
{
  return pimpl->type_;
}
