43#ifndef LASS_GUARDIAN_OF_INCLUSION_UTIL_PYOBJECT_CASTERS_H
44#define LASS_GUARDIAN_OF_INCLUSION_UTIL_PYOBJECT_CASTERS_H
61 typedef lass::meta::False TValue;
64struct NoCast :
public Caster
68 static TTarget cast(TSelf iArg) {
return iArg; }
71struct NoCast<void> :
public Caster
75 static TTarget cast(
void) {}
80struct PointerCast :
public Caster
84 typedef TPointer TTarget;
85 static TSelf cast(TTarget iArg) {
return *iArg; }
89struct PointerCast<T&> :
public Caster
93 typedef TPointer TTarget;
94 static TSelf cast(TTarget iArg) {
return *iArg; }
97struct PointerCast<const T&> :
public Caster
101 typedef TPointer TTarget;
102 static TSelf cast(TTarget iArg) {
return *iArg; }
105struct PointerCast<T*> :
public Caster
109 typedef TPointer TTarget;
110 static TSelf cast(TTarget iArg) {
return iArg; }
113struct PointerCast<const T*> :
public Caster
115 typedef const T* TSelf;
116 typedef const T* TPointer;
117 typedef TPointer TTarget;
118 static TSelf cast(TTarget iArg) {
return iArg; }
124struct CopyCast :
public Caster
128 typedef TCopy TTarget;
129 static TSelf cast(TTarget iArg) {
return TSelf(iArg); }
133struct CopyCast<T&> :
public Caster
137 typedef TCopy TTarget;
138 static TSelf cast(TTarget iArg) {
return TSelf(iArg); }
141struct CopyCast<const T&> :
public Caster
145 typedef TCopy TTarget;
146 static TSelf cast(TTarget iArg) {
return TSelf(iArg); }
149struct CopyCast<T*> :
public Caster
153 typedef TCopy TTarget;
156struct CopyCast<const T*> :
public Caster
158 typedef const T* TSelf;
159 typedef const T TCopy;
160 typedef TCopy TTarget;
164struct IsACaster<PointerCast<T> >
166 typedef lass::meta::True TValue;
169struct IsACaster<CopyCast<T> >
171 typedef lass::meta::True TValue;
177 typedef typename lass::meta::Select< typename IsACaster<T>::TValue , T, NoCast<T> >::Type TCaster;
Comprehensive C++ to Python binding library.
Library for Assembled Shared Sources.