|
From: <mor...@us...> - 2011-02-10 04:20:44
|
Revision: 3895
http://ecell.svn.sourceforge.net/ecell/?rev=3895&view=rev
Author: moriyoshi
Date: 2011-02-10 04:20:38 +0000 (Thu, 10 Feb 2011)
Log Message:
-----------
* Remove unnecessary consts.
Modified Paths:
--------------
ecell3/trunk/ecell/libecs/DataPoint.hpp
ecell3/trunk/ecell/libecs/DynamicPriorityQueue.hpp
ecell3/trunk/ecell/libecs/EventScheduler.hpp
ecell3/trunk/ecell/libecs/FullID.hpp
ecell3/trunk/ecell/libecs/Logger.cpp
ecell3/trunk/ecell/libecs/Logger.hpp
ecell3/trunk/ecell/libecs/Util.cpp
ecell3/trunk/ecell/libecs/Util.hpp
ecell3/trunk/ecell/libecs/Variable.hpp
ecell3/trunk/ecell/libecs/VariableReference.hpp
ecell3/trunk/ecell/libecs/convertTo.hpp
Modified: ecell3/trunk/ecell/libecs/DataPoint.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/DataPoint.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/DataPoint.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -83,31 +83,31 @@
}
- const Real getTime() const
+ Real getTime() const
{
return theTime;
}
- const Real getValue() const
+ Real getValue() const
{
return theValue;
}
- const Real getAvg() const
+ Real getAvg() const
{
return theValue;
}
- const Real getMin() const
+ Real getMin() const
{
return theValue;
}
- const Real getMax() const
+ Real getMax() const
{
return theValue;
}
@@ -125,13 +125,13 @@
}
- static const size_t getElementSize()
+ static size_t getElementSize()
{
return sizeof( Real );
}
- static const int getElementNumber()
+ static int getElementNumber()
{
return 2;
}
@@ -204,31 +204,31 @@
}
- const Real getTime() const
+ Real getTime() const
{
return theTime;
}
- const Real getValue() const
+ Real getValue() const
{
return theValue;
}
- const Real getAvg() const
+ Real getAvg() const
{
return theAvg;
}
- const Real getMin() const
+ Real getMin() const
{
return theMin;
}
- const Real getMax() const
+ Real getMax() const
{
return theMax;
}
@@ -264,13 +264,13 @@
}
- static const size_t getElementSize()
+ static size_t getElementSize()
{
return sizeof( Real );
}
- static const int getElementNumber()
+ static int getElementNumber()
{
return 5;
}
Modified: ecell3/trunk/ecell/libecs/DynamicPriorityQueue.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/DynamicPriorityQueue.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/DynamicPriorityQueue.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -106,7 +106,7 @@
this->indexMap.clear();
}
- const Index getIndex( const ID id ) const
+ Index getIndex( ID id ) const
{
IndexMap::const_iterator i = this->indexMap.find( id );
@@ -118,12 +118,12 @@
return (*i).second;
}
- const ID getIDByIndex( const Index index ) const
+ ID getIDByIndex( Index index ) const
{
return this->idVector[ index ];
}
- const ID push( const Index index )
+ ID push( Index index )
{
const ID id( this->idCounter );
++this->idCounter;
@@ -134,7 +134,7 @@
return id;
}
- void pop( const Index index )
+ void pop( Index index )
{
// update the idVector and the indexMap.
const ID removedID( this->idVector[ index ] );
@@ -156,7 +156,7 @@
return this->idVector.end();
}
- const bool checkConsistency( const Index size ) const
+ bool checkConsistency( Index size ) const
{
if( this->idVector.size() != size )
{
@@ -294,29 +294,29 @@
; // do nothing
}
- const Index getIndex( const ID id ) const
+ Index getIndex( ID id ) const
{
return id;
}
- const ID getIDByIndex( const Index index ) const
+ ID getIDByIndex( Index index ) const
{
return index;
}
- const ID push( const Index index )
+ ID push( Index index )
{
maxIndex = index + 1;
return index;
}
- void pop( const Index index )
+ void pop( Index index )
{
BOOST_ASSERT( maxIndex == index + 1 );
maxIndex = index;
}
- const bool checkConsistency( const Index size ) const
+ bool checkConsistency( Index size ) const
{
return true;
}
@@ -369,12 +369,12 @@
public:
DynamicPriorityQueue();
- const bool isEmpty() const
+ bool isEmpty() const
{
return this->itemVector.empty();
}
- const Index getSize() const
+ Index getSize() const
{
return this->itemVector.size();
}
@@ -391,12 +391,12 @@
return this->itemVector[ getTopIndex() ];
}
- Item& get( const ID id )
+ Item& get( ID id )
{
return this->itemVector[ this->pol.getIndex( id ) ];
}
- Item const& get( const ID id ) const
+ Item const& get( ID id ) const
{
return this->itemVector[ this->pol.getIndex( id ) ];
}
@@ -411,73 +411,73 @@
popByIndex( getTopIndex() );
}
- void pop( const ID id )
+ void pop( ID id )
{
popByIndex( this->pol.getIndex( id ) );
}
void replaceTop( const Item& item );
- void replace( const ID id, const Item& item );
+ void replace( ID id, const Item& item );
- inline const ID push( const Item& item );
+ inline ID push( const Item& item );
void dump() const;
- Item& operator[]( const ID id )
+ Item& operator[]( ID id )
{
return get( id );
}
- Item const& operator[]( const ID id ) const
+ Item const& operator[]( ID id ) const
{
return get( id );
}
- inline void popByIndex( const Index index );
+ inline void popByIndex( Index index );
- Item& getByIndex( const Index index )
+ Item& getByIndex( Index index )
{
return this->itemVector[ index ];
}
- const Index getTopIndex() const
+ Index getTopIndex() const
{
return this->heap[0];
}
- void move( const Index index )
+ void move( Index index )
{
const Index pos( this->positionVector[ index ] );
movePos( pos );
}
- inline void movePos( const Index pos );
+ inline void movePos( Index pos );
void moveTop()
{
moveDownPos( 0 );
}
- void moveUpByIndex( const Index index )
+ void moveUpByIndex( Index index )
{
const Index position( this->positionVector[ index ] );
moveUpPos( position );
}
- void moveUp( const ID id )
+ void moveUp( ID id )
{
moveUpByIndex( pol.getIndex( id ) );
}
- void moveDownByIndex( const Index index )
+ void moveDownByIndex( Index index )
{
const Index position( this->positionVector[ index ] );
moveDownPos( position );
}
- void moveDown( const ID id )
+ void moveDown( ID id )
{
moveDownByIndex( pol.getIndex( id ) );
}
@@ -494,13 +494,13 @@
protected:
// self-diagnostic method
- const bool checkConsistency() const;
+ bool checkConsistency() const;
private:
- inline void moveUpPos( const Index position, const Index start = 0 );
- inline void moveDownPos( const Index position );
+ inline void moveUpPos( Index position, Index start = 0 );
+ inline void moveDownPos( Index position );
private:
@@ -537,7 +537,7 @@
template < typename Item, class IDPolicy >
void DynamicPriorityQueue< Item, IDPolicy >::
-movePos( const Index pos )
+movePos( Index pos )
{
const Index index( this->heap[ pos ] );
const Item& item( this->itemVector[ index ] );
@@ -569,8 +569,8 @@
}
template < typename Item, class IDPolicy >
-void DynamicPriorityQueue< Item, IDPolicy >::moveUpPos( const Index position,
- const Index start )
+void DynamicPriorityQueue< Item, IDPolicy >::moveUpPos( Index position,
+ Index start )
{
if ( position == 0 )
{
@@ -602,7 +602,7 @@
template < typename Item, class IDPolicy >
void
-DynamicPriorityQueue< Item, IDPolicy >::moveDownPos( const Index position )
+DynamicPriorityQueue< Item, IDPolicy >::moveDownPos( Index position )
{
const Index index( this->heap[ position ] );
@@ -634,7 +634,7 @@
template < typename Item, class IDPolicy >
-const typename DynamicPriorityQueue< Item, IDPolicy >::ID
+typename DynamicPriorityQueue< Item, IDPolicy >::ID
DynamicPriorityQueue< Item, IDPolicy >::push( const Item& item )
{
const Index index( getSize() );
@@ -655,7 +655,7 @@
template < typename Item, class IDPolicy >
-void DynamicPriorityQueue< Item, IDPolicy >::popByIndex( const Index index )
+void DynamicPriorityQueue< Item, IDPolicy >::popByIndex( Index index )
{
// 1. pop the item from the itemVector.
this->itemVector[ index ] = this->itemVector.back();
@@ -698,7 +698,7 @@
template < typename Item, class IDPolicy >
void DynamicPriorityQueue< Item, IDPolicy >::
-replace( const ID id, const Item& item )
+replace( ID id, const Item& item )
{
const Index index( this->pol.getIndex( id ) );
this->itemVector[ index ] = item;
@@ -725,7 +725,7 @@
template < typename Item, class IDPolicy >
-const bool DynamicPriorityQueue< Item, IDPolicy >::checkConsistency() const
+bool DynamicPriorityQueue< Item, IDPolicy >::checkConsistency() const
{
bool result( true );
Modified: ecell3/trunk/ecell/libecs/EventScheduler.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/EventScheduler.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/EventScheduler.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -59,7 +59,7 @@
(2) setTime( new scheduled time ).
}
- const bool isDependentOn( const Event& anEvent )
+ bool isDependentOn( const Event& anEvent )
{
Return true if this Event must be updated when the
given Event (anEvent) fired. Otherwise return false;
@@ -83,33 +83,33 @@
}
- const Time getTime() const
+ Time getTime() const
{
return theTime;
}
- const bool operator< ( EventBase const& rhs ) const
+ bool operator< ( EventBase const& rhs ) const
{
return getTime() < rhs.getTime();
}
- const bool operator> ( EventBase const& rhs ) const
+ bool operator> ( EventBase const& rhs ) const
{
return getTime() > rhs.getTime();
}
- const bool operator>= ( EventBase const& rhs ) const
+ bool operator>= ( EventBase const& rhs ) const
{
return !(*this < rhs);
}
- const bool operator<= ( EventBase const& rhs ) const
+ bool operator<= ( EventBase const& rhs ) const
{
return !(*this > rhs);
}
- const bool operator!= ( EventBase const& rhs ) const
+ bool operator!= ( EventBase const& rhs ) const
{
return getTime() != rhs.getTime();
}
@@ -162,7 +162,7 @@
}
- const EventIndex getSize() const
+ EventIndex getSize() const
{
return theEventPriorityQueue.getSize();
}
@@ -259,7 +259,7 @@
theEventDependencyMap.clear();
}
- const EventID addEvent( Event const& anEvent )
+ EventID addEvent( Event const& anEvent )
{
return theEventPriorityQueue.push( anEvent );
}
Modified: ecell3/trunk/ecell/libecs/FullID.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/FullID.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/FullID.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -353,7 +353,7 @@
class FullPN
{
public:
- FullPN( const EntityType type,
+ FullPN( EntityType type,
SystemPath const& systempath,
String const& id,
String const& propertyname )
@@ -389,7 +389,7 @@
return theFullID;
}
- const EntityType getEntityType() const
+ EntityType getEntityType() const
{
return getFullID().getEntityType();
}
Modified: ecell3/trunk/ecell/libecs/Logger.cpp
===================================================================
--- ecell3/trunk/ecell/libecs/Logger.cpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/Logger.cpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -132,13 +132,13 @@
}
-const Real Logger::getStartTime( void ) const
+Real Logger::getStartTime( void ) const
{
return thePhysicalLogger.front().getTime();
}
-const Real Logger::getEndTime( void ) const
+Real Logger::getEndTime( void ) const
{
return thePhysicalLogger.back().getTime();
}
Modified: ecell3/trunk/ecell/libecs/Logger.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/Logger.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/Logger.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -232,19 +232,19 @@
Returns time of the first element in Logger.
*/
- const Real getStartTime( void ) const;
+ Real getStartTime( void ) const;
/**
Returns time of the last element in Logger
*/
- const Real getEndTime( void ) const;
+ Real getEndTime( void ) const;
/**
Returns size of logger
*/
- const size_type getSize() const
+ size_type getSize() const
{
return thePhysicalLogger.size();
}
Modified: ecell3/trunk/ecell/libecs/Util.cpp
===================================================================
--- ecell3/trunk/ecell/libecs/Util.cpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/Util.cpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -46,7 +46,7 @@
{
#define __STRINGCAST_SPECIALIZATION_DEF( NEW, GIVEN )\
- template<> const NEW stringCast<NEW,GIVEN>( const GIVEN& aValue )\
+ template<> NEW stringCast<NEW,GIVEN>( const GIVEN& aValue )\
{\
return boost::lexical_cast<NEW>( aValue );\
} //
@@ -67,7 +67,7 @@
// Specialization here for <Real,String> does this job.
template< typename T >
-const Real stringToFloat( String const& aValue )
+Real stringToFloat( String const& aValue )
{
String aCaseless( boost::algorithm::to_lower_copy( aValue ) );
@@ -86,14 +86,14 @@
}
template<>
-const Real stringCast<Real,String>( String const& aValue )
+Real stringCast<Real,String>( String const& aValue )
{
return stringToFloat<Real>( aValue );
}
#if !HIGHREAL_IS_REAL
template<>
-const HighReal stringCast<HighReal,String>( String const& aValue )
+HighReal stringCast<HighReal,String>( String const& aValue )
{
return stringToFloat<HighReal>( aValue );
}
Modified: ecell3/trunk/ecell/libecs/Util.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/Util.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/Util.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -72,7 +72,7 @@
can reduce resulting binary size.
*/
template< typename NEW, typename GIVEN >
-const NEW stringCast( const GIVEN& aValue )
+NEW stringCast( const GIVEN& aValue )
{
return boost::lexical_cast<NEW>( aValue );
}
@@ -80,13 +80,13 @@
/** @internal */
template< typename GIVEN >
-const String stringCast( const GIVEN& aValue )
+String stringCast( const GIVEN& aValue )
{
return stringCast<String,GIVEN>( aValue );
}
#define __STRINGCAST_SPECIALIZATION_DECL( NEW, GIVEN )\
-template<> LIBECS_API const NEW stringCast<NEW,GIVEN>( const GIVEN& )
+template<> LIBECS_API NEW stringCast<NEW,GIVEN>( const GIVEN& )
__STRINGCAST_SPECIALIZATION_DECL( String, Real );
__STRINGCAST_SPECIALIZATION_DECL( String, HighReal );
@@ -372,7 +372,7 @@
class LexicalCaster: public std::unary_function< GIVEN, NEW >
{
public:
- const NEW operator()( const GIVEN& aValue )
+ NEW operator()( const GIVEN& aValue )
{
return stringCast<NEW>( aValue );
}
Modified: ecell3/trunk/ecell/libecs/Variable.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/Variable.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/Variable.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -108,7 +108,7 @@
/**
Clear theVelocity by zero.
*/
- virtual const bool isIntegrationNeeded() const
+ virtual bool isIntegrationNeeded() const
{
return ! theInterpolantVector.empty();
}
@@ -205,7 +205,7 @@
/**
A wrapper to set Fixed property by a bool value.
*/
- void setFixed( const bool aValue )
+ void setFixed( bool aValue )
{
theFixed = aValue;
}
@@ -213,7 +213,7 @@
/**
@return true if the Variable is fixed or false if not.
*/
- const bool isFixed() const
+ bool isFixed() const
{
return theFixed;
}
@@ -321,8 +321,8 @@
virtual void detach();
protected:
- const Real calculateDifferenceSum( Real aCurrentTime,
- Real anInterval ) const
+ Real calculateDifferenceSum( Real aCurrentTime,
+ Real anInterval ) const
{
Real aVelocitySum( 0.0 );
FOR_ALL( InterpolantVector, theInterpolantVector )
@@ -354,7 +354,7 @@
void clearInterpolantVector();
private:
- const Real getSizeOfSuperSystem() const
+ Real getSizeOfSuperSystem() const
{
return getSuperSystem()->getSizeVariable()->getValue();
}
Modified: ecell3/trunk/ecell/libecs/VariableReference.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/VariableReference.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/VariableReference.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -172,12 +172,12 @@
theName = aName;
}
- const String getName() const
+ String getName() const
{
return theName;
}
- const Integer getSerial() const
+ Integer getSerial() const
{
return theSerial;
}
Modified: ecell3/trunk/ecell/libecs/convertTo.hpp
===================================================================
--- ecell3/trunk/ecell/libecs/convertTo.hpp 2011-02-08 10:29:14 UTC (rev 3894)
+++ ecell3/trunk/ecell/libecs/convertTo.hpp 2011-02-10 04:20:38 UTC (rev 3895)
@@ -48,7 +48,7 @@
class ConvertTo
{
public:
- const ToType operator()( const FromType& aValue )
+ ToType operator()( const FromType& aValue )
{
// strategy:
// (1) if both of ToType and FromType are arithmetic, and
@@ -73,7 +73,7 @@
class ConvertTo< ToType, String >
{
public:
- const ToType operator()( String const& aValue )
+ ToType operator()( String const& aValue )
{
// strategy:
// (1) if ToType is arithmetic, use LexicalCaster.
@@ -89,7 +89,7 @@
class ConvertTo< ToType, char[_N] >
{
public:
- const ToType operator()( char const* aValue )
+ ToType operator()( char const* aValue )
{
// strategy:
// (1) if ToType is arithmetic, use LexicalCaster.
@@ -106,7 +106,7 @@
class ConvertTo< ToType, const char[_N] >
{
public:
- const ToType operator()( char const* aValue )
+ ToType operator()( char const* aValue )
{
// strategy:
// (1) if ToType is arithmetic, use LexicalCaster.
@@ -124,7 +124,7 @@
class ConvertTo< ToType, char* >
{
public:
- const ToType operator()( char const* const& aValue )
+ ToType operator()( char const* const& aValue )
{
// strategy:
// (1) if ToType is arithmetic, use LexicalCaster.
@@ -142,7 +142,7 @@
class ConvertTo< ToType, char const* >
{
public:
- const ToType operator()( char const* const& aValue )
+ ToType operator()( char const* const& aValue )
{
// strategy:
// (1) if ToType is arithmetic, use LexicalCaster.
@@ -161,7 +161,7 @@
class ConvertTo< String, FromType >
{
public:
- const String operator()( const FromType& aValue )
+ String operator()( const FromType& aValue )
{
// strategy:
// (1) if FromType is arithmetic, use LexicalCaster.
@@ -179,7 +179,7 @@
class ConvertTo< String, String >
{
public:
- const String operator()( const String& aValue )
+ String operator()( const String& aValue )
{
return aValue;
}
@@ -191,7 +191,7 @@
// convertTo template function
//
template< typename ToType, typename FromType >
-inline const ToType convertTo( const FromType& aValue )
+inline ToType convertTo( const FromType& aValue )
{
return ConvertTo<ToType,FromType>()( aValue );
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|