MOAB: Mesh Oriented datABase  (version 5.2.1)
SimpleArray< T > Class Template Reference

Public Types

typedef Titerator
typedef const Tconst_iterator
typedef Titerator
typedef const Tconst_iterator
typedef Titerator
typedef const Tconst_iterator

Public Member Functions

 SimpleArray ()
 SimpleArray (unsigned s)
 ~SimpleArray ()
T ** ptr ()
int & size ()
int size () const
int & capacity ()
int capacity () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
Toperator[] (unsigned idx)
T operator[] (unsigned idx) const
 SimpleArray ()
 SimpleArray (unsigned s)
 ~SimpleArray ()
T ** ptr ()
int & size ()
int size () const
int & capacity ()
int capacity () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
Toperator[] (unsigned idx)
T operator[] (unsigned idx) const
 SimpleArray ()
 SimpleArray (unsigned s)
 ~SimpleArray ()
T ** ptr ()
int & size ()
int size () const
int & capacity ()
int capacity () const
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const
Toperator[] (unsigned idx)
T operator[] (unsigned idx) const

Private Attributes

Tarr
int arrSize
int arrAllocated

Detailed Description

template<typename T>
class SimpleArray< T >

Definition at line 51 of file testgeom.cpp.


Member Typedef Documentation

template<typename T>
typedef const T* SimpleArray< T >::const_iterator

Definition at line 96 of file testgeom.cpp.

template<typename T>
typedef const T* SimpleArray< T >::const_iterator

Definition at line 96 of file testSmooth.cpp.

template<typename T>
typedef const T* SimpleArray< T >::const_iterator

Definition at line 102 of file testSmooth2.cpp.

template<typename T>
typedef T* SimpleArray< T >::iterator

Definition at line 95 of file testgeom.cpp.

template<typename T>
typedef T* SimpleArray< T >::iterator

Definition at line 95 of file testSmooth.cpp.

template<typename T>
typedef T* SimpleArray< T >::iterator

Definition at line 101 of file testSmooth2.cpp.


Constructor & Destructor Documentation

template<typename T>
SimpleArray< T >::SimpleArray ( ) [inline]

Definition at line 59 of file testgeom.cpp.

: arr( 0 ), arrSize( 0 ), arrAllocated( 0 ) {}
template<typename T>
SimpleArray< T >::SimpleArray ( unsigned  s) [inline]

Definition at line 60 of file testgeom.cpp.

References SimpleArray< T >::arr, and T.

                              : arrSize( s ), arrAllocated( s )
    {
        arr = (T*)malloc( s * sizeof( T ) );
        for( unsigned i = 0; i < s; ++i )
            new( arr + i ) T();
    }
template<typename T>
SimpleArray< T >::~SimpleArray ( ) [inline]

Definition at line 67 of file testgeom.cpp.

References SimpleArray< T >::arr, SimpleArray< T >::size(), and T.

    {
        for( int i = 0; i < size(); ++i )
            arr[i].~T();
        free( arr );
    }
template<typename T>
SimpleArray< T >::SimpleArray ( ) [inline]

Definition at line 59 of file testSmooth.cpp.

: arr( 0 ), arrSize( 0 ), arrAllocated( 0 ) {}
template<typename T>
SimpleArray< T >::SimpleArray ( unsigned  s) [inline]

Definition at line 60 of file testSmooth.cpp.

References SimpleArray< T >::arr, and T.

                              : arrSize( s ), arrAllocated( s )
    {
        arr = (T*)malloc( s * sizeof( T ) );
        for( unsigned i = 0; i < s; ++i )
            new( arr + i ) T();
    }
template<typename T>
SimpleArray< T >::~SimpleArray ( ) [inline]

Definition at line 67 of file testSmooth.cpp.

References SimpleArray< T >::arr, SimpleArray< T >::size(), and T.

    {
        for( int i = 0; i < size(); ++i )
            arr[i].~T();
        free( arr );
    }
template<typename T>
SimpleArray< T >::SimpleArray ( ) [inline]

Definition at line 65 of file testSmooth2.cpp.

