lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nwelln...@apache.org
Subject [lucy-commits] [6/6] git commit: refs/heads/cfc-pod - Documentation for CFCBindCore
Date Sat, 20 Jul 2013 20:38:02 GMT
Documentation for CFCBindCore


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/82fa8937
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/82fa8937
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/82fa8937

Branch: refs/heads/cfc-pod
Commit: 82fa893701de8f80990a8bf8fb27049732d88279
Parents: d20b48e
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sat Jul 20 20:55:13 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sat Jul 20 20:55:13 2013 +0200

----------------------------------------------------------------------
 .../buildlib/Clownfish/CFC/Build/Binding.pm     | 20 ++++++++++++++++++++
 clownfish/compiler/src/CFCBindCore.h            | 11 ++++++-----
 2 files changed, 26 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/82fa8937/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
index 1de4fd7..94aa4da 100644
--- a/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
+++ b/clownfish/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
@@ -18,12 +18,32 @@ use strict;
 
 sub bind_all {
     my $class = shift;
+    $class->bind_bindcore;
     $class->bind_hierarchy;
     $class->bind_perl;
     $class->bind_perlclass;
     $class->bind_perlpod;
 }
 
+sub bind_bindcore {
+    class_from_c('CFCBindCore', 'Clownfish::CFC::Binding::Core');
+
+    my @exposed = qw(
+        Write_All_Modified
+    );
+
+    my $pod_spec = Clownfish::CFC::Binding::Perl::Pod->new;
+    $pod_spec->add_constructor( alias => 'new' );
+    $pod_spec->add_method( method => $_, alias => lc($_) ) for @exposed;
+
+    my $binding = Clownfish::CFC::Binding::Perl::Class->new(
+        class_name => 'Clownfish::CFC::Binding::Core',
+    );
+    $binding->set_pod_spec($pod_spec);
+
+    Clownfish::CFC::Binding::Perl::Class->register($binding);
+}
+
 sub bind_hierarchy {
     class_from_c('CFCHierarchy', 'Clownfish::CFC::Model::Hierarchy');
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/82fa8937/clownfish/compiler/src/CFCBindCore.h
----------------------------------------------------------------------
diff --git a/clownfish/compiler/src/CFCBindCore.h b/clownfish/compiler/src/CFCBindCore.h
index 33fdd82..64c7492 100644
--- a/clownfish/compiler/src/CFCBindCore.h
+++ b/clownfish/compiler/src/CFCBindCore.h
@@ -14,8 +14,7 @@
  * limitations under the License.
  */
 
-/** Clownfish::CFC::Binding::Core - Generate core C code for a
- * Clownfish::CFC::Model::Hierarchy.
+/** Generate core C code for a Clownfish::CFC::Model::Hierarchy.
  *
  * A Clownfish::CFC::Model::Hierarchy describes an abstract specifiction for a
  * class hierarchy; Clownfish::CFC::Binding::Core is responsible for
@@ -50,9 +49,11 @@ CFCBindCore_init(CFCBindCore *self, struct CFCHierarchy *hierarchy,
 void
 CFCBindCore_destroy(CFCBindCore *self);
 
-/** Call <code>CFCHierarchy_propagate_modified</code>to establish which
- * classes do not have up-to-date generated .c and .h files, then traverse the
- * hierarchy writing all necessary files.
+/** Establish which classes do not have up-to-date generated .c and .h files,
+ * then traverse the hierarchy writing all necessary files.
+ *
+ * @param modified If this argument is true, write all files without checking
+ * whether they're up-to-date.
  */
 int
 CFCBindCore_write_all_modified(CFCBindCore *self, int modified);


Mime
View raw message