forked from Distributive-Network/PythonMonkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTupleType.hh
More file actions
45 lines (38 loc) · 839 Bytes
/
TupleType.hh
File metadata and controls
45 lines (38 loc) · 839 Bytes
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 TupleType.hh
* @author Giovanni Tedesco (giovanni@distributive.network)
* @brief Struct for representing python tuples
* @version 0.1
* @date 2022-08-19
*
* @copyright Copyright (c) 2022
*
*/
#ifndef PythonMonkey_TupleType_
#define PythonMonkey_TupleType_
#include "include/PyType.hh"
#include "include/TypeEnum.hh"
#include <Python.h>
/**
* @brief A struct to represent the tuple type in python
*
*/
struct TupleType : public PyType {
public:
TupleType(PyObject *obj);
const TYPE returnType = TYPE::TUPLE;
/**
* @brief Gets the tuple item at the given index
*
* @param index The index of the item in question
* @return PyType* Returns a pointer to the appropriate PyType object
*/
PyType *get(int index) const;
/**
* @brief
*
* @returns int length of the tuple
*/
int len() const;
};
#endif