source: XIOS/dev/dev_olga/src/extern/blitz/include/blitz/constpointerstack.h @ 1022

Last change on this file since 1022 was 1022, checked in by mhnguyen, 7 years ago
File size: 605 bytes
Line 
1#ifndef BZ_POINTERSTACK_H
2#define BZ_POINTERSTACK_H
3
4#include <blitz/blitz.h>
5
6BZ_NAMESPACE(blitz)
7
8// helper class ConstPointerStack
9template<typename P_numtype, int N_rank>
10class ConstPointerStack {
11public:
12    typedef P_numtype                T_numtype;
13
14    void operator=(const ConstPointerStack<P_numtype,N_rank>& rhs) 
15    {
16        for (int i=0; i<N_rank; ++i)
17            stack_[i] = rhs.stack_[i];
18    }
19
20    const T_numtype*& operator[](int position)
21    {
22        return stack_[position];
23    }
24     
25private:
26    const T_numtype *                stack_[N_rank];
27};
28
29BZ_NAMESPACE_END
30
31#endif
Note: See TracBrowser for help on using the repository browser.