|
From: stephan b. <sg...@us...> - 2004-12-28 04:16:51
|
Update of /cvsroot/pclasses/pclasses2/src/s11n In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15033/src/s11n Modified Files: functor.h Log Message: API doc additions. Minor comparison fix in an operator<(). Index: functor.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/s11n/functor.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- functor.h 26 Dec 2004 00:55:20 -0000 1.2 +++ functor.h 28 Dec 2004 04:16:35 -0000 1.3 @@ -260,15 +260,23 @@ a list of pointers into another list. Designed for use with std::for_each and the like. - ListType must support: + Assuming T is the type contained in ListType, stripped + of any pointer part, then the following must hold: - <code>push_back( value_type * )</code>. + + - List must support <code>push_back( T * )</code>. + + - This must be a valid expression: + + <code>T * t = new T( *p );</code> + + Where p is a passed to this type's operator(). ACHTUNG: This is only useful for non-polymorphic copying. It might be interesting to note that copying - s11n::data_node objects this way is + monomorphic s11n::data_node objects this way is "pseudo-polymorphic" - the copy itself is monomorphic but the data needed to deserialize the proper type from the node is maintained. @@ -361,7 +369,7 @@ bool operator()( const nameable_type * x ) const { - if( ! x ) return false; + if( ! x ) return this->m_name.empty(); return x->name() == this->m_name; } private: |