Packet create functions

This commit is contained in:
Dan Paulat 2021-12-28 16:51:23 -06:00
parent 95a3bb7cb7
commit 0ef21fd609
12 changed files with 95 additions and 0 deletions

View file

@ -142,6 +142,19 @@ bool LinkedVectorPacket::Parse(std::istream& is)
return blockValid;
}
std::shared_ptr<LinkedVectorPacket> LinkedVectorPacket::Create(std::istream& is)
{
std::shared_ptr<LinkedVectorPacket> packet =
std::make_shared<LinkedVectorPacket>();
if (!packet->Parse(is))
{
packet.reset();
}
return packet;
}
} // namespace rpg
} // namespace wsr88d
} // namespace scwx