27#ifndef PYHLHDF_COMMON_H
28#define PYHLHDF_COMMON_H
238int setObjectLong(PyObject* info,
char* keyname,
long in_value);
Common functions for working with an HDF5 file through the HL-HDF API.
Ensures that the python arrayobject.h file is imported correctly.
Python compability file for making it possible to compile rave for both python >2....
int getFloatFromDictionary(char *name, float *val, PyObject *dict)
Retrives a float from a dictionary, python equivalent would be val = dict[name].
Definition pyhlhdf_common.c:35
int getShortFromObject(char *name, short *val, PyObject *dict)
Retrives a short from an object, python equivalent would be val = dict.name.
Definition pyhlhdf_common.c:197
int getUnsignedLongFromDictionary(char *name, unsigned long *val, PyObject *dict)
Retrives a unsigned long from a dictionary, python equivalent would be val = dict[name].
Definition pyhlhdf_common.c:99
char * translatePyFormatToHlHdf(char type)
Translates a PyArray type to a hlhdf known format.
Definition pyhlhdf_common.c:521
int getDoubleFromObject(char *name, double *val, PyObject *dict)
Retrives a double from an object, python equivalent would be val = dict.name.
Definition pyhlhdf_common.c:132
int setObjectString_Length(PyObject *info, char *keyname, char *in_string, int len)
Sets a string in an object, the python equivalent would be: info.keyname=in_string[0:len].
Definition pyhlhdf_common.c:498
int setObjectLong(PyObject *info, char *keyname, long in_value)
Sets an long in a object, the python equivalent would be: info.keyname=in_value.
Definition pyhlhdf_common.c:405
int getDoubleFromDictionary(char *name, double *val, PyObject *dict)
Retrives a double from a dictionary, python equivalent would be val = dict[name].
Definition pyhlhdf_common.c:51
int getLongFromObject(char *name, long *val, PyObject *dict)
Retrives a long from an object, python equivalent would be val = dict.name.
Definition pyhlhdf_common.c:164
int getIdxDoubleFromTuple(int idx, double *val, PyObject *tuple)
Retrives a double from a index in a tuple, python equivalent would be val = tuple[idx].
Definition pyhlhdf_common.c:261
int setObjectDouble(PyObject *info, char *keyname, double in_value)
Sets an double in a object, the python equivalent would be: info.keyname=in_value.
Definition pyhlhdf_common.c:442
int getIntegerFromObject(char *name, int *val, PyObject *dict)
Retrives a integer from an object, python equivalent would be val = dict.name.
Definition pyhlhdf_common.c:148
int setObjectUnsignedLong(PyObject *info, char *keyname, unsigned long in_value)
Sets an unsigned long in a object, the python equivalent would be: info.keyname=in_value.
Definition pyhlhdf_common.c:423
int getFloatFromObject(char *name, float *val, PyObject *dict)
Retrives a float from an object, python equivalent would be val = dict.name.
Definition pyhlhdf_common.c:116
PyArrayObject * new2d_ArrayObject(int xsize, int ysize, const char *format)
Creates a new 2-dimensional PyArrayObject.
Definition pyhlhdf_common.c:626
int getIntegerFromDictionary(char *name, int *val, PyObject *dict)
Retrives a integer from a dictionary, python equivalent would be val = dict[name].
Definition pyhlhdf_common.c:67
int setMappingInteger(PyObject *info, char *keyname, int in_value)
Sets an integer in a dictionary, the python equivalent would be: info[keyname]=in_value.
Definition pyhlhdf_common.c:293
int pyarraytypeFromHdfType(const char *format)
Translates an hlhdf represented type into a PyArray known format.
Definition pyhlhdf_common.c:569
int setMappingFloat(PyObject *info, char *keyname, float in_value)
Sets an float in a dictionary, the python equivalent would be: info[keyname]=in_value.
Definition pyhlhdf_common.c:331
int getByteFromObject(char *name, unsigned char *val, PyObject *dict)
Retrives a unsigned char from an object, python equivalent would be val = dict.name.
Definition pyhlhdf_common.c:213
int setMappingString(PyObject *info, char *keyname, char *in_string)
Sets an string in a dictionary, the python equivalent would be: info[keyname]=in_value.
Definition pyhlhdf_common.c:350
int getLongFromDictionary(char *name, long *val, PyObject *dict)
Retrives a long from a dictionary, python equivalent would be val = dict[name].
Definition pyhlhdf_common.c:83
int setMappingDouble(PyObject *info, char *keyname, double in_value)
Sets an double in a dictionary, the python equivalent would be: info[keyname]=in_value.
Definition pyhlhdf_common.c:312
int setMappingString_Length(PyObject *info, char *keyname, char *in_string, int len)
Sets a string in a dictionary, the python equivalent would be: info[keyname]=in_string[0:len].
Definition pyhlhdf_common.c:368
char * getStringFromObject(char *name, PyObject *dict)
Retrives a string from a name in an object, python equivalent would be val = dict....
Definition pyhlhdf_common.c:229
int getIdxIntegerFromTuple(int idx, int *val, PyObject *tuple)
Retrives a integer from a index in a tuple, python equivalent would be val = tuple[idx].
Definition pyhlhdf_common.c:245
char * getStringFromDictionary(char *name, PyObject *dict)
Retrives a string from a dictionary, python equivalent would be val = dict[name].
Definition pyhlhdf_common.c:277
int setObjectString(PyObject *info, char *keyname, char *in_string)
Sets an string in a object, the python equivalent would be: info.keyname=in_value.
Definition pyhlhdf_common.c:480
PyArrayObject * new1d_ArrayObject(int nl, const char *format)
Creates a new 1-dimensional PyArrayObject.
Definition pyhlhdf_common.c:606
int getUnsignedLongFromObject(char *name, unsigned long *val, PyObject *dict)
Retrives a unsigned long from an object, python equivalent would be val = dict.name.
Definition pyhlhdf_common.c:180
int setObjectInteger(PyObject *info, char *keyname, int in_value)
Sets an integer in a object, the python equivalent would be: info.keyname=in_value.
Definition pyhlhdf_common.c:386
int setObjectFloat(PyObject *info, char *keyname, float in_value)
Sets an float in a object, the python equivalent would be: info.keyname=in_value.
Definition pyhlhdf_common.c:461