1 /* EXTRAITS DE LA LICENCE 2 Copyright CEA, contributeurs : Luc BILLARD et Damien 3 CALISTE, laboratoire L_Sim, (2001-2005) 4 5 Adresse mèl : 6 BILLARD, non joignable par mèl ; 7 CALISTE, damien P caliste AT cea P fr. 8 9 Ce logiciel est un programme informatique servant à visualiser des 10 structures atomiques dans un rendu pseudo-3D. 11 12 Ce logiciel est régi par la licence CeCILL soumise au droit français et 13 respectant les principes de diffusion des logiciels libres. Vous pouvez 14 utiliser, modifier et/ou redistribuer ce programme sous les conditions 15 de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA 16 sur le site "http://www.cecill.info". 17 18 Le fait que vous puissiez accéder à cet en-tête signifie que vous avez 19 pris connaissance de la licence CeCILL, et que vous en avez accepté les 20 termes (cf. le fichier Documentation/licence.fr.txt fourni avec ce logiciel). 21 */ 22 23 /* LICENCE SUM UP 24 Copyright CEA, contributors : Luc BILLARD et Damien 25 CALISTE, laboratoire L_Sim, (2001-2005) 26 27 E-mail address: 28 BILLARD, not reachable any more ; 29 CALISTE, damien P caliste AT cea P fr. 30 31 This software is a computer program whose purpose is to visualize atomic 32 configurations in 3D. 33 34 This software is governed by the CeCILL license under French law and 35 abiding by the rules of distribution of free software. You can use, 36 modify and/ or redistribute the software under the terms of the CeCILL 37 license as circulated by CEA, CNRS and INRIA at the following URL 38 "http://www.cecill.info". 39 40 The fact that you are presently reading this means that you have had 41 knowledge of the CeCILL license and that you accept its terms. You can 42 find a copy of this licence shipped with this software at Documentation/licence.en.txt. 43 */ 44 45 #ifndef TOOLCONFIGFILE_H 46 #define TOOLCONFIGFILE_H 47 48 #include <glib.h> 49 50 /** 51 * TOOL_CONFIG_FILE_ERROR: 52 * 53 * Domain used to parse config files. 54 */ 55 #define TOOL_CONFIG_FILE_ERROR tool_config_file_getQuark() 56 GQuark tool_config_file_getQuark(); 57 /** 58 * ToolConfigFileError: 59 * @TOOL_CONFIG_FILE_ERROR_EMPTY_LINE: error when reading the file, found an empty line, 60 * where something should have been. 61 * @TOOL_CONFIG_FILE_ERROR_VALUE: error of file format, values read are out of bounds. 62 * @TOOL_CONFIG_FILE_ERROR_READ: error of file format (can't read variables...). 63 * @TOOL_CONFIG_FILE_ERROR_MISSING: error of file format (missing 64 * variables...). 65 * @TOOL_CONFIG_FILE_ERROR_TAG: error dealing with a tag. 66 * @TOOL_CONFIG_FILE_ERROR_MARKUP: error dealing with a markup (unkown 67 * one...). 68 * @TOOL_CONFIG_FILE_ERROR_NO_FILE: no valid file found on disk. 69 * 70 * Possible errors when parsing a config file. 71 */ 72 typedef enum 73 { 74 TOOL_CONFIG_FILE_ERROR_EMPTY_LINE, 75 TOOL_CONFIG_FILE_ERROR_VALUE, 76 TOOL_CONFIG_FILE_ERROR_READ, 77 TOOL_CONFIG_FILE_ERROR_MISSING, 78 TOOL_CONFIG_FILE_ERROR_TAG, 79 TOOL_CONFIG_FILE_ERROR_MARKUP, 80 TOOL_CONFIG_FILE_ERROR_NO_FILE 81 } ToolConfigFileError; 82 83 gboolean tool_config_file_readFloatFromTokens(gchar **tokens, int *position, float *values, 84 guint size, int lineId, GError **error); 85 gboolean tool_config_file_readFloat(gchar *line, int position, float *values, 86 guint size, GError **error); 87 88 gboolean tool_config_file_readIntegerFromTokens(gchar **tokens, int *position, int *values, 89 guint size, int lineId, GError **error); 90 gboolean tool_config_file_readInteger(gchar *line, int position, int *values, 91 guint size, GError **error); 92 93 gboolean tool_config_file_readBooleanFromTokens(gchar **tokens, int *position, 94 gboolean *values, guint size, 95 int lineId, GError **error); 96 gboolean tool_config_file_readBoolean(gchar *line, int position, gboolean *values, 97 guint size, GError **error); 98 99 gboolean tool_config_file_readStringFromTokens(gchar **tokens, int *position, 100 gchar ***values, guint size, 101 int lineId, GError **error); 102 gboolean tool_config_file_readString(gchar *line, int position, gchar ***values, 103 guint size, gboolean join, GError **error); 104 105 gboolean tool_config_file_clampFloat(float *variable, float value, float min, float max); 106 gboolean tool_config_file_clampInt(int *variable, int value, int min, int max); 107 108 109 #endif 110