FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
SliceInfo.hpp
1#ifndef __FIBER_SLICE_INFO_HPP
2#define __FIBER_SLICE_INFO_HPP
3
4#include "BundleAPI.h"
5#include "Info.hpp"
6#include <memcore/RefPtr.hpp>
7#include <fiber/grid/Grid.hpp>
8
9namespace Fiber
10{
11
12class BUNDLE_API Slice;
13
17
18
28template <class QueryType>
29 struct Info;
30
35template <>
36struct BUNDLE_API Info<Slice> : std::pair<double, WeakPtrSlice>
37{
39 double getTime() const { return first; }
40
42 const WeakPtrSlice&getSlice() const { return second; }
43
45 operator double () const { return getTime() ; }
46
48 operator const WeakPtrSlice&() const { return getSlice(); }
49
51 Info(double t=0, const WeakPtrSlice&S = MemCore::NullPtr() )
52 : std::pair<double, WeakPtrSlice>(t,S)
53 {}
54
55
57 bool isValid() const
58 {
59 return getSlice();
60 }
61
63 operator bool () const { return isValid(); }
64
66 bool operator! () const { return !isValid(); }
67
70
74 std::string getHumanReadableDescription(const std::string&SelectedGridName,
75 const InfoStringConfiguration&ISC = {} ) const;
76};
77
78
79} /* namespace Fiber */
80
81#endif /* __FIBER_SLICE_INFO_HPP */
basic_string< char > string
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Information per time slice, mainly a set of Grid objects that are accessed via GridID objects.
Definition Slice.hpp:36
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
MemCore::WeakPtr< Slice, OwnerOf< Grid >::reference_domain_t > WeakPtrSlice
Weak pointer to a Slice.
Definition SliceInfo.hpp:15
std::nullptr_t NullPtr
STL namespace.
bool isValid() const
Check for validity by testing the associated slice.
Definition SliceInfo.hpp:57
const WeakPtrSlice & getSlice() const
Get the slice found here.
Definition SliceInfo.hpp:42
double getTime() const
Get the associated time value.
Definition SliceInfo.hpp:39
Info(double t=0, const WeakPtrSlice &S=MemCore::NullPtr())
Constructor.
Definition SliceInfo.hpp:51
Generic template namespace class for results of find() functions throughout the Bundle.
Definition Info.hpp:17