SandroGrzicic/ScalaBuff — pull request #82 by nefilim (2014-06-27 22:35:00+00:00)
Title: Add hinted deserializer support

This PR adds a

def deserializePayload(payload: Array[Byte], payloadType: String): GeneratedMessageLite

and associated support structures to the generated Scala code. This comes in handy when using protobuf as payload in a (framed) protocol and avoiding using reflection at runtime.

I initially tried doing this with a macro which worked ok, except I couldn't find a way to enumerate the objects in the generated package (by scalabuff). I need to iterate them (protobuf messages basically) to generate a hint map. It's far simpler to achieve the same result just doing code generation as part of scalabuff.