~ubuntu-branches/ubuntu/vivid/dune-grid/vivid

« back to all changes in this revision

Viewing changes to dune/grid/onedgrid/nulliteratorfactory.hh

  • Committer: Package Import Robot
  • Author(s): Ansgar Burchardt
  • Date: 2012-04-06 11:31:20 UTC
  • Revision ID: package-import@ubuntu.com-20120406113120-x0z4e0qqgfhmaj2a
Tags: upstream-2.2~svn7982
ImportĀ upstreamĀ versionĀ 2.2~svn7982

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef DUNE_ONEDGRID_NULL_ITERATORS_HH
 
2
#define DUNE_ONEDGRID_NULL_ITERATORS_HH
 
3
 
 
4
#include "onedgridlist.hh"
 
5
 
 
6
namespace Dune {
 
7
 
 
8
    template <int mydim> class OneDEntityImp;
 
9
 
 
10
    template <int dim>
 
11
    class OneDGridNullIteratorFactory {};
 
12
 
 
13
    template <>
 
14
    class OneDGridNullIteratorFactory<0> {
 
15
 
 
16
    public:
 
17
 
 
18
        static OneDGridList<OneDEntityImp<0> >::iterator null() {
 
19
            return emptyList_.end();
 
20
        }
 
21
 
 
22
    private:
 
23
        static OneDGridList<OneDEntityImp<0> > emptyList_;
 
24
    };
 
25
 
 
26
    template <>
 
27
    class OneDGridNullIteratorFactory<1> {
 
28
 
 
29
    public:
 
30
 
 
31
        static OneDGridList<OneDEntityImp<1> >::iterator null() {
 
32
            return emptyList_.end();
 
33
        }
 
34
 
 
35
    private:
 
36
        static OneDGridList<OneDEntityImp<1> > emptyList_;
 
37
    };
 
38
 
 
39
}
 
40
 
 
41
#endif