You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Eric Anderson (JIRA)" <ji...@apache.org> on 2008/07/10 08:37:32 UTC

[jira] Created: (THRIFT-72) C++ structure constructor

 C++ structure constructor
--------------------------

                 Key: THRIFT-72
                 URL: https://issues.apache.org/jira/browse/THRIFT-72
             Project: Thrift
          Issue Type: Improvement
          Components: Compiler (C++)
         Environment: Tested on debian stable (etch)
            Reporter: Eric Anderson


We're mostly using the C++ interface to thrift, and I wanted to be
able to initialize structures more easily than a whole series of lines
that set each of the parameters separately.  Attached is a patch that
adds a constructor to the C++ objects that allow you to fully
initialize an object in a single call.  I added two tests for this,
one in the DebugProtoTest.cpp file, and one in the
OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.


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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Eric Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697231#action_12697231 ] 

Eric Anderson commented on THRIFT-72:
-------------------------------------

I put a comment on THRIFT-236; when we upgrade after the next thrift release we'll probably add an option to support constructor order in IDL order.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-72:
--------------------------------

    Fix Version/s:     (was: 0.4)

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>    Affects Versions: 0.2
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Issue Comment Edited: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688843#action_12688843 ] 

David Reiss edited comment on THRIFT-72 at 3/24/09 1:37 PM:
------------------------------------------------------------

I have no problem with the basic design, as-is.  Some of the other languages already have similar features, and it is tough to require contributors to implement their feature in languages that they do not use.

      was (Author: dreiss):
    I have no problem with it, as-is.  Some of the other languages already have similar features, and it is tough to require contributors to implement their feature in languages that they do not use.
  
>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697165#action_12697165 ] 

David Reiss commented on THRIFT-72:
-----------------------------------

The Thrift compiler no longer has any notion of the order that fields are defined in the IDL file.  If this poses a problem for you, please see THRIFT-236.  I switched to endl because it is the convention in the surrounding code.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697244#action_12697244 ] 

David Reiss commented on THRIFT-72:
-----------------------------------

Oh, man.  We knew it would affect constructors, but I forgot about service functions.  We should definitely fix that.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Shigin updated THRIFT-72:
-----------------------------------

    Attachment: thrift-cpp-constructor-v3.patch

Add some missing files.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696724#action_12696724 ] 

David Reiss commented on THRIFT-72:
-----------------------------------

None of my comments were addressed.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703307#action_12703307 ] 

Alexander Shigin commented on THRIFT-72:
----------------------------------------

