test -z "$1" && usage "Missing name!"
-TOPSRCDIR=$( cd @abs_top_srcdir@ && pwd )
+TOPSRCDIR=${XTOPSRCDIR:-$(cd @CMAKE_SOURCE_DIR@ && pwd)}
test -z "$TOPSRCDIR" && {
- echo "Dir does not exist '@abs_top_srcdir@'" >&2
+ echo "Dir does not exist '$TOPSRCDIR'" >&2
exit 1
}
${INDENT}/** */
${INDENT}class ${CLASS}
${INDENT}{
-${INDENT} friend std::ostream & operator<<( std::ostream & str, const ${CLASS} & obj )
+${INDENT} friend std::ostream & operator<<( std::ostream & str, const ${CLASS} & obj );
+
${INDENT}public:
${INDENT} /** Implementation */
${INDENT} class Impl;
cat <<EOF
$(intro $CLASS_CC)
#include <iostream>
-//#include "zypp/base/Logger.h"
+//#include "zypp/base/LogTools.h"
#include "${INCLUDE_H}"
${INDENT}public:
${INDENT} /** Offer default Impl. */
${INDENT} static shared_ptr<Impl> nullimpl()
-${INDENT} { if ( ! _nullimpl ) _nullimpl.reset( new Impl ); return _nullimpl; }
-
-${INDENT}private:
-${INDENT} /** Default Impl. */
-${INDENT} static shared_ptr<Impl> _nullimpl;
+${INDENT} {
+${INDENT} static shared_ptr<Impl> _nullimpl( new Impl );
+${INDENT} return _nullimpl;
+${INDENT} }
${INDENT}private:
${INDENT} friend Impl * rwcowClone<Impl>( const Impl * rhs );
${INDENT}};
${INDENT}///////////////////////////////////////////////////////////////////
-${INDENT}shared_ptr<${CLASS}::Impl> ${CLASS}::Impl::_nullimpl;
-
-${INDENT}///////////////////////////////////////////////////////////////////
-
${INDENT}/** \relates ${CLASS}::Impl Stream output */
${INDENT}inline std::ostream & operator<<( std::ostream & str, const ${CLASS}::Impl & obj )
${INDENT}{