LibreOffice: uno/any2.h Source File

LibreOffice LibreOffice 7.3 SDK C/C++ API Reference

Loading...
Searching...
No Matches
any2.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20/*
21 * This file is part of LibreOffice published API.
22 */
23#ifndef INCLUDED_UNO_ANY2_H
24#define INCLUDED_UNO_ANY2_H
25
26#include "cppu/cppudllapi.h"
27#include "uno/data.h"
28
29#ifdef __cplusplus
30extern "C"
31{
32#endif
33
34#if defined( _WIN32)
35#pragma pack(push, 8)
36#endif
37
38struct _typelib_TypeDescriptionReference;
39struct _typelib_TypeDescription;
40struct _uno_Mapping;
41
44 typedef struct SAL_DLLPUBLIC_RTTI _uno_Any
45{
48 struct _typelib_TypeDescriptionReference * pType;
53 void * pData;
56 void * pReserved;
57} uno_Any;
58
59#if defined( _WIN32)
60#pragma pack(pop)
61#endif
62
74 CPPU_DLLPUBLIC void SAL_CALL uno_any_assign(
75 uno_Any * pDest, void * pSource,
76 struct _typelib_TypeDescription * pTypeDescr,
77 uno_AcquireFunc acquire, uno_ReleaseFunc release )
78 SAL_THROW_EXTERN_C();
90 CPPU_DLLPUBLIC void SAL_CALL uno_type_any_assign(
91 uno_Any * pDest, void * pSource,
92 struct _typelib_TypeDescriptionReference * pType,
93 uno_AcquireFunc acquire, uno_ReleaseFunc release )
94 SAL_THROW_EXTERN_C();
95
104 CPPU_DLLPUBLIC void SAL_CALL uno_any_construct(
105 uno_Any * pDest, void * pSource,
106 struct _typelib_TypeDescription * pTypeDescr,
107 uno_AcquireFunc acquire )
108 SAL_THROW_EXTERN_C();
117 CPPU_DLLPUBLIC void SAL_CALL uno_type_any_construct(
118 uno_Any * pDest, void * pSource,
119 struct _typelib_TypeDescriptionReference * pType,
120 uno_AcquireFunc acquire )
121 SAL_THROW_EXTERN_C();
122
130 CPPU_DLLPUBLIC void SAL_CALL uno_any_constructAndConvert(
131 uno_Any * pDest, void * pSource,
132 struct _typelib_TypeDescription * pTypeDescr,
133 struct _uno_Mapping * mapping )
134 SAL_THROW_EXTERN_C();
142 CPPU_DLLPUBLIC void SAL_CALL uno_type_any_constructAndConvert(
143 uno_Any * pDest, void * pSource,
144 struct _typelib_TypeDescriptionReference * pType,
145 struct _uno_Mapping * mapping )
146 SAL_THROW_EXTERN_C();
147
154 CPPU_DLLPUBLIC void SAL_CALL uno_any_destruct(
155 uno_Any * pValue, uno_ReleaseFunc release )
156 SAL_THROW_EXTERN_C();
157
164 CPPU_DLLPUBLIC void SAL_CALL uno_any_clear(
165 uno_Any * pValue, uno_ReleaseFunc release )
166 SAL_THROW_EXTERN_C();
167
168#ifdef __cplusplus
169}
170#endif
171
172#endif
173
174/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_THROW_EXTERN_C
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:334
uno_any_destruct
CPPU_DLLPUBLIC void uno_any_destruct(uno_Any *pValue, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Destructs an any.
uno_any_construct
CPPU_DLLPUBLIC void uno_any_construct(uno_Any *pDest, void *pSource, struct _typelib_TypeDescription *pTypeDescr, uno_AcquireFunc acquire) SAL_THROW_EXTERN_C()
Constructs an any with a given value.
uno_type_any_construct
CPPU_DLLPUBLIC void uno_type_any_construct(uno_Any *pDest, void *pSource, struct _typelib_TypeDescriptionReference *pType, uno_AcquireFunc acquire) SAL_THROW_EXTERN_C()
Constructs an any with a given value.
uno_Any
struct SAL_DLLPUBLIC_RTTI _uno_Any uno_Any
This is the binary specification of a UNO any.
uno_type_any_assign
CPPU_DLLPUBLIC void uno_type_any_assign(uno_Any *pDest, void *pSource, struct _typelib_TypeDescriptionReference *pType, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Assign an any with a given value.
uno_any_clear
CPPU_DLLPUBLIC void uno_any_clear(uno_Any *pValue, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Sets value to void.
uno_any_assign
CPPU_DLLPUBLIC void uno_any_assign(uno_Any *pDest, void *pSource, struct _typelib_TypeDescription *pTypeDescr, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Assign an any with a given value.
uno_any_constructAndConvert
CPPU_DLLPUBLIC void uno_any_constructAndConvert(uno_Any *pDest, void *pSource, struct _typelib_TypeDescription *pTypeDescr, struct _uno_Mapping *mapping) SAL_THROW_EXTERN_C()
Constructs an any with a given value and converts/ maps interfaces.
uno_type_any_constructAndConvert
CPPU_DLLPUBLIC void uno_type_any_constructAndConvert(uno_Any *pDest, void *pSource, struct _typelib_TypeDescriptionReference *pType, struct _uno_Mapping *mapping) SAL_THROW_EXTERN_C()
Constructs an any with a given value and converts/ maps interfaces.
data.h
uno_ReleaseFunc
void(* uno_ReleaseFunc)(void *pInterface)
Generic function pointer declaration to release an interface.
Definition: data.h:56
uno_AcquireFunc
void(* uno_AcquireFunc)(void *pInterface)
Generic function pointer declaration to acquire an interface.
Definition: data.h:50
cppudllapi.h
CPPU_DLLPUBLIC
#define CPPU_DLLPUBLIC
Definition: cppudllapi.h:13
_typelib_TypeDescriptionReference
Holds a weak reference to a type description.
Definition: typedescription.h:45
_typelib_TypeDescriptionReference::pType
struct _typelib_TypeDescription * pType
pointer to full typedescription; this value is only valid if the type is never swapped out
Definition: typedescription.h:62
_typelib_TypeDescription
Full type description of a type.
Definition: typedescription.h:76
_uno_Any
This is the binary specification of a UNO any.
Definition: any2.h:45
_uno_Any::pReserved
void * pReserved
reserved space for storing value
Definition: any2.h:56
_uno_Any::pType
struct _typelib_TypeDescriptionReference * pType
type of value
Definition: any2.h:48
_uno_Any::pData
void * pData
pointer to value; this may point to pReserved and thus the uno_Any is not anytime mem-copyable!...
Definition: any2.h:53
_uno_Mapping
This is the binary specification of a mapping.
Definition: mapping.h:69