The THRIFT-236 is resolved, I believe the David's patch is okay now. Or do I missing something?

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Jérémie BORDIER (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688139#action_12688139 ] 

Jérémie BORDIER commented on THRIFT-72:
---------------------------------------

I feel like this issue shouldn't be fixed as is, but generalized to other languages that could benefit from this kind of API enhancement in the compiler. What do you guys think ?

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Eric Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Anderson updated THRIFT-72:
--------------------------------

    Attachment: structure-constructor.patch

Version 2 of the patch; sorts constructor arguments in key order (kinda) negative keys sorted after positive ones, and in descending order.


>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Shigin updated THRIFT-72:
-----------------------------------

    Attachment: thrift-cpp-constructor-v4.patch

fix tabs; fix kinda_negative

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697240#action_12697240 ] 

Bryan Duxbury commented on THRIFT-72:
-------------------------------------

I see what your issue is here. THRIFT-236 was intended to have an effect on the serialization order, but our solution to this problem inadvertently also had an effect on things like constructors and service method parameter ordering. I tend to agree that this change is undesired and we should probably fix it.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12637646#action_12637646 ] 

David Reiss commented on THRIFT-72:
-----------------------------------

In kinda_by_id_less_than, after the first two conditions, you could return abs(a->get_key()) < abs(b->get_key());
Also, what would you think about just making this a static function of the generator instead of a struct?
Also, what would you think about naming the arguments lhs and rhs instead?

Please use spaces instead of tabs for indentation.

The okay_prefix stuff is unnecessary.  You can alias the constructor arguments to the field names and it works fine.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Shigin updated THRIFT-72:
-----------------------------------

    Fix Version/s: 0.1

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-72:
--------------------------------

    Fix Version/s: 0.4
                       (was: 0.3)

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>    Affects Versions: 0.2
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Eric Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Anderson updated THRIFT-72:
--------------------------------

    Priority: Minor  (was: Major)

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Shigin updated THRIFT-72:
-----------------------------------

    Attachment: thrift-cpp-constructor-v2.patch

The first version makes gcc complain about initialization order. The new patch solves the problem.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703344#action_12703344 ] 

David Reiss commented on THRIFT-72:
-----------------------------------

Wait.  I'm confused.  Eric, you say you want the constructor in IDL order, but your original patch used kinda_by_id_less_than.  Am _I_ missing something?

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12688843#action_12688843 ] 

David Reiss commented on THRIFT-72:
-----------------------------------

I have no problem with it, as-is.  Some of the other languages already have similar features, and it is tough to require contributors to implement their feature in languages that they do not use.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Shigin updated THRIFT-72:
-----------------------------------

    Attachment: thrift-cpp-constructor-v5.patch

get rid of ok_prefix

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Jérémie BORDIER (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12689757#action_12689757 ] 

Jérémie BORDIER commented on THRIFT-72:
---------------------------------------

Ok then, +1 !

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Eric Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12697157#action_12697157 ] 

Eric Anderson commented on THRIFT-72:
-------------------------------------

I can't commit (no permission), and the related problem is that the patch as written isn't actually useful to us; we want the constructor argument order to match with the order in the thrift file.

consider the following evolution of a structure:

struct circle {
   required 1: i32 x;
   required 2: i32 y;
   required 3: i32 radius;
}

--- V2: (assuming a series of intermediate ones with the necessary optionals)

struct point {
   required 1: i32 x;
   required 2: i32 y;
}

struct circle {
   required 4: point center;
   required 3: i32 radius;
}

The problem is that the latter circle is now initialized as circle(radius, center), which seems inverted to me from the "expected" order for defining such an object.  However, I can't reuse the 1 and 2 tags because they are obsolete (as I understand the thrift migration of structure tag rules)

I'd planned to put in an option to control which way the constructors would go it, but I got busy.

Out of curiosity, is there a reason that you're replacing \n with endl?  They are exactly the same except that endl is equivalent to \n + flush output, so is strictly slower. (http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?id=1043284376&answer=1045690279) -- we had this argument internally, and tested it on windows, \n in a string generated \x0a\x0d in a file.


>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703491#action_12703491 ] 

Alexander Shigin commented on THRIFT-72:
----------------------------------------

The original Eric's patch (http://publists.facebook.com/pipermail/thrift/2008-July/001071.html) doesn't do any sorting. 

It was my mail (http://publists.facebook.com/pipermail/thrift/2008-July/001072.html) which proposed field sorting. Mark Slee agreed with me (http://mail-archives.apache.org/mod_mbox/incubator-thrift-dev/200807.mbox/%3c028001c8e259$c7307eb0$311017ac@IESLEE%3e).

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss updated THRIFT-72:
------------------------------

    Attachment: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Eric Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Anderson updated THRIFT-72:
--------------------------------

    Attachment: structure-constructor.patch

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>         Attachments: structure-constructor.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696616#action_12696616 ] 

Bryan Duxbury commented on THRIFT-72:
-------------------------------------

Can a cpp committer weigh in on whether we can commit the latest patch? David?

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Jérémie BORDIER (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695825#action_12695825 ] 

Jérémie BORDIER commented on THRIFT-72:
---------------------------------------

Patch looks good, +1

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "Alexander Shigin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696906#action_12696906 ] 

Alexander Shigin commented on THRIFT-72:
----------------------------------------

David, lgtm

Bryan, I believe assignee should be Erik as the author of initial version of patch, but I can't find him in drop box.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Updated: (THRIFT-72) C++ structure constructor

Posted by "Eric Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Anderson updated THRIFT-72:
--------------------------------

    Attachment:     (was: structure-constructor.patch)

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Priority: Minor
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Commented: (THRIFT-72) C++ structure constructor

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12696806#action_12696806 ] 

David Reiss commented on THRIFT-72:
-----------------------------------

Fixed some more tabs.  Replaced "\n" with endl.  Made the tests pass.

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: 0001-THRIFT-72.-cpp-Add-a-struct-constructor-that-takes.patch, structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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


[jira] Assigned: (THRIFT-72) C++ structure constructor

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-72?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury reassigned THRIFT-72:
-----------------------------------

    Assignee: Alexander Shigin

>  C++ structure constructor
> --------------------------
>
>                 Key: THRIFT-72
>                 URL: https://issues.apache.org/jira/browse/THRIFT-72
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (C++)
>         Environment: Tested on debian stable (etch)
>            Reporter: Eric Anderson
>            Assignee: Alexander Shigin
>            Priority: Minor
>             Fix For: 0.1
>
>         Attachments: structure-constructor.patch, thrift-cpp-constructor-v2.patch, thrift-cpp-constructor-v3.patch, thrift-cpp-constructor-v4.patch, thrift-cpp-constructor-v5.patch
>
>
> We're mostly using the C++ interface to thrift, and I wanted to be
> able to initialize structures more easily than a whole series of lines
> that set each of the parameters separately.  Attached is a patch that
> adds a constructor to the C++ objects that allow you to fully
> initialize an object in a single call.  I added two tests for this,
> one in the DebugProtoTest.cpp file, and one in the
> OptionalRequiredTest.cpp.  The patch is against the 20080411p1 release.

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