Add API for querying if intraprocess comm is enabled in pub/subs
Feature request
Feature description
Add a method to Publisher and Subscription classes, which allows querying if intraprocess communication is enabled or not.
bool
is_intra_process_comm_enabled() const;
Reasoning
In #674 an extra argument has been added to create_publisher and create_subscription methods in Node class, which allows choosing if intraprocess communication is enabled or not with more granularity. The argument default value is NodeDefault which enables it or not depending on the node settings. That was the previous behavior.
Now, It's no way of checking if a publisher or subscriber has the intraprocess comm activated.
Also, it doesn't exist any test which sets the intraprocess comm with pub/sub granularity. This will allow to easily add a test.
Implementation considerations
Both publisher and subscriber has a bool storing the intraprocess subscription state, so we have to just return it. I think it's also a good idea to add a test with intraprocess comm being set with pub/sub granularity.
Makes sense to me.