149template<
typename PI_value_t,
typename PI_
id_t,
typename PI_value_no_cv_t>
156 template <
typename T>
161 template<
typename class_t>
162 static std::true_type test_restore(
decltype(std::declval<class_t>().
restore(std::declval<std::istream &>())) *);
164 template<
typename class_t>
165 static std::false_type test_restore(...);
167 template<
typename class_t>
168 static constexpr bool has_restore()
170 return std::is_same<decltype(test_restore<class_t>(
nullptr)), std::true_type>();
174 static const bool value = has_restore<T>();
181 template <
typename T>
186 template<
typename class_t>
187 static std::true_type test_dump(
decltype(std::declval<class_t>().
dump(std::declval<std::ostream &>())) *);
189 template<
typename class_t>
190 static std::false_type test_dump(...);
192 template<
typename class_t>
193 static constexpr bool has_dump()
195 return std::is_same<decltype(test_dump<class_t>(
nullptr)), std::true_type>();
199 static const bool value = has_dump<T>();
206 template <
typename T,
typename Ret,
typename... Args>
207 class check_initialize
212 static constexpr auto test_initialize(C *)
213 ->
typename std::is_same<decltype(std::declval<C>().initialize(std::declval<Args>()...)), Ret>::type;
215 template<
typename class_t>
216 static constexpr auto test_initialize(...)
220 static const bool value = std::is_same<decltype(test_initialize<T>(
nullptr)), std::true_type>();
230 template<
typename PK_
id_t>
253 typedef typename PiercedStorageSyncSlave<id_t>::KernelType
KernelType;
273 typedef typename container_t::pointer
pointer;
315 return check_restore<value_t>::value;
323 return check_dump<value_t>::value;
329 template<
typename... Args>
332 return check_initialize<value_t, void, Args...>::value;
340 template <
typename... Args>
363 void fill(
const value_t &value);
366 __PS_POINTER__
data();
367 __PS_CONST_POINTER__
data()
const;
369 __PS_POINTER__
data(id_t
id, std::size_t offset = 0);
370 __PS_CONST_POINTER__
data(id_t
id, std::size_t offset = 0)
const;
372 __PS_POINTER__
rawData(std::size_t pos, std::size_t offset = 0);
373 __PS_CONST_POINTER__
rawData(std::size_t pos, std::size_t offset = 0)
const;
376 __PS_REFERENCE__
back(std::size_t k = 0);
377 __PS_CONST_REFERENCE__
back(std::size_t k = 0)
const;
379 __PS_REFERENCE__
front(std::size_t k = 0);
380 __PS_CONST_REFERENCE__
front(std::size_t k = 0)
const;
382 __PS_REFERENCE__
at(id_t
id, std::size_t k = 0);
383 __PS_CONST_REFERENCE__
at(id_t
id, std::size_t k = 0)
const;
386 __PS_CONST_REFERENCE__
operator[](id_t
id)
const;
388 void copy(id_t
id, value_t *values)
const;
389 void copy(id_t
id, std::size_t nFields, std::size_t offset, value_t *values)
const;
391 void set(id_t
id,
const value_t &value);
392 void set(id_t
id, std::size_t k,
const value_t &value);
393 void set(id_t
id,
const value_t *values);
394 void set(id_t
id, std::size_t nFields, std::size_t offset,
const value_t *values);
397 __PS_REFERENCE__
rawAt(std::size_t pos, std::size_t offset = 0);
398 __PS_CONST_REFERENCE__
rawAt(std::size_t pos, std::size_t offset = 0)
const;
400 void rawCopy(std::size_t pos, value_t *values)
const;
401 void rawCopy(std::size_t pos, std::size_t nFields, std::size_t offset, value_t *values)
const;
403 void rawSet(std::size_t pos,
const value_t &value);
404 void rawSet(std::size_t pos, std::size_t k,
const value_t &value);
405 void rawSet(std::size_t pos,
const value_t *values);
406 void rawSet(std::size_t pos, std::size_t nFields, std::size_t offset,
const value_t *values);
430 template<typename T = value_t, typename std::enable_if<std::is_pod<T>::value ||
PiercedStorage<T, id_t>::
has_restore()>::type * =
nullptr>
431 void restore(std::istream &stream);
433 template<typename T = value_t, typename std::enable_if<std::is_pod<T>::value ||
PiercedStorage<T, id_t>::
has_dump()>::type * =
nullptr>
434 void dump(std::ostream &stream) const;
453 void rawErase(std::
size_t pos, std::
size_t n);
455 template<typename T = value_t, typename std::enable_if<!std::is_same<T,
bool>::value>::type * =
nullptr>
456 void rawSwap(std::
size_t pos_first, std::
size_t pos_second);
457 template<typename T = value_t, typename std::enable_if<std::is_same<T,
bool>::value>::type * =
nullptr>
458 void rawSwap(std::
size_t pos_first, std::
size_t pos_second);
459 void rawReorder(const std::vector<std::
size_t> &permutations);
461 void rawResize(std::
size_t n, const value_t &value = value_t());
466 void rawInitialize(std::
size_t pos, std::
size_t k, Args&&... args);
468 void rawInsert(std::
size_t pos, std::
size_t n, const value_t &value);
470 template<typename T = value_t, typename std::enable_if<!std::is_same<T,
bool>::value>::type * =
nullptr, typename... Args>
471 void rawEmplace(std::
size_t pos, Args&&... args);
472 template<typename T = value_t, typename std::enable_if<std::is_same<T,
bool>::value>::type * =
nullptr>
473 void rawEmplace(std::
size_t pos,
bool value = false);
474 template<typename T = value_t, typename std::enable_if<!std::is_same<T,
bool>::value>::type * =
nullptr, typename... Args>
476 template<typename T = value_t, typename std::enable_if<std::is_same<T,
bool>::value>::type * =
nullptr>
478 template<typename... Args>
482 std::
size_t m_nFields;
485 void restoreField(std::istream &stream, std::vector<
bool>::
reference value);
488 void restoreField(std::istream &stream, value_t &value);
491 void restoreField(std::istream &stream, value_t &
object);
493 void dumpField(std::ostream &stream, std::vector<
bool>::
const_reference value) const;
495 template<typename T = value_t, typename std::enable_if<!
PiercedStorage<T, id_t>::
has_dump()>::type * =
nullptr>
496 void dumpField(std::ostream &stream, const value_t &value) const;
498 template<typename T = value_t, typename std::enable_if<
PiercedStorage<T, id_t>::
has_dump()>::type * =
nullptr>
499 void dumpField(std::ostream &stream, const value_t &
object) const;