MOAB: Mesh Oriented datABase  (version 5.5.0)
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

◆ const_iterator [1/3]

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

Definition at line 96 of file testgeom.cpp.

◆ const_iterator [2/3]

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

Definition at line 96 of file testSmooth.cpp.

◆ const_iterator [3/3]

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

Definition at line 106 of file testSmooth2.cpp.

◆ iterator [1/3]

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

Definition at line 95 of file testgeom.cpp.

◆ iterator [2/3]

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

Definition at line 95 of file testSmooth.cpp.

◆ iterator [3/3]

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

Definition at line 105 of file testSmooth2.cpp.

Constructor & Destructor Documentation

◆ SimpleArray() [1/6]

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

Definition at line 59 of file testgeom.cpp.

59 : arr( 0 ), arrSize( 0 ), arrAllocated( 0 ) {}

◆ SimpleArray() [2/6]

template<typename T >
SimpleArray< T >::SimpleArray ( unsigned  s)
inline

Definition at line 60 of file testgeom.cpp.

60  : arrSize( s ), arrAllocated( s )
61  {
62  arr = (T*)malloc( s * sizeof( T ) );
63  for( unsigned i = 0; i < s; ++i )
64  new( arr + i ) T();
65  }

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

◆ ~SimpleArray() [1/3]

template<typename T >
SimpleArray< T >::~SimpleArray ( )
inline

Definition at line 67 of file testgeom.cpp.

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

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

◆ SimpleArray() [3/6]

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

Definition at line 59 of file testSmooth.cpp.

59 : arr( 0 ), arrSize( 0 ), arrAllocated( 0 ) {}

◆ SimpleArray() [4/6]

template<typename T >
SimpleArray< T >::SimpleArray ( unsigned  s)
inline

Definition at line 60 of file testSmooth.cpp.

60  : arrSize( s ), arrAllocated( s )
61  {
62  arr = (T*)malloc( s * sizeof( T ) );
63  for( unsigned i = 0; i < s; ++i )
64  new( arr + i ) T();
65  }

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

◆ ~SimpleArray() [2/3]

template<typename T >
SimpleArray< T >::~SimpleArray ( )
inline

Definition at line 67 of file testSmooth.cpp.

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

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

◆ SimpleArray() [5/6]

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

Definition at line 69 of file testSmooth2.cpp.

69 : arr( 0 ), arrSize( 0 ), arrAllocated( 0 ) {}

◆ SimpleArray() [6/6]

template<typename T >
SimpleArray< T >::SimpleArray ( unsigned  s)
inline

Definition at line 70 of file testSmooth2.cpp.

70  : arrSize( s ), arrAllocated( s )
71  {
72  arr = (T*)malloc( s * sizeof( T ) );
73  for( unsigned i = 0; i < s; ++i )
74  new( arr + i ) T();
75  }

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

◆ ~SimpleArray() [3/3]

template<typename T >
SimpleArray< T >::~SimpleArray ( )
inline

Definition at line 77 of file testSmooth2.cpp.

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

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

Member Function Documentation

◆ begin() [1/6]

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

Definition at line 97 of file testgeom.cpp.

98  {
99  return arr;
100  }

References SimpleArray< T >::arr.

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

◆ begin() [2/6]

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

Definition at line 97 of file testSmooth.cpp.

98  {
99  return arr;
100  }

References SimpleArray< T >::arr.

◆ begin() [3/6]

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

Definition at line 107 of file testSmooth2.cpp.

108  {
109  return arr;
110  }

References SimpleArray< T >::arr.

◆ begin() [4/6]

template<typename T >
const_iterator SimpleArray< T >::begin ( ) const
inline

Definition at line 101 of file testgeom.cpp.

102  {
103  return arr;
104  }

References SimpleArray< T >::arr.

◆ begin() [5/6]

template<typename T >
const_iterator SimpleArray< T >::begin ( ) const
inline

Definition at line 101 of file testSmooth.cpp.

102  {
103  return arr;
104  }

References SimpleArray< T >::arr.

◆ begin() [6/6]

template<typename T >
const_iterator SimpleArray< T >::begin ( ) const
inline

Definition at line 111 of file testSmooth2.cpp.

112  {
113  return arr;
114  }

References SimpleArray< T >::arr.

◆ capacity() [1/6]

template<typename T >
int& SimpleArray< T >::capacity ( )
inline

Definition at line 86 of file testgeom.cpp.

87  {
88  return arrAllocated;
89  }

References SimpleArray< T >::arrAllocated.

Referenced by tag_get_set_test().

◆ capacity() [2/6]

template<typename T >
int& SimpleArray< T >::capacity ( )
inline

Definition at line 86 of file testSmooth.cpp.

87  {
88  return arrAllocated;
89  }

References SimpleArray< T >::arrAllocated.

◆ capacity() [3/6]

template<typename T >
int& SimpleArray< T >::capacity ( )
inline

Definition at line 96 of file testSmooth2.cpp.

97  {
98  return arrAllocated;
99  }

References SimpleArray< T >::arrAllocated.

◆ capacity() [4/6]

template<typename T >
int SimpleArray< T >::capacity ( ) const
inline

Definition at line 90 of file testgeom.cpp.

91  {
92  return arrAllocated;
93  }

References SimpleArray< T >::arrAllocated.

◆ capacity() [5/6]

template<typename T >
int SimpleArray< T >::capacity ( ) const
inline

Definition at line 90 of file testSmooth.cpp.

