You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Scott Banachowski (JIRA)" <ji...@apache.org> on 2009/07/03 20:33:47 UTC

[jira] Updated: (AVRO-71) Followup - making some C++ object APIs more generic

     [ https://issues.apache.org/jira/browse/AVRO-71?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Banachowski updated AVRO-71:
----------------------------------

    Description: 
This is a followup to issue AVRO-59.  In that change, a more generic version of Writer class was created to support templates.
I now have done the same kind of refactor for the Reader version, to make Reader and Writer more symmetric.



  was:
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 type.




> Followup - making some C++ object APIs more generic
> ---------------------------------------------------
>
>                 Key: AVRO-71
>                 URL: https://issues.apache.org/jira/browse/AVRO-71
>             Project: Avro
>          Issue Type: Improvement
>          Components: c++
>            Reporter: Scott Banachowski
>            Assignee: Scott Banachowski
>             Fix For: 1.0.0
>
>
> This is a followup to issue AVRO-59.  In that change, a more generic version of Writer class was created to support templates.
> I now have done the same kind of refactor for the Reader version, to make Reader and Writer more symmetric.

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