Closed plata closed 5 years ago
Currently, the PDUBank (and thus the available PDUs) is hardcoded in https://github.com/open-dis/open-dis-cpp/blob/05aa32c59397b7c889a6b603a6327c69ae0b4420/src/utils/IncomingMessage.cpp#L46
As a consequence, it is not possible to use a different PDUBank without changing the code. However, this is required e.g. to use DIS 7 PDUs.
I suggest to implement the PDUBank handling in a similar way to the PacketProcessors, i.e.
Pdu* GetStaticPDU(const DataStream&) const
IncomingMessage::AddProcessor
This would also help reducing the cyclic dependencies between the PDUs and the utils.
@phoppermann was this fixed by #32 ?
Yes.
Currently, the PDUBank (and thus the available PDUs) is hardcoded in https://github.com/open-dis/open-dis-cpp/blob/05aa32c59397b7c889a6b603a6327c69ae0b4420/src/utils/IncomingMessage.cpp#L46
As a consequence, it is not possible to use a different PDUBank without changing the code. However, this is required e.g. to use DIS 7 PDUs.
I suggest to implement the PDUBank handling in a similar way to the PacketProcessors, i.e.
Pdu* GetStaticPDU(const DataStream&) const
IncomingMessage::AddProcessor
This would also help reducing the cyclic dependencies between the PDUs and the utils.