ArchiveHPTime.h

// ArchiveHPTime.h
//
// Author David Barrett-Lennard
// (C)opyright Cedanet Pty Ltd 2007

#pragma once
#ifndef Ceda_cxUtils_ArchiveHPTime_H
#define Ceda_cxUtils_ArchiveHPTime_H

#include "Archive.h"
#include "HPTime.h"

namespace ceda
{

template <typename Archive> 
inline void Serialise(Archive& ar, const HPTime& x)
{
    ar << x.m_ticks;
}

template <typename Archive> 
inline void Deserialise(Archive& ar, HPTime& x)
{
    ar >> x.m_ticks;
}

template <typename Archive, int numDecPlaces> 
inline void Serialise(Archive& ar, const HPTimeStamp<numDecPlaces>& x)
{
    ar << x.m_ticks;
}

template <typename Archive, int numDecPlaces> 
inline void Deserialise(Archive& ar, HPTimeStamp<numDecPlaces>& x)
{
    ar >> x.m_ticks;
}

template <typename Archive, int numDecPlaces> 
inline void Serialise(Archive& ar, const HPTimeSpan<numDecPlaces>& x)
{
    ar << x.m_ticks;
}

template <typename Archive, int numDecPlaces> 
inline void Deserialise(Archive& ar, HPTimeSpan<numDecPlaces>& x)
{
    ar >> x.m_ticks;
}

} // namespace ceda

#endif // include guard