: arr( 0 ), arrSize( 0 ), arrAllocated( 0 ) {}
template<typename T>
SimpleArray< T >::SimpleArray ( unsigned  s) [inline]

Definition at line 66 of file testSmooth2.cpp.

References SimpleArray< T >::arr, and T.

                              : arrSize( s ), arrAllocated( s )
    {
        arr = (T*)malloc( s * sizeof( T ) );
        for( unsigned i = 0; i < s; ++i )
            new( arr + i ) T();
    }
template<typename T>
SimpleArray< T >::~SimpleArray ( ) [inline]

Definition at line 73 of file testSmooth2.cpp.

References SimpleArray< T >::arr, SimpleArray< T >::size(), and T.

    {
        for( int i = 0; i < size(); ++i )
            arr[i].~T();
        free( arr );
    }

Member Function Documentation

template<typename T>
iterator SimpleArray< T >::begin ( ) [inline]

Definition at line 97 of file testgeom.cpp.

References SimpleArray< T >::arr.

Referenced by geometry_evaluation_test(), normals_test(), tag_info_test(), and topology_adjacencies_test().

    {
        return arr;
    }
template<typename T>
iterator SimpleArray< T >::begin ( ) [inline]

Definition at line 97 of file testSmooth.cpp.

References SimpleArray< T >::arr.

    {
        return arr;
    }
template<typename T>
const_iterator SimpleArray< T >::begin ( ) const [inline]

Definition at line 101 of file testSmooth.cpp.

References SimpleArray< T >::arr.

    {
        return arr;
    }
template<typename T>
const_iterator SimpleArray< T >::begin ( ) const [inline]

Definition at line 101 of file testgeom.cpp.

References SimpleArray< T >::arr.

    {
        return arr;
    }
template<typename T>
iterator SimpleArray< T >::begin ( ) [inline]

Definition at line 103 of file testSmooth2.cpp.

References SimpleArray< T >::arr.

    {
        return arr;
    }
template<typename T>
const_iterator SimpleArray< T >::begin ( ) const [inline]

Definition at line 107 of file testSmooth2.cpp.

References SimpleArray< T >::arr.

    {
        return arr;
    }
template<typename T>
int& SimpleArray< T >::capacity ( ) [inline]

Definition at line 86 of file testgeom.cpp.

References SimpleArray< T >::arrAllocated.

Referenced by tag_get_set_test().

    {
        return arrAllocated;
    }
template<typename T>
int& SimpleArray< T >::capacity ( ) [inline]

Definition at line 86 of file testSmooth.cpp.

References SimpleArray< T >::arrAllocated.

    {
        return arrAllocated;
    }
template<typename T>
int SimpleArray< T >::capacity ( ) const [inline]

Definition at line 90 of file testSmooth.cpp.

References SimpleArray< T >::arrAllocated.

    {
        return arrAllocated;
    }
template<typename T>
int SimpleArray< T >::capacity ( ) const [inline]

Definition at line 90 of file testgeom.cpp.

References SimpleArray< T >::arrAllocated.

    {
        return arrAllocated;
    }
template<typename T>
int& SimpleArray< T >::capacity ( ) [inline]

Definition at line 92 of file testSmooth2.cpp.

References SimpleArray< T >::arrAllocated.

    {
        return arrAllocated;
    }
template<typename T>
int SimpleArray< T >::capacity ( ) const [inline]

Definition at line 96 of file testSmooth2.cpp.

References SimpleArray< T >::arrAllocated.

    {
        return arrAllocated;
    }
template<typename T>
iterator SimpleArray< T >::end ( ) [inline]
template<typename T>
iterator SimpleArray< T >::end ( ) [inline]

Definition at line 105 of file testSmooth.cpp.

References SimpleArray< T >::arr, and SimpleArray< T >::arrSize.

    {
        return arr + arrSize;
    }
template<typename T>
const_iterator SimpleArray< T >::end ( ) const [inline]

Definition at line 109 of file testgeom.cpp.

References SimpleArray< T >::arr, and SimpleArray< T >::arrSize.

    {
        return arr + arrSize;
    }
template<typename T>
const_iterator SimpleArray< T >::end ( ) const [inline]

