office-gobmx/cppu
Tor Lillqvist e1c6f36d8b Add a to_string() function to the code generated for UNO IDL constant groups
If the inpt matches one of the constants exactly, the result is the
name of that constant. If the input matches some combination of
constant values that are single bits, the result is the sequence of
the names of those constants joined with plus signs.

For instance, if the IDL has:

constants Constants {
    const byte BIT0 = 1;
    const byte BIT1 = 2;
    const byte BIT2 = 4;
    const byte BIT3 = 8;
}

The result of Constants::to_string(5) is "BIT0+BIT2", and the result
of Constants::to_string(17) is "17".

I am sure there are corner cases that aren't handled as would be
intuitive, especially with types that include unsigned values.
Correspondingly, the semantics of the generated to_string() functions
is not formally defined.

Also add a unit test for the new functionality.

Change-Id: I14aa826d0989ac6dfe97dd5c09119b1601c65643
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148995
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2023-03-17 11:46:36 +00:00
..
qa Add a to_string() function to the code generated for UNO IDL constant groups 2023-03-17 11:46:36 +00:00
source Drop 'using namespace ::std' in dirs b* c* 2023-02-15 18:37:59 +00:00
util
CppunitTest_cppu_any-external.mk
CppunitTest_cppu_qa_any.mk
CppunitTest_cppu_qa_recursion.mk
CppunitTest_cppu_qa_reference.mk
CppunitTest_cppu_qa_unotype.mk
CppunitTest_cppu_test_cppumaker.mk gbuild: Remove MSVC 2013 legacy code 2017-04-21 18:18:44 +02:00
CppunitTest_cppu_typelib.mk
InternalUnoApi_cppu_qa_cppumaker_types.mk
InternalUnoApi_cppu_qa_types.mk
IwyuFilter_cppu.yaml replace usage of blacklist with excludelist for IWYU 2020-07-10 02:03:40 +02:00
Library_affine_uno_uno.mk
Library_cppu.mk Fix clang-cl -Zc:dllexportInlines- build 2021-12-02 07:39:52 +01:00
Library_log_uno_uno.mk
Library_purpenvhelper.mk Fix clang-cl -Zc:dllexportInlines- build 2021-12-02 07:39:52 +01:00
Library_unsafe_uno_uno.mk
Makefile
Module_cppu.mk
README.md

Binary UNO Runtime

CPPU stands for C++ UNO and it contains type definitions / implementations for the core of UNO. The exported API is in C, and there exists some C++ wrappers.

See also

http://wiki.openoffice.org/wiki/Uno/Binary/Modules/CPPU