rice 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/Doxyfile +1 -1
  2. data/Makefile.in +130 -52
  3. data/README +45 -79
  4. data/Rakefile +1 -36
  5. data/aclocal.m4 +133 -61
  6. data/config.guess +43 -8
  7. data/config.sub +41 -13
  8. data/configure +1370 -1898
  9. data/configure.ac +2 -2
  10. data/doxygen.ac +1 -1
  11. data/extconf.rb +3 -1
  12. data/rice/Arg_impl.hpp +2 -2
  13. data/rice/Data_Type.cpp +34 -1
  14. data/rice/Data_Type.ipp +14 -5
  15. data/rice/Data_Type_defn.hpp +28 -1
  16. data/rice/Director.cpp +0 -6
  17. data/rice/Director.hpp +0 -8
  18. data/rice/Hash.hpp +1 -1
  19. data/rice/Makefile.am +2 -12
  20. data/rice/Makefile.in +111 -88
  21. data/rice/Object.cpp +8 -1
  22. data/rice/Object.ipp +1 -1
  23. data/rice/Object_defn.hpp +8 -0
  24. data/rice/config.hpp +3 -0
  25. data/rice/config.hpp.in +3 -0
  26. data/rice/detail/Auto_Function_Wrapper.ipp +1025 -512
  27. data/rice/detail/Auto_Member_Function_Wrapper.ipp +545 -272
  28. data/rice/detail/cfp.hpp +24 -0
  29. data/rice/detail/cfp.ipp +51 -0
  30. data/rice/detail/method_data.cpp +107 -336
  31. data/rice/detail/node.hpp +13 -13
  32. data/rice/detail/ruby.hpp +4 -0
  33. data/rice/detail/rubysig.hpp +19 -19
  34. data/rice/detail/traits.hpp +43 -0
  35. data/rice/generate_code.rb +37 -16
  36. data/rice/protect.hpp +1 -1
  37. data/rice/protect.ipp +448 -192
  38. data/rice/to_from_ruby.ipp +4 -12
  39. data/rice/to_from_ruby_defn.hpp +2 -2
  40. data/ruby/Makefile.in +99 -32
  41. data/ruby/lib/Makefile.in +61 -21
  42. data/ruby/lib/mkmf-rice.rb.in +9 -2
  43. data/ruby/lib/version.rb +1 -1
  44. data/sample/Makefile.in +33 -10
  45. data/test/Makefile.am +27 -0
  46. data/test/Makefile.in +270 -59
  47. data/test/ext/Makefile.am +43 -0
  48. data/test/ext/Makefile.in +399 -0
  49. data/test/ext/t1/Foo.hpp +10 -0
  50. data/test/ext/t1/extconf.rb +2 -0
  51. data/test/ext/t1/t1.cpp +15 -0
  52. data/test/ext/t2/extconf.rb +2 -0
  53. data/test/ext/t2/t2.cpp +11 -0
  54. data/test/test_Allocation_Strategies.cpp +1 -1
  55. data/test/test_Class.cpp +79 -0
  56. data/test/test_Data_Type.cpp +2 -2
  57. data/test/test_Director.cpp +114 -38
  58. data/test/test_Module.cpp +27 -2
  59. data/test/test_To_From_Ruby.cpp +4 -4
  60. data/test/test_rice.rb +9 -1
  61. metadata +23 -8
  62. data/rice/detail/method_data.cpp.rpp +0 -301
  63. data/rice/detail/mininode.cpp.rpp +0 -62
  64. data/rice/detail/mininode.hpp.rpp +0 -119
  65. data/rice/detail/remove_const.hpp +0 -21
data/Doxyfile CHANGED
@@ -23,7 +23,7 @@ PROJECT_NAME = Rice
23
23
  # This could be handy for archiving the generated documentation or
24
24
  # if some version control system is used.
25
25
 
26
- PROJECT_NUMBER = 1.2
26
+ PROJECT_NUMBER = 1.3.0
27
27
 
28
28
  # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
29
29
  # base path where the generated documentation will be put.
@@ -1,8 +1,9 @@
1
- # Makefile.in generated by automake 1.10.2 from Makefile.am.
1
+ # Makefile.in generated by automake 1.11 from Makefile.am.
2
2
  # @configure_input@
3
3
 
4
4
  # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5
