//
//  Structures.h
//  ordi
//
//  Created by léo LELLOUCHE on 20/05/2016.
//  Copyright © 2016 léo LELLOUCHE. All rights reserved.
//

#ifndef Structures_h
#define Structures_h

typedef struct s_base
{
    char    *marque;
    char    *modele;
    char    *USP;
    double  fiabilite;
    char    *restriction;
    int     prix;
    int     conso;
}               t_base;

typedef struct s_carte_mere
{
    t_base  base;
    char    *socket;
    int     nb_socket;
    int     nb_RAM;
    int     version_RAM;
    int     nb_PCIE;
    int     nb_IDE;
    int     nb_SATA;
    int     nb_USB;
    int     nb_VGA;
    int     nb_DVI;
    int     nb_LAN;
    char    *format_carte;
    int     overclocking;
}       t_carte_mere;

typedef struct s_RAM
{
    t_base  base;
    int     version;
    int     frequence;
    int     capacite;
    int     perf;
    int     overclocking;
}               t_RAM;

typedef struct s_processeur
{
    t_base  base;
    char    *socket;
    int     frequence;
    int     nb_RAM;
    int     perf;
    int     overclocking;
}               t_processeur;

typedef struct s_graphic
{
    t_base  base;
    int     nb_VGA;
    int     nb_DVI;
    int     nb_HDMI;
    int     nb_MiniDP;
    int     perf;
    int     overclocking;
}               t_graphic;

typedef struct s_HDD
{
    t_base  base;
    int     capacite;
    char    *type_port;
    int     perf;
}               t_HDD;

typedef struct s_ecran
{
    t_base  base;
    int     size;
    int     resolution;
    char    *port;
    int     perf;
}               t_ecran;

typedef struct s_soft
{
    char    *nom_logiciel;
    int     RAM;
    int     disque;
    int     graphic;
    int     processeur;
    char    *USP;
}               t_soft;

typedef struct s_config
{
    t_carte_mere    *carte_mere;
    t_RAM           *RAM;
    t_processeur    *processeur;
    t_graphic       *graphic;
    t_HDD           *HDD;
    int             prix;
}               t_config;

typedef struct s_donnees
{
    t_carte_mere    *cartes_mere;
    t_RAM           *RAM;
    t_processeur    *processeurs;
    t_graphic       *graphic;
    t_HDD           *HDD;
    t_ecran         *ecrans;
    t_soft          *softs;
    t_config        *configs;
}               t_donnees;

typedef struct s_besoin
{
    int perf_proco_min;
    int RAM_min;
    int graphic_min;
    int prix_max;
    int conso_max;
}               t_besoin;

#endif /* Structures_h */
