/* ReSCAL - Parsing of parameters
 *
 * Copyright (C) 2011
 *
 * Author: Olivier Rozier <rozier@ipgp.fr>
 *
 * This file is part of ReSCAL.
 *
 * ReSCAL is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */


#define NB_PARAM_MAX 100 //nombre max de parametres

typedef struct un_parametre{
  char *nom;
  char *usage;
  void *param;
  unsigned char type;
  unsigned char init;
  unsigned char is_visible;
} Parametre;

enum PARAM_TYPES {PARAM_STRING, PARAM_INT, PARAM_FLOAT, PARAM_DOUBLE};

void init_liste_params();
void param_usage();
void parametre(char *par_nom, char *par_usage, void *par_adr, unsigned char par_type);
void parametre_cache(char *par_nom, char *par_usage, void *par_adr, unsigned char par_type);
int read_int(char* s);
float read_float(char* s);
void lecture_parametres(char *param_file);