- # 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5
+ # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
6
+ # Inc.
6
7
  # This Makefile.in is free software; the Free Software Foundation
7
8
  # gives unlimited permission to copy and/or distribute it,
8
9
  # with or without modifications, as long as this notice is preserved.
@@ -45,8 +46,9 @@
45
46
  # This is usually added to MOSTLYCLEANFILES.
46
47
  VPATH = @srcdir@
47
48
  pkgdatadir = $(datadir)/@PACKAGE@
48
- pkglibdir = $(libdir)/@PACKAGE@
49
49
  pkgincludedir = $(includedir)/@PACKAGE@
50
+ pkglibdir = $(libdir)/@PACKAGE@
51
+ pkglibexecdir = $(libexecdir)/@PACKAGE@
50
52
  am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
51
53
  install_sh_DATA = $(install_sh) -c -m 644
52
54
  install_sh_PROGRAM = $(install_sh) -c
@@ -65,7 +67,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
65
67
  $(srcdir)/Makefile.in $(srcdir)/doxygen.am \
66
68
  $(top_srcdir)/configure \
67
69
  $(top_srcdir)/rice/detail/ruby_version_code.hpp.in COPYING \
68
- config.guess config.sub depcomp install-sh missing
70
+ TODO config.guess config.sub depcomp install-sh missing
69
71
  subdir = .
70
72
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
71
73
  am__aclocal_m4_deps = $(top_srcdir)/ruby.ac $(top_srcdir)/doxygen.ac \
@@ -77,6 +79,7 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
77
79
  mkinstalldirs = $(install_sh) -d
78
80
  CONFIG_HEADER = $(top_builddir)/rice/config.hpp
79
81
  CONFIG_CLEAN_FILES = rice/detail/ruby_version_code.hpp
82
+ CONFIG_CLEAN_VPATH_FILES =
80
83
  SOURCES =
81
84
  DIST_SOURCES =
82
85
  RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -88,6 +91,9 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
88
91
  ps-recursive uninstall-recursive
89
92
  RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
90
93
  distclean-recursive maintainer-clean-recursive
94
+ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
95
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
96
+ distdir dist dist-all distcheck
91
97
  ETAGS = etags
92
98
  CTAGS = ctags
93
99
  DIST_SUBDIRS = $(SUBDIRS)
@@ -98,6 +104,31 @@ am__remove_distdir = \
98
104
  { test ! -d "$(distdir)" \
99
105
  || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
100
106
  && rm -fr "$(distdir)"; }; }
107
+ am__relativize = \
108
+ dir0=`pwd`; \
109
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
110
+ sed_rest='s,^[^/]*/*,,'; \
111
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
112
+ sed_butlast='s,/*[^/]*$$,,'; \
113
+ while test -n "$$dir1"; do \
114
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
115
+ if test "$$first" != "."; then \
116
+ if test "$$first" = ".."; then \
117
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
118
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
119
+ else \
120
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
121
+ if test "$$first2" = "$$first"; then \
122
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
123
+ else \
124
+ dir2="../$$dir2"; \
125
+ fi; \
126
+ dir0="$$dir0"/"$$first"; \
127
+ fi; \
128
+ fi; \
129
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
130
+ done; \
131
+ reldir="$$dir2"
101
132
  DIST_ARCHIVES = "$(distdir)".tar.gz
102
133
  GZIP_ENV = --best
103
134
  distuninstallcheck_listfiles = find . -type f -print
@@ -160,6 +191,7 @@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
160
191
  PACKAGE_NAME = @PACKAGE_NAME@
161
192
  PACKAGE_STRING = @PACKAGE_STRING@
162
193
  PACKAGE_TARNAME = @PACKAGE_TARNAME@
194
+ PACKAGE_URL = @PACKAGE_URL@
163
195
  PACKAGE_VERSION = @PACKAGE_VERSION@
164
196
  PATH_SEPARATOR = @PATH_SEPARATOR@
165
197
  RANLIB = @RANLIB@
@@ -280,15 +312,15 @@ $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/doxygen.am $(am__configu
280
312
  @for dep in $?; do \
281
313
  case '$(am__configure_deps)' in \
282
314
  *$$dep*) \
283
- echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \
284
- cd $(srcdir) && $(AUTOMAKE) --foreign \
315
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
316
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
285
317
  && exit 0; \
286
318
  exit 1;; \
