Adrien 'neox' Bourmault
30f844370c
This commit fixes issues with memory management in the logging code of the FSM. It also optimizes operations by restricting char* pointers, allowing the compiler knowing that they do not overlap. Finally, it encapsulates calls to fsm_add_log in a macro that allows to automatically get file and function names. Signed-off-by: Adrien 'neox' Bourmault <neox@a-lec.org> |
||
---|---|---|
.. | ||
fsm | ||
util | ||
widget | ||
main.c | ||
readme.docs.c |
/** * @file * Gem-graph-client quick documentation (NB see also the Manual) * * @cond LICENSE * This file is part of Gem-graph. * * Copyright © 2021 Libre en Communs <contact@a-lec.org> * Copyright © 2021-2024 Adrien Bourmault <neox@a-lec.org> * Copyright © 2021-2024 Jean Sirmai <jean@a-lec.org> * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, either version 3 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 Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * @endcond * * @details * The code files are all located in the src (sources) directory. * * They are divided according to several *types of organisation*: * * - *hierarchical*: the widgets that give the windows their appearance are * organised in the form of a tree. * Windows are the first level of depth. * Next come the windows contents: the title bars and the pages. * The pages are designed to occupy the windows space below the title bars. * Each of these pages has its own hierarchical structure: it can be divided * into horizontal or vertical strips, which can themselves be divided in the * same way, with varying levels of depth right down to the last containers * which contain lists of widgets such as buttons, bars, entries or images. * * - *list*: the main *sections* of the fsm (finite state machine) constitute * a list of at least four elements, each of which defines a set of possible * states : * -# execute or edit (managing the appropriate tools states in both cases) * -# measure, operate on data, prepare displayable results * -# user preferences * -# desired state of windows and widgets * * The state of the fsm is uniquely defined at all times by all the parameters * listed in these sections. All program actions depend on this state. * * - *transversal*: the other functions that must be easily accessible by all * the previous functions. They are therefore all located at the root. * These are the functions that manage graphics, callbacks and utilities. * Although 'transversal', the log is part of the fsm. * * --- * * @see * Model–view–controller || Model–view–viewmodel || Action–domain–responder || * Multitier_architecture https://en.wikipedia.org/wiki/Multitier_architecture * (presentation, logic, data) */