Go to the documentation of this file.
83 return m_constructors.emplace(ConstructorsMap::value_type(typeId, std::make_pair(constructFunc, matchFunc))).second;
111 c = i->second.first();
virtual CommunicatorTypeId portInfoToCommunicatorId(const XsPortInfo &portInfo) const =0
Match a XsPortInfo to a communicator.
static const CommunicatorFactory::CommunicatorTypeId INVALID
ConstructorsMap m_constructors
virtual Communicator * construct(CommunicatorTypeId communicator) const
Construct a communicator based on typeId.
virtual CommunicatorTypeId filenameToCommunicatorId(const XsString &filename) const =0
Match a filename to a communicator.
unsigned int CommunicatorTypeId
The typedef of the communicator type ID.
A base struct for a communication interface.
virtual ~CommunicatorFactory()
Destory the factory.
Contains a descriptor for opening a communication port to an Xsens device.
Communicator * create(const XsPortInfo &portInfo) const
Create a communicator based on a port info.
CommunicatorFactory()
Create the factory.
A 0-terminated managed string of characters.
bool registerType(CommunicatorTypeId typeId, CommunicatorConstructFunc constructFunc, PortInfoMatchFunc matchFunc)
Register a communicator type with the factory.