Clownfish::Binding::Core - Generate core C code for a Clownfish::Hierarchy.
my $hierarchy = Clownfish::Hierarchy->new( source => '/path/to/bp/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.
Call $hierarchy->propagate_modified to establish which classes do not have up-to-date generated .c and .h files, then traverse the hierarchy writing all necessary files.
$hierarchy->propagate_modified
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.
To install KSx::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KSx::Simple
CPAN shell
perl -MCPAN -e shell install KSx::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.