Crossfire Server, Trunk
cfpython_party.c File Reference
#include <cfpython.h>
+ Include dependency graph for cfpython_party.c:

Go to the source code of this file.

Functions

 CF_PYTHON_OBJECT (Party, NULL, NULL, PyObject_HashNotImplemented, Py_TPFLAGS_DEFAULT|Py_TPFLAGS_BASETYPE, "Crossfire parties",(richcmpfunc) Crossfire_Party_RichCompare, PartyMethods, Party_getseters, NULL, NULL)
 
static PyObject * Crossfire_Party_GetName (Crossfire_Party *partyptr, void *closure)
 
static PyObject * Crossfire_Party_GetNext (Crossfire_Party *party, void *closure)
 
static PyObject * Crossfire_Party_GetPassword (Crossfire_Party *partyptr, void *closure)
 
static PyObject * Crossfire_Party_GetPlayers (Crossfire_Party *party, PyObject *args)
 
static int Crossfire_Party_InternalCompare (Crossfire_Party *left, Crossfire_Party *right)
 
static PyObject * Crossfire_Party_RichCompare (Crossfire_Party *left, Crossfire_Party *right, int op)
 
PyObject * Crossfire_Party_wrap (partylist *what)
 

Variables

static PyGetSetDef Party_getseters []
 
static PyMethodDef PartyMethods []
 

Function Documentation

◆ CF_PYTHON_OBJECT()

CF_PYTHON_OBJECT ( Party  ,
NULL  ,
NULL  ,
PyObject_HashNotImplemented  ,
Py_TPFLAGS_DEFAULT|  Py_TPFLAGS_BASETYPE,
"Crossfire parties"  ,
(richcmpfunc)  Crossfire_Party_RichCompare,
PartyMethods  ,
Party_getseters  ,
NULL  ,
NULL   
)

◆ Crossfire_Party_GetName()

static PyObject* Crossfire_Party_GetName ( Crossfire_Party partyptr,
void *  closure 
)
static

Definition at line 32 of file cfpython_party.c.

References cf_party_get_name(), Crossfire_Party::party, and nlohmann::detail::void().

+ Here is the call graph for this function:

◆ Crossfire_Party_GetNext()

static PyObject* Crossfire_Party_GetNext ( Crossfire_Party party,
void *  closure 
)
static

Definition at line 42 of file cfpython_party.c.

References cf_party_get_next(), Crossfire_Party_wrap(), Crossfire_Party::party, and nlohmann::detail::void().

+ Here is the call graph for this function:

◆ Crossfire_Party_GetPassword()

static PyObject* Crossfire_Party_GetPassword ( Crossfire_Party partyptr,
void *  closure 
)
static

Definition at line 37 of file cfpython_party.c.

References cf_party_get_password(), Crossfire_Party::party, and nlohmann::detail::void().

+ Here is the call graph for this function:

◆ Crossfire_Party_GetPlayers()

static PyObject* Crossfire_Party_GetPlayers ( Crossfire_Party party,
PyObject *  args 
)
static

◆ Crossfire_Party_InternalCompare()

static int Crossfire_Party_InternalCompare ( Crossfire_Party left,
Crossfire_Party right 
)
static

Definition at line 76 of file cfpython_party.c.

References Crossfire_Party::party.

Referenced by Crossfire_Party_RichCompare().

+ Here is the caller graph for this function:

◆ Crossfire_Party_RichCompare()

static PyObject* Crossfire_Party_RichCompare ( Crossfire_Party left,
Crossfire_Party right,
int  op 
)
static

Definition at line 80 of file cfpython_party.c.

References Crossfire_Party_InternalCompare(), Crossfire_PartyType, give::op, and rotate-tower::result.

+ Here is the call graph for this function:

◆ Crossfire_Party_wrap()

PyObject* Crossfire_Party_wrap ( partylist what)

Definition at line 61 of file cfpython_party.c.

References Crossfire_PartyType, and Crossfire_Party::party.

Referenced by Crossfire_Party_GetNext(), getParties(), and Player_GetParty().

+ Here is the caller graph for this function:

Variable Documentation

◆ Party_getseters

PyGetSetDef Party_getseters[]
static
Initial value:
= {
{ "Name", (getter)Crossfire_Party_GetName, NULL, NULL, NULL },
{ "Password", (getter)Crossfire_Party_GetPassword, NULL, NULL, NULL },
{ "Next", (getter)Crossfire_Party_GetNext, NULL, NULL, NULL },
{ NULL, NULL, NULL, NULL, NULL }
}

Definition at line 114 of file cfpython_party.c.

◆ PartyMethods

PyMethodDef PartyMethods[]
static
Initial value:
= {
{ "GetPlayers", (PyCFunction)Crossfire_Party_GetPlayers, METH_NOARGS, NULL },
{ NULL, NULL, 0, NULL }
}

Definition at line 121 of file cfpython_party.c.

Crossfire_Party_GetNext
static PyObject * Crossfire_Party_GetNext(Crossfire_Party *party, void *closure)
Definition: cfpython_party.c:42
Crossfire_Party_GetPassword
static PyObject * Crossfire_Party_GetPassword(Crossfire_Party *partyptr, void *closure)
Definition: cfpython_party.c:37
Crossfire_Party_GetName
static PyObject * Crossfire_Party_GetName(Crossfire_Party *partyptr, void *closure)
Definition: cfpython_party.c:32
Crossfire_Party_GetPlayers
static PyObject * Crossfire_Party_GetPlayers(Crossfire_Party *party, PyObject *args)
Definition: cfpython_party.c:47