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

track down new const design decision

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: 1815
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 1a6f00c9
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: README.changelog,v 1.55 2005-07-04 15:27:29 tforb Exp $
* $Id: README.changelog,v 1.56 2005-07-05 13:11:59 tforb Exp $
*
* Copyright (c) 2002 by Thomas Forbriger (IMG Frankfurt)
*
......@@ -21,12 +21,16 @@
/*! \page page_changelog ChangeLog (AFF)
$Id: README.changelog,v 1.55 2005-07-04 15:27:29 tforb Exp $
$Id: README.changelog,v 1.56 2005-07-05 13:11:59 tforb Exp $
\sa \ref page_project_status
Major changes in the interface of the library are marked by \b !!.
- \b 05/07/2005 (thof)
- track down design decision for const container data modification
(04/07/2005) to operators
- \b 04/07/2005 (thof)
- \b !! removed lib/range.h, since the was no kind of array container.
Range classes already exist elsewhere (libtfxx, libpgplotxx).
......@@ -228,7 +232,7 @@
/*! \page page_project_status Project status (AFF)
$Id: README.changelog,v 1.55 2005-07-04 15:27:29 tforb Exp $
$Id: README.changelog,v 1.56 2005-07-05 13:11:59 tforb Exp $
\sa \ref page_changelog
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: array_dec.h,v 1.26 2005-07-04 15:27:29 tforb Exp $
* $Id: array_dec.h,v 1.27 2005-07-05 13:11:59 tforb Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -63,6 +63,8 @@
* - deepcopy is now in namespace aff
* - 04/07/2005 V1.11 (thof)
* - provide data modification through const Array
* - 05/07/2005 V1.12 (thof)
* - expose const representation too if declared const
*
* ============================================================================
*/
......@@ -71,9 +73,9 @@
#ifndef AFF_ARRAY_DEC_H_VERSION
#define AFF_ARRAY_DEC_H_VERSION \
"AFF_ARRAY_DEC_H V1.11"
"AFF_ARRAY_DEC_H V1.12"
#define AFF_ARRAY_DEC_H_CVSID \
"$Id: array_dec.h,v 1.26 2005-07-04 15:27:29 tforb Exp $"
"$Id: array_dec.h,v 1.27 2005-07-05 13:11:59 tforb Exp $"
#include <aff/lib/sharedheap.h>
#include <aff/lib/strided.h>
......@@ -425,7 +427,7 @@ namespace prebuilt {
}
//! return full access representation
const Trepresentation& representation()
const Trepresentation& representation() const
{ return (Mrepresentation); }
/*-----------------------------------------------------------------*/
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: iterator.h,v 1.9 2003-12-24 13:45:17 tforb Exp $
* $Id: iterator.h,v 1.10 2005-07-05 13:11:59 tforb Exp $
* \author Thomas Forbriger
* \since 08/12/2002
*
......@@ -25,6 +25,8 @@
* instantiated from a const object. It is not
* allowed to create a copy of SharedHeap from a
* const reference to a container.
* - 05/07/2005 V1.3 (thof)
* - promise constness of Iterator argument
*
* ============================================================================
*/
......@@ -33,9 +35,9 @@
#ifndef AFF_ITERATOR_H_VERSION
#define AFF_ITERATOR_H_VERSION \
"AFF_ITERATOR_H V1.2"
"AFF_ITERATOR_H V1.3"
#define AFF_ITERATOR_H_CVSID \
"$Id: iterator.h,v 1.9 2003-12-24 13:45:17 tforb Exp $"
"$Id: iterator.h,v 1.10 2005-07-05 13:11:59 tforb Exp $"
#include<aff/lib/types.h>
......@@ -70,7 +72,7 @@ namespace aff {
//! value type
typedef typename C::Tpointer Tpointer;
//! only this constructor
Iterator(C& c):
Iterator(const C& c):
Mstepper(c.shape()), Mrepresentation(c.representation()) { }
//! delegate to stepper
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: operators.h,v 1.6 2004-02-10 15:35:11 tforb Exp $
* $Id: operators.h,v 1.7 2005-07-05 13:12:00 tforb Exp $
* \author Thomas Forbriger
* \date 10/02/2004
*
......@@ -13,6 +13,8 @@
*
* REVISIONS and CHANGES
* - 10/02/2004 V1.0 Thomas Forbriger
* - 05/07/2005 V1.1 support modification of data in containers that are
* declared const
*
* ============================================================================
*/
......@@ -35,7 +37,7 @@ namespace aff {
#define AFF_OPERATORS_UNOP( CONT, OP ) \
template<class AFF_OPERATORS_TEMPAR > \
CONT& operator OP ## =(CONT& container, \
const CONT& operator OP ## =(const CONT& container, \
typename CONT::Tconst_reference value) \
{ \
for (aff::Iterator< CONT > i(container); i.valid(); ++i) \
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: series.h,v 1.18 2005-07-04 15:50:42 tforb Exp $
* $Id: series.h,v 1.19 2005-07-05 13:12:00 tforb Exp $
* \author Thomas Forbriger
* \date 17/12/2002
*
......@@ -50,6 +50,8 @@
* - 04/07/2005 V1.9 (thof)
* - provide pointer access
* - provide data modification through const Series
* - 05/07/2005 V1.10 (thof)
* - expose const representation too if declared const
*
* ============================================================================
*/
......@@ -58,9 +60,9 @@
#ifndef AFF_SERIES_H_VERSION
#define AFF_SERIES_H_VERSION \
"AFF_SERIES_H V1.9"
"AFF_SERIES_H V1.10"
#define AFF_SERIES_H_CVSID \
"$Id: series.h,v 1.18 2005-07-04 15:50:42 tforb Exp $"
"$Id: series.h,v 1.19 2005-07-05 13:12:00 tforb Exp $"
#include <aff/lib/sharedheap.h>
#include <aff/lib/linearshape.h>
......@@ -362,11 +364,7 @@ namespace aff {
Tcontainer copyout() const;
//! expose representation
const Trepresentation& representation()
{ return (Mrepresentation); }
//! expose representation
const typename Trepresentation::Tcoc& representation() const
const Trepresentation& representation() const
{ return (Mrepresentation); }
private:
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: operatortest.cc,v 1.5 2004-02-10 15:35:11 tforb Exp $
* $Id: operatortest.cc,v 1.6 2005-07-05 13:12:00 tforb Exp $
* \author Thomas Forbriger
* \date 10/02/2004
*
......@@ -13,13 +13,14 @@
*
* REVISIONS and CHANGES
* - 10/02/2004 V1.0 Thomas Forbriger
* - 05/07/2005 V1.1 check operators on containers declared const
*
* ============================================================================
*/
#define OPERATORTEST_VERSION \
"OPERATORTEST V1.0 test operator functions"
"OPERATORTEST V1.1 test operator functions"
#define OPERATORTEST_CVSID \
"$Id: operatortest.cc,v 1.5 2004-02-10 15:35:11 tforb Exp $"
"$Id: operatortest.cc,v 1.6 2005-07-05 13:12:00 tforb Exp $"
#include <iostream>
#include <complex>
......@@ -133,6 +134,10 @@ int main(int iargc, char* argv[])
DUMP(H);
DUMP(100+H);
DUMP(H+100);
CODE(const aff::Series<double> CH(H));
DUMP(CH+100);
DUMP(CH -= 10);
DUMP(CH);
}
/* ----- END OF operatortest.cc ----- */
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