Version initiale

Dependencies:   mbed

Fork of Le_Pont_V10116 by SAGNES Christophe

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers Parametre.h Source File

Parametre.h

00001 /*
00002  * Parametre.h
00003  *
00004  *  Created on: 6 sept. 2017
00005  *      Author: christophe.sagnes
00006  */
00007 
00008 #ifndef PARAMETRE_H_
00009 #define PARAMETRE_H_
00010 
00011 #include <string>
00012 #include <vector>
00013 
00014 using namespace std;
00015 
00016 union   valeur_u {
00017     char    str[32];
00018     bool    boolean;
00019     int     entier;
00020     double  dbl;
00021 };
00022 
00023 template < class T >
00024 struct valeur_t {
00025     T   courante ;
00026     T   defaut ;
00027     T   min ;
00028     T   max ;
00029 };
00030 
00031 template <>
00032 struct valeur_t <string>{
00033     string  courante ;
00034     string  defaut ;
00035 };
00036 
00037 template < class T >
00038 struct parametre_t {
00039     string          section ;
00040     string          label ;
00041     T           type ;
00042     valeur_t <T>    valeur ;
00043 };
00044 
00045 
00046 
00047 #endif /* PARAMETRE_H_ */