avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Banachowski (JIRA)" <j...@apache.org>
Subject [jira] Created: (AVRO-59) proposal to make some C++ object APIs more generic
Date Sat, 20 Jun 2009 19:36:07 GMT
proposal to make some C++ object APIs more generic

                 Key: AVRO-59
                 URL: https://issues.apache.org/jira/browse/AVRO-59
             Project: Avro
          Issue Type: Improvement
          Components: c++
            Reporter: Scott Banachowski

This is a patch I made for the serializer.  In the original version, the Serializer object
has functions like putInt(), putLong(),..., i.e. each put* function has a different name.

This is not convenient for generic template code, because each type requires a different function
call.  I moved the Serializer code to a class called Writer, that has only putValue overridden
for each type, e.g. putValue(int32_t), putValue(int64_t), putValue(bool) etc.

Generic code, such as in AvroSerializer.hh can use the generic API.  To preserve the explicit
calls, Serializer still exists, but has become a thin wrapper for Writer.  The explicit calls
are still useful for when you don't want implicit conversion to accidentally choose the wrong

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message