Added new rubycontainer_extended.swg file.

This file contains standard ruby algorithms but
which place some restriction on the class inside
the STL container.
Fixed GC_VALUE so that it cannot be instantiated
from the language manually.
Fixed delete autodoc.
Started documenting each portion of the SWIG
templates/macros so it makes sense to people.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9773 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Gonzalo Garramuno 2007-05-05 10:26:59 +00:00
commit 1c46a18c50
6 changed files with 212 additions and 45 deletions

View file

@ -1,7 +1,7 @@
#ifdef __cplusplus
/*
GC_VALUE is used as a replacement of VALUE.
GC_VALUE is used as a replacement of Ruby's VALUE.
GC_VALUE automatically handles registering and unregistering
of the underlying ruby object with the GC.
@ -17,7 +17,8 @@
}
};
or as a input/output value (not much use for this, thou):
or as a input/output value (not much use for this, as VALUE works as
well here, thou):
GC_VALUE func(GC_VALUE obj) {
GC_VALUE out = rb_obj_classname(obj);
@ -34,11 +35,19 @@
*/
namespace swig {
// we don't ignore it, so it will get printed nicely with inspect
//%ignore GC_VALUE;
%nodirector GC_VALUE;
// We ignore the constructor so that user can never create a GC_VALUE manually
%ignore GC_VALUE::GC_VALUE;
struct GC_VALUE {
VALUE inspect() const;
VALUE to_s() const;
GC_VALUE();
protected:
GC_VALUE( const GC_VALUE& );
~GC_VALUE();
};
%exception GC_VALUE {};
@ -132,6 +141,12 @@ namespace swig {
}
/**
* std::less< GC_VALUE > functor so that STL containers will accept
* GC_VALUE.
*
*/
namespace std {
template <>
struct less< swig::GC_VALUE >: public binary_function< swig::GC_VALUE,