pyd.class_wrap

Contains utilities for wrapping D classes.

Members

Functions

wrap_class
void wrap_class()

Wrap a class.

Structs

Def
struct Def(alias fn, Options...)

Wraps a member function of the class.

Init
struct Init(cps...)

Wraps the constructors of the class.

OpAssign
struct OpAssign(string _op, rhs_t = Guess)

Wrap an operator assignment overload.

OpCall
struct OpCall(Args_t...)

wrap opCall. The parameter types of opCall must be specified.

OpCompare
struct OpCompare(_rhs_t = Guess)

Wrap opCmp.

OpIndex
struct OpIndex(index_t...)
OpIndexAssign
struct OpIndexAssign(index_t...)

Wrap opIndex, opIndexAssign.

OpSlice
struct OpSlice()

Wrap opSlice.

OpSliceAssign
struct OpSliceAssign(rhs_t = Guess)

Wrap opSliceAssign.

OpUnary
struct OpUnary(string _op)

Wrap a unary operator overload.

Property
struct Property(alias fn, Options...)

Wraps a property of the class.

Repr
struct Repr(alias _fn)

Wraps a method as the class's ___repr__ in Python.

StaticDef
struct StaticDef(alias fn, Options...)

Wraps a static member function of the class. Similar to pyd.def.def

Templates

Len
template Len()
template Len(alias fn)

Wraps Foo.length or another function as python's ___len__ function.

OpBinary
template OpBinary(string op, rhs_t = Guess)
OpBinaryRight
template OpBinaryRight(string op, lhs_t = Guess)

Wrap a binary operator overload.

wrapped_methods
template wrapped_methods(T)
wrapped_repr
template wrapped_repr(T, alias fn)

Meta