Sha256: df50a30bc68e0569f9fc40911126100ab090445735bc8009f2c215957b18d2bf

Contents?: true

Size: 530 Bytes

Versions: 36

Compression:

Stored size: 530 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.3.9 lib/xamplr/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.16 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.13 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.12 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.11 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.10 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.9 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.8 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.7 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.5 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.4 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.3 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.2 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-gen-1.9.0 lib/xamplr-gen/simpleTemplate/obsolete/test003.r5
xamplr-1.3.15 lib/xamplr/simpleTemplate/obsolete/test003.r5
xamplr-1.2.0 lib/xamplr/simpleTemplate/obsolete/test003.r5