File indexing completed on 2024-05-05 11:56:00

0001 /*
0002     SPDX-FileCopyrightText: 2012 Martin Kuettler <martin.kuettler@gmail.com>
0003 
0004     SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005 */
0006 
0007 #ifndef _SAGEKEYWORDS_H
0008 #define _SAGEKEYWORDS_H
0009 
0010 #include <QStringList>
0011 
0012 /**
0013   Class to store all Sage keywords (i.e. Python keywords)
0014   It is similar to MaximaKeywords or ScilabKeywords, but for Sage we only
0015   need to store actual keywords, as variables and functions can be fetched from
0016   the backend.
0017  */
0018 
0019 class SageKeywords
0020 {
0021 private:
0022     SageKeywords() = default;
0023     ~SageKeywords() = default;
0024 
0025 public:
0026     static SageKeywords* instance();
0027 
0028     const QStringList& keywords() const;
0029     const QStringList& functions() const;
0030     const QStringList& variables() const;
0031 
0032   private:
0033     void loadKeywords();
0034 
0035     QStringList m_keywords;
0036     QStringList m_functions;
0037     QStringList m_variables;
0038 };
0039 
0040 #endif /* _SAGEKEYWORDS_H */