maxon::py Namespace Reference

Namespaces

 CPyReferences3
 
 specialtype
 

Classes

class  CPyCodeInterface
 
class  CPyCodeRef
 
class  CPyCompare
 
struct  CPyCompilerFlags
 
class  CPyConstRef
 
class  CPyFrameInterface
 
class  CPyFrameRef
 
class  CPyInterface
 
struct  CPyMemAllocatorEx
 
class  CPyRef
 
class  CPyTempRef
 
struct  CPythonGil
 
class  CPythonLibraryInterface
 
class  CPyTracebackInterface
 
class  CPyTracebackRef
 
class  CPyTypeConstRef
 
class  CPyTypeInterface
 
class  CPyTypeRef
 
struct  ModuleDefinition
 
class  MPyCallerContextInterface
 
class  MPyCallerContextRef
 
class  MPyClassInterface
 
class  MPyClassRef
 
class  MPyDataInterface
 
class  MPyDataRef
 
class  MPyDataTypeInterface
 
class  MPyDataTypeRef
 
class  MPyFunctionInterface
 
class  MPyFunctionRef
 
class  MPyMemberInterface
 
class  MPyMemberRef
 
struct  NativePyCapsule
 
struct  NativePyIntObject
 
struct  NativePyMethodDef
 
struct  NativePyModuleDef
 
struct  NativePyModuleDefBase
 
struct  NativePyObject
 
struct  NativePyThreadState
 
struct  NativePyTypeObject
 
struct  ProxyDefinition
 
struct  PythonDll
 
class  PythonErrorInterface
 
class  PythonSystemExitErrorInterface
 
class  PythonTracebackErrorInterface
 
class  TpFlags
 

Typedefs

template<typename T = Generic>
using DelegatePyObject_FromData = Delegate< CPyRef(const T *, const CPyTypeRef &expected)>
 
using CPyCapsule_Destructor = void(NativePyObject *)
 
using DelegatePyObject_AsData = Delegate< Result< Bool >(const DataType &expected, const CPyRef &src, Data *dst)>
 
using destruct = void(NativePyObject *)
 
using reprfunc = NativePyObject *(NativePyObject *)
 
using newfunc = NativePyObject *(NativePyTypeObject *type, NativePyObject *args, NativePyObject *kwds)
 
using allocfunc = NativePyObject *(NativePyTypeObject *type, Int nitems)
 
using vectorcallfunc = NativePyObject *(NativePyObject *callable, NativePyObject *const args, Int64 nargsf, NativePyObject *kwnames)
 
using NativePyCFunctionWithKeywords = NativePyObject *(*)(NativePyObject *, NativePyObject *, NativePyObject *)
 

Enumerations

enum  PATHHANDLE {
  OVERWRITE,
  APPEND_AT_END,
  INSERT_AT_BEGINNING
}
 
enum  GILSTATE {
  NOT_ACTIVE,
  ACTIVE_BUT_NOT_CURRENT_THREAD,
  ACTIVE_AND_CURRENT_THREAD
}
 
enum  CPyMemAllocatorDomain {
  CPYMEM_DOMAIN_RAW,
  CPYMEM_DOMAIN_MEM,
  CPYMEM_DOMAIN_OBJ
}
 
enum  SPECIALPATH {
  MAXON_MODULES,
  PREFS_PYTHON_GENERATED_DIRECTORY,
  PREFS_PYTHON_GLOBAL_LIBS,
  PREFS_PYTHON_LOCAL_LIBS
}
 
enum  PYGILSTATE {
  LOCKED,
  UNLOCKED
}
 
enum  PYINPUT {
  SINGLE,
  FILE,
  EVAL
}
 
enum  PYSTARTOPERATION {
  NONE,
  EXECUTE_CODE,
  EXECUTE_MODULE,
  EXECUTE_FILE,
  VERSION
}
 
