FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
FragmentIDContainer.hpp
1#ifndef __FIBER_FIELD_FRAGMENTIDCONTAINER_HPP
2#define __FIBER_FIELD_FRAGMENTIDCONTAINER_HPP
3
4#include "FragmentID.hpp"
5
6namespace Fiber
7{
13 using MemCore::NullPtr;
14 using std::string;
15 using std::map;
16
20{
21 bool operator()(const RefPtr<FragmentID>&A, const RefPtr<FragmentID>&B) const
22 {
23 if (A == B) return false;
24 if (!A) return false;
25 if (!B) return true;
26
27 return A->Name() < B->Name();
28 }
29};
30
32class [[deprecated("Use FragmentIDCollection instead")]]
34
35
36
40{
42
43 FragmentIDset_t FragmentIDset;
44
45public:
48
51
54
57
59 size_t nFragments() const;
60
69
71 void insert(const RefPtr<FragmentID>&Fid)
72 {
73 FragmentIDset.insert( Fid );
74 }
75
77// RefPtr<FragmentID> findFragmentID(const string&name) const;
78
80 RefPtr<FragmentID> createFragmentID(const string&name);
81
83// bool removeFragmentID(const string&name);
84
86 struct Iterator
87 {
89 virtual ~Iterator();
90
92 virtual bool apply(const RefPtr<FragmentID>&) = 0;
93 };
94
96 int iterate(Iterator&) const;
97};
98
99
100
101template<>
102inline std::string element_to_string(const FragmentIDContainer&fID)
103{
104 return "[{???}]";
105}
106
107
108} /* namespace Fiber */
109
110#endif /* __FIBER_FIELD__FRAGMENTID_HPP */
basic_string< char > string
void insert(_InputIterator __first, _InputIterator __last)
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Definition FragmentIDContainer.hpp:40
size_t nFragments() const
Return the number of fragments stored here.
Definition FragmentIDContainer.cpp:30
RefPtr< FragmentID > getFirst() const
Get the first fragment from the set.
Definition FragmentIDContainer.cpp:35
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
std::nullptr_t NullPtr
Definition FragmentIDContainer.hpp:20
Definition FragmentIDContainer.hpp:87
virtual bool apply(const RefPtr< FragmentID > &)=0
Iteration callback function.
virtual ~Iterator()
Destructor (virtual)