Add unit tests for cppumaker

Change-Id: I4f53f7ee2d7f5147d09e0ff3bbde9f48f10ff85a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203324
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
This commit is contained in:
Manish Bera
2026-10-04 13:32:46 +02:00
committed by Hossein
parent 8f2eee739d
commit f38bf2917b
311 changed files with 7535 additions and 529 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ $(eval $(call gb_Module_add_targets,codemaker,\
endif endif
$(eval $(call gb_Module_add_check_targets,codemaker,\ $(eval $(call gb_Module_add_check_targets,codemaker,\
PythonTest_codemaker_python \ Test_codemaker \
)) ))
# vim:set noet sw=4 ts=4: # vim:set noet sw=4 ts=4:
-17
View File
@@ -1,17 +0,0 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_PythonTest_PythonTest,codemaker_python))
$(eval $(call gb_PythonTest_add_modules,codemaker_python,$(SRCDIR)/codemaker/tests/pythonmaker,\
test_pythonmaker \
))
$(call gb_PythonTest_get_target,codemaker_python): $(call gb_Executable_get_target,pythonmaker)
# vim: set noet sw=4 ts=4:
+20
View File
@@ -0,0 +1,20 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Golden-file tests for both cppumaker and pythonmaker (see README.md there)
$(eval $(call gb_PythonTest_PythonTest,codemaker))
$(eval $(call gb_PythonTest_add_modules,codemaker,$(SRCDIR)/codemaker/tests,\
codemakertests \
))
$(call gb_PythonTest_get_target,codemaker): \
$(call gb_Executable_get_target,cppumaker) \
$(call gb_Executable_get_target,pythonmaker)
# vim: set noet sw=4 ts=4:
+94
View File
@@ -0,0 +1,94 @@
# Codemaker Test Suite
This directory contains the integration test suite for the UNO code generators `cppumaker` and `pythonmaker`. The suite ensures that:
- `cppumaker` correctly generates C++ headers (`.hpp` and `.hdl`), and
- `pythonmaker` correctly generates Python stub files (`.pyi`)
from the same UNO IDL definitions. It verifies the syntactic correctness of the output and protects against future regressions.
The tests are automatically executed as part of the `make check` command for the `codemaker` module. They can also be run on their own with:
```bash
make codemaker.check
```
## Testing Philosophy
The test suite follows a "Golden File" testing methodology. This is a standard and robust approach for testing compilers and code generators. The process is as follows:
1. **Source IDL:** A single comprehensive test IDL file (`tests.idl`) serves as the source of truth for all UNO constructs that the generators are expected to handle. Both tools are fed the same file.
2. **Generate Output:** During the test run, this IDL is compiled into a temporary `.rdb` file with `unoidl-write`, and each tool (`cppumaker`, `pythonmaker`) is executed to generate its output in its own temporary directory.
3. **Compare Against "Golden" Files:** The newly generated output is recursively compared against a set of manually verified, correct "golden" files:
- `expected_cppumaker_stubs/` for `cppumaker`
- `expected_pythonmaker_stubs/` for `pythonmaker`
4. **Pass/Fail:** A test passes only if the generated output is an exact match to the golden files. Any difference (missing files, extra files, or content mismatches) causes the test to fail.
This approach ensures that any change to a generator that alters its output is immediately detected.
## Directory Structure
- `tests.idl`: The master IDL file containing all test cases. This includes enums, constants, typedefs, structs (plain, inherited, and polymorphic), exceptions, interfaces, services, and singletons. It also includes edge cases like the use of keywords as identifiers. All types live in the tool-neutral module `test::codemaker::codemakertests`, so the generated paths and namespaces (e.g. `test/codemaker/codemakertests/...`) are the same for both tools.
- `expected_cppumaker_stubs/`: The "golden" `.hpp` and `.hdl` file structure that `cppumaker` is expected to generate from `tests.idl`. This is the reference standard for correctness of `cppumaker`.
- `expected_pythonmaker_stubs/`: The "golden" `.pyi` file structure that `pythonmaker` is expected to generate from `tests.idl`. This is the reference standard for correctness of `pythonmaker`.
- `codemakertests.py`: The Python script that orchestrates the tests. It is executed by the build system and, for each tool, compiles the IDL, runs the tool, and compares the output directory with the matching golden directory. It contains one test class per tool (`TestCppuMaker`, `TestPythonMaker`) sharing a common implementation.
- `README.md`: This file.
The gbuild makefile that integrates the script into `make check` is `codemaker/Test_codemaker.mk`, registered in `codemaker/Module_codemaker.mk`. It depends on both the `cppumaker` and `pythonmaker` executables.
---
## How to Modify or Extend the Test Suite
Future developers may need to modify these tests when fixing a bug or adding a new feature to either tool. Here is the standard workflow.
### Regenerating the Golden Files
Both golden directories are regenerated from `tests.idl` with the freshly built tools. Run the following from `instdir/program` (the tools need the libraries located there):
```bash
mkdir -p ../../workdir/golden_tmp
# 1. Compile the shared IDL to an .rdb
../sdk/bin/unoidl-write.exe ../../workdir/UnoApiTarget/udkapi.rdb ../../codemaker/tests/tests.idl ../../workdir/golden_tmp/tests.rdb
# 2. Clear the old golden files
rm -rf ../../codemaker/tests/expected_cppumaker_stubs ../../codemaker/tests/expected_pythonmaker_stubs
mkdir -p ../../codemaker/tests/expected_cppumaker_stubs ../../codemaker/tests/expected_pythonmaker_stubs
# 3. Generate the stubs straight into the golden directories
../sdk/bin/cppumaker.exe -O ../../codemaker/tests/expected_cppumaker_stubs ../../workdir/golden_tmp/tests.rdb -X ../../workdir/UnoApiTarget/udkapi.rdb
../sdk/bin/pythonmaker.exe -O ../../codemaker/tests/expected_pythonmaker_stubs ../../workdir/golden_tmp/tests.rdb -X ../../workdir/UnoApiTarget/udkapi.rdb
# 4. Remove leftovers (the test ignores *.tmp files of pythonmaker)
find ../../codemaker/tests/expected_pythonmaker_stubs -name '*.tmp' -delete
rm -rf ../../workdir/golden_tmp
```
(On Linux/macOS, drop the `.exe` suffix; the SDK tools are in `instdir/sdk/bin`, or in the `LibreOffice*_SDK/bin` directory of the installation.) Only one of the two tools has to be regenerated if only one is affected; the other directory is left untouched. Always review the result with `git diff` before committing.
### Scenario 1: Fixing a Bug in a Generator
If you have fixed a bug that was causing a tool to generate incorrect output, the corresponding test should now fail because the new, correct output will not match the old, incorrect golden files.
1. **Verify the Fix:** After fixing the C++ code of the tool, run `make codemaker.check` to confirm that the test fails as expected. The error output lists the differing files and shows the first difference.
2. **Regenerate the Golden Files:** Follow the steps in "Regenerating the Golden Files" above.
3. **Review the Changes:** Use `git diff` to confirm that only the intended differences appear in the golden files.
4. **Validate:**
- For `cppumaker`: ensure the new generated headers are syntactically correct and type-safe (often verified simply by checking that a full LibreOffice build succeeds with your new `cppumaker`).
- For `pythonmaker`: run `mypy --strict codemaker/tests/expected_pythonmaker_stubs/` to ensure the new golden files are syntactically correct and type-safe.
5. **Commit:** Commit the changes to the tool's C++ source code **along with** the updated golden files in your patch. The commit message should explain that the golden files were updated to reflect the bug fix.
### Scenario 2: Adding a New Feature to a Generator
If you add support for a new IDL feature (e.g., a new type or an annotation), you should add a test case for it.
1. **Add a Test Case to the IDL:**
- Open `codemaker/tests/tests.idl`.
- Add a new, simple example of the feature you've implemented. For example, add a new `interface` with a specific attribute you are now supporting.
2. **Generate and Verify the New Golden Files:**
- Since you've added a new type, new output files will be generated. Regenerate the golden files as described above. Note that the IDL is shared, so a change to `tests.idl` may also change the output of the _other_ tool; review the golden files of both tools.
- Locate the newly generated files for your new test case.
- **Manually inspect these new files** to ensure they are 100% correct (valid C++ for `cppumaker`; run `mypy --strict` on them for `pythonmaker`).
3. **Run the Full Test Suite:** Run `make codemaker.check`. The tests should now pass, as the newly generated output will match your newly added golden files.
4. **Commit:** Commit the changes to the tool's source code, the updated `tests.idl`, and the new golden files together in your patch.
+274
View File
@@ -0,0 +1,274 @@
#! /usr/bin/env python
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
"""Golden-file tests for the codemaker tools (cppumaker and pythonmaker).
Both tools are fed the same IDL (tests.idl). The IDL is compiled to a
temporary .rdb with unoidl-write, each tool is run on it, and the generated
output is compared byte-for-byte with the golden files stored next to this
script:
expected_cppumaker_stubs/ <- golden output of cppumaker
expected_pythonmaker_stubs/ <- golden output of pythonmaker
"""
import filecmp
import difflib
import glob
import os
import shutil
import subprocess
import unittest
from typing import TYPE_CHECKING, List, Optional, Set
HERE: str = os.path.dirname(os.path.abspath(__file__))
if TYPE_CHECKING:
# For the type checker the mixin is a TestCase (so self.fail() etc. are
# known); at run time it stays a plain mixin, so unittest does not collect
# the shared base class as a test of its own.
_MixinBase = unittest.TestCase
else:
_MixinBase = object
class CodemakerGoldenTestMixin(_MixinBase):
"""Shared logic for golden-file comparison of a codemaker tool.
Subclasses must also derive from unittest.TestCase and set:
TOOL_NAME - executable name in the SDK (without suffix)
GOLDEN_DIRNAME - directory (next to this script) with the golden files
IS_OUTPUT_FILE - predicate deciding which generated files are compared
"""
TOOL_NAME: str = ""
GOLDEN_DIRNAME: str = ""
@staticmethod
def IS_OUTPUT_FILE(name: str) -> bool: # pragma: no cover - overridden
raise NotImplementedError
def setUp(self) -> None:
# Build environment
self.srcdir: str = os.environ.get("SRCDIR", os.getcwd())
self.builddir: str = os.environ.get("BUILDDIR", os.getcwd())
self.instdir: str = os.environ.get(
"INSTDIR", os.path.join(self.builddir, "instdir")
)
self.workdir: str = os.environ.get(
"WORKDIR", os.path.join(self.builddir, "workdir")
)
# SDK tools
self.unoidl_write: Optional[str] = None
self.tool: Optional[str] = None
sdk_patterns: List[str] = [
os.path.join(self.instdir, "sdk", "bin"),
os.path.join(self.instdir, "LibreOffice*_SDK", "bin"),
]
exe_suffix: str = ".exe" if os.name == "nt" else ""
for pattern in sdk_patterns:
for sdk_dir in glob.glob(pattern):
unoidl_path = os.path.join(sdk_dir, "unoidl-write" + exe_suffix)
tool_path = os.path.join(sdk_dir, self.TOOL_NAME + exe_suffix)
if os.path.exists(unoidl_path) and os.path.exists(tool_path):
self.unoidl_write = unoidl_path
self.tool = tool_path
break
if self.unoidl_write and self.tool:
break
# Test paths
self.golden_dir: str = os.path.join(HERE, self.GOLDEN_DIRNAME)
self.idl_file: str = os.path.join(HERE, "tests.idl")
self.test_workdir: str = os.path.join(
self.workdir, self.TOOL_NAME + "_test"
)
os.makedirs(self.test_workdir, exist_ok=True)
self.types_rdb: str = os.path.join(
self.workdir, "UnoApiTarget", "udkapi.rdb"
)
self.temp_rdb: str = os.path.join(self.test_workdir, "temptest.rdb")
self.output_dir: str = os.path.join(self.test_workdir, "generated_stubs")
def tearDown(self) -> None:
if os.path.exists(self.test_workdir):
shutil.rmtree(self.test_workdir, ignore_errors=True)
# test
def test_golden_comparison(self) -> None:
self.assertIsNotNone(
self.unoidl_write, "unoidl-write or %s not found in SDK" % self.TOOL_NAME
)
self.assertIsNotNone(self.tool, "%s not found in SDK" % self.TOOL_NAME)
assert self.unoidl_write is not None
assert self.tool is not None
self.assertTrue(
os.path.exists(self.types_rdb),
"udkapi.rdb not found at: " + self.types_rdb,
)
self.assertTrue(
os.path.exists(self.idl_file),
"IDL file not found at: " + self.idl_file,
)
self._convert_idl_to_rdb()
self._generate_stubs()
self._compare_with_expected_files()
# helpers
def _run(self, cmd: List[str], what: str) -> None:
try:
subprocess.run(
cmd,
cwd=self.test_workdir,
capture_output=True,
text=True,
check=True,
)
except subprocess.CalledProcessError as e:
self.fail(
"Failed to %s:\n%s\nCommand: %s"
% (what, e.stderr or "", " ".join(cmd))
)
def _convert_idl_to_rdb(self) -> None:
assert self.unoidl_write is not None
self._run(
[self.unoidl_write, self.types_rdb, self.idl_file, self.temp_rdb],
"convert IDL to RDB",
)
self.assertTrue(
os.path.exists(self.temp_rdb),
"RDB file was not created by unoidl-write",
)
def _generate_stubs(self) -> None:
assert self.tool is not None
os.makedirs(self.output_dir, exist_ok=True)
self._run(
[self.tool, "-O", self.output_dir, self.temp_rdb, "-X", self.types_rdb],
"generate stubs with " + self.TOOL_NAME,
)
self.assertGreater(
len(self._list_files(self.output_dir)),
0,
self.TOOL_NAME + " produced no output files",
)
def _list_files(self, base: str) -> List[str]:
"""Relative paths of all relevant files below base."""
result: List[str] = []
for root, _, files in os.walk(base):
for name in files:
if self.IS_OUTPUT_FILE(name):
result.append(os.path.relpath(os.path.join(root, name), base))
return result
def _compare_with_expected_files(self) -> None:
if not os.path.exists(self.golden_dir):
self.fail("Expected directory does not exist: " + self.golden_dir)
expected_files: List[str] = self._list_files(self.golden_dir)
generated_files: List[str] = self._list_files(self.output_dir)
expected_set: Set[str] = set(expected_files)
generated_set: Set[str] = set(generated_files)
missing: Set[str] = expected_set - generated_set
extra: Set[str] = generated_set - expected_set
if missing:
self.fail(
"Missing generated files (%d):\n %s"
% (len(missing), "\n ".join(sorted(missing)))
)
if extra:
self.fail(
"Unexpected generated files (%d):\n %s"
% (len(extra), "\n ".join(sorted(extra)))
)
differences: List[str] = [
rel
for rel in sorted(expected_files)
if not filecmp.cmp(
os.path.join(self.golden_dir, rel),
os.path.join(self.output_dir, rel),
shallow=False,
)
]
if differences:
self.fail(
"File content differences found (%d):\n %s\n\n%s"
% (
len(differences),
"\n ".join(differences),
self._diff_excerpt(differences[0]),
)
)
def _diff_excerpt(self, rel_path: str, max_lines: int = 40) -> str:
"""Short unified diff of the first differing file, to ease debugging."""
def read(path: str) -> List[str]:
with open(path, encoding="utf-8", errors="replace") as f:
return f.readlines()
diff = list(
difflib.unified_diff(
read(os.path.join(self.golden_dir, rel_path)),
read(os.path.join(self.output_dir, rel_path)),
fromfile="expected/" + rel_path,
tofile="generated/" + rel_path,
)
)
text = "".join(diff[:max_lines])
if len(diff) > max_lines:
text += "... (%d more diff lines)\n" % (len(diff) - max_lines)
return "First difference:\n" + text
class TestCppuMaker(CodemakerGoldenTestMixin, unittest.TestCase):
"""cppumaker must generate exactly the golden .hpp/.hdl headers."""
TOOL_NAME = "cppumaker"
GOLDEN_DIRNAME = "expected_cppumaker_stubs"
@staticmethod
def IS_OUTPUT_FILE(name: str) -> bool:
return name.lower().endswith((".hpp", ".hdl"))
class TestPythonMaker(CodemakerGoldenTestMixin, unittest.TestCase):
"""pythonmaker must generate exactly the golden .pyi stubs."""
TOOL_NAME = "pythonmaker"
GOLDEN_DIRNAME = "expected_pythonmaker_stubs"
@staticmethod
def IS_OUTPUT_FILE(name: str) -> bool:
# pythonmaker may leave temporary files behind; ignore them
return not name.lower().endswith(".tmp")
if __name__ == "__main__":
unittest.main()
# vim: set shiftwidth=4 softtabstop=4 expandtab:
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "com/sun/star/uno/Any.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Any Any;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Any.hdl"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Bool Boolean;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Boolean.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Int8 Byte;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Byte.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Unicode Char;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Char.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef double Double;
} } }
@@ -0,0 +1,9 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Double.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum2.hdl"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::test::codemaker::codemakertests::Enum2 Enum;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum.hdl"
#include "test/codemaker/codemakertests/Enum2.hpp"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,47 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#if defined LIBO_INTERNAL_ONLY
#if defined __GNUC__
enum class Enum1
{
#else
enum class SAL_DLLPUBLIC_RTTI Enum1
{
#endif
#else
enum SAL_DLLPUBLIC_RTTI Enum1
{
#endif
Enum1_VALUE_NEG = -1,
Enum1_VALUE_ZERO = 0,
Enum1_VALUE_POS = 1,
Enum1_MAKE_FIXED_SIZE = SAL_MAX_ENUM
};
#if defined LIBO_INTERNAL_ONLY
constexpr auto Enum1_VALUE_NEG = Enum1::Enum1_VALUE_NEG;
constexpr auto Enum1_VALUE_ZERO = Enum1::Enum1_VALUE_ZERO;
constexpr auto Enum1_VALUE_POS = Enum1::Enum1_VALUE_POS;
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum1 *);
@@ -0,0 +1,27 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum1.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_enum_type_init( &the_type,
"test.codemaker.codemakertests.Enum1",
::test::codemaker::codemakertests::Enum1_VALUE_NEG );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum1 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum1 >::get();
}
@@ -0,0 +1,51 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#if defined LIBO_INTERNAL_ONLY
#if defined __GNUC__
enum class Enum2
{
#else
enum class SAL_DLLPUBLIC_RTTI Enum2
{
#endif
#else
enum SAL_DLLPUBLIC_RTTI Enum2
{
#endif
Enum2_FLAG_NONE = 0,
Enum2_FLAG_READ = 1,
Enum2_FLAG_WRITE = 2,
Enum2_FLAG_EXEC = 4,
Enum2_FLAG_ALL = 7,
Enum2_MAKE_FIXED_SIZE = SAL_MAX_ENUM
};
#if defined LIBO_INTERNAL_ONLY
constexpr auto Enum2_FLAG_NONE = Enum2::Enum2_FLAG_NONE;
constexpr auto Enum2_FLAG_READ = Enum2::Enum2_FLAG_READ;
constexpr auto Enum2_FLAG_WRITE = Enum2::Enum2_FLAG_WRITE;
constexpr auto Enum2_FLAG_EXEC = Enum2::Enum2_FLAG_EXEC;
constexpr auto Enum2_FLAG_ALL = Enum2::Enum2_FLAG_ALL;
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum2 *);
@@ -0,0 +1,27 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum2.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_enum_type_init( &the_type,
"test.codemaker.codemakertests.Enum2",
::test::codemaker::codemakertests::Enum2_FLAG_NONE );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum2 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum2 >::get();
}
@@ -0,0 +1,49 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#if defined LIBO_INTERNAL_ONLY
#if defined __GNUC__
enum class Enum3
{
#else
enum class SAL_DLLPUBLIC_RTTI Enum3
{
#endif
#else
enum SAL_DLLPUBLIC_RTTI Enum3
{
#endif
Enum3_FIRST = 10,
Enum3_SECOND = 20,
Enum3_THIRD = 100,
Enum3_FOURTH = 255,
Enum3_MAKE_FIXED_SIZE = SAL_MAX_ENUM
};
#if defined LIBO_INTERNAL_ONLY
constexpr auto Enum3_FIRST = Enum3::Enum3_FIRST;
constexpr auto Enum3_SECOND = Enum3::Enum3_SECOND;
constexpr auto Enum3_THIRD = Enum3::Enum3_THIRD;
constexpr auto Enum3_FOURTH = Enum3::Enum3_FOURTH;
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum3 *);
@@ -0,0 +1,27 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum3.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_enum_type_init( &the_type,
"test.codemaker.codemakertests.Enum3",
::test::codemaker::codemakertests::Enum3_FIRST );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum3 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum3 >::get();
}
@@ -0,0 +1,47 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#if defined LIBO_INTERNAL_ONLY
#if defined __GNUC__
enum class Enum4
{
#else
enum class SAL_DLLPUBLIC_RTTI Enum4
{
#endif
#else
enum SAL_DLLPUBLIC_RTTI Enum4
{
#endif
Enum4_AUTO_A = 0,
Enum4_AUTO_B = 1,
Enum4_AUTO_C = 2,
Enum4_MAKE_FIXED_SIZE = SAL_MAX_ENUM
};
#if defined LIBO_INTERNAL_ONLY
constexpr auto Enum4_AUTO_A = Enum4::Enum4_AUTO_A;
constexpr auto Enum4_AUTO_B = Enum4::Enum4_AUTO_B;
constexpr auto Enum4_AUTO_C = Enum4::Enum4_AUTO_C;
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Enum4 *);
@@ -0,0 +1,27 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum4.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_enum_type_init( &the_type,
"test.codemaker.codemakertests.Enum4",
::test::codemaker::codemakertests::Enum4_AUTO_A );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Enum4 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Enum4 >::get();
}
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef float Float;
} } }
@@ -0,0 +1,9 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Float.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Int64 Hyper;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Hyper.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Int32 Long;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Long.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,32 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#ifdef _WIN32
# pragma pack(push, 8)
#endif
template< typename typeparam_if, typename typeparam_else > struct SAL_DLLPUBLIC_RTTI PolyStruct {
inline PolyStruct();
inline PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_);
typeparam_if member1;
::sal_Int32 member2;
};
#ifdef _WIN32
# pragma pack(pop)
#endif
} } }
template< typename typeparam_if, typename typeparam_else > SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > *);
@@ -0,0 +1,80 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/PolyStruct.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "rtl/strbuf.hxx"
#include "rtl/textenc.h"
#include "rtl/ustring.hxx"
#include "sal/types.h"
#include "typelib/typeclass.h"
#include "typelib/typedescription.h"
namespace test { namespace codemaker { namespace codemakertests {
template< typename typeparam_if, typename typeparam_else > inline PolyStruct< typeparam_if, typeparam_else >::PolyStruct()
: member1()
, member2(0)
{
}
template< typename typeparam_if, typename typeparam_else > inline PolyStruct< typeparam_if, typeparam_else >::PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_)
: member1(member1_)
, member2(member2_)
{
}
template< typename typeparam_if, typename typeparam_else >
inline PolyStruct< typeparam_if, typeparam_else >
make_PolyStruct(typeparam_if const & member1_, const ::sal_Int32& member2_)
{
return PolyStruct< typeparam_if, typeparam_else >(member1_, member2_);
}
template< typename typeparam_if, typename typeparam_else > inline bool operator==(const PolyStruct< typeparam_if, typeparam_else >& the_lhs, const PolyStruct< typeparam_if, typeparam_else >& the_rhs)
{
return the_lhs.member1 == the_rhs.member1
&& the_lhs.member2 == the_rhs.member2;
}
template< typename typeparam_if, typename typeparam_else > inline bool operator!=(const PolyStruct< typeparam_if, typeparam_else >& the_lhs, const PolyStruct< typeparam_if, typeparam_else >& the_rhs)
{
return !operator==(the_lhs, the_rhs);
}
} } }
namespace cppu {
template< typename typeparam_if, typename typeparam_else > class UnoType< ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > > {
public:
static inline ::css::uno::Type const & get() {
//TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
static ::typelib_TypeDescriptionReference * the_type = 0;
if (the_type == 0) {
::rtl::OStringBuffer the_buffer("test.codemaker.codemakertests.PolyStruct<");
the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_if * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));
the_buffer.append(',');
the_buffer.append(::rtl::OUStringToOString(::cppu::getTypeFavourChar(static_cast< typeparam_else * >(0)).getTypeName(), RTL_TEXTENCODING_UTF8));
the_buffer.append('>');
::typelib_TypeDescriptionReference * the_members[] = {
::cppu::getTypeFavourChar(static_cast< typeparam_if * >(0)).getTypeLibType(),
::cppu::UnoType< ::sal_Int32 >::get().getTypeLibType() };
static ::sal_Bool const the_parameterizedTypes[] = { true, false };
::typelib_static_struct_type_init(&the_type, the_buffer.getStr(), 0, 2, the_members, the_parameterizedTypes);
}
return *reinterpret_cast< ::css::uno::Type * >(&the_type);
}
private:
UnoType(UnoType &); // not defined
~UnoType(); // not defined
void operator =(UnoType); // not defined
};
}
template< typename typeparam_if, typename typeparam_else > SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::PolyStruct< typeparam_if, typeparam_else > >::get();
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,57 @@
#pragma once
#include "sal/config.h"
#include <cassert>
#include "com/sun/star/uno/DeploymentException.hpp"
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "test/codemaker/codemakertests/XTest.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "cppu/unotype.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#if defined ANDROID || defined IOS //TODO
#include <com/sun/star/lang/XInitialization.hpp>
#include <osl/detail/component-defines.h>
#endif
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2
extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &);
#endif
namespace test { namespace codemaker { namespace codemakertests {
class S2 {
public:
static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > create(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) {
assert(the_context.is());
::css::uno::Reference< ::test::codemaker::codemakertests::XTest > the_instance;
try {
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S2) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2
the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S2)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY);
#else
the_instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(the_context->getServiceManager()->createInstanceWithContext( "test.codemaker.codemakertests.S2", the_context), ::css::uno::UNO_QUERY);
#endif
} catch (const ::css::uno::RuntimeException &) {
throw;
} catch (const ::css::uno::Exception & the_exception) {
throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S2" + " of type " + "test.codemaker.codemakertests.XTest" + ": " + the_exception.Message, the_context);
}
if (!the_instance.is()) {
throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.S2" + " of type " + "test.codemaker.codemakertests.XTest", the_context);
}
return the_instance;
}
private:
S2(); // not implemented
S2(S2 &); // not implemented
~S2(); // not implemented
void operator =(S2); // not implemented
};
} } }
@@ -0,0 +1,50 @@
#pragma once
#include "sal/config.h"
#include <cassert>
#include "com/sun/star/uno/DeploymentException.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "test/codemaker/codemakertests/XTest.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Reference.hxx"
#include "cppu/unotype.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#if defined ANDROID || defined IOS //TODO
#include <com/sun/star/lang/XInitialization.hpp>
#include <osl/detail/component-defines.h>
#endif
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4
extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &);
#endif
namespace test { namespace codemaker { namespace codemakertests {
class S4 {
public:
static ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > get(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context) {
assert(the_context.is());
::css::uno::Reference< ::test::codemaker::codemakertests::XTest > instance;
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4 && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_S4) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4
instance = ::css::uno::Reference< ::test::codemaker::codemakertests::XTest >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_S4)(the_context.get(), ::css::uno::Sequence< ::css::uno::Any >())), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY);
#else
the_context->getValueByName(::rtl::OUString( "/singletons/test.codemaker.codemakertests.S4" )) >>= instance;
#endif
if (!instance.is()) {
throw ::css::uno::DeploymentException(::rtl::OUString( "component context fails to supply singleton test.codemaker.codemakertests.S4 of type test.codemaker.codemakertests.XTest" ), the_context);
}
return instance;
}
private:
S4(); // not implemented
S4(S4 &); // not implemented
~S4(); // not implemented
void operator =(S4); // not implemented
};
} } }
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Any.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::css::uno::Any > SequenceAny;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceAny.hdl"
#include "test/codemaker/codemakertests/Any.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Boolean.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Bool > SequenceBoolean;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceBoolean.hdl"
#include "test/codemaker/codemakertests/Boolean.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Byte.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Int8 > SequenceByte;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceByte.hdl"
#include "test/codemaker/codemakertests/Byte.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Char.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Unicode > SequenceChar;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceChar.hdl"
#include "test/codemaker/codemakertests/Char.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Double.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< double > SequenceDouble;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceDouble.hdl"
#include "test/codemaker/codemakertests/Double.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Enum.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::test::codemaker::codemakertests::Enum2 > SequenceEnum;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceEnum.hdl"
#include "test/codemaker/codemakertests/Enum.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Float.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< float > SequenceFloat;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceFloat.hdl"
#include "test/codemaker/codemakertests/Float.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Hyper.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Int64 > SequenceHyper;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceHyper.hdl"
#include "test/codemaker/codemakertests/Hyper.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Long.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Int32 > SequenceLong;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceLong.hdl"
#include "test/codemaker/codemakertests/Long.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Short.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_Int16 > SequenceShort;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceShort.hdl"
#include "test/codemaker/codemakertests/Short.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/String.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::rtl::OUString > SequenceString;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceString.hdl"
#include "test/codemaker/codemakertests/String.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Struct.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::test::codemaker::codemakertests::Struct1 > SequenceStruct;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceStruct.hdl"
#include "test/codemaker/codemakertests/Struct.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Type.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::css::uno::Type > SequenceType;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceType.hdl"
#include "test/codemaker/codemakertests/Type.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedHyper.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_uInt64 > SequenceUnsignedHyper;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceUnsignedHyper.hdl"
#include "test/codemaker/codemakertests/UnsignedHyper.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedLong.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_uInt32 > SequenceUnsignedLong;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceUnsignedLong.hdl"
#include "test/codemaker/codemakertests/UnsignedLong.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedShort.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::sal_uInt16 > SequenceUnsignedShort;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceUnsignedShort.hdl"
#include "test/codemaker/codemakertests/UnsignedShort.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/XInterface.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XInterface > > SequenceXInterface;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceXInterface.hdl"
#include "test/codemaker/codemakertests/XInterface.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/XNamingService.hdl"
#include "com/sun/star/uno/Sequence.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Sequence< ::css::uno::Reference< ::css::uno::XNamingService > > SequenceXNamingService;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/SequenceXNamingService.hdl"
#include "test/codemaker/codemakertests/XNamingService.hpp"
#include "com/sun/star/uno/Sequence.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,63 @@
#pragma once
#include "sal/config.h"
#include <cassert>
#include "com/sun/star/uno/DeploymentException.hpp"
#include "com/sun/star/uno/Exception.hpp"
#include "com/sun/star/uno/RuntimeException.hpp"
#include "com/sun/star/uno/XComponentContext.hpp"
#include "com/sun/star/uno/XInterface.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
#include "cppu/unotype.hxx"
#include "rtl/ustring.h"
#include "rtl/ustring.hxx"
#if defined ANDROID || defined IOS //TODO
#include <com/sun/star/lang/XInitialization.hpp>
#include <osl/detail/component-defines.h>
#endif
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_Service && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_Service) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_Service
extern "C" ::css::uno::XInterface * SAL_CALL LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_Service(::css::uno::XComponentContext *, ::css::uno::Sequence< ::css::uno::Any > const &);
#endif
namespace test { namespace codemaker { namespace codemakertests {
class Service {
public:
static ::css::uno::Reference< ::css::uno::XInterface > create(::css::uno::Reference< ::css::uno::XComponentContext > const & the_context, const ::css::uno::Sequence< ::css::uno::Any >& args) {
assert(the_context.is());
::css::uno::Reference< ::css::uno::XInterface > the_instance;
try {
#if defined LO_URE_CURRENT_ENV && defined LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_Service && (LO_URE_CURRENT_ENV) == (LO_URE_CTOR_ENV_test_dot_codemaker_dot_codemakertests_dot_Service) && defined LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_Service
the_instance = ::css::uno::Reference< ::css::uno::XInterface >(::css::uno::Reference< ::css::uno::XInterface >(static_cast< ::css::uno::XInterface * >((*LO_URE_CTOR_FUN_test_dot_codemaker_dot_codemakertests_dot_Service)(the_context.get(), args)), ::SAL_NO_ACQUIRE), ::css::uno::UNO_QUERY);
::css::uno::Reference< ::css::lang::XInitialization > init(the_instance, ::css::uno::UNO_QUERY);
if (init.is()) {
init->initialize(the_arguments);
}
#else
the_instance = ::css::uno::Reference< ::css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext( "test.codemaker.codemakertests.Service", args, the_context), ::css::uno::UNO_QUERY);
#endif
} catch (const ::css::uno::RuntimeException &) {
throw;
} catch (const ::css::uno::Exception & the_exception) {
throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.Service" + " of type " + "com.sun.star.uno.XInterface" + ": " + the_exception.Message, the_context);
}
if (!the_instance.is()) {
throw ::css::uno::DeploymentException(::rtl::OUString("component context fails to supply service ") + "test.codemaker.codemakertests.Service" + " of type " + "com.sun.star.uno.XInterface", the_context);
}
return the_instance;
}
private:
Service(); // not implemented
Service(Service &); // not implemented
~Service(); // not implemented
void operator =(Service); // not implemented
};
} } }
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_Int16 Short;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Short.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "rtl/ustring.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::rtl::OUString String;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/String.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "rtl/ustring.hxx"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Struct1.hdl"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::test::codemaker::codemakertests::Struct1 Struct;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Struct.hdl"
#include "test/codemaker/codemakertests/Struct1.hpp"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,33 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
#ifdef _WIN32
# pragma pack(push, 8)
#endif
struct SAL_DLLPUBLIC_RTTI SAL_WARN_UNUSED Struct1 {
inline Struct1();
inline Struct1(const ::sal_Int32& member1_);
::sal_Int32 member1;
};
#ifdef _WIN32
# pragma pack(pop)
#endif
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct1 const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::test::codemaker::codemakertests::Struct1 *);
@@ -0,0 +1,54 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Struct1.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
#include "typelib/typeclass.h"
#include "typelib/typedescription.h"
namespace test { namespace codemaker { namespace codemakertests {
inline Struct1::Struct1()
: member1(0)
{
}
inline Struct1::Struct1(const ::sal_Int32& member1_)
: member1(member1_)
{
}
inline bool operator==(const Struct1& the_lhs, const Struct1& the_rhs)
{
return the_lhs.member1 == the_rhs.member1;
}
inline bool operator!=(const Struct1& the_lhs, const Struct1& the_rhs)
{
return !operator==(the_lhs, the_rhs);
}
} } }
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct1 const *) {
//TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
static ::typelib_TypeDescriptionReference * the_type = 0;
if (the_type == 0) {
::typelib_TypeDescriptionReference * the_members[] = {
::cppu::UnoType< ::sal_Int32 >::get().getTypeLibType() };
::typelib_static_struct_type_init(&the_type, "test.codemaker.codemakertests.Struct1", 0, 1, the_members, 0);
}
return *reinterpret_cast< ::css::uno::Type * >(&the_type);
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::Struct1 const *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::Struct1 >::get();
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,22 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests { namespace TestConstantsBasic {
static const ::sal_Bool BOOL_FALSE = sal_False;
static const ::sal_Bool BOOL_TRUE = sal_True;
static const ::sal_Int64 HYPER_MAX = (sal_Int64) SAL_CONST_INT64(9223372036854775807);
static const ::sal_Int64 HYPER_MIN = SAL_MIN_INT64;
static const ::sal_Int32 LONG_HEX = (sal_Int32)2147483647;
static const ::sal_Int32 LONG_MAX = (sal_Int32)2147483647;
static const ::sal_Int32 LONG_MIN = SAL_MIN_INT32;
static const ::sal_Int16 SHORT_MAX = (sal_Int16)32767;
static const ::sal_Int16 SHORT_MIN = (sal_Int16)-32768;
static const ::sal_uInt32 ULONG_MAX = (sal_uInt32)4294967295U;
static const ::sal_uInt16 USHORT_MAX = (sal_uInt16)65535;
} } } }
@@ -0,0 +1,3 @@
#pragma once
#include "test/codemaker/codemakertests/TestConstantsBasic.hdl"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "com/sun/star/uno/Type.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Type Type;
} } }
@@ -0,0 +1,9 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/Type.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_uInt64 UnsignedHyper;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedHyper.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_uInt32 UnsignedLong;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedLong.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,12 @@
#pragma once
#include "sal/config.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::sal_uInt16 UnsignedShort;
} } }
@@ -0,0 +1,10 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/UnsignedShort.hdl"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
@@ -0,0 +1,43 @@
#pragma once
#include "sal/config.h"
#include "com/sun/star/uno/XInterface.hdl"
#include "test/codemaker/codemakertests/PolyStruct.hdl"
#include "com/sun/star/uno/Any.h"
#include "com/sun/star/uno/Reference.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI XIfc : public ::css::uno::XInterface
{
public:
#if defined LIBO_INTERNAL_ONLY
XIfc() = default;
XIfc(XIfc const &) = default;
XIfc(XIfc &&) = default;
XIfc & operator =(XIfc const &) = default;
XIfc & operator =(XIfc &&) = default;
#endif
// Methods
virtual void SAL_CALL f1( const ::test::codemaker::codemakertests::PolyStruct< ::sal_Int32, ::sal_Int32 >& arg ) = 0;
virtual void SAL_CALL f2( const ::test::codemaker::codemakertests::PolyStruct< ::css::uno::Any, ::css::uno::Reference< ::css::uno::XInterface > >& arg ) = 0;
static inline ::css::uno::Type const & SAL_CALL static_type(void * = 0);
protected:
~XIfc() SAL_NOEXCEPT {} // avoid warnings about virtual members and non-virtual dtor
};
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::XIfc const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::css::uno::Reference< ::test::codemaker::codemakertests::XIfc > *);
@@ -0,0 +1,45 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/XIfc.hdl"
#include "com/sun/star/uno/XInterface.hpp"
#include "test/codemaker/codemakertests/PolyStruct.hpp"
#include "com/sun/star/uno/Any.hxx"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
#include "sal/types.h"
#if defined LIBO_INTERNAL_ONLY
#include <type_traits>
#endif
namespace test { namespace codemaker { namespace codemakertests {
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::XIfc const *) {
static typelib_TypeDescriptionReference * the_type = 0;
if ( !the_type )
{
typelib_static_mi_interface_type_init( &the_type, "test.codemaker.codemakertests.XIfc", 0, 0 );
}
return * reinterpret_cast< ::css::uno::Type * >( &the_type );
}
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::css::uno::Reference< ::test::codemaker::codemakertests::XIfc > const *) {
return ::cppu::UnoType< ::css::uno::Reference< ::test::codemaker::codemakertests::XIfc > >::get();
}
::css::uno::Type const & ::test::codemaker::codemakertests::XIfc::static_type(SAL_UNUSED_PARAMETER void *) {
return ::cppu::UnoType< ::test::codemaker::codemakertests::XIfc >::get();
}
#if defined LIBO_INTERNAL_ONLY
namespace cppu::detail {
template<> struct IsUnoInterfaceType<::test::codemaker::codemakertests::XIfc>: ::std::true_type {};
}
#endif
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
namespace com { namespace sun { namespace star { namespace uno { class XInterface; } } } }
#include "com/sun/star/uno/Reference.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Reference< ::css::uno::XInterface > XInterface;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/XInterface.hdl"
#include "com/sun/star/uno/XInterface.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,13 @@
#pragma once
#include "sal/config.h"
namespace com { namespace sun { namespace star { namespace uno { class XNamingService; } } } }
#include "com/sun/star/uno/Reference.h"
#include "cppu/macros.hxx"
namespace test { namespace codemaker { namespace codemakertests {
typedef ::css::uno::Reference< ::css::uno::XNamingService > XNamingService;
} } }
@@ -0,0 +1,11 @@
#pragma once
#include "sal/config.h"
#include "test/codemaker/codemakertests/XNamingService.hdl"
#include "com/sun/star/uno/XNamingService.hpp"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Type.hxx"
#include "cppu/unotype.hxx"
@@ -0,0 +1,48 @@
#pragma once
#include "sal/config.h"
#include "com/sun/star/uno/XInterface.hdl"
#include "com/sun/star/uno/Reference.h"
#include "cppu/macros.hxx"
#include "sal/types.h"
namespace com { namespace sun { namespace star { namespace uno { class Type; } } } }
namespace test { namespace codemaker { namespace codemakertests {
class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI XTest : public ::css::uno::XInterface
{
public:
#if defined LIBO_INTERNAL_ONLY
XTest() = default;
XTest(XTest const &) = default;
XTest(XTest &&) = default;
XTest & operator =(XTest const &) = default;
XTest & operator =(XTest &&) = default;
#endif
// Attributes
virtual ::sal_Int32 SAL_CALL getA1() = 0;
virtual void SAL_CALL setA1( ::sal_Int32 _a1 ) = 0;
virtual ::sal_Int32 SAL_CALL getA2() = 0;
virtual ::sal_Int32 SAL_CALL getA3() = 0;
virtual void SAL_CALL setA3( ::sal_Int32 _a3 ) = 0;
virtual ::sal_Int32 SAL_CALL getA4() = 0;
// Methods
virtual ::sal_Bool SAL_CALL test() = 0;
static inline ::css::uno::Type const & SAL_CALL static_type(void * = 0);
protected:
~XTest() SAL_NOEXCEPT {} // avoid warnings about virtual members and non-virtual dtor
};
inline ::css::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::test::codemaker::codemakertests::XTest const *);
} } }
SAL_DEPRECATED("use cppu::UnoType") inline ::css::uno::Type const & SAL_CALL getCppuType(const ::css::uno::Reference< ::test::codemaker::codemakertests::XTest > *);

Some files were not shown because too many files have changed in this diff Show More