LibreOffice
LibreOffice 6.0 SDK C/C++ API Reference
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 #ifndef INCLUDED_UNO_ANY2_H
20 #define INCLUDED_UNO_ANY2_H
21 
22 #include <cppu/cppudllapi.h>
23 #include <uno/data.h>
24 
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29 
30 #if defined( SAL_W32)
31 #pragma pack(push, 8)
32 #endif
33 
36 struct _uno_Mapping;
37 
40 typedef struct SAL_DLLPUBLIC_RTTI _uno_Any
41 {
49  void * pData;
52  void * pReserved;
53 } uno_Any;
54 
55 #if defined( SAL_W32)
56 #pragma pack(pop)
57 #endif
58 
70 CPPU_DLLPUBLIC void SAL_CALL uno_any_assign(
71  uno_Any * pDest, void * pSource,
72  struct _typelib_TypeDescription * pTypeDescr,
73  uno_AcquireFunc acquire, uno_ReleaseFunc release )
87  uno_Any * pDest, void * pSource,
89  uno_AcquireFunc acquire, uno_ReleaseFunc release )
91 
100 CPPU_DLLPUBLIC void SAL_CALL uno_any_construct(
101  uno_Any * pDest, void * pSource,
102  struct _typelib_TypeDescription * pTypeDescr,
103  uno_AcquireFunc acquire )
114  uno_Any * pDest, void * pSource,
116  uno_AcquireFunc acquire )
118 
127  uno_Any * pDest, void * pSource,
128  struct _typelib_TypeDescription * pTypeDescr,
129  struct _uno_Mapping * mapping )
139  uno_Any * pDest, void * pSource,
141  struct _uno_Mapping * mapping )
143 
150 CPPU_DLLPUBLIC void SAL_CALL uno_any_destruct(
151  uno_Any * pValue, uno_ReleaseFunc release )
153 
160 CPPU_DLLPUBLIC void SAL_CALL uno_any_clear(
161  uno_Any * pValue, uno_ReleaseFunc release )
163 
164 #ifdef __cplusplus
165 }
166 #endif
167 
168 #endif
169 
170 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Holds a weak reference to a type description.
Definition: typedescription.h:40
CPPU_DLLPUBLIC void uno_any_destruct(uno_Any *pValue, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Destructs an any.
CPPU_DLLPUBLIC void uno_any_clear(uno_Any *pValue, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Sets value to void.
void * pData
pointer to value; this may point to pReserved and thus the uno_Any is not anytime mem-copyable! You m...
Definition: any2.h:49
#define CPPU_DLLPUBLIC
Definition: cppudllapi.h:10
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.
struct SAL_DLLPUBLIC_RTTI _uno_Any uno_Any
This is the binary specification of an UNO any.
struct _typelib_TypeDescriptionReference * pType
type of value
Definition: any2.h:44
void(* uno_ReleaseFunc)(void *pInterface)
Generic function pointer declaration to release an interface.
Definition: data.h:52
struct _typelib_TypeDescription * pType
pointer to full typedescription; this value is only valid if the type is never swapped out ...
Definition: typedescription.h:58
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.
Full type description of a type.
Definition: typedescription.h:71
void * pReserved
reserved space for storing value
Definition: any2.h:52
This is the binary specification of an UNO any.
Definition: any2.h:40
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.
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.
void(* uno_AcquireFunc)(void *pInterface)
Generic function pointer declaration to acquire an interface.
Definition: data.h:46
This is the binary specification of a mapping.
Definition: mapping.h:64
#define SAL_THROW_EXTERN_C()
Nothrow specification for C functions.
Definition: types.h:352
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.
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.