Example #1
0
void wbExport(const char *file, wbExportKind_t kind, void *data, int rows,
              int columns, wbType_t type) {
  wbExport_t exprt;

  if (file == nullptr) {
    return;
  }

  exprt = wbExport_open(file, kind);

  wbExport_write(exprt, data, rows, columns, type);
  wbExport_close(exprt);
}
Example #2
0
void wbExport(const char *file, wbReal_t *data, int rows, int columns) {
  wbExportKind_t kind;
  wbExport_t exprt;

  if (file == NULL) {
    return;
  }

  kind = _parseExportExtension(file);
  exprt = wbExport_open(file, kind);

  wbExport_write(exprt, data, rows, columns, wbType_real);
  wbExport_close(exprt);
}
Example #3
0
void wbExport(const char *file, unsigned char *data, int rows,
              int columns) {
  wbExportKind_t kind;
  wbExport_t exprt;

  if (file == nullptr) {
    return;
  }

  kind  = _parseExportExtension(file);
  exprt = wbExport_open(file, kind);

  wbExport_write(exprt, data, rows, columns, wbType_ubit8);
  wbExport_close(exprt);
}
Example #4
0
static inline void wbExport_write(wbExport_t exprt, void *data, int rows,
                                  int columns, wbType_t type) {
  wbExport_write(exprt, data, rows, columns, ',', type);
}