eccLib 1.3.0
Python library for bioinformatics written in C
Loading...
Searching...
No Matches
Functions | Variables
GtfListViews.c File Reference
#include "GtfListViews.h"
#include "../../formats/gtf.h"
Include dependency graph for GtfListViews.c:

Functions

static void GtfList_ColumnView_dealloc (GtfList_ColumnView *self)
 Deallocates a GtfList_ColumnView object.
 
static int GtfList_ColumnView_init (GtfList_ColumnView *self, PyObject *args, PyObject *kwargs)
 
int GtfList_ColumnView_initialise (GtfList_ColumnView *self, GtfList *list, PyObject *column)
 Initialise a GtfList_ColumnView object.
 
static PyObject * GtfList_ColumnView_getitem (GtfList_ColumnView *self, Py_ssize_t index)
 Get an item from the column view by index.
 
static int GtfList_ColumnView_len (GtfList_ColumnView *self)
 
static int GtfList_ColumnView_contains (GtfList_ColumnView *self, PyObject *value)
 
static PyObject * GtfList_ColumnView_count (GtfList_ColumnView *self, PyObject *value)
 
static PyObject * GtfList_ColumnView_index (GtfList_ColumnView *self, PyObject *args, PyObject *kwargs)
 
static void GtfList_ColumnIterator_initialise (GtfList_ColumnIterator *self, GtfList_ColumnView *view, bool reverse)
 
static PyObject * GtfList_ColumnView_iter (GtfList_ColumnView *self)
 
static PyObject * GtfList_ColumnView_reversed (GtfList_ColumnView *self)
 
static void GtfList_ColumnIterator_dealloc (GtfList_ColumnIterator *self)
 
static PyObject * GtfList_ColumnIterator_next (GtfList_ColumnIterator *self)
 
static PyObject * GtfList_ColumnIterator_iter (GtfList_ColumnIterator *self)
 

Variables

static PyMethodDef GtfList_ColumnView_methods []
 
PySequenceMethods GtfList_ColumnViewSeq
 
PyTypeObject GtfList_ColumnViewType
 
PyTypeObject GtfList_ColumnIteratorType
 

Function Documentation

◆ GtfList_ColumnIterator_dealloc()

static void GtfList_ColumnIterator_dealloc ( GtfList_ColumnIterator self)
static

◆ GtfList_ColumnIterator_initialise()

static void GtfList_ColumnIterator_initialise ( GtfList_ColumnIterator self,
GtfList_ColumnView view,
bool  reverse 
)
static
Here is the caller graph for this function:

◆ GtfList_ColumnIterator_iter()

static PyObject * GtfList_ColumnIterator_iter ( GtfList_ColumnIterator self)
static

◆ GtfList_ColumnIterator_next()

static PyObject * GtfList_ColumnIterator_next ( GtfList_ColumnIterator self)
static
Here is the call graph for this function:

◆ GtfList_ColumnView_contains()

static int GtfList_ColumnView_contains ( GtfList_ColumnView self,
PyObject *  value 
)
static
Here is the call graph for this function:

◆ GtfList_ColumnView_count()

static PyObject * GtfList_ColumnView_count ( GtfList_ColumnView self,
PyObject *  value 
)
static
Here is the call graph for this function:

◆ GtfList_ColumnView_dealloc()

static void GtfList_ColumnView_dealloc ( GtfList_ColumnView self)
static

Deallocates a GtfList_ColumnView object.

Parameters
selfThe GtfList_ColumnView object to deallocate.

◆ GtfList_ColumnView_getitem()

static PyObject * GtfList_ColumnView_getitem ( GtfList_ColumnView self,
Py_ssize_t  index 
)
static

Get an item from the column view by index.

Parameters
selfThe column view
indexThe index to get
Returns
The item at the index, or NULL if the index is out of bounds
Warning
Returns a new reference
Here is the caller graph for this function:

◆ GtfList_ColumnView_index()

static PyObject * GtfList_ColumnView_index ( GtfList_ColumnView self,
PyObject *  args,
PyObject *  kwargs 
)
static
Here is the call graph for this function:

◆ GtfList_ColumnView_init()

static int GtfList_ColumnView_init ( GtfList_ColumnView self,
PyObject *  args,
PyObject *  kwargs 
)
static
Here is the call graph for this function:

◆ GtfList_ColumnView_initialise()

int GtfList_ColumnView_initialise ( GtfList_ColumnView self,
GtfList list,
PyObject *  column 
)

Initialise a GtfList_ColumnView object.

Parameters
selfThe GtfList_ColumnView object to initialise
listThe underlying GtfList object
columnThe column index or attribute key
Returns
0 on success, -1 on failure
Here is the caller graph for this function:

◆ GtfList_ColumnView_iter()

