File: VsUtils.h

package info (click to toggle)
paraview 4.0.1-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 526,572 kB
  • sloc: cpp: 2,284,430; ansic: 816,374; python: 239,936; xml: 70,162; tcl: 48,295; fortran: 39,116; yacc: 5,466; java: 3,518; perl: 3,107; lex: 1,620; sh: 1,555; makefile: 932; asm: 471; pascal: 228
file content (50 lines) | stat: -rw-r--r-- 1,573 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <hdf5.h>
#include <visit-hdf5.h>
#if HDF5_VERSION_GE(1, 8, 1)
/**
 * @file  VsUtils.h
 *
 * @class VsMetaReader
 *
 * @brief Some useful routines for HDF5 used in this dir.
 *
 * Copyright &copy; 2008 by Tech-X Corporation
 */

#ifndef VS_UTILS
#define VS_UTILS

#include <iostream>
#include <string>
#include <vector>

// Get a value of a attribute
herr_t getAttributeHelper(const hid_t aid, std::string* val, std::vector<int>* ivals,
    std::vector<float>* fvals);

// Parse expressions for variables separated by "".
// JRC: commented out as obviously buggy and not used.
// void parseVars(const string& vsVars, vector<string>& vars);

// Get dimensions of a dataset or attribute
void getDims(hid_t id, bool isDataset, std::vector<int>& dims);

// Create fully qualified name from an object name
// This means strip the leading "/" if it exists
std::string makeCanonicalName(std::string name);

// Create fully qualified name from object path and name
// i.e. path + "/" + name
// Then strip the leading "/" if it exists
std::string makeCanonicalName(std::string path, std::string name);

// Compare two object names to a target name
// Return the name that is "closest" to the target
// If the two object names are identical, returns the first
std::string getClosestName(std::string name1, std::string name2, std::string target);

void adjustSize_hsize_t(hsize_t* dims, unsigned int rank, std::vector<int> stride, int before, int after);
void adjustSize_vector(std::vector<int>* dims, int rank, std::vector<int> stride, int before, int after);
#endif
#endif