1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
31 #include <cppu/cppudllapi.h>
43 struct _typelib_TypeDescriptionReference
;
44 struct _typelib_TypeDescription
;
47 /** This is the binary specification of an UNO any.
49 typedef struct _uno_Any
53 struct _typelib_TypeDescriptionReference
* pType
;
54 /** pointer to value; this may point to pReserved and thus the uno_Any is not anytime
55 mem-copyable! You may have to correct the pData pointer to pReserved. Otherwise you need
56 not, because the data is stored in heap space.
59 /** reserved space for storing value
68 /** Assign an any with a given value. Interfaces are acquired or released by the given callback
71 @param pDest pointer memory of destination any
72 @param pSource pointer to source value; defaults (0) to default constructed value
73 @param pTypeDescr type description of value; defaults (0) to void
74 @param acquire function called each time an interface needs to be acquired;
76 @param release function called each time an interface needs to be released;
79 CPPU_DLLPUBLIC
void SAL_CALL
uno_any_assign(
80 uno_Any
* pDest
, void * pSource
,
81 struct _typelib_TypeDescription
* pTypeDescr
,
82 uno_AcquireFunc acquire
, uno_ReleaseFunc release
)
84 /** Assign an any with a given value. Interfaces are acquired or released by the given callback
87 @param pDest pointer memory of destination any
88 @param pSource pointer to source value; defaults (0) to default constructed value
89 @param pType type description of value; defaults (0) to void
90 @param acquire function called each time an interface needs to be acquired;
92 @param release function called each time an interface needs to be released;
95 CPPU_DLLPUBLIC
void SAL_CALL
uno_type_any_assign(
96 uno_Any
* pDest
, void * pSource
,
97 struct _typelib_TypeDescriptionReference
* pType
,
98 uno_AcquireFunc acquire
, uno_ReleaseFunc release
)
101 /** Constructs an any with a given value. Interfaces are acquired by the given callback function.
103 @param pDest pointer memory of destination any
104 @param pSource pointer to source value; defaults (0) to default constructed value
105 @param pTypeDescr type description of value; defaults (0) to void
106 @param acquire function called each time an interface needs to be acquired;
109 CPPU_DLLPUBLIC
void SAL_CALL
uno_any_construct(
110 uno_Any
* pDest
, void * pSource
,
111 struct _typelib_TypeDescription
* pTypeDescr
,
112 uno_AcquireFunc acquire
)
113 SAL_THROW_EXTERN_C();
114 /** Constructs an any with a given value. Interfaces are acquired by the given callback function.
116 @param pDest pointer memory of destination any
117 @param pSource pointer to source value; defaults (0) to default constructed value
118 @param pType type of value; defaults (0) to void
119 @param acquire function called each time an interface needs to be acquired;
122 CPPU_DLLPUBLIC
void SAL_CALL
uno_type_any_construct(
123 uno_Any
* pDest
, void * pSource
,
124 struct _typelib_TypeDescriptionReference
* pType
,
125 uno_AcquireFunc acquire
)
126 SAL_THROW_EXTERN_C();
128 /** Constructs an any with a given value and converts/ maps interfaces.
130 @param pDest pointer memory of destination any
131 @param pSource pointer to source value; defaults (0) to default constructed value
132 @param pTypeDescr type description of value; defaults (0) to void
133 @param mapping mapping to convert/ map interfaces
135 CPPU_DLLPUBLIC
void SAL_CALL
uno_any_constructAndConvert(
136 uno_Any
* pDest
, void * pSource
,
137 struct _typelib_TypeDescription
* pTypeDescr
,
138 struct _uno_Mapping
* mapping
)
139 SAL_THROW_EXTERN_C();
140 /** Constructs an any with a given value and converts/ maps interfaces.
142 @param pDest pointer memory of destination any
143 @param pSource pointer to source value; defaults (0) to default constructed value
144 @param pType type of value; defaults (0) to void
145 @param mapping mapping to convert/ map interfaces
147 CPPU_DLLPUBLIC
void SAL_CALL
uno_type_any_constructAndConvert(
148 uno_Any
* pDest
, void * pSource
,
149 struct _typelib_TypeDescriptionReference
* pType
,
150 struct _uno_Mapping
* mapping
)
151 SAL_THROW_EXTERN_C();
153 /** Destructs an any.
155 @param pValue pointer to any
156 @param release function called each time an interface needs to be released;
159 CPPU_DLLPUBLIC
void SAL_CALL
uno_any_destruct(
160 uno_Any
* pValue
, uno_ReleaseFunc release
)
161 SAL_THROW_EXTERN_C();
163 /** Sets value to void.
165 @param pValue pointer to any
166 @param release function called each time an interface needs to be released;
169 CPPU_DLLPUBLIC
void SAL_CALL
uno_any_clear(
170 uno_Any
* pValue
, uno_ReleaseFunc release
)
171 SAL_THROW_EXTERN_C();
179 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */