FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
GridObject.hpp
1#ifndef __FISH_GRIDOBJECT_HPP
2#define __FISH_GRIDOBJECT_HPP
3
4#include "fishboneDllApi.h"
5
6#include <memcore/stringutil.hpp>
7
8#include <ocean/plankton/VCreator.hpp>
9#include <bundle/Bundle.hpp>
10#include "FishBundle.hpp"
11#include "FishGrid.hpp"
12
13#include "GridProviderObject.hpp"
14
15#include <ocean/shrimp/VObjectStatus.hpp>
16
17namespace Wizt
18{
19
25 , public Fish<Fiber::Bundle>
26 , public StatusIndicator
27{
28public:
29 TypedSlot<VStringList> MyGridNames;
30
32 GridObject(const string&name, int p, const RefPtr<VCreationPreferences>&VP);
33
36
40static bool HasGrids(const WeakPtr<VCreatorBase>&crec, const RefPtr<VObject>&vobj);
41
42 bool update(VRequest&R, double precision) override;
43
44 string help(HelpType=HTMLText) const override;
45};
46
47
52template <class GridVObject>
53struct GridObjectCreator : VCreator<GridVObject, AcceptList<Fiber::BundlePtr> >
54{
55 GridObjectCreator(const string&name, int quality)
57 {}
58
59 template <unsigned ID>
62 {}
63
64 string createChildname(const string&parent_name) const override
65 {
66 string BaseName = right_of( this->Name(), '/');
67
68 return BaseName + "Of" + parent_name;
69 }
70
72 {
73 // printf("GridObjectCreator<%s>::accept()\n", Typename( typeid(GridVObject) ).c_str() );
74#if 0
75// accept grids on any object that exports a bundle pointer?
76 if (!GridObject::HasGrids(this->self(), vobj) )
77 {
78 return NullPtr();
79 }
80#endif
81
83
89 return VAIL;
90
91/*
92 RefPtr<VAcceptInfo>
93 VAI =
94
95 MemCoreSetLastKnownSourceCodeLineEntry
96
97 if (!VAI)
98 return NullPtr();
99
100 return VAI;
101*/
102 }
103};
104
105
106} // namespace Wizt
107
108#endif /* __FISH_GRIDOBJECT_HPP */
109
110
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
const std::string & Name() const
std::string BaseName(const char Separator) const
Base class for objects that provide Grid objects extracted from Bundle objects.
Definition GridObject.hpp:27
static bool HasGrids(const WeakPtr< VCreatorBase > &crec, const RefPtr< VObject > &vobj)
Check whether the given VObject carries any grid objects.
Definition GridObject.cpp:196
Common base class for objects that provide Grid objects.
Definition GridProviderObject.hpp:77
std::nullptr_t NullPtr
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
Creator for objects that may create grids; such objects may be attached to objects that provide bundl...
Definition GridObject.hpp:54
VAcceptInfoList_t accept(const RefPtr< VObject > &vobj) const override
Definition GridObject.hpp:71