287
319
  esac; \
288
320
  done; \
289
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
290
- cd $(top_srcdir) && \
291
- $(AUTOMAKE) --foreign Makefile
321
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
322
+ $(am__cd) $(top_srcdir) && \
323
+ $(AUTOMAKE) --foreign Makefile
292
324
  .PRECIOUS: Makefile
293
325
  Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
294
326
  @case '$?' in \
@@ -304,9 +336,10 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
304
336
  $(SHELL) ./config.status --recheck
305
337
 
306
338
  $(top_srcdir)/configure: $(am__configure_deps)
307
- cd $(srcdir) && $(AUTOCONF)
339
+ $(am__cd) $(srcdir) && $(AUTOCONF)
308
340
  $(ACLOCAL_M4): $(am__aclocal_m4_deps)
309
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
341
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
342
+ $(am__aclocal_m4_deps):
310
343
  rice/detail/ruby_version_code.hpp: $(top_builddir)/config.status $(top_srcdir)/rice/detail/ruby_version_code.hpp.in
311
344
  cd $(top_builddir) && $(SHELL) ./config.status $@
312
345
 
@@ -334,7 +367,7 @@ $(RECURSIVE_TARGETS):
334
367
  else \
335
368
  local_target="$$target"; \
336
369
  fi; \
337
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
370
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
338
371
  || eval $$failcom; \
339
372
  done; \
340
373
  if test "$$dot_seen" = "no"; then \
@@ -368,16 +401,16 @@ $(RECURSIVE_CLEAN_TARGETS):
368
401
  else \
369
402
  local_target="$$target"; \
370
403
  fi; \
