private String[] fetchTypesPackageName(final Token token, final Ir ir)
    {
        if (!shouldSupportTypesPackageNames)
        {
            return ir.namespaces();
        }

        if (token.packageName() != null)
        {
            return Ir.getNamespaces(token.packageName());
        }

        return ir.namespaces();
    }
Create a new C++ DTO {@link CodeGenerator}.

@param ir                             for the messages and types.
@param shouldSupportTypesPackageNames generator support for types in their own package.
@param outputManager                  for generating the DTOs to.
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/cpp/CppDtoGenerator.java