コード例 #1
0
ファイル: hdfgroup.hpp プロジェクト: AcidLeroy/hdf5
    boost::shared_ptr<HDFDataSet<HDFImpl> >
    writeDataset(const std::string & path, const Type* data, const Slab<order, HDFImpl> &memslab, const Slab<order, HDFImpl> &fileslab) {
      boost::shared_ptr<HDFDataSet<HDFImpl> > dataset;
      try {
	dataset = createDataset<Type>(path, fileslab);
      } catch (DatasetExists &) {
	dataset = openDataset(path);
      }
      dataset->writeData(data, memslab);
      return dataset;
    }
コード例 #2
0
ファイル: hdfgroup.hpp プロジェクト: AcidLeroy/hdf5
    boost::shared_ptr<HDFDataSet<HDFImpl> >
    writeDataset(const std::string & path, const std::vector<Type> & data) {
      std::vector<hsize_t> dims(1,data.size());
      boost::shared_ptr<HDFDataSet<HDFImpl> > dataset;
      try {
	dataset = createDataset<Type,1>(path, dims);
      } catch (DatasetExists &) {
	dataset = openDataset(path);
      }

      dataset->writeData(data);
      return dataset;
    }
コード例 #3
0
ファイル: qh5dataset.cpp プロジェクト: NanoSim/Porto
QH5Dataset :: QH5Dataset (QH5File *file, QH5Dataspace *dataspace, QString const &path, QH5Datatype::Type dtype, QObject *parent)
  : QObject (parent)
  , datasetId (openDataset (file, dataspace, path, dtype))
  , datatype(dtype)
{}