// #### Do not edit: this file is autogenerated !!!

#include "devices/list/device_list.h"
#include "pickit2_bootloader.h"
#include "pickit2_bootloader_data.h"
#include "pickit2_bootloader_prog.h"

namespace Pickit2Bootloader
{
struct CData {
  const char *name;
  uint family;
  uint support;
  Data data;
};

const CData PIC18F2455_DATA = {  "18F2455", 0, 1, {  } };
const CData PIC18F2550_DATA = {  "18F2550", 0, 1, {  } };
const CData PIC18F4455_DATA = {  "18F4455", 0, 1, {  } };
const CData PIC18F4550_DATA = {  "18F4550", 0, 1, {  } };

const CData *DATA_LIST[] = {
&PIC18F2455_DATA,&PIC18F2550_DATA,&PIC18F4455_DATA,&PIC18F4550_DATA,0 
};

const CData *cdata(const TQString &device)
{
  for(uint i=0; DATA_LIST[i]; i++)
    if ( device==DATA_LIST[i]->name ) return DATA_LIST[i];
  return 0;
}
bool isSupported(const TQString &device)
{
  return cdata(device);
}
uint family(const TQString &device)
{
  return cdata(device)->family;
}
::Group::Support support(const TQString &device)
{
  return ::Group::Support::Type(cdata(device)->support);
}
const Data &data(const TQString &device)
{
  return cdata(device)->data;
}

void Group::initSupported()
{
  for (uint i=0; DATA_LIST[i]; i++) {
    const Device::Data *data = Device::lister().data(DATA_LIST[i]->name);
    addDevice(data->name(), data, ::Group::Support::Type(DATA_LIST[i]->support));
  }
}


}