static PyObject * GtfList_ColumnView_iter ( GtfList_ColumnView self)
static
Here is the call graph for this function:

◆ GtfList_ColumnView_len()

static int GtfList_ColumnView_len ( GtfList_ColumnView self)
static

◆ GtfList_ColumnView_reversed()

static PyObject * GtfList_ColumnView_reversed ( GtfList_ColumnView self)
static
Here is the call graph for this function:

Variable Documentation

◆ GtfList_ColumnIteratorType

PyTypeObject GtfList_ColumnIteratorType
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "eccLib.GtfList_ColumnIterator",
.tp_basicsize = sizeof(GtfList_ColumnIterator),
.tp_doc = PyDoc_STR("An iterator over the items in a GtfList column"),
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_new = PyType_GenericNew,
.tp_dealloc = (destructor)GtfList_ColumnIterator_dealloc,
.tp_iter = (getiterfunc)GtfList_ColumnIterator_iter,
.tp_iternext = (iternextfunc)GtfList_ColumnIterator_next,
}
static void GtfList_ColumnIterator_dealloc(GtfList_ColumnIterator *self)
Definition GtfListViews.c:243
static PyObject * GtfList_ColumnIterator_next(GtfList_ColumnIterator *self)
Definition GtfListViews.c:248
static PyObject * GtfList_ColumnIterator_iter(GtfList_ColumnIterator *self)
Definition GtfListViews.c:268
Definition GtfListViews.h:44

◆ GtfList_ColumnView_methods

PyMethodDef GtfList_ColumnView_methods[]
static
Initial value:
= {
{"__reversed__", (PyCFunction)GtfList_ColumnView_reversed, METH_NOARGS,
"Returns a reverse iterator over the items in the column"},
{"count", (PyCFunction)GtfList_ColumnView_count, METH_O,
"Returns the number of times a value appears in the column"},
{"index", (PyCFunction)GtfList_ColumnView_index,
METH_VARARGS | METH_KEYWORDS,
"Returns the index of the first occurrence of a value in the column"},
{NULL, NULL, 0, NULL}
}
static PyObject * GtfList_ColumnView_reversed(GtfList_ColumnView *self)
Definition GtfListViews.c:198
static PyObject * GtfList_ColumnView_index(GtfList_ColumnView *self, PyObject *args, PyObject *kwargs)
Definition GtfListViews.c:136
static PyObject * GtfList_ColumnView_count(GtfList_ColumnView *self, PyObject *value)
Definition GtfListViews.c:115

◆ GtfList_ColumnViewSeq

PySequenceMethods GtfList_ColumnViewSeq
Initial value:
= {
.sq_contains = (objobjproc)GtfList_ColumnView_contains,
.sq_length = (lenfunc)GtfList_ColumnView_len,
.sq_item = (ssizeargfunc)GtfList_ColumnView_getitem,
}
static PyObject * GtfList_ColumnView_getitem(GtfList_ColumnView *self, Py_ssize_t index)
Get an item from the column view by index.
Definition GtfListViews.c:69
static int GtfList_ColumnView_len(GtfList_ColumnView *self)
Definition GtfListViews.c:91
static int GtfList_ColumnView_contains(GtfList_ColumnView *self, PyObject *value)
Definition GtfListViews.c:95

◆ GtfList_ColumnViewType

PyTypeObject GtfList_ColumnViewType
Initial value:
= {
PyVarObject_HEAD_INIT(NULL, 0).tp_name = "eccLib.GtfList_ColumnView",
.tp_basicsize = sizeof(GtfList_ColumnView),
.tp_doc = PyDoc_STR("A view of the items in a GtfList column"),
.tp_itemsize = 0,
.tp_flags = Py_TPFLAGS_DEFAULT,
.tp_new = PyType_GenericNew,
.tp_init = (initproc)GtfList_ColumnView_init,
.tp_iter = (getiterfunc)GtfList_ColumnView_iter,
.tp_dealloc = (destructor)GtfList_ColumnView_dealloc,
.tp_as_sequence = &GtfList_ColumnViewSeq,
}
static PyMethodDef GtfList_ColumnView_methods[]
Definition GtfListViews.c:210
static void GtfList_ColumnView_dealloc(GtfList_ColumnView *self)
Deallocates a GtfList_ColumnView object.
Definition GtfListViews.c:11
static int GtfList_ColumnView_init(GtfList_ColumnView *self, PyObject *args, PyObject *kwargs)
Definition GtfListViews.c:19
PySequenceMethods GtfList_ColumnViewSeq
Definition GtfListViews.c:221
static PyObject * GtfList_ColumnView_iter(GtfList_ColumnView *self)
Definition GtfListViews.c:186
Definition GtfListViews.h:15