371
- (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
404
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
372
405
  || eval $$failcom; \
373
406
  done && test -z "$$fail"
374
407
  tags-recursive:
375
408
  list='$(SUBDIRS)'; for subdir in $$list; do \
376
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
409
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
377
410
  done
378
411
  ctags-recursive:
379
412
  list='$(SUBDIRS)'; for subdir in $$list; do \
380
- test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
413
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
381
414
  done
382
415
 
383
416
  ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -392,7 +425,7 @@ tags: TAGS
392
425
 
393
426
  TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
394
427
  $(TAGS_FILES) $(LISP)
395
- tags=; \
428
+ set x; \
396
429
  here=`pwd`; \
397
430
  if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
398
431
  include_option=--etags-include; \
@@ -404,7 +437,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
404
437
  list='$(SUBDIRS)'; for subdir in $$list; do \
405
438
  if test "$$subdir" = .; then :; else \
406
439
  test ! -f $$subdir/TAGS || \
407
- tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
440
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
408
441
  fi; \
409
442
  done; \
410
443
  list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -413,29 +446,34 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
413
446
  done | \
414
447
  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
415
448
  END { if (nonempty) { for (i in files) print i; }; }'`; \
416
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
449
+ shift; \
450
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
417
451
  test -n "$$unique" || unique=$$empty_fix; \
418
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
419
- $$tags $$unique; \
452
+ if test $$# -gt 0; then \
453
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
454
+ "$$@" $$unique; \
455
+ else \
456
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
457
+ $$unique; \
458
+ fi; \
420
459
  fi
421
460
  ctags: CTAGS
422
461
  CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
423
462
  $(TAGS_FILES) $(LISP)
424
- tags=; \
425
463
  list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
426
464
  unique=`for i in $$list; do \
427
465
  if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
428
466
  done | \
429
467
  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
430
468
  END { if (nonempty) { for (i in files) print i; }; }'`; \
431
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
469
+ test -z "$(CTAGS_ARGS)$$unique" \
432
470
  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
433
- $$tags $$unique
471
+ $$unique
434
472
 
435
473
  GTAGS:
436
474
  here=`$(am__cd) $(top_builddir) && pwd` \
437
- && cd $(top_srcdir) \
438
- && gtags -i $(GTAGS_ARGS) $$here
475
+ && $(am__cd) $(top_srcdir) \
476
+ && gtags -i $(GTAGS_ARGS) "$$here"
439
477
 
440
478
  distclean-tags:
441
479
  -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -458,34 +496,50 @@ distdir: $(DISTFILES)
458
496
  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
459
497
  if test -d $$d/$$file; then \
460
498
  dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
499
+ if test -d "$(distdir)/$$file"; then \
500
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
501
+ fi; \
461
502
  if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
462
- cp -pR $(srcdir)/$$file "$(distdir)"$$dir || exit 1; \
503
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
504
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
463
505
  fi; \
464
- cp -pR $$d/$$file "$(distdir)"$$dir || exit 1; \
506
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
465
507
  else \
466
- test -f "$(distdir)"/$$file \
467
- || cp -p $$d/$$file "$(distdir)"/$$file \
508
+ test -f "$(distdir)/$$file" \
509
+ || cp -p $$d/$$file "$(distdir)/$$file" \
468
510
  || exit 1; \
469
511
  fi; \
470
512
  done
471
- list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
513
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
472
514
  if test "$$subdir" = .; then :; else \
473
515
  test -d "$(distdir)/$$subdir" \
474
516
  || $(MKDIR_P) "$(distdir)/$$subdir" \
475
517
  || exit 1; \
476
- distdir=`$(am__cd) "$(distdir)" && pwd`; \
477
- top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
478
- (cd $$subdir && \
518
+ fi; \
519
+ done
520
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
521
+ if test "$$subdir" = .; then :; else \
522
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
523
+ $(am__relativize); \
524
+ new_distdir=$$reldir; \
525
+ dir1=$$subdir; dir2="$(top_distdir)"; \
526
+ $(am__relativize); \
527
+ new_top_distdir=$$reldir; \
528
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
529
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
530
+ ($(am__cd) $$subdir && \
479
531
  $(MAKE) $(AM_MAKEFLAGS) \
480
- top_distdir="$$top_distdir" \
481
- distdir="$$distdir/$$subdir" \
532
+ top_distdir="$$new_top_distdir" \
533
+ distdir="$$new_distdir" \
482
534
  am__remove_distdir=: \
483
535
  am__skip_length_check=: \
536
+ am__skip_mode_fix=: \
484
537
  distdir) \
485
538
  || exit 1; \
486
539
  fi; \
487
540
  done
488
- -find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
541
+ -test -n "$(am__skip_mode_fix)" \
542
+ || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
489
543
  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
490
544
  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
491
545
  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
@@ -502,6 +556,10 @@ dist-lzma: distdir
502
556
  tardir="$(distdir)" && $(am__tar) | lzma -9 -c >"$(distdir)".tar.lzma
503
557
  $(am__remove_distdir)
504
558
 
559
+ dist-xz: distdir
560
+ tardir="$(distdir)" && $(am__tar) | xz -c >"$(distdir)".tar.xz
561
+ $(am__remove_distdir)
562
+
505
563
  dist-tarZ: distdir
506
564
  tardir="$(distdir)" && $(am__tar) | compress -c >"$(distdir)".tar.Z
507
565
  $(am__remove_distdir)
@@ -530,6 +588,8 @@ distcheck: dist
530
588
  bunzip2 -c "$(distdir)".tar.bz2 | $(am__untar) ;;\
531
589
  *.tar.lzma*) \
532
590
  unlzma -c "$(distdir)".tar.lzma | $(am__untar) ;;\
591
+ *.tar.xz*) \
592
+ xz -dc "$(distdir)".tar.xz | $(am__untar) ;;\
533
593
  *.tar.Z*) \
534
594
  uncompress -c "$(distdir)".tar.Z | $(am__untar) ;;\
535
595
  *.shar.gz*) \
@@ -541,9 +601,11 @@ distcheck: dist
541
601
  mkdir "$(distdir)"/_build
542
602
  mkdir "$(distdir)"/_inst
543
603
  chmod a-w "$(distdir)"
