[spirit 2] create and fusionize struct

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[spirit 2] create and fusionize struct

CARL BARRON-3
Atteached is a macro I use to create 'simple' structs and make fusion  
sequences of them




-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel

create_struct.h (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2] create and fusionize struct

Joel de Guzman-2
Carl Barron wrote:
> Atteached is a macro I use to create 'simple' structs and make fusion
> sequences of them

Cool!

Some comments:
* Don't include <boost/preprocessor.hpp>. That is expensive.
Include only what's needed. Actually, simply including
adapt_struct.hpp is enough to give you what you need from PP.
* If you intend that to be part of fusion, then the name
should be BOOST_FUSION_STRUCT
* Why do you need to include <boost/fusion/include/for_each.hpp> ?


If you want them added to fusion, I'll need:
1) Some tests
2) Docs

I'll add a page for acknowledging contributions. Thanks!

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2] create and fusionize struct

CARL BARRON-3

On Dec 1, 2008, at 7:02 PM, Joel de Guzman wrote:

> Carl Barron wrote:
>> Atteached is a macro I use to create 'simple' structs and make fusion
>> sequences of them
>
> Cool!
>
> Some comments:
> * Don't include <boost/preprocessor.hpp>. That is expensive.
> Include only what's needed. Actually, simply including
> adapt_struct.hpp is enough to give you what you need from PP.
        Ok tthe  extra includes go away
>
> * If you intend that to be part of fusion, then the name
> should be BOOST_FUSION_STRUCT
        ok   DEFINE_STRUCT -> BOOST_FUSION_STRUCT
        and your copywrite /license added.
>
> * Why do you need to include <boost/fusion/include/for_each.hpp> ?
>
       Probably since it was once cut from a testing main file:) its  
not needed

>
> If you want them added to fusion, I'll need:
> 1) Some tests
> 2) Docs
     Docs   same as BOOST_FUSION_ADAPT_STRUCT except it also creates  
the struct.

attached is modifed crteate_strict.h.   maiin.cpp - simple tests  
results.txt  my results of my runs.
tested with fusion:::for_each,fusion::at_c  any others fusion  
operations needed to test??





-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel

create_struct.h (1K) Download Attachment
main.cpp (1K) Download Attachment
results.txt (820 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2] create and fusionize struct

Joel de Guzman-2
Carl Barron wrote:
>
>> * If you intend that to be part of fusion, then the name
>> should be BOOST_FUSION_STRUCT
>     ok   DEFINE_STRUCT -> BOOST_FUSION_STRUCT
>     and your copywrite /license added.

Hey, you should keep your copyright ;-)

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2] create and fusionize struct

Joel de Guzman-2
In reply to this post by CARL BARRON-3
Carl Barron wrote:

>> If you want them added to fusion, I'll need:
>> 1) Some tests
>> 2) Docs
>     Docs   same as BOOST_FUSION_ADAPT_STRUCT except it also creates the
> struct.
>
> attached is modifed crteate_strict.h.   maiin.cpp - simple tests  
> results.txt  my results of my runs.
> tested with fusion:::for_each,fusion::at_c  any others fusion operations
> needed to test??

Cool! I think that's sufficient. But, hey, don't forget the docs,
ok. You can simply rip the adapt_struct docs, if you want.

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2] create and fusionize struct

CARL BARRON-3

On Dec 1, 2008, at 9:17 PM, Joel de Guzman wrote:

>
> Cool! I think that's sufficient. But, hey, don't forget the docs,
> ok. You can simply rip the adapt_struct docs, if you want.

attached is a mdified  section describing BOOST_FUSION_STRUCT I used a  
text editor
but the tags seem self explanatory so its is in quick book format but  
is only a section.







-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel

create_struct.txt (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [spirit 2] create and fusionize struct

Joel de Guzman-2
Carl Barron wrote:

>
> On Dec 1, 2008, at 9:17 PM, Joel de Guzman wrote:
>
>>
>> Cool! I think that's sufficient. But, hey, don't forget the docs,
>> ok. You can simply rip the adapt_struct docs, if you want.
>
> attached is a mdified  section describing BOOST_FUSION_STRUCT I used a
> text editor
> but the tags seem self explanatory so its is in quick book format but is
> only a section.

Thank You! :-)

--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Spirit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/spirit-devel