"""
/***************************************************************************
 Topaze
                                 A QGIS plugin
 Configuration LSCI
                              -------------------
        begin                : 2025-06-03
        git sha              : $Format:%H$
        copyright            : (C) 2025 by Jean-Marie Arsac
        email                : jmarsac@azimut.fr
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program 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.                                   *
 *                                                                         *
 ***************************************************************************/
"""

import yaml


class BridgeLsci:
    def __init__(self, lsci_file: str):
        """Constructor

        :param lsci_file: _description_
        :type lsci_file: str
        """
        self._qlsc = None
        try:
            yaml_load = yaml.full_load
        except AttributeError:
            yaml_load = yaml.load

        with open(lsci_file) as f:
            try:
                self._qlsc = yaml_load(f)
            except Exception as e:
                print(str(e))
        pass

    def qlsc(self):
        return self._qlsc
