add a publish method with the const MessageT * signature (#307)
This commit is contained in:
parent
dc6b15983a
commit
ce146cfdba
2 changed files with 18 additions and 0 deletions
|
@ -261,6 +261,15 @@ public:
|
|||
return this->publish(unique_msg);
|
||||
}
|
||||
|
||||
virtual void
|
||||
publish(const MessageT * msg)
|
||||
{
|
||||
if (!msg) {
|
||||
throw std::runtime_error("msg argument is nullptr");
|
||||
}
|
||||
return this->publish(*msg);
|
||||
}
|
||||
|
||||
std::shared_ptr<MessageAlloc> get_allocator() const
|
||||
{
|
||||
return message_allocator_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue