e1c6f36d8b
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> |
||
---|---|---|
.. | ||
qa | ||
source | ||
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 | ||
CppunitTest_cppu_typelib.mk | ||
InternalUnoApi_cppu_qa_cppumaker_types.mk | ||
InternalUnoApi_cppu_qa_types.mk | ||
IwyuFilter_cppu.yaml | ||
Library_affine_uno_uno.mk | ||
Library_cppu.mk | ||
Library_log_uno_uno.mk | ||
Library_purpenvhelper.mk | ||
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.