]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/include/vector.h
remove home-made 'uint', 'uchar', 'ushort', etc replace by uint32_t, uint8_t, uint16_t
[creaMaracasVisu.git] / lib / maracasVisuLib / include / vector.h
index edadd114f48639694a4ce6f973bdf117db5bcb64..580deb7b4e67d9b9d06c54c9ef711324a3615d25 100644 (file)
@@ -60,11 +60,11 @@ namespace gtm
         */
        //@{
        /// Default constructor.
-       TVector( uint N = 3, T data = ( T )0, int type = COL_VECTOR  );
+       TVector( uint32_t N = 3, T data = ( T )0, int type = COL_VECTOR  );
        /// Copy constructor.
        TVector( const TVector< T >& r );
        /// Use this to treat an ANSI array as a TVector.
-       TVector( T* block, uint N, bool copy = true, int type = COL_VECTOR );
+       TVector( T* block, uint32_t N, bool copy = true, int type = COL_VECTOR );
        //@}
 
        /// Destructor.
@@ -73,7 +73,7 @@ namespace gtm
        };
 
        /// Size change
-       void SetN( uint N );
+       void SetN( uint32_t N );
 
        /** Assignation operators.
         *
@@ -108,7 +108,7 @@ namespace gtm
        //@}
 
        /// Reference operator.
-       T& operator()( uint i ) {
+       T& operator()( uint32_t i ) {
            return( _vector[ i ] );
        };
        /// ANSI (C/C++ array) reference.
@@ -116,7 +116,7 @@ namespace gtm
            return( _vector );
        };
        /// Vector's cardinality.
-       uint GetN( ) {
+       uint32_t GetN( ) {
            return( _N );
        };
        /// Vector's type (ROW_VECTOR/COL_VECTOR).
@@ -197,7 +197,7 @@ namespace gtm
        /// Memory block.
        T* _vector;
        /// Cardinality.
-       uint _N;
+       uint32_t _N;
        /// Type (ROW_VECTOR/COL_VECTOR).
        int _type;
        /// Have I created _vector?
@@ -208,7 +208,7 @@ namespace gtm
 
 // -----------------------------------------------------------------------------
     template< class T >
-    TVector< T >::TVector( uint N, T data, int type )
+    TVector< T >::TVector( uint32_t N, T data, int type )
     {
        _N        = N;
        _type     = type;
@@ -231,7 +231,7 @@ namespace gtm
 
 // -----------------------------------------------------------------------------
     template< class T >
-    TVector< T >::TVector( T* block, uint N, bool copy, int type )
+    TVector< T >::TVector( T* block, uint32_t N, bool copy, int type )
     {
        _N        = N;
        _type     = type;
@@ -242,7 +242,7 @@ namespace gtm
 
 // -----------------------------------------------------------------------------
     template< class T >
-    void TVector< T >::SetN( uint N )
+    void TVector< T >::SetN( uint32_t N )
     {
        if( _myMemory ) VectorFreeMemory< T >( _vector );
        _N        = N;
@@ -269,7 +269,7 @@ namespace gtm
     template< class T >
     bool TVector< T >::operator==( const TVector< T >& r )
     {
-       uint i;
+       uint32_t i;
        bool ret;
 
        for(
@@ -285,7 +285,7 @@ namespace gtm
     template< class T >
     bool TVector< T >::operator!=( const TVector< T >& r )
     {
-       uint i;
+       uint32_t i;
        bool ret;
 
        for(
@@ -346,7 +346,7 @@ namespace gtm
     TVector< T > TVector< T >::operator-( )
     {
        TVector< T > ret( _N );
-       uint i;
+       uint32_t i;
   
        for( i = 0; i < _N; ret._vector[ i ] = ( T )0 - _vector[ i ], i++ );
        return( ret );