Implementing a Type Field copy with Reflection?

BlitzMax Forums/BlitzMax Programming/Implementing a Type Field copy with Reflection?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I'm interested in this too. Consider this.

Type TEmitter
   Field vPos:TVec3 = Vec3()
End Type

Type TVec3
   Field x:Float, y:Float, z:Float
End Type

Function Vec3:TVec3()
   Return New TVec3
End Function

Now if I wanted to create a fast copy of an Emitter which included all its fields that are types (TVec3), but I didn't want to go through each field vector and have to copy that too...what's the fastest way?

I know that doing a EmitterA = EmitterB is wrong because then EmitterA just becomes a pointer to EmitterB and isn't it's own Emitter per say. Maybe if there was a fast way to copy an entire type to another.But so you don't have to blah blah blah.

When I say fast, I mean something that could possibly be called each cycle with minimal tasking.