You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2014/06/25 17:47:32 UTC

[8/8] git commit: Documentation for CFCBindCore

Documentation for CFCBindCore


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

Branch: refs/heads/cfc-pod-wip2
Commit: b067b8eeb43a681f4dcae5b00a81170e3df104d9
Parents: 64e9037
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Sat Jul 20 20:55:13 2013 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Jun 25 17:45:00 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/b067b8ee/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm b/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
index 4930d3f..f12b543 100644
--- a/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
+++ b/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
@@ -18,12 +18,33 @@ 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(
+        parcel     => 'Clownfish',
+        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-clownfish/blob/b067b8ee/compiler/src/CFCBindCore.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCBindCore.h b/compiler/src/CFCBindCore.h
index 33fdd82..64c7492 100644
--- a/compiler/src/CFCBindCore.h
+++ b/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);