#include "stdafx.h"

#include "Overview.h"
#include "FindDialogBE.h"
#include "Wb.h"

namespace MySQL {
namespace Workbench {
  
String^ WbContext::read_state(String^ name, String^ domain, String^ default_value)
{
  std::string value= inner->get_wb()->read_state(NativeToCppString(name), NativeToCppString(domain), 
    NativeToCppString(default_value));
  
  return CppStringToNative(value);
}

int WbContext::read_state(String^ name, String^ domain, const int default_value)
{
  int value= inner->get_wb()->read_state(NativeToCppString(name), NativeToCppString(domain), 
    default_value);
  
  return value;
}

double WbContext::read_state(String^ name, String^ domain, const double default_value)
{
  double value= inner->get_wb()->read_state(NativeToCppString(name), NativeToCppString(domain), 
    default_value);
  
  return value;
}

bool WbContext::read_state(String^ name, String^ domain, const bool default_value)
{
  bool value= inner->get_wb()->read_state(NativeToCppString(name), NativeToCppString(domain), 
    default_value);
  
  return value;
}

void WbContext::save_state(String^ name, String^ domain, String^ value)
{
  inner->get_wb()->save_state(NativeToCppString(name), NativeToCppString(domain), 
    NativeToCppString(value));
}

void WbContext::save_state(String^ name, String^ domain, const int value)
{
  inner->get_wb()->save_state(NativeToCppString(name), NativeToCppString(domain), value);
}

void WbContext::save_state(String^ name, String^ domain, const double value)
{
  inner->get_wb()->save_state(NativeToCppString(name), NativeToCppString(domain), value);
}

void WbContext::save_state(String^ name, String^ domain, const bool value)
{
  inner->get_wb()->save_state(NativeToCppString(name), NativeToCppString(domain), value);
}

} // namespace Workbench
} // namespace MySQL