Revision: 673
http://svn.sourceforge.net/pygccxml/?rev=673&view=rev
Author: roman_yakovenko
Date: 2006-10-18 14:54:57 -0700 (Wed, 18 Oct 2006)
Log Message:
-----------
updating documentation
Modified Paths:
--------------
pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/bindings.cpp
pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/classes.hpp
pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/sconstruct
pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/smart_ptr.h
pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/smart_ptrs.rest
Modified: pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/bindings.cpp
===================================================================
--- pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/bindings.cpp 2006-10-18 21:23:08 UTC (rev 672)
+++ pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/bindings.cpp 2006-10-18 21:54:57 UTC (rev 673)
@@ -82,10 +82,11 @@
.def( "get_value", bp::pure_virtual( &base_i::get_value ) );
//Register implicit conversion between smart pointers. Boost.Python library
- //can not discover relationship between classes.This will allow Boost.Python
- //to treat right the functions, which expect to get as argument
- //smart_ptr_t< base_i > class instance, when smart_ptr_t< derived from base_i >
- //class instance is passed.
+ //can not discover relationship between classes. You have to tell about the
+ //relationship to it. This will allow Boost.Python to treat right, the
+ //functions, which expect to get as argument smart_ptr_t< base_i > class
+ //instance, when smart_ptr_t< derived from base_i > class instance is passed.
+ //
//For more information about implicitly_convertible see the documentation:
//http://boost.org/libs/python/doc/v2/implicit.html .
bp::implicitly_convertible< smart_ptr_t< base_wrapper_t >, smart_ptr_t< base_i > >();
Modified: pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/classes.hpp
===================================================================
--- pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/classes.hpp 2006-10-18 21:23:08 UTC (rev 672)
+++ pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/classes.hpp 2006-10-18 21:54:57 UTC (rev 673)
@@ -68,7 +68,7 @@
//Next function could be exposed, but it could not be called from Python, when
-//the argument is instance of derived class.
+//the argument is the instance of a derived class.
//
//This is the explanation David Abrahams gave:
// Naturally; there is no instance of smart_ptr_t<base_i> anywhere in the
Modified: pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/sconstruct
===================================================================
--- pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/sconstruct 2006-10-18 21:23:08 UTC (rev 672)
+++ pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/sconstruct 2006-10-18 21:54:57 UTC (rev 673)
@@ -3,7 +3,8 @@
, source=[ r'bindings.cpp' ]
, LIBS=[ r"boost_python" ]
, LIBPATH=[ r"/home/roman/boost_cvs/bin",r"" ]
- , CPPPATH=[ r"/home/roman/boost_cvs",r"/usr/include/python2.4" ]
+ , CPPPATH=[ r"/home/roman/boost_cvs"
+ , r"/usr/include/python2.4" ]
, SHLIBPREFIX=''
, SHLIBSUFFIX='.so'
)
Modified: pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/smart_ptr.h
===================================================================
--- pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/smart_ptr.h 2006-10-18 21:23:08 UTC (rev 672)
+++ pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/smart_ptr.h 2006-10-18 21:54:57 UTC (rev 673)
@@ -3,6 +3,7 @@
#include <assert.h>
+
//The smart_ptr_t class has been created based on Ogre::SharedPtr class
//http://www.ogre3d.org/docs/api/html/OgreSharedPtr_8h-source.html
@@ -23,7 +24,7 @@
{}
//Every custom smart pointer class should have copy constructor and
- //assignment operator. Probably you smart pointer class already has this
+ //assignment operator. Probably your smart pointer class already has this
//functionality.
smart_ptr_t(const smart_ptr_t& r)
@@ -58,7 +59,7 @@
// smart_ptr_t< base > b( smart_ptr_t<derived>() );
//
//This functionality is very important for C++ Python bindings. It will allow
- //us to register smart pointer conversion:
+ //you to register smart pointer conversion:
// boost::python::implicitly_convertible< smart_ptr_t< derived >, smart_ptr_t< base > >();
template<class Y>
smart_ptr_t(const smart_ptr_t<Y>& r)
Modified: pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/smart_ptrs.rest
===================================================================
--- pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/smart_ptrs.rest 2006-10-18 21:23:08 UTC (rev 672)
+++ pyplusplus_dev/docs/bpl_lessons_learned/smart_ptrs/smart_ptrs.rest 2006-10-18 21:54:57 UTC (rev 673)
@@ -10,7 +10,28 @@
.. include:: ./definition.rest
+Files
+-----
+* `smart_ptr.h`_ file contains definition of custom smart pointer class.
+
+* `classes.hpp`_ file contains definition of few classes, which should be exposed
+ to Python.
+
+* `bindings.cpp`_ file contains source code that exposes the classes to Python.
+
+* `sconstruct`_ file contains build instructions for scons build tool.
+
+* `test.py`_ file contains complete unit tests for the exposed classes
+
+All files contain comments, which describe what and why was done.
+
+.. _`smart_ptr.h` : ./smart_ptr.h.html
+.. _`classes.hpp` : ./classes.hpp.html
+.. _`bindings.cpp` : ./bindings.cpp.html
+.. _`sconstruct` : ./sconstruct.html
+.. _`test.py` : ./test.py.html
+
--------
Download
--------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|