FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
CreativeIterator.hpp
1#ifndef __FIBER_CREATIVEITERATOR_HPP
2#define __FIBER_CREATIVEITERATOR_HPP
3
4#include "fvectorAPI.h"
5#include "MultiIndex.hpp"
6#include "Iterator.hpp"
7#include "Expression.hpp"
8#include <meta/IF.hpp>
9#include <eagle/Vector.hpp>
10
11#include <vector>
12
13namespace Fiber
14{
15 using Eagle::MetaInfo;
16
17
18template <class T>
19 struct DataCreator;
20
32template <class T>
33class CreativeIterator : public Iterator<T>
34{
35protected:
36 DataCreator<T> *myDataCreator;
37public:
38 using Iterator<T>::ptr;
39
41 : Iterator<T>(D)
42 , myDataCreator(C)
43 {}
44
46 : Iterator<T>(length, data)
47 , myDataCreator(C)
48 {}
49
52 , myDataCreator(CI.myDataCreator)
53 {}
54
55 typedef typename MetaInfo<T>::element_t component_t;
56
57 typedef FixedArray< component_t,
59
60 typedef typename META::IF< MetaInfo<T>::MULTIPLICITY == 1,
61 component_t, FixedArray_t>::result ValueBase_t;
62
63
68 typedef typename META::IF< MetaInfo<T>::MULTIPLICITY == 1,
70
71 typedef Eagle::Vector< component_t,
73
78 typedef typename META::IF< MetaInfo<T>::RANK == 0,
80};
81
82template <class T>
84{
85 typedef typename Iterator<T>::reference_t reference_t;
86
87 virtual CreativeIterator<T> slice(int Dimension, index_t i) = 0;
88
89 virtual reference_t getElement(index_t i) = 0;
90};
91
92
93} /* namespace Fiber */
94
95#endif /* __Fiber_CREATIVEITERATOR_HPP */
96
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
META::IF< MetaInfo< T >::RANK==0, void, VectorArray_t >::result VectorArrayBase_t
If the type has a non-zero rank, then there exists an associated base class of vectors.
Definition CreativeIterator.hpp:79
META::IF< MetaInfo< T >::MULTIPLICITY==1, void, FixedArray_t >::result FixedArrayBase_t
If the type has a non-zero multiplicity, then there exists an associated base class of fixed arrays.
Definition CreativeIterator.hpp:69
index_t length
The length (number of elements) of the data array.
Definition HyperslabParameters.hpp:37
T * ptr(int c=0) const
Return pointer to data, which is good for C interface, but otherwise, avoid that.
Definition vector/Iterator.hpp:266
Implementation of an Iterator to a sequence of elements, which might be contiguous or a projection of...
Definition vector/Iterator.hpp:525
T & reference_t
The reference type.
Definition vector/Iterator.hpp:709
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
Definition CreativeIterator.hpp:84