enum  PYTHONFLAG {
  NONE,
  DEBUG,
  VERBOSE,
  INTERACTIVE,
  INSPECT,
  OPTIMIZE,
  NOSITE,
  BYTESWARNING,
  FROZEN,
  IGNOREENVIRONMENT,
  DIVISIONWARNING,
  DONTWRITEBYTECODE,
  NOUSERSITEDIRECTORY,
  PY3KWARNING,
  SET_CONTEXT_COMMANDLINEARGS,
  SET_ALL_COMMANDLINEARGS,
  PROCESS_COMMANDLINEARGS,
  ERRORS_IN_RESULT
}
 
enum  REFTYPE {
  DECREF,
  BORROWED,
  PRIVATE_SHORTTERM_BORROWED,
  PRIVATE_MUST_NOT_BE_USED_ANYMORE
}
 

Functions

enum maxon::py::PATHHANDLE MAXON_ENUM_LIST (PATHHANDLE)
 
enum maxon::py::GILSTATE MAXON_ENUM_LIST (GILSTATE)
 
enum maxon::py::CPyMemAllocatorDomain MAXON_ENUM_LIST (CPyMemAllocatorDomain)
 
enum maxon::py::SPECIALPATH MAXON_ENUM_LIST (SPECIALPATH)
 
enum maxon::py::PYGILSTATE MAXON_ENUM_LIST (PYGILSTATE)
 
enum maxon::py::PYINPUT MAXON_ENUM_LIST (PYINPUT)
 
enum maxon::py::PYSTARTOPERATION MAXON_ENUM_LIST (PYSTARTOPERATION)
 
 MAXON_DATATYPE (NativePyObject, "net.maxon.python.datatype.nativepyobject")
 
template<typename T >
MAXON_ATTRIBUTE_FORCE_INLINE Bool PassedRefCheck (const CPyRef &o)
 
template<>
MAXON_ATTRIBUTE_FORCE_INLINE Bool PassedRefCheck< MPyDataRef > (const CPyRef &o)
 
template<typename T >
MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if< STD_IS_REPLACEMENT(pointer, T), T >::type PrivateGetPtr (Data *data)
 
template<typename T >
MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if< STD_IS_REPLACEMENT(reference, T), T >::type PrivateGetPtr (Data *data)
 
template<>
MAXON_ATTRIBUTE_FORCE_INLINE DataPrivateGetPtr< Data & > (Data *data)
 
template<>
MAXON_ATTRIBUTE_FORCE_INLINE DataPrivateGetPtr< Data * > (Data *data)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyTypeRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyFrameRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyTracebackRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyCodeRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyClassRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyMemberRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyFunctionRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyDataTypeRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyDataRef), T >::type CPyCast (const CPyRef &o)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyCallerContextRef), T >::type CPyCast (const CPyRef &o)
 
enum maxon::py::PYTHONFLAG MAXON_ENUM_FLAGS (PYTHONFLAG)
 
enum maxon::py::REFTYPE MAXON_ENUM_LIST (REFTYPE)
 
template<typename T >
std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyRef), T >::type CPyCast (const CPyRef &o)
 
 MAXON_REGISTRY (Class< CPyRef >, CPyReferences3, "net.maxon.python.registry.pyreferences3")
 

Variables

struct maxon::py::ModuleDefinition MAXON_ENUM_LIST
 
struct maxon::py::NativePyThreadState MAXON_ENUM_FLAGS
 

Typedef Documentation

◆ DelegatePyObject_FromData

using DelegatePyObject_FromData = Delegate<CPyRef(const T*, const CPyTypeRef& expected)>

◆ CPyCapsule_Destructor

◆ DelegatePyObject_AsData

using DelegatePyObject_AsData = Delegate<Result<Bool>(const DataType& expected, const CPyRef& src, Data* dst)>

◆ destruct

using destruct = void(NativePyObject*)

◆ reprfunc

◆ newfunc

◆ allocfunc

using allocfunc = NativePyObject * (NativePyTypeObject* type, Int nitems)

◆ vectorcallfunc

using vectorcallfunc = NativePyObject * (NativePyObject* callable, NativePyObject* const args, Int64 nargsf, NativePyObject* kwnames)

◆ NativePyCFunctionWithKeywords

