I have a template as follows:
template<typename T, Array::Type ARRAYTYPE, int DataSize, int DataType>
class TemplateArray : public Array, public MixinVector<T>
{
What would be the wrapping? Something like this?
type
Type* {.include:"myfile.hxx",importcpp:"TemplateArray".} = object
TemplateArray* {.include:"myfile.hxx",importcpp:"TemplateArray".} [T,ARRAYTYPE:Type, DataSize:cint, DataType:cint] = object
or it should be just [T,ARRAYTYPE, DataSize, DataType] in the last line? Yeah. The Array::Type is an enum. I got it like:
type
Type* {.size:sizeof(cuint),header: "Array", importcpp: "osg::Array::Type".} = enum
## The type of data stored in this array.
ArrayType = 0,
ByteArrayType = 1,
ShortArrayType = 2,
IntArrayType = 3,
UByteArrayType = 4,
....
I think you are right. One thing that I have observed is that the manual says:
type
StdMap {.importcpp: "std::map", header: "<map>".} [K, V] = object
It looks like this syntax is discouraged. And now the compiler suggest things like:
type
StdMap [K,V] {.importcpp: "std::map", header: "<map>".} = object
The manual should be updated.