Panda3D
Macros | Functions
py_panda.I File Reference

Go to the source code of this file.

Macros

#define _IS_FINAL(T)   (0)
 

Functions

bool Dtool_CheckNoArgs (PyObject *args)
 Checks that the tuple is empty. More...
 
bool Dtool_CheckNoArgs (PyObject *args, PyObject *kwds)
 Checks that the tuple is empty, and that the dict is empty or NULL. More...
 
template<class T >
PyObject * DTool_CreatePyInstance (const T *obj, bool memory_rules)
 These functions wrap a pointer for a class that defines get_type_handle(). More...
 
template<class T >
PyObject * DTool_CreatePyInstance (T *obj, bool memory_rules)
 
template<class T >
PyObject * DTool_CreatePyInstanceTyped (const T *obj, bool memory_rules)
 
template<class T >
PyObject * DTool_CreatePyInstanceTyped (T *obj, bool memory_rules)
 
long Dtool_EnumValue_AsLong (PyObject *value)
 Converts the enum value to a C long. More...
 
int DTool_PyInit_Finalize (PyObject *self, void *local_this, Dtool_PyTypedObject *type, bool memory_rules, bool is_const)
 Finishes initializing the Dtool_PyInstDef. More...
 
PyObject * Dtool_WrapValue (int value)
 The following functions wrap an arbitrary C++ value into a PyObject. More...
 
PyObject * Dtool_WrapValue (unsigned int value)
 
PyObject * Dtool_WrapValue (long value)
 
PyObject * Dtool_WrapValue (unsigned long value)
 
PyObject * Dtool_WrapValue (long long value)
 
PyObject * Dtool_WrapValue (unsigned long long value)
 
PyObject * Dtool_WrapValue (bool value)
 
PyObject * Dtool_WrapValue (double value)
 
PyObject * Dtool_WrapValue (const char *value)
 
PyObject * Dtool_WrapValue (const wchar_t *value)
 
PyObject * Dtool_WrapValue (const std::string &value)
 
PyObject * Dtool_WrapValue (const std::wstring &value)
 
PyObject * Dtool_WrapValue (const std::string *value)
 
PyObject * Dtool_WrapValue (const std::wstring *value)
 
PyObject * Dtool_WrapValue (char value)
 
PyObject * Dtool_WrapValue (wchar_t value)
 
PyObject * Dtool_WrapValue (std::nullptr_t)
 
PyObject * Dtool_WrapValue (PyObject *value)
 
PyObject * Dtool_WrapValue (const vector_uchar &value)
 
template<class T1 , class T2 >
PyObject * Dtool_WrapValue (const std::pair< T1, T2 > &value)
 
int DtoolInstance_ComparePointers (PyObject *v1, PyObject *v2)
 Python 2-style comparison function that compares objects by pointer. More...
 
template<class T >
bool DtoolInstance_GetPointer (PyObject *self, T *&into)
 Template function that can be used to extract any TypedObject pointer from a wrapped Python object. More...
 
template<class T >
bool DtoolInstance_GetPointer (PyObject *self, T *&into, Dtool_PyTypedObject &target_class)
 Template function that can be used to extract any TypedObject pointer from a wrapped Python object. More...
 
Py_hash_t DtoolInstance_HashPointer (PyObject *self)
 Function to create a hash from a wrapped Python object. More...
 
PyObject * DtoolInstance_RichComparePointers (PyObject *v1, PyObject *v2, int op)
 Rich comparison function that compares objects by pointer. More...
 

Detailed Description

Author
rdb
Date
2016-06-06

Definition in file py_panda.I.

Function Documentation

◆ Dtool_CheckNoArgs() [1/2]

bool Dtool_CheckNoArgs ( PyObject *  args)
inline

Checks that the tuple is empty.

Definition at line 154 of file py_panda.I.

◆ Dtool_CheckNoArgs() [2/2]

bool Dtool_CheckNoArgs ( PyObject *  args,
PyObject *  kwds 
)
inline

Checks that the tuple is empty, and that the dict is empty or NULL.

Definition at line 162 of file py_panda.I.

◆ DTool_CreatePyInstance()

template<class T >
PyObject* DTool_CreatePyInstance ( const T *  obj,
bool  memory_rules 
)
inline

These functions wrap a pointer for a class that defines get_type_handle().

Definition at line 111 of file py_panda.I.

◆ Dtool_EnumValue_AsLong()

long Dtool_EnumValue_AsLong ( PyObject *  value)
inline

Converts the enum value to a C long.

Definition at line 96 of file py_panda.I.

◆ DTool_PyInit_Finalize()

int DTool_PyInit_Finalize ( PyObject *  self,
void *  local_this,
Dtool_PyTypedObject *  type,
bool  memory_rules,
bool  is_const 
)
inline

Finishes initializing the Dtool_PyInstDef.

Definition at line 142 of file py_panda.I.

◆ Dtool_WrapValue()

PyObject* Dtool_WrapValue ( int  value)
inline

The following functions wrap an arbitrary C++ value into a PyObject.

Definition at line 170 of file py_panda.I.

◆ DtoolInstance_ComparePointers()

int DtoolInstance_ComparePointers ( PyObject *  v1,
PyObject *  v2 
)
inline

Python 2-style comparison function that compares objects by pointer.

Definition at line 75 of file py_panda.I.

◆ DtoolInstance_GetPointer() [1/2]

template<class T >
bool DtoolInstance_GetPointer ( PyObject *  self,
T *&  into 
)
inline

Template function that can be used to extract any TypedObject pointer from a wrapped Python object.

Definition at line 20 of file py_panda.I.

◆ DtoolInstance_GetPointer() [2/2]

template<class T >
bool DtoolInstance_GetPointer ( PyObject *  self,
T *&  into,
Dtool_PyTypedObject &  target_class 
)
inline

Template function that can be used to extract any TypedObject pointer from a wrapped Python object.

In this case, the Dtool_PyTypedObject is known.

Definition at line 45 of file py_panda.I.

◆ DtoolInstance_HashPointer()

Py_hash_t DtoolInstance_HashPointer ( PyObject *  self)
inline

Function to create a hash from a wrapped Python object.

Definition at line 65 of file py_panda.I.

◆ DtoolInstance_RichComparePointers()

PyObject* DtoolInstance_RichComparePointers ( PyObject *  v1,
PyObject *  v2,
int  op 
)
inline

Rich comparison function that compares objects by pointer.

Definition at line 88 of file py_panda.I.