| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | #pragma once | 
| 2 |  |  |  |  |  |  | #include "base.h" | 
| 3 |  |  |  |  |  |  | #include | 
| 4 |  |  |  |  |  |  |  | 
| 5 |  |  |  |  |  |  | namespace xs { | 
| 6 |  |  |  |  |  |  |  | 
| 7 |  |  |  |  |  |  | // automatic default typemap for  if typemap for  defined | 
| 8 |  |  |  |  |  |  | template  struct Typemap : Typemap {}; | 
| 9 |  |  |  |  |  |  |  | 
| 10 |  |  |  |  |  |  | // automatic default reference resolving | 
| 11 |  |  |  |  |  |  | template *>::value> struct TypemapResolveReference {}; | 
| 12 |  |  |  |  |  |  | template  struct TypemapResolveReference : Typemap { | 
| 13 |  |  |  |  |  |  | using Super = Typemap; | 
| 14 |  |  |  |  |  |  | static TYPE& in (SV* arg) { | 
| 15 |  |  |  |  |  |  | auto ret = Super::in(arg); | 
| 16 |  |  |  |  |  |  | if (!ret) throw "invalid value: undef not allowed"; | 
| 17 |  |  |  |  |  |  | return *ret; | 
| 18 |  |  |  |  |  |  | } | 
| 19 |  |  |  |  |  |  | static Sv out (TYPE& var, const Sv& = {}) = delete; | 
| 20 |  |  |  |  |  |  | }; | 
| 21 |  |  |  |  |  |  | template  struct TypemapResolveReference : Typemap> {}; | 
| 22 |  |  |  |  |  |  | template  struct Typemap : TypemapResolveReference {}; | 
| 23 |  |  |  |  |  |  |  | 
| 24 |  |  |  |  |  |  | // automatic default typemap for > if typemap for  defined | 
| 25 |  |  |  |  |  |  | template  struct Typemap, panda::iptr> : Typemap { | 
| 26 |  |  |  |  |  |  | using Super = Typemap; | 
| 27 |  |  |  |  |  |  | static panda::iptr in (SV* arg) { return Super::in(arg); } | 
| 28 |  |  |  |  |  |  |  | 
| 29 | 69 |  |  |  |  |  | static Sv out (const panda::iptr& var, const Sv& proto = {}) { | 
| 30 | 69 | 50 |  |  |  |  | return Super::out(var.get(), proto); | 
|  |  | 50 |  |  |  |  |  | 
|  |  | 50 |  |  |  |  |  | 
| 31 |  |  |  |  |  |  | } | 
| 32 |  |  |  |  |  |  | }; | 
| 33 |  |  |  |  |  |  |  | 
| 34 |  |  |  |  |  |  | } |