FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
VScriptH5.hpp
1/*
2 * VscriptH5.hpp
3 *
4 * Created on: Jul 18, 2016
5 * Author: dimos
6 */
7
8#ifndef FISH_V5_VSCRIPTH5_HPP_
9#define FISH_V5_VSCRIPTH5_HPP_
10
11
12#include <ocean/plankton/VActionNotifier.hpp>
13#include <ocean/plankton/VObject.hpp>
14#include <ocean/shrimp/Action.hpp>
15
16#include <fish/v5/VCreateScriptH5.hpp>
17
18#include <hdf5.h>
19
20#define H5LOAD_DEBUG 1
21#define TRAVERSE_LINKS_BY_CRT_ORDER 0
22
23namespace Wizt
24{
25 using std::string;
26
31// functions for accessing HDF5 file containing Vish scripts
32herr_t parse_group(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata);
33herr_t parse_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata);
34void addStringAttribute(hid_t obj_id, const char * attr_name, const char * attr_value);
35
36class VScriptH5 : public VObject
37{
38 TypedSlot<Action> inUpdateScript;
39
40
41public:
42 RefPtr<VActionNotifier> MyH5Notifier;
43
44 WeakPtr<VScriptH5> VScriptH5loaded = nullptr;
45
46 VScriptH5(const string&name, int N, const RefPtr<VCreationPreferences>&VP);
47 VScriptH5(const string&fileName, const string&name, int N, const RefPtr<VCreationPreferences>&VP);
48
49 ~VScriptH5();
50
51 bool update(VRequest&Context, double precision);
52
53 void loadH5();
54};
55
56} // namespace Wizt
57
58typedef struct attr_data {
59 Wizt::string obj_name;
60 Object_type object_type;
61 Wizt::string creator;
62 std::map <Wizt::string, int>& localParamsMap;
63
64
65 attr_data(Wizt::string& obj_name, Object_type object_type, Wizt::string& creator, std::map <Wizt::string, int>& localParamsMap):
66 obj_name(obj_name), object_type(object_type), creator(creator), localParamsMap(localParamsMap){}
68
69
70#endif /* FISH_V5_VSCRIPTH5_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
Definition VScriptH5.hpp:37
void loadH5()
overrided function that loads a HDF5 format Vish script
Definition VScriptH5.cpp:961
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
herr_t parse_attr(hid_t loc_id, const char *name, const H5A_info_t *ainfo, void *opdata)
Function callback for parsing attributes.
Definition VScriptH5.cpp:901
herr_t parse_group(hid_t loc_id, const char *name, const H5L_info_t *linfo, void *opdata)
parses a group, it is called by H5Literate for all sub-groups found in a given group loc_id: the loca...
Definition VScriptH5.cpp:766
Definition VScriptH5.hpp:58