FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
IndexListViaSelectionString.hpp
1
2//
3// With given field names and selection lists return all corresponding
4// indices (similar to CreateIndirection.hpp)
5/*
6change 2022: works also with multiple fields. Index is selected if
7selected in all other fields (the order of selection fields is important!)
8
9*/
11
12#ifndef __INDEXLIST_VIA_SELECTIONSTRING_HPP
13#define __INDEXLIST_VIA_SELECTIONSTRING_HPP
14
15#include "fiberopDllApi.h"
16#include <fiber/bundle/Bundle.hpp>
17#include "elementary/aerie/MultiRange.hpp"
18
19namespace Fiber
20{
21using namespace MemCore;
22using namespace Fiber;
23using namespace Eagle::PhysicalSpace;
24using namespace std;
25using namespace META;
26using namespace Eagle;
27
28
29struct myData
30{
31string Name="";
32RefPtr<Field> F = nullptr;
33string SelStr = "";
34
35 myData(){}
36 myData(string&NameP,RefPtr<Field>&FP, string&SelStrP)
37 : Name(NameP)
38 , F(FP)
39 , SelStr(SelStrP)
40 {}
41};
42
44
46{
47const Fiber::Grid&G;
48const string SelectionString;
49const bool Inverse;
50
51const SelectionContainer_t SelectionContainer;
52const RefPtr<Field> PositionsField;
53
54string Err;
55
56 /* initialize struct: selection string will be parsed/split accordingly */
57 IndexListViaSelectionString(const Fiber::Grid&G,const string&SelectionString, const bool&Inverse=false);
58
59 /* for each fragment only the selected index will be returned as Chunk<uint32_t>. if selection string is empty all
60 indexes are returned. if RefPtr is null an error has occured */
61 RefPtr<Chunk<uint32_t> > select(const RefPtr<FragmentID>&FragID) const;
62
63static string checkParseString(const string&s);
64
65static std::tuple<std::set<string>,string> getOnlyFieldNames(const string&s);
66};
67
68
69}
70
71#endif
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
A Grid is a set of Skeleton objects, each of them accessed via some unique SkeletonID object.
Definition Grid.hpp:60
Field Inversion.
Definition Inverse.cpp:96
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
STL namespace.
Definition IndexListViaSelectionString.hpp:46
Definition IndexListViaSelectionString.hpp:30