Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[keyple-dev] Keyple C++ Headers
  • From: Charles HUET <charles.huet@xxxxxxxxxxxxxxxx>
  • Date: Thu, 1 Dec 2022 09:13:08 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ixxitechside.com; dmarc=pass action=none header.from=ixxitechside.com; dkim=pass header.d=ixxitechside.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5byfmG/zvtHNwey8J8/7skxeCGORDUG/SgGwqwgqt68=; b=FKYpBhsk6zT0mIY2lGQStpYwnwdNmaYb+cSIc/0VscY1M/4lhIhJKmi+qjKtj2O+wQKVoKRijfj2sJoQbu63kv2JAJZ5LnVWhULk2Thl3iEgQRly6cj8zgpKAe5m4a1rt8AIFu1nFEIUxq0TxnG+0wiT39OgutIsdwubN81vdZAXS16S2rpo53C/01DX1U/Ay8AzkTUOMelfZJVxG3Meatzm7HXu3an4wGoD6KAexojS//QFleKPvIJd7/EqbBhLN247PnZ2oMzPrs1U63Mn6zauC2UqxNO6cj17CqIFaC4ZOnTJgdFa/FeNjHjNWe9OWN5yjna5pEi9jvgZXAaBmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bHLrr7AMgp7/aOrl6l6fpIK1sIC8IwE1uuQ5jEArarR1sLcLguFNz7WWXAPqOTVbbbuiz1kEg7JqS+7BMsQbQKCusquYXIhq+H5RC8Y/Ec4it+MrVEsxrgzNeH35MgiCui6VUXXrSQittW5LRHRTPF22XX8UOUU4Vh9vrBZRDdT/sjRyye0yxmld0yTiFVNYzrUT3YKcVjD9/uFi30a2vDH2xR3cAJnaKZr64utBKW0c/U705spWmMfsVDQsQSGmZT6+J+QuUgY9yFMryTkb1NrV93DU4KhSBX4nMAMdu2t92/uEt0E7prQGhT+4YLKzsY2l13Wo7JhOHxH3mEjaag==
  • Delivered-to: keyple-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/keyple-dev/>
  • List-help: <mailto:keyple-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/keyple-dev>, <mailto:keyple-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/keyple-dev>, <mailto:keyple-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHZBWPPCotAaxJctUiZGPuqnR6BLg==
  • Thread-topic: Keyple C++ Headers

Hi,

I just found out there are multiple headers with the exact same name in the Keyple C++ hierarchy.

Setting aside the difficulties this can cause for code reading when multiple classes have the same name, this causes a specific issue in C++ given the way the projects are structured.

For instance, the line #include "CardIOException.h"​ can refer to two completely different files, and which one is included depends on the order in which the includes are passed to the compiler.
In modern CMake this means the order in which the targets are passed to the target_link_libraries​ instruction.

This means that if my previous proposal of using dependencies transitively is accepted, specifying which CardIOException.h we want to include becomes much more difficult.

While in Java this is solved by using an import with the full package name, in C++ this is usually solved by having headers in folders whose name reflects the library, and using these in the #include​ directive, e.g. #include <keyple-plugin-cpp-api/CardIOException.h>​ or #include <calypsonet-terminal-calypso-cpp-api/CardIOException.h>

This requires a reorganisation of the source files to avoid having a very verbose include like #include <keyple-plugin-cpp-api/src/main/CardIOException.h>

Should I reorganize the files this way along with the CMake targets refactor ?

Thanks

Charles HUET

Architecte, Design Authority


RATP SMART SYSTEMS

8, Avenue Ariane

33700 Mérignac

 ratpsmartsystems.com

ratpgroup.com

 



Si vous n'êtes pas destinataires de ce message, merci d'avertir l'expéditeur de l'erreur de distribution et de le détruire immédiatement. Ce message contient des informations confidentielles ou appartenant à RATP Smart Systems. Il est établi a l'intention exclusive de ses destinataires. Toute divulgation, utilisation, diffusion ou reproduction (totale ou partielle) de ce message ou des informations qu'il contient, doit être préalablement autorisée par RATP Smart Systems. Tout message électronique est susceptible d'altération et son intégrité ne peut être assurée. RATP Smart Systems décline toute responsabilité au titre de ce message s'il a été modifié ou falsifié.

Back to the top