Newer
Older
* Distributed under the OSI-approved Apache License, Version 2.0. See
* accompanying file Copyright.txt for details.
*
*
* Created on: Dec 22, 2016
* Author: wfg
*/
/// \cond EXCLUDE_FROM_DOXYGEN
#include <new> //std::bad_alloc
#include <stdexcept> //std::runtime_error
STLVector::STLVector(const bool debugMode)
: Capsule("heap/STLVector", debugMode)
{
}
char *STLVector::GetData() { return m_Data.data(); }
char *STLVector::GetMetadata() { return m_Metadata.data(); }
size_t STLVector::GetDataSize() const { return m_Data.size(); }
size_t STLVector::GetMetadataSize() const { return m_Metadata.size(); }
void STLVector::ResizeData(const size_t size)
try
{
m_Data.resize(size);
}
std::runtime_error("ERROR: possible overflow when resizing "
"data buffer with size " +
std::to_string(size) + "\n"));
void STLVector::ResizeMetadata(const size_t size)
try
{
m_Metadata.resize(size);
}
std::runtime_error("ERROR: possible overflow when resizing "
"metadata buffer with size " +
std::to_string(size) + "\n"));
} // end namespace capsule
} // end namespace adios