View on GitHub

Vistle

Distributed Data-parallel Scientific Visualization in VR

database.h
Go to the documentation of this file.
1#ifndef VISTLE_DATABASE_H
2#define VISTLE_DATABASE_H
3
4#include "index.h"
5#include "dimensions.h"
6#include "object.h"
7#include "archives_config.h"
8#include "vector.h"
9#include "shm_obj_ref.h"
10
11
12namespace vistle {
13
16
17public:
18 DEFINE_ENUM_WITH_STRING_CONVERSIONS(Mapping, (Unspecified)(Vertex)(Element));
19
20 typedef Object Base;
21 std::set<Object::const_ptr> referencedObjects() const override;
22 virtual void resetArrays(); //< remove reference to data arrays and create empty ones
23 virtual Index getSize();
24 virtual Index getSize() const;
25 virtual void setSize(const Index size);
26 virtual void applyDimensionHint(Object::const_ptr grid);
28 void setGrid(Object::const_ptr grid);
29 Mapping guessMapping(Object::const_ptr grid = Object::const_ptr())
30 const; //< if Unspecified, try to derive a mapping based on array and grid size
31 Mapping mapping() const;
32 void setMapping(Mapping m);
33 virtual void setExact(bool enable); //< whether data arrays may not be compressed lossy
34
35 void copyAttributes(Object::const_ptr src, bool replace = true) override;
36
37 virtual int dimension() const;
38 virtual bool copyEntry(Index to, DataBase::const_ptr src, Index from);
39 virtual void setValue(Index idx, int component, const double &value);
40 virtual double value(Index idx, int component = 0) const;
41
42private:
45 Mapping mapping;
46
47 Data(const Data &o, const std::string &name, Type id);
48 ~Data();
49 static Data *create(Type id = UNKNOWN, const Meta &meta = Meta());
51};
52
54
55//ARCHIVE_ASSUME_ABSTRACT(DataBase)
56
57} // namespace vistle
58#endif
Definition: database.h:14
Object::const_ptr grid() const
Mapping mapping() const
DEFINE_ENUM_WITH_STRING_CONVERSIONS(Mapping,(Unspecified)(Vertex)(Element))
Object Base
Definition: database.h:20
Definition: objectmeta.h:16
Definition: object.h:58
std::shared_ptr< const Object > const_ptr
Definition: object.h:68
Type
Definition: object.h:84
Definition: shm_obj_ref.h:15
#define V_COREEXPORT
Definition: export.h:9
Definition: allobjects.cpp:30
uint32_t Index
Definition: index.h:13
#define V_DATA_BEGIN(ObjType)
Definition: object.h:474
#define V_OBJECT_DECL(ObjType)
Definition: object.h:525
#define V_DATA_END(ObjType)
Definition: object.h:481
#define V_OBJECT(ObjType)
declare a new Object type
Definition: object.h:381
Definition: object.h:233