20#ifndef OPM_PADDEDOUTPUTSTRING_HEADER_HPP
21#define OPM_PADDEDOUTPUTSTRING_HEADER_HPP
29namespace Opm {
namespace EclIO {
38 template <std::
size_t N>
50 this->copy_in(s.c_str(), s.size());
65 this->copy_in(s.data(), s.size());
70 const char* c_str()
const
72 return this->s_.data();
76 enum :
typename std::array<char, N + 1>::size_type { NChar = N };
78 std::array<char, NChar + 1> s_;
84 this->s_[NChar] =
'\0';
89 void copy_in(
const char* s,
90 const typename std::array<char, NChar + 1>::size_type len)
92 const auto ncpy = std::min(len,
static_cast<decltype(len)
>(NChar));
97 std::memcpy(this->s_.data(), s,
98 ncpy *
sizeof *this->s_.data());
Null-terminated, left adjusted, space padded array of N characters.
Definition PaddedOutputString.hpp:40
PaddedOutputString & operator=(const std::string &s)
Assign from.
Definition PaddedOutputString.hpp:62
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30