call.cpp 542 Bytes
Newer Older
1
#include "call.hpp"
2
#include <atomic>
3 4 5 6 7 8 9 10

namespace cvv
{
namespace impl
{

size_t newCallId()
{
11
	static std::atomic_size_t nextId (1);
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
	return nextId++;
}

Call::Call() : metaData_{}, id{ newCallId() }, calltype{}
{
}

Call::Call(impl::CallMetaData callData, QString type, QString description,
           QString requestedView)
    : metaData_{ std::move(callData) }, id{ newCallId() },
      calltype{ std::move(type) }, description_{ std::move(description) },
      requestedView_{ std::move(requestedView) }
{

}
}
} // namespaces cvv::impl