Enumeration Type Documentation

◆ PATHHANDLE

enum PATHHANDLE
strong
Enumerator
OVERWRITE 
APPEND_AT_END 

Overwrite sys.path.

INSERT_AT_BEGINNING 

Append array to sys.path.

Insert array at sys.path[0]

◆ GILSTATE

enum GILSTATE
strong
Enumerator
NOT_ACTIVE 
ACTIVE_BUT_NOT_CURRENT_THREAD 

GIL is not hold by any thread.

ACTIVE_AND_CURRENT_THREAD 

GIL is hold by another thread.

◆ CPyMemAllocatorDomain

enum CPyMemAllocatorDomain
strong
Enumerator
CPYMEM_DOMAIN_RAW 
CPYMEM_DOMAIN_MEM 
CPYMEM_DOMAIN_OBJ 

◆ SPECIALPATH

enum SPECIALPATH
strong
Enumerator
MAXON_MODULES 
PREFS_PYTHON_GENERATED_DIRECTORY 

Path to the 'maxon' module.

PREFS_PYTHON_GLOBAL_LIBS 

Path to the 'generated' directory.

PREFS_PYTHON_LOCAL_LIBS 

Path to the globals 'libs directory which all Cinema 4D instances share.

Path to the local 'libs directory which only the current Cinema 4D instance uses.

◆ PYGILSTATE

enum PYGILSTATE
strong
Enumerator
LOCKED 
UNLOCKED 

GIL is locked.

GIL is unlocked.

◆ PYINPUT

enum PYINPUT
strong
Enumerator
SINGLE 
FILE 

The start symbol from the Python grammar for a single statement.

EVAL 

The start symbol from the Python grammar for sequences of statements as read from a file or other source.

◆ PYSTARTOPERATION

enum PYSTARTOPERATION
strong
Enumerator
NONE 
EXECUTE_CODE 
EXECUTE_MODULE 

maxon::String

EXECUTE_FILE 

maxon::String

VERSION 

maxon:Url

Version mode

◆ PYTHONFLAG

enum PYTHONFLAG
strong
Enumerator
NONE 
DEBUG 
VERBOSE 
INTERACTIVE 
INSPECT 
OPTIMIZE 
NOSITE 
BYTESWARNING 
FROZEN 
IGNOREENVIRONMENT 
DIVISIONWARNING 
DONTWRITEBYTECODE 
NOUSERSITEDIRECTORY 
PY3KWARNING 
SET_CONTEXT_COMMANDLINEARGS 
SET_ALL_COMMANDLINEARGS 
PROCESS_COMMANDLINEARGS 
ERRORS_IN_RESULT 

◆ REFTYPE

enum REFTYPE
strong
Enumerator
DECREF 

The NativePyObject is new and just needs to be decrefed after the CPyRef instance is destructed.

BORROWED 

The NativePyObject is borrowed and the CPyRef needs to incref it internally, and decref it after the CPyRef instance is destructed.

PRIVATE_SHORTTERM_BORROWED 

No refcount handling is performed on the passed NativePyObject.

PRIVATE_MUST_NOT_BE_USED_ANYMORE 

Indicates that the CPyRef is not supposed to be used anymore and should be destructed as soon as possible.

Function Documentation

◆ MAXON_ENUM_LIST() [1/8]

enum maxon::py::PATHHANDLE maxon::py::MAXON_ENUM_LIST ( PATHHANDLE  )

◆ MAXON_ENUM_LIST() [2/8]

enum maxon::py::GILSTATE maxon::py::MAXON_ENUM_LIST ( GILSTATE  )

◆ MAXON_ENUM_LIST() [3/8]

enum maxon::py::CPyMemAllocatorDomain maxon::py::MAXON_ENUM_LIST ( CPyMemAllocatorDomain  )

◆ MAXON_ENUM_LIST() [4/8]

enum maxon::py::SPECIALPATH maxon::py::MAXON_ENUM_LIST ( SPECIALPATH  )

◆ MAXON_ENUM_LIST() [5/8]

