diff --git a/src/core/Makefile.am b/src/core/Makefile.am index 755467c3effa77671d5037c984a557c0e83bc512..0a9cfcd067881c9a0a2270d70cb01b182a1aea73 100644 --- a/src/core/Makefile.am +++ b/src/core/Makefile.am @@ -18,7 +18,7 @@ headers = \ mField2D.h \ mField3D.h \ mFieldSystem1D.h \ - mList.h \ + tnlList.h \ mLongVector.h \ mLogger.h \ tnlObject.h \ diff --git a/src/core/mConfigDescription.h b/src/core/mConfigDescription.h index 181a091fa471e8ccda37b48f5db7196b75378c7b..572410febfecb8f3dbfe7421f7ce5d222765c132 100644 --- a/src/core/mConfigDescription.h +++ b/src/core/mConfigDescription.h @@ -19,7 +19,7 @@ #define mConfigDescriptionH #include "tnlString.h" -#include "mList.h" +#include "tnlList.h" class mParameterContainer; @@ -182,9 +182,9 @@ class mConfigDescription protected: - mList< mConfigGroup* > groups; + tnlList< mConfigGroup* > groups; - mList< mConfigEntryBase* > entries; + tnlList< mConfigEntryBase* > entries; }; diff --git a/src/core/mCurve.h b/src/core/mCurve.h index 87e15e4db43e7f9871aef06bf43941919b7db6dd..a76773a3a4d6389aa0232232d922dc9a78913271 100644 --- a/src/core/mCurve.h +++ b/src/core/mCurve.h @@ -20,7 +20,7 @@ #include <iomanip> #include <fstream> -#include "mList.h" +#include "tnlList.h" #include "tnlObject.h" #include "mfuncs.h" #include "compress-file.h" @@ -59,7 +59,7 @@ template< class T > class mCurveElement bool separator; }; -template< class T > class mCurve : public tnlObject, public mList< mCurveElement< T > > +template< class T > class mCurve : public tnlObject, public tnlList< mCurveElement< T > > { public: //! Basic contructor @@ -79,20 +79,20 @@ template< class T > class mCurve : public tnlObject, public mList< mCurveElement //! Append new point void Append( const T& vec, bool separator = false ) { - mList< mCurveElement< T > > :: Append( mCurveElement< T >( vec, separator ) ); + tnlList< mCurveElement< T > > :: Append( mCurveElement< T >( vec, separator ) ); }; //! Erase the curve void Erase() { - mList< mCurveElement< T > > :: EraseAll(); + tnlList< mCurveElement< T > > :: EraseAll(); }; //! Method for saving the object to a file as a binary data bool Save( ostream& file ) const { if( ! tnlObject :: Save( file ) ) return false; - if( ! mList< mCurveElement< T > > :: DeepSave( file ) ) return false; + if( ! tnlList< mCurveElement< T > > :: DeepSave( file ) ) return false; if( file. bad() ) return false; return true; }; @@ -101,7 +101,7 @@ template< class T > class mCurve : public tnlObject, public mList< mCurveElement bool Load( istream& file ) { if( ! tnlObject :: Load( file ) ) return false; - if( ! mList< mCurveElement< T > > :: DeepLoad( file ) ) return false; + if( ! tnlList< mCurveElement< T > > :: DeepLoad( file ) ) return false; if( file. bad() ) return false; return true; }; diff --git a/src/core/mDataElement.h b/src/core/mDataElement.h index 894e1cccdd72ad1e74104d612a2a9a5fd65d98a9..77f6e1c3dc39f669af08f5a272d19526db70d1d4 100644 --- a/src/core/mDataElement.h +++ b/src/core/mDataElement.h @@ -18,7 +18,7 @@ #ifndef __mDATAELEMENT_H__ #define __mDATAELEMENT_H__ -//! Data element for mList and mStack +//! Data element for tnlList and mStack template< class T > class mDataElement { //! Main data diff --git a/src/core/mParameterContainer.cpp b/src/core/mParameterContainer.cpp index 656c21aa4a262c96bd71e9230482e731b6ea3143..e5519c06007f0e34f367e2eb8daf5983d5557cd8 100644 --- a/src/core/mParameterContainer.cpp +++ b/src/core/mParameterContainer.cpp @@ -190,19 +190,19 @@ bool ParseCommandLine( int argc, char* argv[], const tnlString& basic_type_name = entry_type -> basic_type; if( entry_type -> list_entry ) { - mList< tnlString >* string_list( 0 ); - mList< bool >* bool_list( 0 ); - mList< int >* integer_list( 0 ); - mList< double >* real_list( 0 ); + tnlList< tnlString >* string_list( 0 ); + tnlList< bool >* bool_list( 0 ); + tnlList< int >* integer_list( 0 ); + tnlList< double >* real_list( 0 ); if( basic_type_name == "string" ) - string_list = new mList< tnlString >; + string_list = new tnlList< tnlString >; if( basic_type_name == "bool" ) - bool_list = new mList< bool >; + bool_list = new tnlList< bool >; if( basic_type_name == "integer" ) - integer_list = new mList< int >; + integer_list = new tnlList< int >; if( basic_type_name == "real" ) - real_list = new mList< double >; + real_list = new tnlList< double >; while( i < argc && ( ( argv[ i ] )[ 0 ] != '-' || ( atof( argv[ i ] ) < 0.0 && ( integer_list || real_list ) ) ) ) { @@ -223,22 +223,22 @@ bool ParseCommandLine( int argc, char* argv[], } if( string_list ) { - parameters. AddParameter< mList< tnlString > >( option, *string_list ); + parameters. AddParameter< tnlList< tnlString > >( option, *string_list ); delete string_list; } if( bool_list ) { - parameters. AddParameter< mList< bool > >( option, *bool_list ); + parameters. AddParameter< tnlList< bool > >( option, *bool_list ); delete bool_list; } if( integer_list ) { - parameters. AddParameter< mList< int > >( option, *integer_list ); + parameters. AddParameter< tnlList< int > >( option, *integer_list ); delete integer_list; } if( real_list ) { - parameters. AddParameter< mList< double > >( option, *real_list ); + parameters. AddParameter< tnlList< double > >( option, *real_list ); delete real_list; } if( i < argc ) i --; diff --git a/src/core/mParameterContainer.h b/src/core/mParameterContainer.h index ca85a92759968a32dd117a5a1eaba3e77fb3583c..6ee6259fc40c3945ef309cd745cd3317883eae69 100644 --- a/src/core/mParameterContainer.h +++ b/src/core/mParameterContainer.h @@ -18,7 +18,7 @@ #ifndef mParameterContainerH #define mParameterContainerH -#include "mList.h" +#include "tnlList.h" #include "mConfigDescription.h" #include "mpi-supp.h" #include "param-types.h" @@ -108,7 +108,7 @@ class mParameterContainer protected: - mList< mParameterBase* > parameters; + tnlList< mParameterBase* > parameters; }; diff --git a/src/core/param-types.h b/src/core/param-types.h index ee5c2d0ac87e41a28224661b090e4f5f7f545430..e8d18d699854d833e6d8256d776771507d00f15e 100644 --- a/src/core/param-types.h +++ b/src/core/param-types.h @@ -18,7 +18,7 @@ #ifndef param_typesH #define param_typesH -#include "mList.h" +#include "tnlList.h" #include "tnlString.h" inline tnlString GetParameterType( bool ) { return tnlString( "bool" ); }; diff --git a/src/core/mList.h b/src/core/tnlList.h similarity index 95% rename from src/core/mList.h rename to src/core/tnlList.h index 290fb993d2695e6e06f036ac13dd78f3ea9c7aa8..683231e142a7514e21c23775569409d140aa1610 100644 --- a/src/core/mList.h +++ b/src/core/tnlList.h @@ -1,5 +1,5 @@ /*************************************************************************** - mList.h - description + tnlList.h - description ------------------- begin : Sat, 10 Apr 2004 15:58:51 +0100 copyright : (C) 2004 by Tomďż˝ Oberhuber @@ -47,7 +47,7 @@ using namespace :: std; of the list. So with common use one does not need to worry about efficiency :-) */ -template< class T > class mList +template< class T > class tnlList { protected: @@ -70,7 +70,7 @@ template< class T > class mList public: //! Basic constructor - mList() + tnlList() : first( 0 ), last( 0 ), size( 0 ), @@ -78,7 +78,7 @@ template< class T > class mList index( 0 ){}; //! Copy constructor - mList( const mList& list ) + tnlList( const tnlList& list ) : first( 0 ), last( 0 ), size( 0 ), @@ -89,7 +89,7 @@ template< class T > class mList }; //! Destructor - ~mList() { EraseAll(); }; + ~tnlList() { EraseAll(); }; //! If the list is empty return 'true' bool IsEmpty() const { return ! size; }; @@ -151,7 +151,7 @@ template< class T > class mList //! Indexing operator for constant instances const T& operator[] ( long int ind ) const { - return const_cast< mList< T >* >( this ) -> operator[]( ind ); + return const_cast< tnlList< T >* >( this ) -> operator[]( ind ); } //! Append new data element @@ -214,7 +214,7 @@ template< class T > class mList }; //! Append copy of another list - bool AppendList( const mList< T >& lst ) + bool AppendList( const tnlList< T >& lst ) { long int i; for( i = 0; i < lst. Size(); i ++ ) @@ -225,7 +225,7 @@ template< class T > class mList }; //! Prepend copy of another list - bool PrependList( const mList< T >& lst ) + bool PrependList( const tnlList< T >& lst ) { long int i; @@ -362,13 +362,13 @@ template< class T > class mList }; -template< typename T > tnlString GetParameterType( const mList< T >& ) +template< typename T > tnlString GetParameterType( const tnlList< T >& ) { T t; return tnlString( "mList< " ) + GetParameterType( t ) + tnlString( " >" ); }; -template< typename T > ostream& operator << ( ostream& str, const mList< T >& list ) +template< typename T > ostream& operator << ( ostream& str, const tnlList< T >& list ) { long int i, size( list. Size() ); for( i = 0; i < size; i ++ ) diff --git a/src/diff/curve-ident.h b/src/diff/curve-ident.h index b8d4cb9d63e6606b0b227bd69615dadef89ec653..63f29a156cc548dc273eeb7199a41bcf25b2b935 100644 --- a/src/diff/curve-ident.h +++ b/src/diff/curve-ident.h @@ -42,7 +42,7 @@ template< class T > bool GetLevelSetCurve( const mGrid2D< T >& u, const long int y_size = u. GetYSize(); // this list stores curves or just curve fargments - mList< mList< MeshIndex>* > curves; + tnlList< tnlList< MeshIndex>* > curves; // generating curves or fragments for( i = 0; i < x_size - 1; i ++ ) @@ -91,7 +91,7 @@ template< class T > bool GetLevelSetCurve( const mGrid2D< T >& u, // If it is not create new curve fragment. if( ! added ) { - mList< MeshIndex >* new_list = new mList< MeshIndex >; + tnlList< MeshIndex >* new_list = new tnlList< MeshIndex >; new_list -> Append( MeshIndex( i, j ) ); curves. Append( new_list ); dbgCout( "Adding new list." ); @@ -108,13 +108,13 @@ template< class T > bool GetLevelSetCurve( const mGrid2D< T >& u, fragmented = false; for( i = 0; i < curves. Size(); i ++ ) { - mList< MeshIndex >& c1 = * curves[ i ]; + tnlList< MeshIndex >& c1 = * curves[ i ]; MeshIndex c1_start = c1[ 0 ]; MeshIndex c1_end = c1[ c1. Size() - 1 ]; for( j = 0 ; j < curves. Size(); j ++ ) { if( i == j ) continue; - mList< MeshIndex >& c2 = * curves[ j ]; + tnlList< MeshIndex >& c2 = * curves[ j ]; assert( &c2 != &c1 ); MeshIndex c2_start = c2[ 0 ]; MeshIndex c2_end = c2[ c2. Size() - 1 ]; @@ -197,7 +197,7 @@ template< class T > bool GetLevelSetCurve( const mGrid2D< T >& u, // the end match). for( i = 0; i < curves. Size(); i ++ ) { - mList< MeshIndex >& c = * curves[ i ]; + tnlList< MeshIndex >& c = * curves[ i ]; long int l = c. Size(); MeshIndex m1 = c[ 0 ]; MeshIndex m2 = c[ l - 1 ]; @@ -222,7 +222,7 @@ template< class T > bool GetLevelSetCurve( const mGrid2D< T >& u, for( i = 0; i < curves. Size(); i ++ ) { if( i > 0 ) crv. Append( null_vector, true ); //separator - mList< MeshIndex >& c = * curves[ i ]; + tnlList< MeshIndex >& c = * curves[ i ]; long int l = c. Size(); mVector< 2, T > first; for( j = 0; j < l - 1; j ++ ) diff --git a/tools/src/mcurve2gnuplot.cpp b/tools/src/mcurve2gnuplot.cpp index ab1c318140f30635259ab7acf242adf1fa39beee..ff0c2246c52fb0c985965e4599c5dcc569f8b525 100644 --- a/tools/src/mcurve2gnuplot.cpp +++ b/tools/src/mcurve2gnuplot.cpp @@ -35,9 +35,9 @@ int main( int argc, char* argv[] ) return 1; } - mList< tnlString > input_files = parameters. GetParameter< mList< tnlString > >( "input-files" ); - mList< tnlString > output_files; - if( ! parameters. GetParameter< mList< tnlString > >( "output-files", output_files ) ) + tnlList< tnlString > input_files = parameters. GetParameter< tnlList< tnlString > >( "input-files" ); + tnlList< tnlString > output_files; + if( ! parameters. GetParameter< tnlList< tnlString > >( "output-files", output_files ) ) cout << "No output files were given." << endl; int output_step( 1 ); parameters. GetParameter< int >( "output-step", output_step ); diff --git a/tools/src/mdiff-err-norms.cpp b/tools/src/mdiff-err-norms.cpp index 76f6bfcf4fe78327d74cbbfdac9837029ba67a9e..ab1ad45a64da6accd81a458cd12449a00095ac0a 100644 --- a/tools/src/mdiff-err-norms.cpp +++ b/tools/src/mdiff-err-norms.cpp @@ -164,8 +164,8 @@ int main( int argc, char* argv[] ) cout << "************************************************************************" << endl; tnlString test = parameters. GetParameter< tnlString >( "test" ); - mList< tnlString > first_files = parameters. GetParameter< mList< tnlString > >( "first-set" ); - mList< tnlString > second_files; + tnlList< tnlString > first_files = parameters. GetParameter< tnlList< tnlString > >( "first-set" ); + tnlList< tnlString > second_files; if( test == "function" ) { if( ! parameters. CheckParameter( "second-set" ) ) @@ -173,7 +173,7 @@ int main( int argc, char* argv[] ) cerr << "Missing parameter second-set." << endl; return 1; } - second_files = parameters. GetParameter< mList< tnlString > >( "second-set" ); + second_files = parameters. GetParameter< tnlList< tnlString > >( "second-set" ); } long int size = first_files. Size(); cout << "Processing " << size << " files. " << endl; diff --git a/tools/src/mgrid-view.cpp b/tools/src/mgrid-view.cpp index 5587a259e9494cdfddaca8ec07dd3423ad59d8fb..59c4ba73d94fc6900fe3ddfc2a1024bc5fb334de 100644 --- a/tools/src/mgrid-view.cpp +++ b/tools/src/mgrid-view.cpp @@ -75,8 +75,8 @@ bool ProcessmGrid2D( const tnlString& file_name, cout << " writing ... " << output_file_name; - mList< double > level_lines; - parameters. GetParameter< mList< double > >( "level-lines", level_lines ); + tnlList< double > level_lines; + parameters. GetParameter< tnlList< double > >( "level-lines", level_lines ); if( ! level_lines. IsEmpty() ) { mCurve< mVector< 2, double > > crv; @@ -180,12 +180,12 @@ int main( int argc, char* argv[] ) return 1; } - mList< tnlString > input_files = parameters. GetParameter< mList< tnlString > >( "input-files" ); + tnlList< tnlString > input_files = parameters. GetParameter< tnlList< tnlString > >( "input-files" ); long int size = input_files. Size(); tnlString output_file_name; - mList< tnlString > output_files; - if( ! parameters. GetParameter< mList< tnlString > >( "output-files", output_files ) ) + tnlList< tnlString > output_files; + if( ! parameters. GetParameter< tnlList< tnlString > >( "output-files", output_files ) ) cout << "No output files were given." << endl; long int i; for( i = 0; i < size; i ++ ) diff --git a/tools/src/mgrid2gnuplot.cpp b/tools/src/mgrid2gnuplot.cpp index a6fe668b83346a6177ce840f0e26e8242f3a8327..0458d02c61f237284c68b6f2a21743542b8649f8 100644 --- a/tools/src/mgrid2gnuplot.cpp +++ b/tools/src/mgrid2gnuplot.cpp @@ -34,12 +34,12 @@ int main( int argc, char* argv[] ) return 1; } - mList< tnlString > input_files = parameters. GetParameter< mList< tnlString > >( "input-files" ); - mList< tnlString > output_files; - if( ! parameters. GetParameter< mList< tnlString > >( "output-files", output_files ) ) + tnlList< tnlString > input_files = parameters. GetParameter< tnlList< tnlString > >( "input-files" ); + tnlList< tnlString > output_files; + if( ! parameters. GetParameter< tnlList< tnlString > >( "output-files", output_files ) ) cout << "No output files were given." << endl; - mList< double > level_lines; - if( ! parameters. GetParameter< mList< double > >( "level-lines", level_lines ) ) + tnlList< double > level_lines; + if( ! parameters. GetParameter< tnlList< double > >( "level-lines", level_lines ) ) cout << "No level lines were given." << endl; int output_x_size( 0 ), output_y_size( 0 ); parameters. GetParameter< int >( "output-x-size", output_x_size );