more qt:variant conversions
Wed Jun 10 14:02:01 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* more qt:variant conversions
hunk ./src/variant.lisp 76
+(defmacro variant-conversions ((variant) &body types)
+ `(ecase (cxx:user-type ,variant)
+ [_$_]
+ ,@(loop for type in types collect
+ (if (symbolp type)
+ `(,(value (symbol-value (alexandria:symbolicate 'variant.+ type '+)))
+ (,(intern (format nil "TO-~A" type) :cxx) ,variant))
+ type))))
+
hunk ./src/variant.lisp 87
- (ecase (cxx:user-type variant)
+ (variant-conversions (variant)
hunk ./src/variant.lisp 91
- (#.(value variant.+string+)
- (cxx:to-string variant))
- (#.(value variant.+string-list+)
- (cxx:to-string-list variant))
- (#.(value variant.+uint+)
- (cxx:to-uint variant))
- (#.(value variant.+int+)
- (cxx:to-int variant))
- (#.(value variant.+double+)
- (cxx:to-double variant))
- (#.(value variant.+char+)
- (cxx:to-char variant))
- (#.(value variant.+bool+)
- (cxx:to-bool variant))
+ bit-array bool byte-array
+ char
+ date date-time double
+ int
+ line line-f list locale long-long
+ point point-f
+ rect rect-f reg-exp
+ size size-f string string-list
+ time
+ uint
+ ulong-long
+ url
hunk ./src/variant.lisp 109
-
+ [_$_]