Skip to content
Snippets Groups Projects
Commit 4dadd8d4 authored by Xavier ELATTAOUI's avatar Xavier ELATTAOUI
Browse files

Release version

parents b964189f 2ee1cf8e
No related branches found
No related merge requests found
......@@ -9,7 +9,7 @@
</parent>
<groupId>fr.soleil.lib</groupId>
<artifactId>NexusCPP-${aol}-${library}-${mode}</artifactId>
<version>3.1.7</version>
<version>3.1.6</version>
<packaging>nar</packaging>
<name>NexusCPP</name>
<description>NexusCPP library</description>
......
......@@ -779,10 +779,9 @@ public:
m_lock_ptr.reset( new yat::LockFile( yat::FileName(path), yat::LockFile::READ) );
else if( NexusFile::WRITE )
m_lock_ptr.reset( new yat::LockFile( yat::FileName(path), yat::LockFile::WRITE) );
else
throw NexusException("unknown open mode", "NexusFileImpl::NexusFileImpl");
}
if( yat::FileName(path).file_exist() && mode != NexusFile::NONE )
Open(path, mode);
}
......@@ -805,13 +804,12 @@ public:
/// file related methods ... ///
////////////////////////////////
void Create(const std::string& path, ENexusCreateMode mode)
void Create(const std::string& path)
{
NXFILE_LOCK;
NXFILEIMPL_COUT("Create");
if (mode != NX_HDF5)
throw NexusException("unsupported creation mode", "NexusFileImpl::Create");
PrivOpenFile(path, H5F_ACC_TRUNC);
PrivCloseFile();
}
bool Open(const std::string& path, NexusFile::OpenMode mode)
......@@ -1549,8 +1547,19 @@ private:
/// create data set
hsize_t dataDims[MAX_DATASET_NDIMS];
std::copy(dim, dim + rank, dataDims);
H5::DataSpace dataSpace(rank, dataDims);
H5::DataSet dataset = group->createDataSet(name, nexusData2h5Data(dataType), dataSpace, props);
H5::DataSpace dataSpace;
H5::DataType memDataType;
if( NX_CHAR == dataType && 1 == rank )
{
// Characters string
memDataType = H5::StrType(0, dim[0] == 0 ? 1 : dim[0]);
}
else
{
dataSpace = H5::DataSpace(rank, dataDims);
memDataType = nexusData2h5Data(dataType);
}
H5::DataSet dataset = group->createDataSet(name, memDataType, dataSpace, props);
/// push it
if (open)
PushTop(new H5::DataSet(dataset));
......@@ -1751,9 +1760,9 @@ void NexusFile::Flush()
//---------------------------------------------------------------------------
// NexusFile::Create
//---------------------------------------------------------------------------
void NexusFile::Create(const char *pcszFullPath, ENexusCreateMode eMode)
void NexusFile::Create(const char *pcszFullPath, ENexusCreateMode)
{
m_pImpl->Create(pcszFullPath, eMode);
m_pImpl->Create(pcszFullPath);
}
//---------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment