// forward declaration
-template <unsigned int N, typename T> class TableBase;
-template <unsigned int N, typename T> class Table;
+template <int N, typename T> class TableBase;
+template <int N, typename T> class Table;
template <typename T> class Table<1,T>;
template <typename T> class Table<2,T>;
template <typename T> class Table<3,T>;
*
* @author Wolfgang Bangerth, 2002
*/
-template <unsigned int N>
+template <int N>
class TableIndicesBase
{
public:
* indicating constness of the table for which accessor objects are to
* be generated in this namespace.
*/
- template <unsigned int N, typename T, bool Constness>
+ template <int N, typename T, bool Constness>
class Types
{};
* template parameters. Specialization for accessors to constant
* objects.
*/
- template <unsigned int N, typename T> struct Types<N,T,true>
+ template <int N, typename T> struct Types<N,T,true>
{
typedef const T value_type;
typedef const TableBase<N,T> TableType;
* template parameters. Specialization for accessors to non-constant
* objects.
*/
- template <unsigned int N, typename T> struct Types<N,T,false>
+ template <int N, typename T> struct Types<N,T,false>
{
typedef T value_type;
typedef TableBase<N,T> TableType;
*
* @author Wolfgang Bangerth, 2002
*/
- template <unsigned int N, typename T, bool C, unsigned int P>
+ template <int N, typename T, bool C, unsigned int P>
class Accessor
{
public:
// compilers
#ifndef DEAL_II_NAMESP_TEMPL_FRIEND_BUG
template <int N1, typename T1> friend class Table;
- template <unsigned int N1, typename T1, bool C1, unsigned int P1>
+ template <int N1, typename T1, bool C1, unsigned int P1>
friend class Accessor;
#else
friend class Accessor<N,T,C,P+1>;
*
* @author Wolfgang Bangerth, 2002
*/
- template <unsigned int N, typename T, bool C>
+ template <int N, typename T, bool C>
class Accessor<N,T,C,1>
{
public:
// work around bugs in some
// compilers
#ifndef DEAL_II_NAMESP_TEMPL_FRIEND_BUG
- template <unsigned int N1, typename T1> friend class Table;
- template <unsigned int N1, typename T1, bool C1, unsigned int P1>
+ template <int N1, typename T1> friend class Table;
+ template <int N1, typename T1, bool C1, unsigned int P1>
friend class Accessor;
#else
friend class Accessor<N,T,C,2>;
*
* @author Wolfgang Bangerth, 2002.
*/
-template <unsigned int N, typename T>
+template <int N, typename T>
class TableBase : public Subscriptor
{
public:
*
* @author Wolfgang Bangerth, 2002
*/
-template <unsigned int N,typename T>
+template <int N,typename T>
class Table : public TableBase<N,T>
{};
/* --------------------- Template and inline functions ---------------- */
-template <unsigned int N>
+template <int N>
inline
unsigned int
TableIndicesBase<N>::operator [] (const unsigned int i) const
-template <unsigned int N, typename T>
+template <int N, typename T>
TableBase<N,T>::TableBase ()
:
val (0),
-template <unsigned int N, typename T>
+template <int N, typename T>
TableBase<N,T>::TableBase (const TableIndices<N> &sizes)
:
val (0),
-template <unsigned int N, typename T>
+template <int N, typename T>
TableBase<N,T>::TableBase (const TableBase<N,T> &src)
:
Subscriptor (),
-template <unsigned int N, typename T>
+template <int N, typename T>
template <typename T2>
TableBase<N,T>::TableBase (const TableBase<N,T2> &src)
:
namespace TableBaseAccessors
{
- template <unsigned int N, typename T, bool C, unsigned int P>
+ template <int N, typename T, bool C, unsigned int P>
inline
Accessor<N,T,C,P>::Accessor (const TableType &table,
const pointer data)
- template <unsigned int N, typename T, bool C, unsigned int P>
+ template <int N, typename T, bool C, unsigned int P>
inline
Accessor<N,T,C,P>::Accessor (const Accessor &)
:
- template <unsigned int N, typename T, bool C, unsigned int P>
+ template <int N, typename T, bool C, unsigned int P>
inline
Accessor<N,T,C,P>::Accessor ()
:
- template <unsigned int N, typename T, bool C, unsigned int P>
+ template <int N, typename T, bool C, unsigned int P>
inline
Accessor<N,T,C,P-1>
Accessor<N,T,C,P>::operator [] (const unsigned int i) const
- template <unsigned int N, typename T, bool C>
+ template <int N, typename T, bool C>
inline
Accessor<N,T,C,1>::Accessor (const TableType &table,
const pointer data)
- template <unsigned int N, typename T, bool C>
+ template <int N, typename T, bool C>
inline
Accessor<N,T,C,1>::Accessor ()
:
- template <unsigned int N, typename T, bool C>
+ template <int N, typename T, bool C>
inline
Accessor<N,T,C,1>::Accessor (const Accessor &)
:
- template <unsigned int N, typename T, bool C>
+ template <int N, typename T, bool C>
inline
typename Accessor<N,T,C,1>::reference
Accessor<N,T,C,1>::operator [] (const unsigned int i) const
- template <unsigned int N, typename T, bool C>
+ template <int N, typename T, bool C>
inline
unsigned int
Accessor<N,T,C,1>::size () const
- template <unsigned int N, typename T, bool C>
+ template <int N, typename T, bool C>
inline
typename Accessor<N,T,C,1>::iterator
Accessor<N,T,C,1>::begin () const
- template <unsigned int N, typename T, bool C>
+ template <int N, typename T, bool C>
inline
typename Accessor<N,T,C,1>::iterator
Accessor<N,T,C,1>::end () const
-template <unsigned int N, typename T>
+template <int N, typename T>
inline
TableBase<N,T>::~TableBase ()
{
-template <unsigned int N, typename T>
+template <int N, typename T>
TableBase<N,T>&
TableBase<N,T>::operator = (const TableBase<N,T>& m)
{
-template <unsigned int N, typename T>
+template <int N, typename T>
template <typename T2>
TableBase<N,T>&
TableBase<N,T>::operator = (const TableBase<N,T2>& m)
-template <unsigned int N, typename T>
+template <int N, typename T>
inline
void
TableBase<N,T>::clear ()
-template <unsigned int N, typename T>
+template <int N, typename T>
void
TableBase<N,T>::reinit (const TableIndices<N> &new_sizes)
{
-template <unsigned int N, typename T>
+template <int N, typename T>
const TableIndices<N> &
TableBase<N,T>::size () const
{
-template <unsigned int N, typename T>
+template <int N, typename T>
unsigned int
TableBase<N,T>::n_elements () const
{
-template <unsigned int N, typename T>
+template <int N, typename T>
bool
TableBase<N,T>::empty () const
{
-template <unsigned int N, typename T>
+template <int N, typename T>
template <typename T2>
inline
void
-template <unsigned int N, typename T>
+template <int N, typename T>
unsigned int
TableBase<N,T>::memory_consumption () const
{
}
-template <unsigned int N, typename T>
+template <int N, typename T>
inline
unsigned int
TableBase<N,T>::position (const TableIndices<N> &indices) const
-template <unsigned int N, typename T>
+template <int N, typename T>
inline const T &
TableBase<N,T>::operator() (const TableIndices<N> &indices) const
{
-template <unsigned int N, typename T>
+template <int N, typename T>
inline T &
TableBase<N,T>::operator() (const TableIndices<N> &indices)
{
-template <unsigned int N, typename T>
+template <int N, typename T>
inline const T &
TableBase<N,T>::el (const TableIndices<N> &indices) const
{
-template <unsigned int N, typename T>
+template <int N, typename T>
inline T &
TableBase<N,T>::el (const TableIndices<N> &indices)
{
-template <unsigned int N, typename T>
+template <int N, typename T>
inline
const T *
TableBase<N,T>::data () const