Commit ac95cd9b authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

some corrections concerning deepcopy

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1901
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 9ba742b4
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: series.h,v 1.20 2005-07-05 15:18:36 tforb Exp $
* $Id: series.h,v 1.21 2005-07-27 10:20:31 tforb Exp $
* \author Thomas Forbriger
* \date 17/12/2002
*
......@@ -52,6 +52,11 @@
* - provide data modification through const Series
* - 05/07/2005 V1.10 (thof)
* - expose const representation too if declared const
* - 27/07/2005 V1.11 (thof)
* - deepcopy moved to namespace aff
* - copyout() used wrong index values in constructor
* - ConstSeries::copyout() must use a writeable
* intermediate container
*
* ============================================================================
*/
......@@ -60,9 +65,9 @@
#ifndef AFF_SERIES_H_VERSION
#define AFF_SERIES_H_VERSION \
"AFF_SERIES_H V1.10"
"AFF_SERIES_H V1.11"
#define AFF_SERIES_H_CVSID \
"$Id: series.h,v 1.20 2005-07-05 15:18:36 tforb Exp $"
"$Id: series.h,v 1.21 2005-07-27 10:20:31 tforb Exp $"
#include <aff/lib/sharedheap.h>
#include <aff/lib/linearshape.h>
......@@ -357,7 +362,7 @@ namespace aff {
template<class C>
Tcontainer& copyin(const C& a)
{
aff::util::deepcopy(a, *this);
aff::deepcopy(a, *this);
return(*this);
}
......@@ -405,7 +410,7 @@ namespace aff {
template<class T>
Series<T> Series<T>::copyout() const
{
Tcontainer copy(this->size(),this->first());
Tcontainer copy(this->first(),this->last());
copy.copyin(*this);
return(copy);
}
......@@ -416,7 +421,8 @@ namespace aff {
template<class T>
ConstSeries<T> ConstSeries<T>::copyout() const
{
Tcontainer copy(this->size(),this->first());
// must use a writeable container as intermediate object
Series<T> copy(this->first(),this->last());
copy.copyin(*this);
return(copy);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment