1#ifndef __FISH_BONE_FIELDINPUTCREATOR_HPP
2#define __FISH_BONE_FIELDINPUTCREATOR_HPP
6#include <ocean/shrimp/VStringList.hpp>
7#include <ocean/plankton/VObject.hpp>
8#include <ocean/plankton/VPipeline.hpp>
10#include <bundle/FieldSelector.hpp>
12#include <meta/LIST.hpp>
13#include <meta/NativeTypeList.hpp>
27template <
class FieldVObject,
class OutputType>
35template <
class FieldVObject>
55 string QualificationInfo;
71 printf(
" TypeInspector<%s>: ",
typeid(T).name() );
72 TI.FS.FieldTypes().speak();
puts(
"");
74 if (
TI.FS.requiresType(
typeid(T) ) )
77 printf(
" ...... FIELD requires %s (%d fields available)\n",
typeid(T).name(),
TI.FS.NumberOfAvailableFields() );
79 TI.QualificationInfo =
"Field qualifies to be of type " +
Typename(
typeid(T) );
84 printf(
"Field requirement %s is NOT available\n",
typeid(T).name() );
92template <
class TypeList>
142template <
class FieldVObject,
class TypeList = LIST<META::NIL>,
143 class Gr
idInspector =
typename FieldVObject::Gr
idInspector,
144 int NumberOfInputFields = FieldVObject::NumberOfInputFields,
145 class OutputType =
void>
170 if (this->Arguments().length()<1)
171 this->Arguments() = TypeString();
190 template <
unsigned ID>
194 if (this->Arguments().length()<1)
195 this->Arguments() = TypeString();
199#ifndef FieldInputCreatorVerbose
200#define FieldInputCreatorVerbose(X) AppVerbose("FieldInput", X)
212 FieldInputCreatorVerbose(20) <<
"FieldInputCreator(): NO INPUT FOUND!";
216 FieldInputCreatorVerbose(30) <<
217 "RefPtr<VAcceptInfo> " << this->
Name() <<
"::accept(const RefPtr<VObject>&"<< vobj->Name()<<
" ) const override";
227 FieldInputCreatorVerbose(30) <<
"FieldInputCreator(): NO INPUT FIELD FOUND at " <<
vobj->Name();
231 FieldInputCreatorVerbose(30) <<
"Getting Fieldselector for " << this->
Name()
232 <<
" from " << vobj->Name()
238 FieldInputCreatorVerbose(30) <<
"FieldInputCreator(): Could not get fieldselector for " <<
vobj->Name();
243 if (!
FS.getBundle() )
245 FieldInputCreatorVerbose(30) <<
"FieldInputCreator(): No BUNDLE available at " <<
vobj->Name();
254 return (
VAIL &
"Unitialized generic Field provider, "
255 "might be suitable to provide the requested type, we don't know yet.") * 0.5;
270 if (
FS.NumberOfAvailableFields()>0
272 FS.NumberOfAvailableFields()<NumberOfInputFields)
274 FieldInputCreatorVerbose(30) <<
275 "FieldInputCreator(): Input object provides a number of available fields, "
276 "but FS.NumberOfAvailableFields() ("
277 <<
FS.NumberOfAvailableFields()
278 <<
") < NumberOfInputFields ("<<NumberOfInputFields<<
")\n";
287 if (!GS.
hasProperty(GridInspector::InspectionProperty() ) )
289 FieldInputCreatorVerbose(30) <<
"The Grid as exported by " <<
vobj->Name() <<
" does not qualify as input.";
294 FieldInputCreatorVerbose(30) <<
"FieldInputCreator(): INSPECT FIELD AS EXPORTED BY "
295 <<
vobj->Name() <<
" (" <<
FS.FieldTypes().size() <<
" types) "
296 <<
FS.FieldTypes().str();
310 FieldInputCreatorVerbose(30) <<
"NOPE, don't want this field type";
316 FieldInputCreatorVerbose(30) <<
"YESSS, accepted this field type";
326 string theTypeString;
328 template <
typename T>
336 MS.theTypeString +=
"|";
344static string TypeString()
348 return MS.theTypeString;
367template <
class FieldVObject,
class Gr
idInspector =
typename FieldVObject::Gr
idInspector,
class OutputType =
void>
393 template <
unsigned ID>
408template <
class FunctionObject>
417 template <
unsigned ID>
428template <
class FunctionObject,
class OutputType>
437 template <
unsigned ID>
448template <
class FunctionObject>
455 template <
unsigned ID>
467template <
class FunctionObject>
474 template <
unsigned ID>
487template <
class FunctionObject,
class OutputType>
494 template <
unsigned ID>
504template <
class FunctionObject>
511 template <
unsigned ID>
constexpr tuple< typename __decay_and_strip< _Elements >::__type... > make_tuple(_Elements &&... __args)
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
An internal class that stores a couple of textual names.
Definition FieldSelector.hpp:18
A Field is a collection of CreativeArrayBase reference pointers which are accessed via FragmentID obj...
Definition Field.hpp:245
Context information to select a grid from within a bundle.
Definition GridSelector.hpp:26
bool hasProperty(const BundleProperty &theProperty) const
Check this GridSelector for a certain property.
Definition GridSelector.hpp:251
const T & getValue(index_t i) const
Get the value, readonly.
Definition vector/Iterator.hpp:718
const std::string & Name() const
MEMCORE_API std::string Typename(const std::type_info &t)
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
Generic template namespace class for results of find() functions throughout the Bundle.
Definition Info.hpp:17
Definition FieldInputCreator.hpp:94
Definition FieldInputCreator.hpp:65
Helper class for FieldInputCreator .
Definition FieldInputCreator.hpp:48