/* FernUniversität in Hagen, Lehrgebiet Mensch-Computer-Interaktion Author: J. Kerdels The use of this code for military and/or intelligence purposes is disapproved of. */ #include "TAtomic.h" templateClassImp(TAtomic); template TAtomic::TAtomic() : TObject(), std::atomic() {} template TAtomic::TAtomic(T desired) : TObject(), std::atomic(desired) {} template TAtomic::TAtomic(const TAtomic &other) : TObject(other), std::atomic() { this->store(other.load()); } template TAtomic& TAtomic::operator=(const TAtomic& rhs) { if (this == &rhs) return *this; TObject::operator=(rhs); this->store(rhs.load()); return *this; } template TAtomic::~TAtomic() {} template void TAtomic::Streamer(TBuffer &buffer) { // custom streamer TObject::Streamer( buffer ); if (buffer.IsReading()) { T value; buffer.ReadFastArray(reinterpret_cast(&value),(Int_t)sizeof(T)); this->store(value); } else { T value = this->load(); buffer.WriteFastArray(reinterpret_cast(&value),(Int_t)sizeof(T)); } } template class TAtomic;