enum maxon::py::PYGILSTATE maxon::py::MAXON_ENUM_LIST ( PYGILSTATE  )

◆ MAXON_ENUM_LIST() [6/8]

enum maxon::py::PYINPUT maxon::py::MAXON_ENUM_LIST ( PYINPUT  )

◆ MAXON_ENUM_LIST() [7/8]

enum maxon::py::PYSTARTOPERATION maxon::py::MAXON_ENUM_LIST ( PYSTARTOPERATION  )

◆ MAXON_DATATYPE()

maxon::py::MAXON_DATATYPE ( NativePyObject  ,
"net.maxon.python.datatype.nativepyobject"   
)

◆ PassedRefCheck()

MAXON_ATTRIBUTE_FORCE_INLINE Bool maxon::py::PassedRefCheck ( const CPyRef o)

◆ PassedRefCheck< MPyDataRef >()

◆ PrivateGetPtr() [1/2]

MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if<STD_IS_REPLACEMENT(pointer, T), T>::type maxon::py::PrivateGetPtr ( Data data)

◆ PrivateGetPtr() [2/2]

MAXON_ATTRIBUTE_FORCE_INLINE std::enable_if<STD_IS_REPLACEMENT(reference, T), T>::type maxon::py::PrivateGetPtr ( Data data)

◆ PrivateGetPtr< Data & >()

◆ PrivateGetPtr< Data * >()

◆ CPyCast() [1/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyTypeRef), T >::type CPyCast ( const CPyRef o)

Casts an object to a CPyTypeRef. Reference must be of this type, or the behavior is undefined.

Parameters
[in]oObject to cast.
Returns
Returns the object cast to CPyTypeRef.

◆ CPyCast() [2/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyFrameRef), T >::type CPyCast ( const CPyRef o)

Casts an object to CPyFrameRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ CPyCast() [3/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyTracebackRef), T >::type CPyCast ( const CPyRef o)

Casts an object to CPyCPyTracebackRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ CPyCast() [4/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::CPyCodeRef), T >::type CPyCast ( const CPyRef o)

Casts an object to PyCodeRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ CPyCast() [5/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyClassRef), T >::type CPyCast ( const CPyRef o)

Casts an object to MPyClassRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ CPyCast() [6/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyMemberRef), T >::type CPyCast ( const CPyRef o)

Casts an object to MPyMemberRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ CPyCast() [7/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyFunctionRef), T >::type CPyCast ( const CPyRef o)

Casts an object to MPMPyFunctionRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ CPyCast() [8/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyDataTypeRef), T >::type CPyCast ( const CPyRef o)

Casts an object to MPMPyDataTypeRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ CPyCast() [9/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyDataRef), T >::type CPyCast ( const CPyRef o)

Casts an object to PyDataRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ CPyCast() [10/11]

std::enable_if< STD_IS_REPLACEMENT(same, T, py::MPyCallerContextRef), T >::type CPyCast ( const CPyRef o)

Casts an object to MPyCallMPyCallerContextRef. The object must be of the targets type.

Parameters
[in]oObject to cast.
Returns
Casted object.

◆ MAXON_ENUM_FLAGS()

enum maxon::py::PYTHONFLAG maxon::py::MAXON_ENUM_FLAGS ( PYTHONFLAG  )

◆ MAXON_ENUM_LIST() [8/8]

enum maxon::py::REFTYPE maxon::py::MAXON_ENUM_LIST ( REFTYPE  )

◆ CPyCast() [11/11]

std::enable_if<STD_IS_REPLACEMENT(same, T, py::CPyRef), T>::type maxon::py::CPyCast ( const CPyRef o)

◆ MAXON_REGISTRY()

maxon::py::MAXON_REGISTRY ( Class< CPyRef ,
CPyReferences3  ,
"net.maxon.python.registry.pyreferences3"   
)

Variable Documentation

◆ MAXON_ENUM_LIST

maxon::py::CPyInterface MAXON_ENUM_LIST

◆ MAXON_ENUM_FLAGS

struct maxon::py::NativePyThreadState MAXON_ENUM_FLAGS