11 Aug 2011 02:55:56 UTC
- Distribution: Lucy
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (3 / 16 / 0)
- KwaliteeBus factor: 1
- License: apache_2_0
- Perl: v5.8.3
- Activity24 month
- Download (1.02MB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:6 non-PAUSE usersCREAMYG Marvin Humphreyand 1 contributors
- The Apache Lucy Project <lucy-dev at incubator dot apache dot org>
Clownfish::File - Structured representation of the contents of a Clownfish source file.
An abstraction representing a file which contains Clownfish code.
my $file_obj = Clownfish::File->new( source_class => 'Crustacean::Lobster', # required );
source_class - The class name associated with the source file, regardless of how what classes are defined in the source file. Example: If source_class is "Foo::Bar", that implies that the source file could be found at 'Foo/Bar.cfh' within the source directory and that the output C header file should be 'Foo/Bar.h' within the target include directory.
Add an element to the blocks array. The block must be either a Clownfish::Class, a Clownfish::Parcel, or a Clownfish::CBlock.
my $blocks = $file->blocks;
Return all blocks as an arrayref.
my $classes = $file->classes;
Return all Clownfish::Class blocks from the file as an arrayref.
Accessors for the file's "modified" property, which is initially false.
# '/path/to/Source/Class.c', etc. my $c_path = $file->c_path('/path/to'); my $h_path = $file->h_path('/path/to'); my $cfh_path = $file->cfh_path('/path/to');
Given a base directory, return a path name derived from the File's source_class with the specified extension.
# e.g. "H_CRUSTACEAN_LOBSTER" my $guard_name = $file->guard_name
Return a string used for an include guard in a C header, unique per file.
Return a string opening the include guard.
Return a string closing the include guard. Other classes count on being able to match this string.