Definition at line 109 of file testSmooth.cpp.

References SimpleArray< T >::arr, and SimpleArray< T >::arrSize.

    {
        return arr + arrSize;
    }
template<typename T>
iterator SimpleArray< T >::end ( ) [inline]

Definition at line 111 of file testSmooth2.cpp.

References SimpleArray< T >::arr, and SimpleArray< T >::arrSize.

    {
        return arr + arrSize;
    }
template<typename T>
const_iterator SimpleArray< T >::end ( ) const [inline]

Definition at line 115 of file testSmooth2.cpp.

References SimpleArray< T >::arr, and SimpleArray< T >::arrSize.

    {
        return arr + arrSize;
    }
template<typename T>
T& SimpleArray< T >::operator[] ( unsigned  idx) [inline]

Definition at line 114 of file testSmooth.cpp.

References SimpleArray< T >::arr.

    {
        return arr[idx];
    }
template<typename T>
T& SimpleArray< T >::operator[] ( unsigned  idx) [inline]

Definition at line 114 of file testgeom.cpp.

References SimpleArray< T >::arr.

    {
        return arr[idx];
    }
template<typename T>
T SimpleArray< T >::operator[] ( unsigned  idx) const [inline]

Definition at line 118 of file testSmooth.cpp.

References SimpleArray< T >::arr.

    {
        return arr[idx];
    }
template<typename T>
T SimpleArray< T >::operator[] ( unsigned  idx) const [inline]

Definition at line 118 of file testgeom.cpp.

References SimpleArray< T >::arr.

    {
        return arr[idx];
    }
template<typename T>
T& SimpleArray< T >::operator[] ( unsigned  idx) [inline]

Definition at line 120 of file testSmooth2.cpp.

References SimpleArray< T >::arr.

    {
        return arr[idx];
    }
template<typename T>
T SimpleArray< T >::operator[] ( unsigned  idx) const [inline]

Definition at line 124 of file testSmooth2.cpp.

References SimpleArray< T >::arr.

    {
        return arr[idx];
    }
template<typename T>
T** SimpleArray< T >::ptr ( ) [inline]

Definition at line 74 of file testgeom.cpp.

References SimpleArray< T >::arr.

Referenced by tag_get_set_test().

    {
        return &arr;
    }
template<typename T>
T** SimpleArray< T >::ptr ( ) [inline]

Definition at line 74 of file testSmooth.cpp.

References SimpleArray< T >::arr.

    {
        return &arr;
    }
template<typename T>
T** SimpleArray< T >::ptr ( ) [inline]

Definition at line 80 of file testSmooth2.cpp.

References SimpleArray< T >::arr.

    {
        return &arr;
    }
template<typename T>
int& SimpleArray< T >::size ( ) [inline]

Definition at line 78 of file testSmooth.cpp.

References SimpleArray< T >::arrSize.

    {
        return arrSize;
    }
template<typename T>
int SimpleArray< T >::size ( ) const [inline]

Definition at line 82 of file testSmooth.cpp.

References SimpleArray< T >::arrSize.

    {
        return arrSize;
    }
template<typename T>
int SimpleArray< T >::size ( ) const [inline]

Definition at line 82 of file testgeom.cpp.

References SimpleArray< T >::arrSize.

    {
        return arrSize;
    }
template<typename T>
int& SimpleArray< T >::size ( ) [inline]

Definition at line 84 of file testSmooth2.cpp.

References SimpleArray< T >::arrSize.

    {
        return arrSize;
    }
template<typename T>
int SimpleArray< T >::size ( ) const [inline]

Definition at line 88 of file testSmooth2.cpp.

References SimpleArray< T >::arrSize.

    {
        return arrSize;
    }

Member Data Documentation

template<typename T>
int SimpleArray< T >::arrAllocated [private]

Definition at line 56 of file testgeom.cpp.

Referenced by SimpleArray< T >::capacity().

template<typename T>
int SimpleArray< T >::arrSize [private]

Definition at line 55 of file testgeom.cpp.

Referenced by SimpleArray< T >::end(), and SimpleArray< T >::size().

List of all members.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines