Sha256: d05438ed7923279498dbf193088008c644f6b2d462d030abcf32457030928fbf

Contents?: true

Size: 528 Bytes

Versions: 36

Compression:

Stored size: 528 Bytes

Contents

|
| fields = %w( foo bar foobar barfoo )
|
| macro('field'){|name| "int #{ name };" }
|
| macro('setter') do |name|
|   <<-c
|     int set_#{ name }(self, value)
|       object * self;
|       int value;
|     {
|       return( self->#{ name } = value );
|     }
|   c
| end
|
| macro('getter') do |name|
|   <<-c
|     int get_#{ name }(self)
|       object * self;
|     {
|       return( self->#{ name } );
|     }
|   c
| end

struct object {
|
| fields.each{|f| field f}
|
};

|
| fields.each{|f| setter(f); getter(f); }
|

Version data entries

36 entries across 36 versions & 3 rubygems

Version Path
hutch-xamplr-1.0.0 lib/xamplr/simpleTemplate/input-c.r4
hutch-xamplr-1.0.1 lib/xamplr/simpleTemplate/input-c.r4
hutch-xamplr-1.0.2 lib/xamplr/simpleTemplate/input-c.r4
hutch-xamplr-1.0.3 lib/xamplr/simpleTemplate/input-c.r4
hutch-xamplr-1.0.4 lib/xamplr/simpleTemplate/input-c.r4
hutch-xamplr-1.0.5 lib/xamplr/simpleTemplate/input-c.r4
hutch-xamplr-1.1.0 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.1.1 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.1.2 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.1.4 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.2.0 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.0 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.1 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.10 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.11 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.12 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.13 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.14 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.3 lib/xamplr/simpleTemplate/obsolete/input-c.r4
hutch-xamplr-1.3.8 lib/xamplr/simpleTemplate/obsolete/input-c.r4