29 Dec 2010 02:53:48 UTC
- Distribution: KinoSearch
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (5)
- Testers (34 / 42 / 5)
- KwaliteeBus factor: 0
- License: perl_5
- Activity24 month
- Download (850.99KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionCREAMYG Marvin Humphreyand 1 contributors
- Marvin Humphrey <marvin at rectangular dot com>
Clownfish::Binding::Core - Generate core C code for a Clownfish::Hierarchy.
my $hierarchy = Clownfish::Hierarchy->new( source => '/path/to/clownfish/files', dest => 'autogen', ); $hierarchy->build; my $core_binding = Clownfish::Binding::Core->new( hierarchy => $hierarchy, dest => 'autogen', header => "/* Auto-generated file. */\n", footer => $copyfoot, ); my $modified = $core_binding->write_all_modified($modified);
A Clownfish::Hierarchy describes an abstract specifiction for a class hierarchy; Clownfish::Binding::Core is responsible for auto-generating C code which implements that specification.
my $binding = Clownfish::Binding::Core->new( hierarchy => $hierarchy, # required dest => '/path/to/autogen', # required header => $header, # required footer => $footer, # required );
hierarchy - A Clownfish::Hierarchy.
dest - The directory where C output files will be written.
header - Text which will be prepended to each generated C file -- typically, an "autogenerated file" warning.
footer - Text to be appended to the end of each generated C file -- typically copyright information.
$hierarchy->propagate_modifiedto establish which classes do not have up-to-date generated .c and .h files, then traverse the hierarchy writing all necessary files.
Copyright 2008-2010 Marvin Humphrey
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.