1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <sal/types.h>
23 #include <typelib/typedescription.h>
25 namespace bridges::cpp_uno::shared
28 * Calculate the number of local functions of an interface type.
30 * <p><em>Local</em> functions are those not inherited from any base types. The
31 * number of <em>functions</em> is potentially larger than the number of
32 * <em>members</em>, as each read–write attribute member counts as two
35 * @param type a non-null pointer to an interface type description, for which
36 * <code>typelib_typedescription_complete</code> must already have been
38 * @return the number of local functions of the given interface type
40 sal_Int32
getLocalFunctions(typelib_InterfaceTypeDescription
const* type
);
43 * Calculate the number of primary functions of an interface type.
45 * <p>The number of primary functions of an interface is the number of local
46 * functions of that interface (see <code>getLocalFunctions</code>), plus the
47 * number of primary functions of that interface's first base type (if it has at
48 * least one base type).</p>
50 * @param type a pointer to an interface type description; may be null
51 * @return the number of primary functions of the given interface type, or zero
52 * if the given interface type is null
54 sal_Int32
getPrimaryFunctions(typelib_InterfaceTypeDescription
* type
);
57 * Represents a vtable slot of a C++ class.
62 * The offset of the vtable.
64 * <p>Multiple-inheritance C++ classes have more than one vtable. The
65 * offset is logical (<em>not</em> a byte offset), and must be
71 * The index within the vtable.
73 * <p>The index is logical (<em>not</em> a byte offset), and must be
80 * Calculates the vtable slot associated with an interface attribute member.
82 * @param ifcMember a non-null pointer to an interface attribute member
84 * @return the vtable slot associated with the given interface member
86 VtableSlot
getVtableSlot(typelib_InterfaceAttributeTypeDescription
const* ifcMember
);
89 * Calculates the vtable slot associated with an interface method member.
91 * @param ifcMember a non-null pointer to an interface method member description
92 * @return the vtable slot associated with the given interface member
94 VtableSlot
getVtableSlot(typelib_InterfaceMethodTypeDescription
const* ifcMember
);
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */