File: nonetype.h

package info (click to toggle)
kdevelop-python 24.12.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 12,640 kB
  • sloc: python: 183,048; cpp: 18,798; xml: 140; sh: 14; makefile: 9
file content (42 lines) | stat: -rw-r--r-- 957 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
    SPDX-FileCopyrightText: 2017 Francis Herne <mail@flherne.uk>

    SPDX-License-Identifier: GPL-2.0-or-later
*/

#ifndef PYTHON_NONETYPE_H
#define PYTHON_NONETYPE_H

#include <language/duchain/types/integraltype.h>
#include "pythonduchainexport.h"

using namespace KDevelop;

namespace Python {

typedef IntegralTypeData NoneTypeData;

/**
 * The only purpose of this class is to override IntegralType::toString().
 * TODO: improve kdevplatform API to allow custom strings sanely.
 */
class KDEVPYTHONDUCHAIN_EXPORT NoneType: public IntegralType
{
public:
    /// Default constructor
    explicit NoneType();
    /// Copy constructor. \param rhs type to copy
    NoneType(const NoneType& rhs);
    /// Constructor using raw data. \param data internal data.
    explicit NoneType(IntegralTypeData& data);

    AbstractType* clone() const override;

    enum { Identity = 64 };

    QString toString() const override;
};

}

#endif // PYTHON_NONETYPE_H