FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
FishSaver.hpp
1#ifndef __FISH_BONE_FISHSAVER_HPP
2#define __FISH_BONE_FISHSAVER_HPP
3
4#include "fishboneDllApi.h"
5#include <ocean/plankton/VObject.hpp>
6#include <bundle/Bundle.hpp>
7#include "FishGrid.hpp"
8
9using namespace Fiber;
10
11namespace Wizt
12{
13
15class fishbone_API FishSaver;
16
21{
22 BundlePtr Spacetime;
23 RefPtr<StringList> SaveableGridNames;
24
25 FishBait()
26 {}
27
29 : Spacetime(theSpacetime)
30 {}
31
32 FishBait(const BundlePtr&theSpacetime, const string&WhichGrid)
33 : Spacetime(theSpacetime)
34 {
35 if (WhichGrid.length()>0)
36 SaveableGridNames = new StringList(WhichGrid);
37 }
38
39 ~FishBait();
40};
41
51class fishbone_API FishWharf : public ReferenceBase<FishWharf>
52{
53 FishSavable&MySaveable;
54
55 FishWharf(const FishWharf&);
56 void operator=(const FishWharf&);
57
58public:
60 FishWharf(FishSavable&MySaveable);
61
63 virtual ~FishWharf();
64
66 FishBait getBait() const;
67};
68
69
78{
79 MemCore::RefPtr<FishWharf> MyFishWharf;
80
82 void operator=(const FishSavable&);
83
84 friend class FishSaver;
85
86public:
92
93 virtual ~FishSavable() = 0;
94
99 virtual FishBait getBait() const = 0;
100};
101
103{
104 return MySaveable.getBait();
105}
106
109class fishbone_API FishSaver : public VishSaver
110{
111 WeakPtr<FishWharf> MyFishWharf;
112public:
113
114 FishSaver(const FishSavable&FS);
115
116 bool save(const string&url);
117};
118
119
127{
128 VOutput<Grid> &MySavableGrid;
129
130public:
144 : FishSavable(what)
145 , MySavableGrid(SavableGrid)
146 {}
147
154 FishBait getBait() const override;
155
157};
158
159
167{
168 VOutput<BundlePtr> &MySavableBundle;
169
170public:
184 : FishSavable(what)
185 , MySavableBundle(SavableGrid)
186 {}
187
194 FishBait getBait() const override;
195
197};
198
199#define F5_SAVER_NAME "FiberBundle HDF5 (F5)"
200
201
202} // Wizt
203
204
205#endif // __FISH_BONE_FISHSAVER_HPP
206
constexpr complex< _Tp > & operator=(const _Tp &)
Convenience class that implements a pointer to a Bundle object but adds some useful member funtions t...
Definition Bundle.hpp:779
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
index_t length
The length (number of elements) of the data array.
Definition HyperslabParameters.hpp:37
Convenience class for objects that provide a Bundle that may be saved.
Definition FishSaver.hpp:167
FishBundleSavable(VSaveable *what, VOutput< BundlePtr > &SavableGrid)
Construction time is used to store the output slot that will be used for saving.
Definition FishSaver.hpp:183
Convenience class for objects that provide a Grid that may be saved.
Definition FishSaver.hpp:127
FishGridSavable(VSaveable *what, VOutput< Grid > &SavableGrid)
Construction time is used to store the output slot that will be used for saving.
Definition FishSaver.hpp:143
Abstract base class for objects that allow saving of their fiber bundle data.
Definition FishSaver.hpp:78
virtual FishBait getBait() const =0
The Bait retrieval function that must be implemented by the child class.
Internal class to communicate information about saveable fishes from FishSavable to and from FishSave...
Definition FishSaver.hpp:52
FishBait getBait() const
Get the associated bait (from the FishSavable).
Definition FishSaver.hpp:102
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
Definition fs/init.hpp:20
Structure describing what information shall be saved to file.
Definition FishSaver.hpp:21