LibreOffice Module cppu (master) 1
any.cxx
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#include "copy.hxx"
22#include "destr.hxx"
23
24using namespace cppu;
25
26
27extern "C"
28{
29
30void SAL_CALL uno_type_any_assign(
31 uno_Any * pDest, void * pSource,
32 typelib_TypeDescriptionReference * pType,
33 uno_AcquireFunc acquire, uno_ReleaseFunc release )
35{
36 _destructAny( pDest, release );
37 if (pType)
38 {
39 _copyConstructAny( pDest, pSource, pType, nullptr, acquire, nullptr );
40 }
41 else
42 {
43 CONSTRUCT_EMPTY_ANY( pDest );
44 }
45}
46
47void SAL_CALL uno_any_assign(
48 uno_Any * pDest, void * pSource,
49 typelib_TypeDescription * pTypeDescr,
50 uno_AcquireFunc acquire, uno_ReleaseFunc release )
52{
53 _destructAny( pDest, release );
54 if (pTypeDescr)
55 {
56 _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, nullptr );
57 }
58 else
59 {
60 CONSTRUCT_EMPTY_ANY( pDest );
61 }
62}
63
65 uno_Any * pDest, void * pSource,
66 typelib_TypeDescriptionReference * pType,
67 uno_AcquireFunc acquire )
69{
70 if (pType)
71 {
72 _copyConstructAny( pDest, pSource, pType, nullptr, acquire, nullptr );
73 }
74 else
75 {
76 CONSTRUCT_EMPTY_ANY( pDest );
77 }
78}
79
80void SAL_CALL uno_any_construct(
81 uno_Any * pDest, void * pSource,
82 typelib_TypeDescription * pTypeDescr,
83 uno_AcquireFunc acquire )
85{
86 if (pTypeDescr)
87 {
88 _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, acquire, nullptr );
89 }
90 else
91 {
92 CONSTRUCT_EMPTY_ANY( pDest );
93 }
94}
95
97 uno_Any * pDest, void * pSource,
98 typelib_TypeDescriptionReference * pType,
99 uno_Mapping * mapping )
101{
102 if (pType)
103 {
104 _copyConstructAny( pDest, pSource, pType, nullptr, nullptr, mapping );
105 }
106 else
107 {
108 CONSTRUCT_EMPTY_ANY( pDest );
109 }
110}
111
113 uno_Any * pDest, void * pSource,
114 typelib_TypeDescription * pTypeDescr,
115 uno_Mapping * mapping )
117{
118 if (pTypeDescr)
119 {
120 _copyConstructAny( pDest, pSource, pTypeDescr->pWeakRef, pTypeDescr, nullptr, mapping );
121 }
122 else
123 {
124 CONSTRUCT_EMPTY_ANY( pDest );
125 }
126}
127
128void SAL_CALL uno_any_destruct( uno_Any * pValue, uno_ReleaseFunc release )
130{
131 _destructAny( pValue, release );
132}
133
134void SAL_CALL uno_any_clear( uno_Any * pValue, uno_ReleaseFunc release )
136{
137 _destructAny( pValue, release );
138 CONSTRUCT_EMPTY_ANY( pValue );
139}
140}
141
142/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void SAL_CALL uno_any_assign(uno_Any *pDest, void *pSource, typelib_TypeDescription *pTypeDescr, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Definition: any.cxx:47
void SAL_CALL uno_any_clear(uno_Any *pValue, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Definition: any.cxx:134
void SAL_CALL uno_type_any_constructAndConvert(uno_Any *pDest, void *pSource, typelib_TypeDescriptionReference *pType, uno_Mapping *mapping) SAL_THROW_EXTERN_C()
Definition: any.cxx:96
void SAL_CALL uno_any_constructAndConvert(uno_Any *pDest, void *pSource, typelib_TypeDescription *pTypeDescr, uno_Mapping *mapping) SAL_THROW_EXTERN_C()
Definition: any.cxx:112
void SAL_CALL uno_any_construct(uno_Any *pDest, void *pSource, typelib_TypeDescription *pTypeDescr, uno_AcquireFunc acquire) SAL_THROW_EXTERN_C()
Definition: any.cxx:80
void SAL_CALL uno_any_destruct(uno_Any *pValue, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Definition: any.cxx:128
void SAL_CALL uno_type_any_assign(uno_Any *pDest, void *pSource, typelib_TypeDescriptionReference *pType, uno_AcquireFunc acquire, uno_ReleaseFunc release) SAL_THROW_EXTERN_C()
Definition: any.cxx:30
void SAL_CALL uno_type_any_construct(uno_Any *pDest, void *pSource, typelib_TypeDescriptionReference *pType, uno_AcquireFunc acquire) SAL_THROW_EXTERN_C()
Definition: any.cxx:64
struct _uno_Mapping uno_Mapping
struct _typelib_TypeDescription typelib_TypeDescription
struct _uno_Any uno_Any
void _copyConstructAny(uno_Any *pDestAny, void *pSource, typelib_TypeDescriptionReference *pType, typelib_TypeDescription *pTypeDescr, uno_AcquireFunc acquire, uno_Mapping *mapping)
Definition: copy.hxx:256
void CONSTRUCT_EMPTY_ANY(uno_Any *pAny)
Definition: prim.hxx:124
void _destructAny(uno_Any *pAny, uno_ReleaseFunc release)
Definition: destr.hxx:70
#define SAL_THROW_EXTERN_C()