91  {
92  return arrAllocated;
93  }

References SimpleArray< T >::arrAllocated.

◆ capacity() [6/6]

template<typename T >
int SimpleArray< T >::capacity ( ) const
inline

Definition at line 100 of file testSmooth2.cpp.

101  {
102  return arrAllocated;
103  }

References SimpleArray< T >::arrAllocated.

◆ end() [1/6]

template<typename T >
iterator SimpleArray< T >::end ( )
inline

Definition at line 105 of file testgeom.cpp.

106  {
107  return arr + arrSize;
108  }

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

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

◆ end() [2/6]

template<typename T >
iterator SimpleArray< T >::end ( )
inline

Definition at line 105 of file testSmooth.cpp.

106  {
107  return arr + arrSize;
108  }

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

◆ end() [3/6]

template<typename T >
iterator SimpleArray< T >::end ( )
inline

Definition at line 115 of file testSmooth2.cpp.

116  {
117  return arr + arrSize;
118  }

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

◆ end() [4/6]

template<typename T >
const_iterator SimpleArray< T >::end ( ) const
inline

Definition at line 109 of file testgeom.cpp.

110  {
111  return arr + arrSize;
112  }

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

◆ end() [5/6]

template<typename T >
const_iterator SimpleArray< T >::end ( ) const
inline

Definition at line 109 of file testSmooth.cpp.

110  {
111  return arr + arrSize;
112  }

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

◆ end() [6/6]

template<typename T >
const_iterator SimpleArray< T >::end ( ) const
inline

Definition at line 119 of file testSmooth2.cpp.

120  {
121  return arr + arrSize;
122  }

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

◆ operator[]() [1/6]

template<typename T >
T& SimpleArray< T >::operator[] ( unsigned  idx)
inline

Definition at line 114 of file testgeom.cpp.

115  {
116  return arr[idx];
117  }

References SimpleArray< T >::arr.

◆ operator[]() [2/6]

template<typename T >
T& SimpleArray< T >::operator[] ( unsigned  idx)
inline

Definition at line 114 of file testSmooth.cpp.

115  {
116  return arr[idx];
117  }

References SimpleArray< T >::arr.

◆ operator[]() [3/6]

template<typename T >
T& SimpleArray< T >::operator[] ( unsigned  idx)
inline

Definition at line 124 of file testSmooth2.cpp.

125  {
126  return arr[idx];
127  }

References SimpleArray< T >::arr.

◆ operator[]() [4/6]

template<typename T >
T SimpleArray< T >::operator[] ( unsigned  idx) const
inline

Definition at line 118 of file testgeom.cpp.

119  {
120  return arr[idx];
121  }

References SimpleArray< T >::arr.

◆ operator[]() [5/6]

template<typename T >
T SimpleArray< T >::operator[] ( unsigned  idx) const
inline

Definition at line 118 of file testSmooth.cpp.

119  {
120  return arr[idx];
121  }

References SimpleArray< T >::arr.

◆ operator[]() [6/6]

template<typename T >
T SimpleArray< T >::operator[] ( unsigned  idx) const
inline

Definition at line 128 of file testSmooth2.cpp.

129  {
130  return arr[idx];
131  }

References SimpleArray< T >::arr.

◆ ptr() [1/3]

template<typename T >
T** SimpleArray< T >::ptr ( )
inline

Definition at line 74 of file testgeom.cpp.

75  {
76  return &arr;
77  }

References SimpleArray< T >::arr.

Referenced by tag_get_set_test().

◆ ptr() [2/3]

template<typename T >
T** SimpleArray< T >::ptr ( )
inline

Definition at line 74 of file testSmooth.cpp.

75  {
76  return &arr;
77  }

References SimpleArray< T >::arr.

◆ ptr() [3/3]

template<typename T >
T** SimpleArray< T >::ptr ( )
inline

Definition at line 84 of file testSmooth2.cpp.

85  {
86  return &arr;
87  }

References SimpleArray< T >::arr.

◆ size() [1/6]

template<typename T >
int& SimpleArray< T >::size ( )
inline

◆ size() [2/6]

template<typename T >
int& SimpleArray< T >::size ( )
inline

Definition at line 78 of file testSmooth.cpp.

79  {
80  return arrSize;
81  }

References SimpleArray< T >::arrSize.

◆ size() [3/6]

template<typename T >
int& SimpleArray< T >::size ( )
inline

Definition at line 88 of file testSmooth2.cpp.

89  {
90  return arrSize;
91  }

References SimpleArray< T >::arrSize.

◆ size() [4/6]

template<typename T >
int SimpleArray< T >::size ( ) const
inline

Definition at line 82 of file testgeom.cpp.

83  {
84  return arrSize;
85  }

References SimpleArray< T >::arrSize.

◆ size() [5/6]

template<typename T >
int SimpleArray< T >::size ( ) const
inline

Definition at line 82 of file testSmooth.cpp.

83  {
84  return arrSize;
85  }

References SimpleArray< T >::arrSize.

◆ size() [6/6]

template<typename T >
int SimpleArray< T >::size ( ) const
inline

Definition at line 92 of file testSmooth2.cpp.

93  {
94  return arrSize;
95  }

References SimpleArray< T >::arrSize.

Member Data Documentation

◆ arr

◆ arrAllocated

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

Definition at line 56 of file testgeom.cpp.

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

◆ arrSize

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().


The documentation for this class was generated from the following files: