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

#include "devices/list/device_list.h"
#include "icd1.h"
#include "icd1_data.h"
#include "icd1_prog.h"

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

const CData PIC16F870_DATA = {  "16F870", 0, 1, { 0x02 } };
const CData PIC16F871_DATA = {  "16F871", 0, 1, { 0x02 } };
const CData PIC16F872_DATA = {  "16F872", 0, 1, { 0x02 } };
const CData PIC16F873_DATA = {  "16F873", 1, 1, { 0x01 } };
const CData PIC16F873A_DATA = {  "16F873A", 1, 1, { 0x01 } };
const CData PIC16F874_DATA = {  "16F874", 1, 1, { 0x01 } };
const CData PIC16F874A_DATA = {  "16F874A", 1, 1, { 0x01 } };
const CData PIC16F876_DATA = {  "16F876", 2, 1, { 0x00 } };
const CData PIC16F876A_DATA = {  "16F876A", 2, 1, { 0x00 } };
const CData PIC16F877_DATA = {  "16F877", 2, 1, { 0x00 } };
const CData PIC16F877A_DATA = {  "16F877A", 2, 1, { 0x00 } };

const CData *DATA_LIST[] = {
&PIC16F870_DATA,&PIC16F871_DATA,&PIC16F872_DATA,&PIC16F873_DATA,&PIC16F873A_DATA,&PIC16F874_DATA,&PIC16F874A_DATA,&PIC16F876_DATA,&PIC16F876A_DATA,&PIC16F877_DATA,
&PIC16F877A_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));
  }
}


}
