Blender  V2.93
BPy_EqualToTimeStampUP1D.cpp
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 using namespace Freestyle;
28 
30 
31 //------------------------INSTANCE METHODS ----------------------------------
32 
34  "Class hierarchy: :class:`freestyle.types.UnaryPredicate1D` > :class:`EqualToTimeStampUP1D`\n"
35  "\n"
36  ".. method:: __init__(ts)\n"
37  "\n"
38  " Builds a EqualToTimeStampUP1D object.\n"
39  "\n"
40  " :arg ts: A time stamp value.\n"
41  " :type ts: int\n"
42  "\n"
43  ".. method:: __call__(inter)\n"
44  "\n"
45  " Returns true if the Interface1D's time stamp is equal to a certain\n"
46  " user-defined value.\n"
47  "\n"
48  " :arg inter: An Interface1D object.\n"
49  " :type inter: :class:`freestyle.types.Interface1D`\n"
50  " :return: True if the time stamp is equal to a user-defined value.\n"
51  " :rtype: bool\n";
52 
54  PyObject *args,
55  PyObject *kwds)
56 {
57  static const char *kwlist[] = {"ts", nullptr};
58  unsigned u;
59 
60  if (!PyArg_ParseTupleAndKeywords(args, kwds, "I", (char **)kwlist, &u)) {
61  return -1;
62  }
63  self->py_up1D.up1D = new Predicates1D::EqualToTimeStampUP1D(u);
64  return 0;
65 }
66 
67 /*-----------------------BPy_EqualToTimeStampUP1D type definition ------------------------------*/
68 
69 PyTypeObject EqualToTimeStampUP1D_Type = {
70  PyVarObject_HEAD_INIT(nullptr, 0) "EqualToTimeStampUP1D", /* tp_name */
71  sizeof(BPy_EqualToTimeStampUP1D), /* tp_basicsize */
72  0, /* tp_itemsize */
73  nullptr, /* tp_dealloc */
74  0, /* tp_vectorcall_offset */
75  nullptr, /* tp_getattr */
76  nullptr, /* tp_setattr */
77  nullptr, /* tp_reserved */
78  nullptr, /* tp_repr */
79  nullptr, /* tp_as_number */
80  nullptr, /* tp_as_sequence */
81  nullptr, /* tp_as_mapping */
82  nullptr, /* tp_hash */
83  nullptr, /* tp_call */
84  nullptr, /* tp_str */
85  nullptr, /* tp_getattro */
86  nullptr, /* tp_setattro */
87  nullptr, /* tp_as_buffer */
88  Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
89  EqualToTimeStampUP1D___doc__, /* tp_doc */
90  nullptr, /* tp_traverse */
91  nullptr, /* tp_clear */
92  nullptr, /* tp_richcompare */
93  0, /* tp_weaklistoffset */
94  nullptr, /* tp_iter */
95  nullptr, /* tp_iternext */
96  nullptr, /* tp_methods */
97  nullptr, /* tp_members */
98  nullptr, /* tp_getset */
99  &UnaryPredicate1D_Type, /* tp_base */
100  nullptr, /* tp_dict */
101  nullptr, /* tp_descr_get */
102  nullptr, /* tp_descr_set */
103  0, /* tp_dictoffset */
104  (initproc)EqualToTimeStampUP1D___init__, /* tp_init */
105  nullptr, /* tp_alloc */
106  nullptr, /* tp_new */
107 };
108 
110 
111 #ifdef __cplusplus
112 }
113 #endif
PyTypeObject EqualToTimeStampUP1D_Type
static int EqualToTimeStampUP1D___init__(BPy_EqualToTimeStampUP1D *self, PyObject *args, PyObject *kwds)
static char EqualToTimeStampUP1D___doc__[]
PyTypeObject UnaryPredicate1D_Type
inherits from class Rep
Definition: AppCanvas.cpp:32