-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPyBool.h
More file actions
46 lines (37 loc) · 1.01 KB
/
PyBool.h
File metadata and controls
46 lines (37 loc) · 1.01 KB
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
43
44
45
/*
* File: PyBool.h
* Author: Kent D. Lee
* (c) 2013
* Created on February 16, 2013, 4:05 PM
*
* License:
* Please read the LICENSE file in this distribution for details regarding
* the licensing of this code. This code is freely available for educational
* use. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
*
* Description:
* PyBool objects are the CoCo implementation of boolean values.
*/
#ifndef PYBOOL_H
#define PYBOOL_H
#include "PyType.h"
#include "PyCallable.h"
#include <string>
using namespace std;
class PyBool : public PyObject {
public:
PyBool();
PyBool(bool val);
PyBool(const PyBool& orig);
virtual ~PyBool();
PyType* getType();
string toString();
bool getVal();
protected:
bool val;
virtual PyObject* __float__(vector<PyObject*>* args);
virtual PyObject* __int__(vector<PyObject*>* args);
virtual PyObject* __bool__(vector<PyObject*>* args);
virtual PyObject* __eq__(vector<PyObject*>* args);
};
#endif /* PYBOOL_H */