604
+ test -d "$(distdir)"/_build || exit 0; \
544
605
  dc_install_base=`$(am__cd) "$(distdir)"/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
545
606
  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
546
- && cd "$(distdir)"/_build \
607
+ && am__cwd=`pwd` \
608
+ && $(am__cd) "$(distdir)"/_build \
547
609
  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
548
610
  $(DISTCHECK_CONFIGURE_FLAGS) \
549
611
  && $(MAKE) $(AM_MAKEFLAGS) \
@@ -565,13 +627,15 @@ distcheck: dist
565
627
  && rm -rf "$$dc_destdir" \
566
628
  && $(MAKE) $(AM_MAKEFLAGS) dist \
567
629
  && rm -rf $(DIST_ARCHIVES) \
568
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
630
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
631
+ && cd "$$am__cwd" \
632
+ || exit 1
569
633
  $(am__remove_distdir)
570
634
  @(echo "$(distdir) archives ready for distribution: "; \
571
635
  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
572
636
  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
573
637
  distuninstallcheck:
574
- @cd $(distuninstallcheck_dir) \
638
+ @$(am__cd) '$(distuninstallcheck_dir)' \
575
639
  && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
576
640
  || { echo "ERROR: files left after uninstall:" ; \
577
641
  if test -n "$(DESTDIR)"; then \
@@ -613,6 +677,7 @@ clean-generic:
613
677
 
614
678
  distclean-generic:
615
679
  -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
680
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
616
681
 
617
682
  maintainer-clean-generic:
618
683
  @echo "This command is intended for maintainers to use"
@@ -632,6 +697,8 @@ dvi-am:
632
697
 
633
698
  html: html-recursive
634
699
 
700
+ html-am:
701
+
635
702
  info: info-recursive
636
703
 
637
704
  info-am:
@@ -640,18 +707,28 @@ install-data-am:
640
707
 
641
708
  install-dvi: install-dvi-recursive
642
709
 
710
+ install-dvi-am:
711
+
643
712
  install-exec-am:
644
713
 
645
714
  install-html: install-html-recursive
646
715
 
716
+ install-html-am:
717
+
647
718
  install-info: install-info-recursive
648
719
 
720
+ install-info-am:
721
+
649
722
  install-man:
650
723
 
651
724
  install-pdf: install-pdf-recursive
652
725
 
726
+ install-pdf-am:
727
+
653
728
  install-ps: install-ps-recursive
654
729
 
730
+ install-ps-am:
731
+
655
732
  installcheck-am:
656
733
 
657
734
  maintainer-clean: maintainer-clean-recursive
@@ -674,23 +751,23 @@ ps-am:
674
751
 
675
752
  uninstall-am:
676
753
 
677
- .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
678
- install-strip
754
+ .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
755
+ install-am install-strip tags-recursive
679
756
 
680
757
  .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
681
758
  all all-am am--refresh check check-am clean clean-generic \
682
759
  ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
683
- dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
684
- distclean-generic distclean-tags distcleancheck distdir \
685
- distuninstallcheck dvi dvi-am html html-am info info-am \
686
- install install-am install-data install-data-am install-dvi \
687
- install-dvi-am install-exec install-exec-am install-html \
688
- install-html-am install-info install-info-am install-man \
689
- install-pdf install-pdf-am install-ps install-ps-am \
690
- install-strip installcheck installcheck-am installdirs \
691
- installdirs-am maintainer-clean maintainer-clean-generic \
692
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
693
- tags-recursive uninstall uninstall-am
760
+ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
761
+ distclean distclean-generic distclean-tags distcleancheck \
762
+ distdir distuninstallcheck dvi dvi-am html html-am info \
763
+ info-am install install-am install-data install-data-am \
764
+ install-dvi install-dvi-am install-exec install-exec-am \
765
+ install-html install-html-am install-info install-info-am \
766
+ install-man install-pdf install-pdf-am install-ps \
767
+ install-ps-am install-strip installcheck installcheck-am \
768
+ installdirs installdirs-am maintainer-clean \
769
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
770
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
694
771
 
695
772
 
696
773
  @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps
@@ -744,6 +821,7 @@ doc: doxygen-doc
744
821
  rice/README.doxygen: README
745
822
  @echo Generating documentation
746
823
  @$(RUBY) -e 'File.open("README") { |i| File.open("rice/README.doxygen", "w") { |o| o.puts "/*! #{i.gets}"; i.each_line { |l| o.puts " * #{l}" if l !~ /^\\comment/ and l !~ /^vim:/ }; o.puts " */" } }'
824
+
747
825
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
748
826
  # Otherwise a system limit (for SysV at least) may be exceeded.
749
827
  .NOEXPORT:
data/README CHANGED
@@ -669,7 +669,7 @@ it's necessary to define this in Rice explicitly using Rice::Arg:
669
669
 
670
670
  The syntax here is simply Arg(nameOfParameter)[ = defaultValue]. The name of the
671
671
  parameter is not important (more for readability, and the future for when/if Ruby
672
- gets named arguments), but the value set via operator= must match the type
672
+ gets named parameters), but the value set via operator= must match the type
673
673
  of the given parameter.
674
674
 
675
675
  These Rice::Arg objects must be in the correct order, and if there are more than
@@ -702,8 +702,8 @@ As polymorphism is the most important tennant of Object Oriented Programming,
702
702
  it's important that Rice supports polymorphic calls travelling between C++
703
703
  and Ruby seemlessly. Super calls from Ruby subclasses back into C++ already work,
704
704
  but enabling the other direction requires some extra work. While this isn't
705
- something Rice can do on it's own, the Rice::Director class hides most of the
706
- details.
705
+ something Rice can do on it's own, the Rice::Director class, coupled with
706
+ Rice::Data_Type::define_director exposes this functionality cleanly.
707
707
 
708
708
  Like SWIG_Director, Rice::Director is a class that is used to build a proxy class
709
709
  to properly send execution up or down the object heiarchy for that class. Take
@@ -721,11 +721,11 @@ the following class:
721
721
  Due to the abstract nature of this class, it will not work at all with Rice
722
722
  in it's current form. Any attempt to do so will cause a compilation error due to
723
723
  this class not being constructable. Even without the pure virtual function, any
724
- call to VirtualBase::doWork will stop at the C++ level and not pass down into
724
+ call to VirtualBase::doWork will stop at the C++ level and will not pass down into
725
725
  any Ruby subclasses.
726
726
 
727
727
  To properly wrap both of these methods, you'll need to build a proxy class
728
- that subclasses Rice::Director:
728
+ that subclasses Rice::Director along with a few methods:
729
729
 
730
730
  \code
731
731
  #include "rice/Director.hpp"
@@ -735,30 +735,30 @@ that subclasses Rice::Director:
735
735
  VirtualBaseProxy(Object self) : Rice::Director(self) { }
736
736
 
737
737
  virtual int doWork() {
738
- if(callIsFromRuby("do_work")) {
739
- return VirtualBase::doWork();
740
- } else {
741
- return from_ruby<int>( getSelf().call("do_work") );
742
- }
738
+ return from_ruby<int>( getSelf().call("do_work") );
739
+ }
740
+
741
+ int default_doWork() {
742
+ return VirtualBase::doWork();
743
743
  }
744
744
 
745
745
  virtual int processWorker() {
746
- if(callIsFromRuby("process_worker")) {
747
- raisePureVirtual();
748
- } else {
749
- return from_ruby<int>( getSelf().call("process_worker") );
750
- }
746
+ return from_ruby<int>( getSelf().call("process_worker") );
747
+ }
748
+
749
+ int default_processWorker() {
750
+ raisePureVirtual();
751
751
  }
752
752
  };
753
753
  \endcode
754
754
 
755
- There is a lot going on here, so we'll take go through each part.
755
+ There is a lot going on here, so we'll go through each part.
756
756
 
757
757
  \code
758
758
  class VirtualBaseProxy : public Virtualbase, public Rice::Director {
759
759
  \endcode
760
760
 
761
- First, the class needs to subclass both the virtual class and Rice::Director.
761
+ First, the class needs to subclass both the virtual class and Rice::Director class.
762
762
 
763
763
  \code
764
764
  public:
@@ -773,88 +773,54 @@ minimum required for a Rice::Director proxy.
773
773
 
774
774
  \code
775
775
  virtual int doWork() {
776
- if(callIsFromRuby("do_work")) {
777
- // Call from Ruby via super, head up the stack
778
- return VirtualBase::doWork();
779
- } else {
780
- // Call from C++ heading down the stack, get self
781
- // and call the method in Ruby, taking care to
782
- // convert types to and from ruby as needed.
783
- return from_ruby<int>( getSelf().call("do_work") );
784
- }
776
+ return from_ruby<int>( getSelf().call("do_work") );
777
+ }
778
+
779
+ int default_doWork() {
780
+ return VirtualBase::doWork();
785
781
  }
786
782
  \endcode
787
783
 
788
- Every virtual method needs to have a special definition inside of this proxy class.
789
- Use Rice::Director::callIsFromRuby to check if execution is passing up or down
790
- the heirarchy. The name passed to this method needs to be the name as exposed to Ruby
791
- (which will be seen in the wrapper code below).
784
+ The two methods seen here directly correspond to the two code directions this class
785
+ opens up. The virtual method is this class's hook into C++'s polymorphism. Any calls
786
+ that need to be forwarded into Ruby are done as specified here: get the Ruby object
787
+ for the instance of this class, call Rice::Object::call, and if necessary convert
788
+ the return value from Ruby back into C++ types.
792
789
 
793
- A special case as seen in the proxy method for processWorker is the raisePureVirtual
794
- method. In the case of pure virtual methods, the proxy is the top of the heirarchy.
795
- This proxy could be written more simply:
790
+ The default_doWork method will be used as Rice's hookup of calling back up the
791
+ heirarchy (wrapping is below). This method needs to do one of two things: call
792
+ up the class heirarchy, as seen here, or call raisePureVirtual() as seen in the
793
+ processWorker example:
796
794
 
797
795
  \code
798
- virtual int processWorker() {
799
- return from_ruby<int>( getSelf().call("process_worker") );
796
+ int default_processWorker() {
797
+ raisePureVirtual();
800
798
  }
801
799
  \endcode
802
800
 
803
- but if the Ruby code accidentally calls #super, the code will get stuck in an infinite loop.
804
- To prevent this from happening, use Rice::Director::raisePureVirtual to inform users of the
805
- extension that they should not be calling up into C++ for that method.
801
+ The method raisePureVirtual() exists to allow wrapping a pure virtual method into Ruby
802
+ but making sure any users of this extension are informed quickly that there's nothing
803
+ in the C++ to call for the given method.
806
804
 
807
805
  Once the proxy class is built, it's time to wrap it into Ruby:
808
806
 
809
807
  \code
810
808
  extern "C"
811
809
  void Init_virtual() {
812
- // See Caveat below
813
- define_class<VirtualBase>("__VirtualBase__");
814
-
815
- define_class<VirtualBaseProxy, VirtualBase>("VirtualBase")
816
- .define_method("do_work", &VirtualBaseProxy::doWork)
817
- .define_method("process_worker", &VirtualBaseProxy::processWorker);
810
+ define_class<VirtualBase>("VirtualBase")
811
+ .define_director<VirtualBaseProxy>()
812
+ .define_constructor(Constructor<VirtualBaseProxy, Rice::Object>())
813
+ .define_method("do_work", &VirtualBaseProxy::default_doWork)
814
+ .define_method("process_worker", &VirtualBaseProxy::default_processWorker);
818
815
  }
819
816
  \endcode
820
817
 
821
818
  The wrapping is the same as is described earlier in this document. Expose the class
822
- VirtualBaseProxy named as VirtualBase, register it as a subclass of VirtualBase,
823
- and define methods pointing to the proxy object.
824
-
825
- <b>Caveat</b>: Rice figures out inheritance and class heirarchies solely through
826
- the types given in define_class. Ideally Rice would be able to handle this edge
827
- case automatically, but for now you'll still need to tell Rice about the base class
828
- being wrapped into a Rice::Director proxy, or type casting will throw an exception
829
- during execution. So as a general rule, make sure that any class you use as SuperClass
830
- in define_class<Class, SuperClass> is also itself
831
- exposed.
832
-
833
- Following this, if you have subclasses of virtual classes that themselves have virtual
834
- methods, you need to set the Rice::Director proxy as the superclass of that class,
835
- something like:
836
-
837
- \code
838
- // Given a class like this
839
- class SubVirtual : public VirtualBase {
840
- public:
841
- virtual int doMoreWork();
842
- }
843
-
844
- // You'd need another Director proxy
845
- class SubVirtualDirector : public SubVirtual, public VirtualBase, public Rice::Director {
846
- ...
847
- }
848
-
849
- // And expose it in Rice as such
850
- define_class<SubVirtual, VirtualBaseProxy>("__SubVirtual__");
851
- define_class<SubVirtualDirector, SubVirtual>("SubVirtual")
852
- ...
853
-
854
- \endcode
855
-
856
- This situation has not been fully tested
819
+ VirtualBase, and register VirtualBaseProxy as a director proxy of VirtualBase with
820
+ Rice::Data_Type::define_director, then define methods pointing to the proxy object as necessary.
857
821
 
822
+ You must use the Rice::Director proxy class in the Constructor line, this allows proper
823
+ object construction / destruction of the types in question.
858
824
 
859
825
  \section motivation Motivation
860
826