#88337# documentation review

This commit is contained in:
Daniel Boelzle
2001-08-21 08:17:07 +00:00
parent 0f562b5ac2
commit 4e320a40b5
19 changed files with 784 additions and 920 deletions

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Any.h,v $ * $RCSfile: Any.h,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: dbo $ $Date: 2001-08-02 15:13:46 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -90,16 +90,12 @@ namespace uno
{ {
/** C++ class representing an IDL any. /** C++ class representing an IDL any.
This class is used to transport any type defined in IDL. This class is used to transport any type defined in IDL. The class inherits from the
The class inherits from the binary C representation binary C representation of uno_Any.
of <b>uno_Any</b>.<br> You can insert a value by either using the <<= operators or the template function makeAny().
You can insert a value by either using the <<= operators No any can hold an any. You can extract values from an any by using the >>= operators which
or the template function makeAny(). No any can hold an any.<br> return true if the any contains an assignable value (no data loss), e.g. the any contains a
You can extract values from an any by using the >>= operators short and you >>= it into a long variable.
which return true if the any contains an assignable value
(no data loss), e.g. the any contains a short and you >>= it
into a long variable.
<br>
*/ */
class Any : public uno_Any class Any : public uno_Any
{ {
@@ -114,101 +110,91 @@ public:
inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW( () ) inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW( () )
{} {}
/** Default constructor: /** Default constructor: Any holds no value; its type is void.
Any holds no value; its type is void.
<br>
*/ */
inline Any() SAL_THROW( () ); inline Any() SAL_THROW( () );
/** Copy constructor: /** Copy constructor: Sets value of the given any.
Sets value of the given any.
<br>
@param rAny another any @param rAny another any
*/ */
inline Any( const Any & rAny ) SAL_THROW( () ); inline Any( const Any & rAny ) SAL_THROW( () );
/** Constructor: /** Constructor: Sets a copy of the given data.
Sets a copy of the given data.
<br>
@param pData_ value @param pData_ value
@param rType type of value @param rType type of value
*/ */
inline Any( const void * pData_, const Type & rType ) SAL_THROW( () ); inline Any( const void * pData_, const Type & rType ) SAL_THROW( () );
/** Constructor: /** Constructor: Sets a copy of the given data.
Sets a copy of the given data.
<br>
@param pData_ value @param pData_ value
@param pTypeDescr type of value @param pTypeDescr type of value
*/ */
inline Any( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ); inline Any( const void * pData_, typelib_TypeDescription * pTypeDescr ) SAL_THROW( () );
/** Constructor: /** Constructor: Sets a copy of the given data.
Sets a copy of the given data.
<br>
@param pData_ value @param pData_ value
@param pType type of value @param pType type of value
*/ */
inline Any( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW( () ); inline Any( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW( () );
/** Destructor: /** Destructor: Destructs any content and frees memory.
Destructs any content and frees memory.
<br>
*/ */
inline ~Any() SAL_THROW( () ); inline ~Any() SAL_THROW( () );
/** Assignment operator: /** Assignment operator: Sets the value of the given any.
Sets the value of the given any.
<br>
@param rAny another any (right side) @param rAny another any (right side)
@return this any @return this any
*/ */
inline Any & SAL_CALL operator = ( const Any & rAny ) SAL_THROW( () ); inline Any & SAL_CALL operator = ( const Any & rAny ) SAL_THROW( () );
/** Gets the type of the set value. /** Gets the type of the set value.
<br>
@return a Type object of the set value @return a Type object of the set value
*/ */
inline const Type & SAL_CALL getValueType() const SAL_THROW( () ) inline const Type & SAL_CALL getValueType() const SAL_THROW( () )
{ return * reinterpret_cast< const Type * >( &pType ); } { return * reinterpret_cast< const Type * >( &pType ); }
/** Gets the type of the set value. /** Gets the type of the set value.
<br>
@return the <b>un</b>acquired type description reference of the set value @return the UNacquired type description reference of the set value
*/ */
inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const SAL_THROW( () ) inline typelib_TypeDescriptionReference * SAL_CALL getValueTypeRef() const SAL_THROW( () )
{ return pType; } { return pType; }
/** Gets the type description of the set value.<br> /** Gets the type description of the set value. Provides ownership of the type description!
Provides <b>ownership</b> of the type description! Call an explicit typelib_typedescription_release() to release afterwards.
Call an explicit typelib_typedescription_release() to release.
<br>
@param a pointer to type description pointer @param a pointer to type description pointer
*/ */
inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const SAL_THROW( () ) inline void SAL_CALL getValueTypeDescription( typelib_TypeDescription ** ppTypeDescr ) const SAL_THROW( () )
{ ::typelib_typedescriptionreference_getDescription( ppTypeDescr, pType ); } { ::typelib_typedescriptionreference_getDescription( ppTypeDescr, pType ); }
/** Gets the type class of the set value. /** Gets the type class of the set value.
<br>
@return the type class of the set value @return the type class of the set value
*/ */
inline TypeClass SAL_CALL getValueTypeClass() const SAL_THROW( () ) inline TypeClass SAL_CALL getValueTypeClass() const SAL_THROW( () )
{ return (TypeClass)pType->eTypeClass; } { return (TypeClass)pType->eTypeClass; }
/** Gets the type name of the set value. /** Gets the type name of the set value.
<br>
@return the type name of the set value @return the type name of the set value
*/ */
inline ::rtl::OUString SAL_CALL getValueTypeName() const SAL_THROW( () ); inline ::rtl::OUString SAL_CALL getValueTypeName() const SAL_THROW( () );
/** Tests if any contains a value. /** Tests if any contains a value.
<br>
@return true if any has a value, false otherwise @return true if any has a value, false otherwise
*/ */
inline sal_Bool SAL_CALL hasValue() const SAL_THROW( () ) inline sal_Bool SAL_CALL hasValue() const SAL_THROW( () )
{ return (typelib_TypeClass_VOID != pType->eTypeClass); } { return (typelib_TypeClass_VOID != pType->eTypeClass); }
/** Gets a pointer to the set value. /** Gets a pointer to the set value.
<br>
@return a pointer to the set value @return a pointer to the set value
*/ */
inline const void * SAL_CALL getValue() const SAL_THROW( () ) inline const void * SAL_CALL getValue() const SAL_THROW( () )
@@ -216,21 +202,21 @@ public:
/** Sets a value. If the any already contains a value, that value will be destructed /** Sets a value. If the any already contains a value, that value will be destructed
and its memory freed. and its memory freed.
<br>
@param pData_ pointer to value @param pData_ pointer to value
@param rType type of value @param rType type of value
*/ */
inline void SAL_CALL setValue( const void * pData_, const Type & rType ) SAL_THROW( () ); inline void SAL_CALL setValue( const void * pData_, const Type & rType ) SAL_THROW( () );
/** Sets a value. If the any already contains a value, that value will be destructed /** Sets a value. If the any already contains a value, that value will be destructed
and its memory freed. and its memory freed.
<br>
@param pData_ pointer to value @param pData_ pointer to value
@param pType type of value @param pType type of value
*/ */
inline void SAL_CALL setValue( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW( () ); inline void SAL_CALL setValue( const void * pData_, typelib_TypeDescriptionReference * pType ) SAL_THROW( () );
/** Sets a value. If the any already contains a value, that value will be destructed /** Sets a value. If the any already contains a value, that value will be destructed
and its memory freed. and its memory freed.
<br>
@param pData_ pointer to value @param pData_ pointer to value
@param pTypeDescr type description of value @param pTypeDescr type description of value
*/ */
@@ -238,22 +224,19 @@ public:
/** Clears this any. If the any already contains a value, that value will be destructed /** Clears this any. If the any already contains a value, that value will be destructed
and its memory freed. After this has been called, the any does not contain a value. and its memory freed. After this has been called, the any does not contain a value.
<br>
*/ */
inline void SAL_CALL clear() SAL_THROW( () ); inline void SAL_CALL clear() SAL_THROW( () );
/** Equality operator: compares two anys.<br> /** Equality operator: compares two anys.
The values need not be of equal type, e.g. a short integer is compared to The values need not be of equal type, e.g. a short integer is compared to a long integer.
a long integer.
<br>
@param rAny another any (right side) @param rAny another any (right side)
@return true if both any contains equal values @return true if both any contains equal values
*/ */
inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const SAL_THROW( () ); inline sal_Bool SAL_CALL operator == ( const Any & rAny ) const SAL_THROW( () );
/** Unequality operator: compares two anys.<br> /** Unequality operator: compares two anys.
The values need not be of equal type, e.g. a short integer is compared to The values need not be of equal type, e.g. a short integer is compared to a long integer.
a long integer.
<br>
@param rAny another any (right side) @param rAny another any (right side)
@return true if both any contains unequal values @return true if both any contains unequal values
*/ */
@@ -261,7 +244,7 @@ public:
}; };
/** Template function to generically construct an any from a C++ value. /** Template function to generically construct an any from a C++ value.
<br>
@param value a value @param value a value
@return an any @return an any
*/ */
@@ -272,16 +255,16 @@ class BaseReference;
class Type; class Type;
/** Template binary <<= operator to set the value of an any. /** Template binary <<= operator to set the value of an any.
<br>
@param rAny destination any (left side) @param rAny destination any (left side)
@param value source value (right side) @param value source value (right side)
*/ */
template< class C > template< class C >
inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW( () ); inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW( () );
/** Template binary >>= operator to assign a value from an any.<br> /** Template binary >>= operator to assign a value from an any.
If the any does not contain a value that can be assigned <b>without</b> If the any does not contain a value that can be assigned without data loss, then this
data loss, this operation will fail returning false. operation will fail returning false.
<br>
@param rAny source any (left side) @param rAny source any (left side)
@param value destination value (right side) @param value destination value (right side)
@return true if assignment was possible without data loss @return true if assignment was possible without data loss
@@ -289,24 +272,22 @@ inline void SAL_CALL operator <<= ( Any & rAny, const C & value ) SAL_THROW( ()
template< class C > template< class C >
inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW( () ); inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, C & value ) SAL_THROW( () );
/** Template equality operator: compares set value of left side any to right side value.<br> /** Template equality operator: compares set value of left side any to right side value.
The values need not be of equal type, e.g. a short integer is compared to The values need not be of equal type, e.g. a short integer is compared to a long integer.
a long integer.<br> This operator can be implemented as template member function, if all supported compilers
This operator can be implemented as template member function, if can cope with template member functions.
all supported compilers can cope with template member functions.
<br>
@param rAny another any (left side) @param rAny another any (left side)
@param value a value (right side) @param value a value (right side)
@return true if values are equal, false otherwise @return true if values are equal, false otherwise
*/ */
template< class C > template< class C >
inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW( () ); inline sal_Bool SAL_CALL operator == ( const Any & rAny, const C & value ) SAL_THROW( () );
/** Template unequality operator: compares set value of left side any to right side value.<br> /** Template unequality operator: compares set value of left side any to right side value.
The values need not be of equal type, e.g. a short integer is compared to The values need not be of equal type, e.g. a short integer is compared to a long integer.
a long integer.<br> This operator can be implemented as template member function, if all supported compilers
This operator can be implemented as template member function, if can cope with template member functions.
all supported compilers can cope with template member functions.
<br>
@param rAny another any (left side) @param rAny another any (left side)
@param value a value (right side) @param value a value (right side)
@return true if values are unequal, false otherwise @return true if values are unequal, false otherwise
@@ -349,10 +330,10 @@ inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & v
} }
} }
/** Gets the meta type of IDL type <b>any</b>. /** Gets the meta type of IDL type any.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>any</b> @return type of IDL type any
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) SAL_THROW( () ) inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Any * ) SAL_THROW( () )
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Reference.h,v $ * $RCSfile: Reference.h,v $
* *
* $Revision: 1.7 $ * $Revision: 1.8 $
* *
* last change: $Author: dbo $ $Date: 2001-03-16 16:34:33 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -84,70 +84,65 @@ class XInterface;
/** DEPRECATED: use SAL_NO_ACQUIRE /** DEPRECATED: use SAL_NO_ACQUIRE
Enum defining UNO_REF_NO_ACQUIRE for setting reference without acquiring a given interface. Enum defining UNO_REF_NO_ACQUIRE for setting reference without acquiring a given interface.
<br>
*/ */
enum __UnoReference_NoAcquire enum __UnoReference_NoAcquire
{ {
/** This enum value can be used for creating a reference granting a given /** This enum value can be used for creating a reference granting a given interface,
interface, i.e. transferring ownership to it. i.e. transferring ownership to it.
<br>
*/ */
UNO_REF_NO_ACQUIRE UNO_REF_NO_ACQUIRE
}; };
/** This base class serves as a base class for all template reference classes and /** This base class serves as a base class for all template reference classes and
has been introduced due to compiler problems with templated operators ==, =!. has been introduced due to compiler problems with templated operators ==, =!.
<br>
*/ */
class BaseReference class BaseReference
{ {
protected: protected:
/** the interface pointer /** the interface pointer
<br>
*/ */
XInterface * _pInterface; XInterface * _pInterface;
public: public:
/** Gets interface pointer. /** Gets interface pointer. This call does not acquire the interface.
This call does <b>not</b> acquire the interface.
<br> @return UNacquired interface pointer
@return <b>un</b>acquired interface pointer
*/ */
inline XInterface * SAL_CALL get() const SAL_THROW( () ) inline XInterface * SAL_CALL get() const SAL_THROW( () )
{ return _pInterface; } { return _pInterface; }
/** Checks if reference is null. /** Checks if reference is null.
<br>
@return true if reference acquires an interface, i.e. is not null @return true if reference acquires an interface, i.e. true if it is not null
*/ */
inline sal_Bool SAL_CALL is() const SAL_THROW( () ) inline sal_Bool SAL_CALL is() const SAL_THROW( () )
{ return (_pInterface != 0); } { return (_pInterface != 0); }
/** Equality operator: compares two interfaces<br> /** Equality operator: compares two interfaces
Checks if both references are null or refer to the same object. Checks if both references are null or refer to the same object.
<br>
@param rRef another interface @param rRef another interface
@return true if both references are null or refer to the same object, false otherwise @return true if both references are null or refer to the same object, false otherwise
*/ */
inline sal_Bool SAL_CALL operator == ( XInterface * pInterface ) const SAL_THROW( () ); inline sal_Bool SAL_CALL operator == ( XInterface * pInterface ) const SAL_THROW( () );
/** Unequality operator: compares two interfaces<br> /** Unequality operator: compares two interfaces
Checks if both references are null or refer to the same object. Checks if both references are null or refer to the same object.
<br>
@param rRef another interface @param rRef another interface
@return false if both references are null or refer to the same object, true otherwise @return false if both references are null or refer to the same object, true otherwise
*/ */
inline sal_Bool SAL_CALL operator != ( XInterface * pInterface ) const SAL_THROW( () ); inline sal_Bool SAL_CALL operator != ( XInterface * pInterface ) const SAL_THROW( () );
/** Equality operator: compares two interfaces<br> /** Equality operator: compares two interfaces
Checks if both references are null or refer to the same object. Checks if both references are null or refer to the same object.
<br>
@param rRef another reference @param rRef another reference
@return true if both references are null or refer to the same object, false otherwise @return true if both references are null or refer to the same object, false otherwise
*/ */
inline sal_Bool SAL_CALL operator == ( const BaseReference & rRef ) const SAL_THROW( () ); inline sal_Bool SAL_CALL operator == ( const BaseReference & rRef ) const SAL_THROW( () );
/** Unequality operator: compares two interfaces<br> /** Unequality operator: compares two interfaces
Checks if both references are null or refer to the same object. Checks if both references are null or refer to the same object.
<br>
@param rRef another reference @param rRef another reference
@return false if both references are null or refer to the same object, true otherwise @return false if both references are null or refer to the same object, true otherwise
*/ */
@@ -158,18 +153,15 @@ public:
{ return (_pInterface < rRef._pInterface); } { return (_pInterface < rRef._pInterface); }
}; };
/** Enum defining UNO_QUERY and UNO_REF_QUERY for query interface constructor /** Enum defining UNO_QUERY and UNO_REF_QUERY for query interface constructor of reference template.
of reference template.
<br>
*/ */
enum __UnoReference_Query enum __UnoReference_Query
{ {
/** This enum value can be used for querying interface constructor of reference template. /** This enum value can be used for querying interface constructor of reference template.
<br>
*/ */
UNO_QUERY, UNO_QUERY,
/** This enum value can be used for querying interface constructor of reference template. /** This enum value can be used for querying interface constructor of reference template.
<br>
*/ */
UNO_REF_QUERY UNO_REF_QUERY
}; };
@@ -177,13 +169,12 @@ enum __UnoReference_Query
/** Template reference class for interface type derived from BaseReference. /** Template reference class for interface type derived from BaseReference.
A special constructor given the UNO_QUERY or UNO_REF_QUERY identifier queries interfaces A special constructor given the UNO_QUERY or UNO_REF_QUERY identifier queries interfaces
for reference type. for reference type.
<br>
*/ */
template< class interface_type > template< class interface_type >
class Reference : public BaseReference class Reference : public BaseReference
{ {
/** Queries given interface reference for type <b>interface_type</b>. /** Queries given interface reference for type interface_type.
<br>
@param pInterface interface pointer @param pInterface interface pointer
@return interface of demanded type (may be null) @return interface of demanded type (may be null)
*/ */
@@ -200,166 +191,142 @@ public:
static void SAL_CALL operator delete ( void *, void * ) SAL_THROW( () ) static void SAL_CALL operator delete ( void *, void * ) SAL_THROW( () )
{} {}
/** Destructor: /** Destructor: Releases interface if set.
Releases interface if set.
<br>
*/ */
inline ~Reference() SAL_THROW( () ); inline ~Reference() SAL_THROW( () );
/** Default Constructor: /** Default Constructor: Sets null reference.
Sets null reference.
<br>
*/ */
inline Reference() SAL_THROW( () ); inline Reference() SAL_THROW( () );
/** Copy constructor: /** Copy constructor: Copies interface reference.
Copies interface reference.
<br>
@param rRef another reference @param rRef another reference
*/ */
inline Reference( const Reference< interface_type > & rRef ) SAL_THROW( () ); inline Reference( const Reference< interface_type > & rRef ) SAL_THROW( () );
/** Constructor: /** Constructor: Sets given interface pointer.
Sets given interface pointer.
<br>
@param pInterface an interface pointer @param pInterface an interface pointer
*/ */
inline Reference( interface_type * pInterface ) SAL_THROW( () ); inline Reference( interface_type * pInterface ) SAL_THROW( () );
/** Constructor: /** Constructor: Sets given interface pointer without acquiring it.
Sets given interface pointer without acquiring it.
<br>
@param pInterface another reference @param pInterface another reference
@param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors
*/ */
inline Reference( interface_type * pInterface, __sal_NoAcquire ) SAL_THROW( () ); inline Reference( interface_type * pInterface, __sal_NoAcquire ) SAL_THROW( () );
/** DEPRECATED: use SAL_NO_ACQUIRE version /** DEPRECATED: use SAL_NO_ACQUIRE version
Constructor: Constructor: Sets given interface pointer without acquiring it.
Sets given interface pointer without acquiring it.
<br>
@param pInterface another reference @param pInterface another reference
@param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other constructors
*/ */
inline Reference( interface_type * pInterface, __UnoReference_NoAcquire ) SAL_THROW( () ); inline Reference( interface_type * pInterface, __UnoReference_NoAcquire ) SAL_THROW( () );
/** Constructor: /** Constructor: Queries given interface for reference interface type (interface_type).
Queries given interface for reference interface type (<b>interface_type</b>).
<br>
@param rRef another reference @param rRef another reference
@param dummy UNO_QUERY or UNO_REF_QUERY to force obvious distinction to other constructors @param dummy UNO_QUERY or UNO_REF_QUERY to force obvious distinction to other constructors
*/ */
inline Reference( const BaseReference & rRef, __UnoReference_Query ) SAL_THROW( (RuntimeException) ); inline Reference( const BaseReference & rRef, __UnoReference_Query ) SAL_THROW( (RuntimeException) );
/** Constructor: /** Constructor: Queries given interface for reference interface type (interface_type).
Queries given interface for reference interface type (<b>interface_type</b>).
<br>
@param pInterface an interface pointer @param pInterface an interface pointer
@param dummy UNO_QUERY to force obvious distinction to other constructors @param dummy UNO_QUERY to force obvious distinction to other constructors
*/ */
inline Reference( XInterface * pInterface, __UnoReference_Query ) SAL_THROW( (RuntimeException) ); inline Reference( XInterface * pInterface, __UnoReference_Query ) SAL_THROW( (RuntimeException) );
/** Cast operator to Reference< XInterface >: /** Cast operator to Reference< XInterface >: Reference objects are binary compatible and
Reference objects are binary compatible and any interface must be derived any interface must be derived from com.sun.star.uno.XInterface.
from com.sun.star.uno.XInterface.
This a useful direct cast possibility. This a useful direct cast possibility.
<br>
*/ */
inline SAL_CALL operator const Reference< XInterface > & () const SAL_THROW( () ) inline SAL_CALL operator const Reference< XInterface > & () const SAL_THROW( () )
{ return * reinterpret_cast< const Reference< XInterface > * >( this ); } { return * reinterpret_cast< const Reference< XInterface > * >( this ); }
/** Dereference operator: /** Dereference operator: Used to call interface methods.
Used to call interface methods.
<br> @return UNacquired interface pointer
@return <b>un</b>acquired interface pointer
*/ */
inline interface_type * SAL_CALL operator -> () const SAL_THROW( () ) inline interface_type * SAL_CALL operator -> () const SAL_THROW( () )
{ return static_cast< interface_type * >( _pInterface ); } { return static_cast< interface_type * >( _pInterface ); }
/** Gets interface pointer. /** Gets interface pointer. This call does not acquire the interface.
This call does <b>not</b> acquire the interface.
<br> @return UNacquired interface pointer
@return <b>un</b>acquired interface pointer
*/ */
inline interface_type * SAL_CALL get() const SAL_THROW( () ) inline interface_type * SAL_CALL get() const SAL_THROW( () )
{ return static_cast< interface_type * >( _pInterface ); } { return static_cast< interface_type * >( _pInterface ); }
/** Clears reference, i.e. releases interface. /** Clears reference, i.e. releases interface. Reference is null after clear() call.
Reference is null after clear() call.
<br>
*/ */
inline void SAL_CALL clear() SAL_THROW( () ); inline void SAL_CALL clear() SAL_THROW( () );
/** Sets the given interface. /** Sets the given interface. An interface already set will be released.
An interface already set will be released.
<br>
@param rRef another reference @param rRef another reference
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( const Reference< interface_type > & rRef ) SAL_THROW( () ); inline sal_Bool SAL_CALL set( const Reference< interface_type > & rRef ) SAL_THROW( () );
/** Sets the given interface. /** Sets the given interface. An interface already set will be released.
An interface already set will be released.
<br>
@param pInterface another interface @param pInterface another interface
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( interface_type * pInterface ) SAL_THROW( () ); inline sal_Bool SAL_CALL set( interface_type * pInterface ) SAL_THROW( () );
/** Sets interface pointer without acquiring it. /** Sets interface pointer without acquiring it. An interface already set will be released.
An interface already set will be released.
<br>
@param pInterface an interface pointer @param pInterface an interface pointer
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( interface_type * pInterface, __sal_NoAcquire ) SAL_THROW( () ); inline sal_Bool SAL_CALL set( interface_type * pInterface, __sal_NoAcquire ) SAL_THROW( () );
/** DEPRECATED: use SAL_NO_ACQUIRE version /** DEPRECATED: use SAL_NO_ACQUIRE version
Sets interface pointer without acquiring it. Sets interface pointer without acquiring it. An interface already set will be released.
An interface already set will be released.
<br>
@param pInterface an interface pointer @param pInterface an interface pointer
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( interface_type * pInterface, __UnoReference_NoAcquire ) SAL_THROW( () ); inline sal_Bool SAL_CALL set( interface_type * pInterface, __UnoReference_NoAcquire ) SAL_THROW( () );
/** Queries given interface for reference interface type (<b>interface_type</b>) /** Queries given interface for reference interface type (interface_type) and sets it.
and sets it.
An interface already set will be released. An interface already set will be released.
<br>
@param pInterface an interface pointer @param pInterface an interface pointer
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( XInterface * pInterface, __UnoReference_Query ) SAL_THROW( (RuntimeException) ); inline sal_Bool SAL_CALL set( XInterface * pInterface, __UnoReference_Query ) SAL_THROW( (RuntimeException) );
/** Queries given interface for reference interface type (<b>interface_type</b>) /** Queries given interface for reference interface type (interface_type) and sets it.
and sets it.
An interface already set will be released. An interface already set will be released.
<br>
@param rRef another reference @param rRef another reference
@return true, if non-null interface was set @return true, if non-null interface was set
*/ */
inline sal_Bool SAL_CALL set( const BaseReference & rRef, __UnoReference_Query ) SAL_THROW( (RuntimeException) ); inline sal_Bool SAL_CALL set( const BaseReference & rRef, __UnoReference_Query ) SAL_THROW( (RuntimeException) );
/** Assignment operator: /** Assignment operator: Acquires given interface pointer and sets reference.
Acquires given interface pointer and sets reference.
An interface already set will be released. An interface already set will be released.
<br>
@param pInterface an interface pointer @param pInterface an interface pointer
@return this reference @return this reference
*/ */
inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ) SAL_THROW( () ); inline Reference< interface_type > & SAL_CALL operator = ( interface_type * pInterface ) SAL_THROW( () );
/** Assignment operator: /** Assignment operator: Acquires given interface reference and sets reference.
Acquires given interface reference and sets reference.
An interface already set will be released. An interface already set will be released.
<br>
@param rRef an interface reference @param rRef an interface reference
@return this reference @return this reference
*/ */
inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) SAL_THROW( () ); inline Reference< interface_type > & SAL_CALL operator = ( const Reference< interface_type > & rRef ) SAL_THROW( () );
/** Queries given interface reference for type <b>interface_type</b>. /** Queries given interface reference for type interface_type.
<br>
@param rRef interface reference @param rRef interface reference
@return interface reference of demanded type (may be null) @return interface reference of demanded type (may be null)
*/ */
inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) SAL_THROW( (RuntimeException) ); inline static Reference< interface_type > SAL_CALL query( const BaseReference & rRef ) SAL_THROW( (RuntimeException) );
/** Queries given interface for type <b>interface_type</b>. /** Queries given interface for type interface_type.
<br>
@param pInterface interface pointer @param pInterface interface pointer
@return interface reference of demanded type (may be null) @return interface reference of demanded type (may be null)
*/ */

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Sequence.h,v $ * $RCSfile: Sequence.h,v $
* *
* $Revision: 1.11 $ * $Revision: 1.12 $
* *
* last change: $Author: dbo $ $Date: 2001-05-10 14:40:58 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -94,18 +94,15 @@ namespace star
namespace uno namespace uno
{ {
/** Template C++ class representing an IDL sequence<>. Template argument is /** Template C++ class representing an IDL sequence. Template argument is the sequence element type.
sequence element type<br> C++ Sequences are reference counted and shared, so the sequence keeps a handle to its data.
C++ Sequences are reference counted and shared, so the sequence keeps a handle
to its data.
To keep value semantics, copies are only generated if the sequence is to be modified To keep value semantics, copies are only generated if the sequence is to be modified
(new handle). (new handle).
<br>
*/ */
template< class E > template< class E >
class Sequence class Sequence
{ {
/** sequence handle<br> /** sequence handle
*/ */
uno_Sequence * _pSequence; uno_Sequence * _pSequence;
@@ -124,136 +121,126 @@ public:
static typelib_TypeDescriptionReference * s_pType; static typelib_TypeDescriptionReference * s_pType;
/** typedefs the element type of the sequence /** typedefs the element type of the sequence
<br>
*/ */
typedef E ElementType; typedef E ElementType;
/** Default constructor: /** Default constructor: Creates an empty sequence.
Creates an empty sequence.
<br>
*/ */
inline Sequence< E >() SAL_THROW( () ); inline Sequence< E >() SAL_THROW( () );
/** Copy constructor: /** Copy constructor: Creates a copy of given sequence.
Creates a copy of given sequence.
<br>
@param rSeq another sequence of same type @param rSeq another sequence of same type
*/ */
inline Sequence< E >( const Sequence< E > & rSeq ) SAL_THROW( () ); inline Sequence< E >( const Sequence< E > & rSeq ) SAL_THROW( () );
/** Constructor: /** Constructor: Takes over ownership of given sequence.
Takes over ownership of given sequence.
<br>
@param pSequence a sequence @param pSequence a sequence
@param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors
*/ */
inline Sequence< E >( uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW( () ); inline Sequence< E >( uno_Sequence * pSequence, __sal_NoAcquire ) SAL_THROW( () );
/** Constructor: /** Constructor: Creates a copy of given elements.
Creates a copy of given elements.
<br>
@param pElement an array of elements @param pElement an array of elements
@param len length of array @param len length of array
*/ */
inline Sequence< E >( const E * pElements, sal_Int32 len ) SAL_THROW( () ); inline Sequence< E >( const E * pElements, sal_Int32 len ) SAL_THROW( () );
/** Constructor: /** Constructor: Creates a default constructed sequence of given length.
Creates a default constructed sequence of given length.
<br>
@param len initial sequence length @param len initial sequence length
*/ */
inline Sequence< E >( sal_Int32 len ) SAL_THROW( () ); inline Sequence< E >( sal_Int32 len ) SAL_THROW( () );
/** Destructor: /** Destructor: Releases sequence handle. Last handle will destruct elements and free memory.
Releases sequence handle. Last handle will destruct elements and free memory.
<br>
*/ */
inline ~Sequence< E >() SAL_THROW( () ); inline ~Sequence< E >() SAL_THROW( () );
/** Assignment operator: /** Assignment operator: Acquires given sequence handle and releases previously set handle.
Acquires given sequence handle and releases previously set handle.
<br>
@param rSeq another sequence of same type @param rSeq another sequence of same type
@return this sequence @return this sequence
*/ */
inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ) SAL_THROW( () ); inline Sequence< E > & SAL_CALL operator = ( const Sequence< E > & rSeq ) SAL_THROW( () );
/** Gets length of sequence. /** Gets length of the sequence.
<br>
@return length of sequence @return length of sequence
*/ */
inline sal_Int32 SAL_CALL getLength() const SAL_THROW( () ) inline sal_Int32 SAL_CALL getLength() const SAL_THROW( () )
{ return _pSequence->nElements; } { return _pSequence->nElements; }
/** Tests whether the sequence has elements, i.e. elements count is greater than zero. /** Tests whether the sequence has elements, i.e. elements count is greater than zero.
<br>
@return true, if elements count is greater than zero @return true, if elements count is greater than zero
*/ */
inline sal_Bool SAL_CALL hasElements() const SAL_THROW( () ) inline sal_Bool SAL_CALL hasElements() const SAL_THROW( () )
{ return (_pSequence->nElements > 0); } { return (_pSequence->nElements > 0); }
/** Gets a pointer to elements array for <b>reading</b>. /** Gets a pointer to elements array for reading.
If the sequence has a length of 0, then the returned pointer is undefined. If the sequence has a length of 0, then the returned pointer is undefined.
<br>
@return pointer to elements array @return pointer to elements array
*/ */
inline const E * SAL_CALL getConstArray() const SAL_THROW( () ) inline const E * SAL_CALL getConstArray() const SAL_THROW( () )
{ return reinterpret_cast< const E * >( _pSequence->elements ); } { return reinterpret_cast< const E * >( _pSequence->elements ); }
/** Gets a pointer to elements array for <b>reading and writing</b>.<br> /** Gets a pointer to elements array for reading and writing.
In general if the sequence has a handle acquired by other sequences In general if the sequence has a handle acquired by other sequences (reference count > 1),
(reference count > 1), then a new sequence is created copy constructing then a new sequence is created copy constructing all elements to keep value semantics!
all elements to keep value semantics!<br>
If the sequence has a length of 0, then the returned pointer is undefined. If the sequence has a length of 0, then the returned pointer is undefined.
<br>
@return pointer to elements array @return pointer to elements array
*/ */
inline E * SAL_CALL getArray() SAL_THROW( () ); inline E * SAL_CALL getArray() SAL_THROW( () );
/** Non-const index operator: /** Non-const index operator: Obtains a reference to element indexed at given position.
Obtains a reference to element indexed at given position.<br> The implementation does not check for array bounds!
The implementation does <b>not</b> check for array bounds!<br> In general if the sequence has a handle acquired by other sequences (reference count > 1),
In general if the sequence has a handle acquired by other sequences then a new sequence is created copy constructing all elements to keep value semantics!
(reference count > 1), then a new sequence is created copy constructing
all elements to keep value semantics!
<br>
@param nIndex index @param nIndex index
@return non-const C++ reference to element @return non-const C++ reference to element
*/ */
inline E & SAL_CALL operator [] ( sal_Int32 nIndex ) SAL_THROW( () ); inline E & SAL_CALL operator [] ( sal_Int32 nIndex ) SAL_THROW( () );
/** Const index operator: /** Const index operator: Obtains a reference to element indexed at given position.
Obtains a reference to element indexed at given position.<br> The implementation does not check for array bounds!
The implementation does <b>not</b> check for array bounds!<br>
<br>
@param nIndex index @param nIndex index
@return const C++ reference to element @return const C++ reference to element
*/ */
inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const SAL_THROW( () ); inline const E & SAL_CALL operator [] ( sal_Int32 nIndex ) const SAL_THROW( () );
/** Equality operator: /** Equality operator: Compares two sequences.
Compares two sequences.
<br>
@param rSeq another sequence of same type (right side) @param rSeq another sequence of same type (right side)
@return true if both sequences are equal, false otherwise @return true if both sequences are equal, false otherwise
*/ */
inline sal_Bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const SAL_THROW( () ); inline sal_Bool SAL_CALL operator == ( const Sequence< E > & rSeq ) const SAL_THROW( () );
/** Unequality operator: /** Unequality operator: Compares two sequences.
Compares two sequences.
<br>
@param rSeq another sequence of same type (right side) @param rSeq another sequence of same type (right side)
@return false if both sequences are equal, true otherwise @return false if both sequences are equal, true otherwise
*/ */
inline sal_Bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const SAL_THROW( () ); inline sal_Bool SAL_CALL operator != ( const Sequence< E > & rSeq ) const SAL_THROW( () );
/** Reallocates sequence to new length. /** Reallocates sequence to new length.
If the new length is smaller than the former, then upper elements If the new length is smaller than the former, then upper elements will be destructed
will be destructed (and their memory freed). (and their memory freed). If the new length is greater than the former, then
If the new length is greater than the former, then upper (new) elements upper (new) elements are default constructed.
are default constructed.<br> If the sequence has a handle acquired by other sequences (reference count > 1),
If the sequence has a handle acquired by other sequences then the remaining elements are copy constructed to a new sequence handle to keep
(reference count > 1), then the remaining elements are copy constructed value semantics!
to a new sequence handle to keep value semantics!
<br>
@param nSize new size of sequence @param nSize new size of sequence
*/ */
inline void SAL_CALL realloc( sal_Int32 nSize ) SAL_THROW( () ); inline void SAL_CALL realloc( sal_Int32 nSize ) SAL_THROW( () );
/** Provides UNacquired sequence handle.
@return UNacquired sequence handle
*/
inline uno_Sequence * SAL_CALL get() const SAL_THROW( () )
{ return _pSequence; }
}; };
/** Creates a UNO byte sequence from a SAL byte sequence. /** Creates a UNO byte sequence from a SAL byte sequence.
<br>
@param rByteSequence a byte sequence @param rByteSequence a byte sequence
@return a UNO byte sequence @return a UNO byte sequence
*/ */
@@ -266,7 +253,7 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
} }
/** Gets the meta type of IDL sequence. /** Gets the meta type of IDL sequence.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL sequence @return type of IDL sequence
*/ */
@@ -278,7 +265,7 @@ SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * ) SAL_THROW(
THE GIVEN ELEMENT TYPE MUST BE THE SAME AS THE CPP_UNO TYPE OF THE TEMPLATE ARGUMENT! THE GIVEN ELEMENT TYPE MUST BE THE SAME AS THE CPP_UNO TYPE OF THE TEMPLATE ARGUMENT!
This function has been introduced, because one cannot get the (templated) cppu type out This function has been introduced, because one cannot get the (templated) cppu type out
of C++ array types. Array types have special getCppuArrayTypeN<>() functions. of C++ array types. Array types have special getCppuArrayTypeN<>() functions.
<br>
@param rElementType element type of sequence @param rElementType element type of sequence
@return type of IDL sequence @return type of IDL sequence
*/ */
@@ -286,11 +273,11 @@ template< class S >
inline const ::com::sun::star::uno::Type & inline const ::com::sun::star::uno::Type &
SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType ) SAL_THROW( () ); SAL_CALL getCppuSequenceType( const ::com::sun::star::uno::Type & rElementType ) SAL_THROW( () );
/** Gets the meta type of IDL <b>sequence< char ></b>. /** Gets the meta type of IDL sequence< char >.
This function has been introduced due to ambiguities with unsigned short. This function has been introduced due to ambiguities with unsigned short.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL <b>sequence< char ></b> @return type of IDL sequence< char >
*/ */
inline const ::com::sun::star::uno::Type & inline const ::com::sun::star::uno::Type &
SAL_CALL getCharSequenceCppuType() SAL_THROW( () ); SAL_CALL getCharSequenceCppuType() SAL_THROW( () );

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: Type.h,v $ * $RCSfile: Type.h,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: dbo $ $Date: 2001-03-16 16:34:33 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -93,27 +93,23 @@ namespace uno
{ {
/** Enum defining UNO_TYPE_NO_ACQUIRE for type description reference transfer. /** Enum defining UNO_TYPE_NO_ACQUIRE for type description reference transfer.
<br>
*/ */
enum __UnoType_NoAcquire enum __UnoType_NoAcquire
{ {
/** This enum value can be used for creating a Type object granting a given /** This enum value can be used for creating a Type object granting a given type description
type description reference, i.e. transferring ownership to it. reference, i.e. transferring ownership to it.
<br>
*/ */
UNO_TYPE_NO_ACQUIRE UNO_TYPE_NO_ACQUIRE
}; };
/** C++ class representing an IDL meta type. /** C++ class representing an IDL meta type. This class is used to represent a a type,
This class is used to represent a a type, i.e. a type name and its type class.<br> i.e. a type name and its type class.
Internally the type holds a C type description reference of the runtime. Internally the type holds a C type description reference of the runtime.
You can obtain a full type description of a type by calling member function You can obtain a full type description of a type by calling member function getDescription().
getDescription().
<br>
*/ */
class Type class Type
{ {
/** the C typelib reference pointer<br> /** the C typelib reference pointer
*/ */
typelib_TypeDescriptionReference * _pType; typelib_TypeDescriptionReference * _pType;
@@ -128,118 +124,106 @@ public:
inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW( () ) inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW( () )
{} {}
/** Default Constructor: /** Default Constructor: Type is set to void.
Type is set to void.
<br>
*/ */
inline Type() SAL_THROW( () ); inline Type() SAL_THROW( () );
/** Constructor: /** Constructor: Type is constructed by given name and type class.
Type is constructed by given name and type class.
<br>
@param eTypeClass type class of type @param eTypeClass type class of type
@param rTypeName name of type @param rTypeName name of type
*/ */
inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW( () ); inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName ) SAL_THROW( () );
/** Constructor: /** Constructor: Type is constructed by given name and type class.
Type is constructed by given name and type class.
<br>
@param eTypeClass type class of type @param eTypeClass type class of type
@param pTypeName name of type @param pTypeName name of type
*/ */
inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW( () ); inline Type( TypeClass eTypeClass, const sal_Char * pTypeName ) SAL_THROW( () );
/** Constructor: /** Constructor: Type is (copy) constructed by given C type description reference.
Type is (copy) constructed by given C type description reference.
<br>
@param pType C type description reference @param pType C type description reference
*/ */
inline Type( typelib_TypeDescriptionReference * pType ) SAL_THROW( () ); inline Type( typelib_TypeDescriptionReference * pType ) SAL_THROW( () );
/** Constructor: /** Constructor: Type is (copy) constructed by given C type description reference
Type is (copy) constructed by given C type description reference without acquiring it. without acquiring it.
<br>
@param pType C type description reference @param pType C type description reference
@param dummy UNO_TYPE_NO_ACQUIRE to force obvious distinction to other constructors @param dummy UNO_TYPE_NO_ACQUIRE to force obvious distinction to other constructors
*/ */
inline Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) SAL_THROW( () ); inline Type( typelib_TypeDescriptionReference * pType, __UnoType_NoAcquire ) SAL_THROW( () );
/** Constructor: /** Constructor: Type is (copy) constructed by given C type description reference
Type is (copy) constructed by given C type description reference without acquiring it. without acquiring it.
<br>
@param pType C type description reference @param pType C type description reference
@param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors @param dummy SAL_NO_ACQUIRE to force obvious distinction to other constructors
*/ */
inline Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire ) SAL_THROW( () ); inline Type( typelib_TypeDescriptionReference * pType, __sal_NoAcquire ) SAL_THROW( () );
/** Copy constructor: /** Copy constructor: Type is copy constructed by given type.
Type is copy constructed by given type.
<br>
@param rType another type @param rType another type
*/ */
inline Type( const Type & rType ) SAL_THROW( () ); inline Type( const Type & rType ) SAL_THROW( () );
/** Destructor: /** Destructor: Releases acquired C type description reference.
Releases acquired C type description reference.
<br>
*/ */
inline ~Type() SAL_THROW( () ) inline ~Type() SAL_THROW( () )
{ ::typelib_typedescriptionreference_release( _pType ); } { ::typelib_typedescriptionreference_release( _pType ); }
/** Assignment operator: /** Assignment operator: Acquires right side type and releases previously set type.
Acquires right side type and releases previously set type.
<br>
@param rType another type (right side) @param rType another type (right side)
@return this type @return this type
*/ */
inline Type & SAL_CALL operator = ( const Type & rType ) SAL_THROW( () ); inline Type & SAL_CALL operator = ( const Type & rType ) SAL_THROW( () );
/** Gets the type class of set type. /** Gets the type class of set type.
<br>
@return type class of set type @return type class of set type
*/ */
inline TypeClass SAL_CALL getTypeClass() const SAL_THROW( () ) inline TypeClass SAL_CALL getTypeClass() const SAL_THROW( () )
{ return (TypeClass)_pType->eTypeClass; } { return (TypeClass)_pType->eTypeClass; }
/** Gets the name of the set type. /** Gets the name of the set type.
<br>
@return name of the set type @return name of the set type
*/ */
inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW( () ); inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW( () );
/** Obtains a full type description of set type. /** Obtains a full type description of set type.
<br>
@param ppDescr [inout] type description @param ppDescr [inout] type description
*/ */
inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const SAL_THROW( () ) inline void SAL_CALL getDescription( typelib_TypeDescription ** ppDescr ) const SAL_THROW( () )
{ ::typelib_typedescriptionreference_getDescription( ppDescr, _pType ); } { ::typelib_typedescriptionreference_getDescription( ppDescr, _pType ); }
/** Gets the C typelib type description reference pointer. /** Gets the C typelib type description reference pointer. Does not acquire the reference!
Does <b>not</b> acquire the reference!
<br> @return UNacquired type description reference
@return <b>un</b>acquired type description reference
*/ */
inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const SAL_THROW( () ) inline typelib_TypeDescriptionReference * SAL_CALL getTypeLibType() const SAL_THROW( () )
{ return _pType; } { return _pType; }
/** Compares two types. /** Compares two types.
<br>
@param rType another type @param rType another type
@return true if both types refer the same type, false otherwise @return true if both types refer the same type, false otherwise
*/ */
inline sal_Bool SAL_CALL equals( const Type & rType ) const SAL_THROW( () ) inline sal_Bool SAL_CALL equals( const Type & rType ) const SAL_THROW( () )
{ return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); } { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); }
/** Equality operator: /** Equality operator: Compares two types.
Compares two types.
<br>
@param rType another type @param rType another type
@return true if both types refer the same type, false otherwise @return true if both types refer the same type, false otherwise
*/ */
inline sal_Bool SAL_CALL operator == ( const Type & rType ) const SAL_THROW( () ) inline sal_Bool SAL_CALL operator == ( const Type & rType ) const SAL_THROW( () )
{ return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); } { return ::typelib_typedescriptionreference_equals( _pType, rType._pType ); }
/** Unequality operator: /** Unequality operator: Compares two types.
Compares two types.
<br>
@param rType another type @param rType another type
@return false if both types refer the same type, true otherwise @return false if both types refer the same type, true otherwise
*/ */
@@ -252,118 +236,118 @@ public:
} }
} }
/** Gets the meta type of IDL type <b>type</b>. /** Gets the meta type of IDL type "type".
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>type</b> @return type of IDL type "type"
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::sun::star::uno::Type * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>void</b>. /** Gets the meta type of IDL type void.
@return type of IDL type <b>void</b> @return type of IDL type void
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuVoidType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>void</b>. /** Gets the meta type of IDL type void.
<br>
@return type of IDL type <b>void</b> @return type of IDL type void
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getVoidCppuType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>boolean</b>. /** Gets the meta type of IDL type boolean.
<br>
@return type of IDL type <b>boolean</b> @return type of IDL type boolean
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuBooleanType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>boolean</b>. /** Gets the meta type of IDL type boolean.
<br>
@return type of IDL type <b>boolean</b> @return type of IDL type boolean
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getBooleanCppuType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>boolean</b>. /** Gets the meta type of IDL type boolean.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>boolean</b> @return type of IDL type boolean
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Bool * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>char</b>. /** Gets the meta type of IDL type char.
<br>
@return type of IDL type <b>char</b> @return type of IDL type char
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCharCppuType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>char</b>. /** Gets the meta type of IDL type char.
<br>
@return type of IDL type <b>char</b> @return type of IDL type char
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuCharType() SAL_THROW( () );
/** Gets the meta type of IDL type <b>byte</b>. /** Gets the meta type of IDL type byte.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>byte</b> @return type of IDL type byte
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int8 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>string</b>. /** Gets the meta type of IDL type string.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>string</b> @return type of IDL type string
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::rtl::OUString * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>short</b>. /** Gets the meta type of IDL type short.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>short</b> @return type of IDL type short
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int16 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>unsigned short</b>. /** Gets the meta type of IDL type unsigned short.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>unsigned short</b> @return type of IDL type unsigned short
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt16 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>long</b>. /** Gets the meta type of IDL type long.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>long</b> @return type of IDL type long
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int32 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>unsigned long</b>. /** Gets the meta type of IDL type unsigned long.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>unsigned long</b> @return type of IDL type unsigned long
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt32 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>hyper</b>. /** Gets the meta type of IDL type hyper.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>hyper</b> @return type of IDL type hyper
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_Int64 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>unsigned hyper</b>. /** Gets the meta type of IDL type unsigned hyper.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>unsigned hyper</b> @return type of IDL type unsigned hyper
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const sal_uInt64 * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>float</b>. /** Gets the meta type of IDL type float.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>float</b> @return type of IDL type float
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) SAL_THROW( () );
/** Gets the meta type of IDL type <b>double</b>. /** Gets the meta type of IDL type double.
<br>
@param dummy typed pointer for function signature @param dummy typed pointer for function signature
@return type of IDL type <b>double</b> @return type of IDL type double
*/ */
inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW( () ); inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW( () );

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: genfunc.h,v $ * $RCSfile: genfunc.h,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -79,19 +79,19 @@ namespace uno
extern "C" extern "C"
{ {
/** C function to acquire a C++ interface. /** C function to acquire a C++ interface.
<br>
@param pCppI C++ interface pointer @param pCppI C++ interface pointer
*/ */
inline void SAL_CALL cpp_acquire( void * pCppI ) inline void SAL_CALL cpp_acquire( void * pCppI )
SAL_THROW( () ); SAL_THROW( () );
/** C function to release a C++ interface. /** C function to release a C++ interface.
<br>
@param pCppI C++ interface pointer @param pCppI C++ interface pointer
*/ */
inline void SAL_CALL cpp_release( void * pCppI ) inline void SAL_CALL cpp_release( void * pCppI )
SAL_THROW( () ); SAL_THROW( () );
/** C function to query for a C++ interface. /** C function to query for a C++ interface.
<br>
@param pCppI C++ interface pointer @param pCppI C++ interface pointer
@param pType demanded interface type @param pType demanded interface type
@return acquired C++ interface pointer or null @return acquired C++ interface pointer or null

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: typeclass.h,v $ * $RCSfile: typeclass.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:25 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -65,67 +65,67 @@
#include <sal/types.h> #include <sal/types.h>
#endif #endif
/** This type class enum is binary compatible with the IDL enum /** This type class enum is binary compatible with the IDL enum com.sun.star.uno.TypeClass.
com.sun.star.uno.TypeClass.
*/ */
typedef enum _typelib_TypeClass typedef enum _typelib_TypeClass
{ {
/** type class of void<br> */ /** type class of void */
typelib_TypeClass_VOID = 0, typelib_TypeClass_VOID = 0,
/** type class of char<br> */ /** type class of char */
typelib_TypeClass_CHAR = 1, typelib_TypeClass_CHAR = 1,
/** type class of boolean<br> */ /** type class of boolean */
typelib_TypeClass_BOOLEAN = 2, typelib_TypeClass_BOOLEAN = 2,
/** type class of byte<br> */ /** type class of byte */
typelib_TypeClass_BYTE = 3, typelib_TypeClass_BYTE = 3,
/** type class of short<br> */ /** type class of short */
typelib_TypeClass_SHORT = 4, typelib_TypeClass_SHORT = 4,
/** type class of unsigned short<br> */ /** type class of unsigned short */
typelib_TypeClass_UNSIGNED_SHORT = 5, typelib_TypeClass_UNSIGNED_SHORT = 5,
/** type class of long<br> */ /** type class of long */
typelib_TypeClass_LONG = 6, typelib_TypeClass_LONG = 6,
/** type class of unsigned long<br> */ /** type class of unsigned long */
typelib_TypeClass_UNSIGNED_LONG = 7, typelib_TypeClass_UNSIGNED_LONG = 7,
/** type class of hyper<br> */ /** type class of hyper */
typelib_TypeClass_HYPER = 8, typelib_TypeClass_HYPER = 8,
/** type class of unsigned hyper<br> */ /** type class of unsigned hyper */
typelib_TypeClass_UNSIGNED_HYPER = 9, typelib_TypeClass_UNSIGNED_HYPER = 9,
/** type class of float<br> */ /** type class of float */
typelib_TypeClass_FLOAT = 10, typelib_TypeClass_FLOAT = 10,
/** type class of double<br> */ /** type class of double */
typelib_TypeClass_DOUBLE = 11, typelib_TypeClass_DOUBLE = 11,
/** type class of string<br> */ /** type class of string */
typelib_TypeClass_STRING = 12, typelib_TypeClass_STRING = 12,
/** type class of type<br> */ /** type class of type */
typelib_TypeClass_TYPE = 13, typelib_TypeClass_TYPE = 13,
/** type class of any<br> */ /** type class of any */
typelib_TypeClass_ANY = 14, typelib_TypeClass_ANY = 14,
/** type class of enum<br> */ /** type class of enum */
typelib_TypeClass_ENUM = 15, typelib_TypeClass_ENUM = 15,
/** type class of typedef<br> */ /** type class of typedef */
typelib_TypeClass_TYPEDEF = 16, typelib_TypeClass_TYPEDEF = 16,
/** type class of struct<br> */ /** type class of struct */
typelib_TypeClass_STRUCT = 17, typelib_TypeClass_STRUCT = 17,
/** type class of union<br> */ /** type class of union */
typelib_TypeClass_UNION = 18, typelib_TypeClass_UNION = 18,
/** type class of exception<br> */ /** type class of exception */
typelib_TypeClass_EXCEPTION = 19, typelib_TypeClass_EXCEPTION = 19,
/** type class of sequence<br> */ /** type class of sequence */
typelib_TypeClass_SEQUENCE = 20, typelib_TypeClass_SEQUENCE = 20,
/** type class of array (not impl)<br> */ /** type class of array */
typelib_TypeClass_ARRAY = 21, typelib_TypeClass_ARRAY = 21,
/** type class of interface<br> */ /** type class of interface */
typelib_TypeClass_INTERFACE = 22, typelib_TypeClass_INTERFACE = 22,
/** type class of service (not impl)<br> */ /** type class of service (not implemented) */
typelib_TypeClass_SERVICE = 23, typelib_TypeClass_SERVICE = 23,
/** type class of module (not impl)<br> */ /** type class of module (not implemented) */
typelib_TypeClass_MODULE = 24, typelib_TypeClass_MODULE = 24,
/** type class of interface method<br> */ /** type class of interface method */
typelib_TypeClass_INTERFACE_METHOD = 25, typelib_TypeClass_INTERFACE_METHOD = 25,
/** type class of interface attribute<br> */ /** type class of interface attribute */
typelib_TypeClass_INTERFACE_ATTRIBUTE = 26, typelib_TypeClass_INTERFACE_ATTRIBUTE = 26,
/** type class of unknown<br> */ /** type class of unknown */
typelib_TypeClass_UNKNOWN = 27, typelib_TypeClass_UNKNOWN = 27,
/** fixing enum size */
typelib_TypeClass_MAKE_FIXED_SIZE = SAL_MAX_ENUM typelib_TypeClass_MAKE_FIXED_SIZE = SAL_MAX_ENUM
} typelib_TypeClass; } typelib_TypeClass;

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: typedescription.h,v $ * $RCSfile: typedescription.h,v $
* *
* $Revision: 1.8 $ * $Revision: 1.9 $
* *
* last change: $Author: dbo $ $Date: 2001-07-03 16:09:01 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -88,405 +88,367 @@ struct _typelib_TypeDescription;
#endif #endif
/** Holds a weak reference to a type description. /** Holds a weak reference to a type description.
<br>
*/ */
typedef struct _typelib_TypeDescriptionReference typedef struct _typelib_TypeDescriptionReference
{ {
/** reference count of type; /** reference count of type; don't ever modify this by yourself, use
don't ever modify this by yourself, use typelib_typedescriptionreference_acquire() and typelib_typedescriptionreference_release()
typelib_typedescriptionreference_acquire() and
typelib_typedescriptionreference_release()
<br>
*/ */
sal_Int32 nRefCount; sal_Int32 nRefCount;
/** number of static references of type, /** number of static references of type, because of the fact that some types are needed
because of the fact that some types are needed
until program termination and are commonly held static. until program termination and are commonly held static.
<br>
*/ */
sal_Int32 nStaticRefCount; sal_Int32 nStaticRefCount;
/** type class of type<br> /** type class of type
*/ */
typelib_TypeClass eTypeClass; typelib_TypeClass eTypeClass;
/** fully qualified name of type<br> /** fully qualified name of type
*/ */
rtl_uString * pTypeName; rtl_uString * pTypeName;
/** pointer to full typedescription; this value is only valid if /** pointer to full typedescription; this value is only valid if the type is never swapped out
the type is never swapped out<br>
*/ */
struct _typelib_TypeDescription * pType; struct _typelib_TypeDescription * pType;
/** pointer to optimize the runtime; not for public use<br> /** pointer to optimize the runtime; not for public use
*/ */
void * pUniqueIdentifier; void * pUniqueIdentifier;
/** reserved for future use; 0 if not used<br> /** reserved for future use; 0 if not used
*/ */
void * pReserved; void * pReserved;
} typelib_TypeDescriptionReference; } typelib_TypeDescriptionReference;
/** Full type description of a type. Memory layout of this struct /** Full type description of a type. Memory layout of this struct is identical to the
is identical to the typelib_TypeDescriptionReference for the first six members. typelib_TypeDescriptionReference for the first six members.
So a typedescription can be used as type reference. So a typedescription can be used as type reference.
<br>
*/ */
typedef struct _typelib_TypeDescription typedef struct _typelib_TypeDescription
{ {
/** reference count; /** reference count; don't ever modify this by yourself, use
don't ever modify this by yourself, use typelib_typedescription_acquire() and typelib_typedescription_release()
typelib_typedescription_acquire() and
typelib_typedescription_release()
<br>
*/ */
sal_Int32 nRefCount; sal_Int32 nRefCount;
/** number of static references of type, /** number of static references of type, because of the fact that some types are needed
because of the fact that some types are needed
until program termination and are commonly held static. until program termination and are commonly held static.
<br>
*/ */
sal_Int32 nStaticRefCount; sal_Int32 nStaticRefCount;
/** type class of type<br> /** type class of type
*/ */
typelib_TypeClass eTypeClass; typelib_TypeClass eTypeClass;
/** fully qualified name of type<br> /** fully qualified name of type
*/ */
rtl_uString * pTypeName; rtl_uString * pTypeName;
/** pointer to self to distinguish reference from description; /** pointer to self to distinguish reference from description; for internal use only
for internal use only<br>
*/ */
struct _typelib_TypeDescription * pSelf; struct _typelib_TypeDescription * pSelf;
/** pointer to optimize the runtime; not for public use<br> /** pointer to optimize the runtime; not for public use
*/ */
void * pUniqueIdentifier; void * pUniqueIdentifier;
/** reserved for future use; 0 if not used<br> /** reserved for future use; 0 if not used
*/ */
void * pReserved; void * pReserved;
/** flag to determine whether the description is complete: /** flag to determine whether the description is complete:
compound and union types lack of member names, compound and union types lack of member names, enums lack of member types and names,
enums lack of member types and names,
interfaces lack of members and table init. interfaces lack of members and table init.
Call typelib_typedescription_complete() if false. Call typelib_typedescription_complete() if false.
<br>
*/ */
sal_Bool bComplete; sal_Bool bComplete;
/** size of type<br> /** size of type
*/ */
sal_Int32 nSize; sal_Int32 nSize;
/** alignment of type<br> /** alignment of type
*/ */
sal_Int32 nAlignment; sal_Int32 nAlignment;
/** pointer to weak reference<br> /** pointer to weak reference
*/ */
typelib_TypeDescriptionReference * pWeakRef; typelib_TypeDescriptionReference * pWeakRef;
/** determines, if type can be unloaded (and it is possible to reloaded it)<br> /** determines, if type can be unloaded (and it is possible to reloaded it)
*/ */
sal_Bool bOnDemand; sal_Bool bOnDemand;
} typelib_TypeDescription; } typelib_TypeDescription;
/** Type description of a struct or exception. /** Type description of a struct or exception.
<br>
*/ */
typedef struct _typelib_CompoundTypeDescription typedef struct _typelib_CompoundTypeDescription
{ {
/** inherits all members of typelib_TypeDescription<br> /** inherits all members of typelib_TypeDescription
*/ */
typelib_TypeDescription aBase; typelib_TypeDescription aBase;
/** pointer to base type description, else 0<br> /** pointer to base type description, else 0
*/ */
struct _typelib_CompoundTypeDescription * pBaseTypeDescription; struct _typelib_CompoundTypeDescription * pBaseTypeDescription;
/** number of members<br> /** number of members
*/ */
sal_Int32 nMembers; sal_Int32 nMembers;
/** byte offsets of each member including the size the base type<br> /** byte offsets of each member including the size the base type
*/ */
sal_Int32 * pMemberOffsets; sal_Int32 * pMemberOffsets;
/** members of the struct or exception<br> /** members of the struct or exception
*/ */
typelib_TypeDescriptionReference ** ppTypeRefs; typelib_TypeDescriptionReference ** ppTypeRefs;
/** member names of the struct or exception<br> /** member names of the struct or exception
*/ */
rtl_uString ** ppMemberNames; rtl_uString ** ppMemberNames;
} typelib_CompoundTypeDescription; } typelib_CompoundTypeDescription;
/** Type description of a union.<br> /** Type description of a union. The type class of this description is typelib_TypeClass_UNION.
The type class of this description is typelib_TypeClass_UNION.
<br>
*/ */
typedef struct _typelib_UnionTypeDescription typedef struct _typelib_UnionTypeDescription
{ {
/** inherits all members of typelib_TypeDescription<br> /** inherits all members of typelib_TypeDescription
*/ */
typelib_TypeDescription aBase; typelib_TypeDescription aBase;
/** type of the discriminant<br> /** type of the discriminant
*/ */
typelib_TypeDescriptionReference * pDiscriminantTypeRef; typelib_TypeDescriptionReference * pDiscriminantTypeRef;
/** union default descriminant<br> /** union default descriminant
*/ */
sal_Int64 nDefaultDiscriminant; sal_Int64 nDefaultDiscriminant;
/** union default member type (may be 0)<br> /** union default member type (may be 0)
*/ */
typelib_TypeDescriptionReference * pDefaultTypeRef; typelib_TypeDescriptionReference * pDefaultTypeRef;
/** number of union member types<br> /** number of union member types
*/ */
sal_Int32 nMembers; sal_Int32 nMembers;
/** union member discriminant values (same order as idl declaration)<br> /** union member discriminant values (same order as idl declaration)
*/ */
sal_Int64 * pDiscriminants; sal_Int64 * pDiscriminants;
/** union member value types (same order as idl declaration)<br> /** union member value types (same order as idl declaration)
*/ */
typelib_TypeDescriptionReference ** ppTypeRefs; typelib_TypeDescriptionReference ** ppTypeRefs;
/** union member value names (same order as idl declaration)<br> /** union member value names (same order as idl declaration)
*/ */
rtl_uString ** ppMemberNames; rtl_uString ** ppMemberNames;
/** union value offset for data access<br> /** union value offset for data access
*/ */
sal_Int32 nValueOffset; sal_Int32 nValueOffset;
} typelib_UnionTypeDescription; } typelib_UnionTypeDescription;
/** Type description of an array or sequence. /** Type description of an array or sequence.
<br>
*/ */
typedef struct _typelib_IndirectTypeDescription typedef struct _typelib_IndirectTypeDescription
{ {
/** inherits all members of typelib_TypeDescription<br> /** inherits all members of typelib_TypeDescription
*/ */
typelib_TypeDescription aBase; typelib_TypeDescription aBase;
/** array, sequence: pointer to element type<br> /** array, sequence: pointer to element type
*/ */
typelib_TypeDescriptionReference * pType; typelib_TypeDescriptionReference * pType;
} typelib_IndirectTypeDescription; } typelib_IndirectTypeDescription;
/** Type description of an array. /** Type description of an array.
<br>
*/ */
typedef struct _typelib_ArrayTypeDescription typedef struct _typelib_ArrayTypeDescription
{ {
/** inherits all members of typelib_IndirectTypeDescription<br> /** inherits all members of typelib_IndirectTypeDescription
*/ */
typelib_IndirectTypeDescription aBase; typelib_IndirectTypeDescription aBase;
/** number of dimensions<br> /** number of dimensions
*/ */
sal_Int32 nDimensions; sal_Int32 nDimensions;
/** number of total array elements<br> /** number of total array elements
*/ */
sal_Int32 nTotalElements; sal_Int32 nTotalElements;
/** array of dimensions<br> /** array of dimensions
*/ */
sal_Int32 * pDimensions; sal_Int32 * pDimensions;
} typelib_ArrayTypeDescription; } typelib_ArrayTypeDescription;
/** Type description of an enum.<br> /** Type description of an enum. The type class of this description is typelib_TypeClass_ENUM.
The type class of this description is typelib_TypeClass_ENUM.
<br>
*/ */
typedef struct _typelib_EnumTypeDescription typedef struct _typelib_EnumTypeDescription
{ {
/** inherits all members of typelib_TypeDescription<br> /** inherits all members of typelib_TypeDescription
*/ */
typelib_TypeDescription aBase; typelib_TypeDescription aBase;
/** first value of the enum<br> /** first value of the enum
*/ */
sal_Int32 nDefaultEnumValue; sal_Int32 nDefaultEnumValue;
/** number of enum values<br> /** number of enum values
*/ */
sal_Int32 nEnumValues; sal_Int32 nEnumValues;
/** names of enum values<br> /** names of enum values
*/ */
rtl_uString ** ppEnumNames; rtl_uString ** ppEnumNames;
/** values of enum (corresponding to names in similar order)<br> /** values of enum (corresponding to names in similar order)
*/ */
sal_Int32 * pEnumValues; sal_Int32 * pEnumValues;
} typelib_EnumTypeDescription; } typelib_EnumTypeDescription;
/** Description of an interface method parameter. /** Description of an interface method parameter.
<br>
*/ */
typedef struct _typelib_MethodParameter typedef struct _typelib_MethodParameter
{ {
/** name of parameter<br> /** name of parameter
*/ */
rtl_uString * pName; rtl_uString * pName;
/** type of parameter<br> /** type of parameter
*/ */
typelib_TypeDescriptionReference * pTypeRef; typelib_TypeDescriptionReference * pTypeRef;
/** true: the call type of this parameter is [in] or [inout] /** true: the call type of this parameter is [in] or [inout]
false: the call type of this parameter is [out]<br> false: the call type of this parameter is [out]
*/ */
sal_Bool bIn; sal_Bool bIn;
/** true: the call type of this parameter is [out] or [inout] /** true: the call type of this parameter is [out] or [inout]
false: the call type of this parameter is [in]<br> false: the call type of this parameter is [in]
*/ */
sal_Bool bOut; sal_Bool bOut;
} typelib_MethodParameter; } typelib_MethodParameter;
/** Common base type description of /** Common base type description of typelib_InterfaceMemberTypeDescription and
typelib_InterfaceMemberTypeDescription and
typelib_InterfaceAttributeTypeDescription. typelib_InterfaceAttributeTypeDescription.
<br>
*/ */
typedef struct _typelib_InterfaceMemberTypeDescription typedef struct _typelib_InterfaceMemberTypeDescription
{ {
/** inherits all members of typelib_TypeDescription<br> /** inherits all members of typelib_TypeDescription
*/ */
typelib_TypeDescription aBase; typelib_TypeDescription aBase;
/** position of member in the interface including the number of members /** position of member in the interface including the number of members of the base interface
of the base interface<br>
*/ */
sal_Int32 nPosition; sal_Int32 nPosition;
/** name of member<br> /** name of member
*/ */
rtl_uString * pMemberName; rtl_uString * pMemberName;
} typelib_InterfaceMemberTypeDescription; } typelib_InterfaceMemberTypeDescription;
/** Type description of an interface method.<br> /** Type description of an interface method. The type class of this description is
The type class of this description is typelib_TypeClass_INTERFACE_METHOD. typelib_TypeClass_INTERFACE_METHOD. The size and the alignment are 0.
The size and the alignment are 0.
<br>
*/ */
typedef struct _typelib_InterfaceMethodTypeDescription typedef struct _typelib_InterfaceMethodTypeDescription
{ {
/** inherits all members of typelib_InterfaceMemberTypeDescription<br> /** inherits all members of typelib_InterfaceMemberTypeDescription
*/ */
typelib_InterfaceMemberTypeDescription aBase; typelib_InterfaceMemberTypeDescription aBase;
/** type of the return value<br> /** type of the return value
*/ */
typelib_TypeDescriptionReference * pReturnTypeRef; typelib_TypeDescriptionReference * pReturnTypeRef;
/** number of parameters<br> /** number of parameters
*/ */
sal_Int32 nParams; sal_Int32 nParams;
/** array of parameters<br> /** array of parameters
*/ */
typelib_MethodParameter * pParams; typelib_MethodParameter * pParams;
/** number of exceptions<br> /** number of exceptions
*/ */
sal_Int32 nExceptions; sal_Int32 nExceptions;
/** array of exception types<br> /** array of exception types
*/ */
typelib_TypeDescriptionReference ** ppExceptions; typelib_TypeDescriptionReference ** ppExceptions;
/** determines whether method is declared oneway<br> /** determines whether method is declared oneway
*/ */
sal_Bool bOneWay; sal_Bool bOneWay;
} typelib_InterfaceMethodTypeDescription; } typelib_InterfaceMethodTypeDescription;
/** The description of an interface attribute.<br> /** The description of an interface attribute. The type class of this description is
The type class of this description is typelib_TypeClass_INTERFACE_ATTRIBUTE. typelib_TypeClass_INTERFACE_ATTRIBUTE. The size and the alignment are 0.
The size and the alignment are 0.
<br>
*/ */
typedef struct _typelib_InterfaceAttributeTypeDescription typedef struct _typelib_InterfaceAttributeTypeDescription
{ {
/** inherits all members of typelib_InterfaceMemberTypeDescription<br> /** inherits all members of typelib_InterfaceMemberTypeDescription
*/ */
typelib_InterfaceMemberTypeDescription aBase; typelib_InterfaceMemberTypeDescription aBase;
/** determines whether attribute is read only<br> /** determines whether attribute is read only
*/ */
sal_Bool bReadOnly; sal_Bool bReadOnly;
/** type of the attribute<br> /** type of the attribute
*/ */
typelib_TypeDescriptionReference * pAttributeTypeRef; typelib_TypeDescriptionReference * pAttributeTypeRef;
} typelib_InterfaceAttributeTypeDescription; } typelib_InterfaceAttributeTypeDescription;
/** Type description of an interface. /** Type description of an interface.
<br>
*/ */
typedef struct _typelib_InterfaceTypeDescription typedef struct _typelib_InterfaceTypeDescription
{ {
/** inherits all members of typelib_TypeDescription<br> /** inherits all members of typelib_TypeDescription
*/ */
typelib_TypeDescription aBase; typelib_TypeDescription aBase;
/** pointer to base type description, else 0<br> /** pointer to base type description, else 0
*/ */
struct _typelib_InterfaceTypeDescription * pBaseTypeDescription; struct _typelib_InterfaceTypeDescription * pBaseTypeDescription;
/** unique identifier of interface<br> /** unique identifier of interface
*/ */
typelib_Uik aUik; typelib_Uik aUik;
/** number of members<br> /** number of members
*/ */
sal_Int32 nMembers; sal_Int32 nMembers;
/** array of members; references attributes or methods<br> /** array of members; references attributes or methods
*/ */
typelib_TypeDescriptionReference ** ppMembers; typelib_TypeDescriptionReference ** ppMembers;
/** number of members including members of base interface<br> /** number of members including members of base interface
*/ */
sal_Int32 nAllMembers; sal_Int32 nAllMembers;
/** array of members including members of base interface; /** array of members including members of base interface; references attributes or methods
references attributes or methods<br>
*/ */
typelib_TypeDescriptionReference ** ppAllMembers; typelib_TypeDescriptionReference ** ppAllMembers;
/** array mapping index of the member description to an index /** array mapping index of the member description to an index doubling for read-write
doubling for read-write attributes (called function index); attributes (called function index); size of array is nAllMembers
size of array is nAllMembers<br>
*/ */
sal_Int32 * pMapMemberIndexToFunctionIndex; sal_Int32 * pMapMemberIndexToFunctionIndex;
/** number of members plus number of read-write attributes<br> /** number of members plus number of read-write attributes
*/ */
sal_Int32 nMapFunctionIndexToMemberIndex; sal_Int32 nMapFunctionIndexToMemberIndex;
/** array mapping function index to member index; /** array mapping function index to member index; size of arry is nMapFunctionIndexToMemberIndex
size of arry is nMapFunctionIndexToMemberIndex<br>
*/ */
sal_Int32 * pMapFunctionIndexToMemberIndex; sal_Int32 * pMapFunctionIndexToMemberIndex;
} typelib_InterfaceTypeDescription; } typelib_InterfaceTypeDescription;
/** Init struct of compound members for typelib_typedescription_new(). /** Init struct of compound members for typelib_typedescription_new().
<br>
*/ */
typedef struct _typelib_CompoundMember_Init typedef struct _typelib_CompoundMember_Init
{ {
/** type class of compound member<br> /** type class of compound member
*/ */
typelib_TypeClass eTypeClass; typelib_TypeClass eTypeClass;
/** name of type of compound member<br> /** name of type of compound member
*/ */
rtl_uString * pTypeName; rtl_uString * pTypeName;
/** name of compound member<br> /** name of compound member
*/ */
rtl_uString * pMemberName; rtl_uString * pMemberName;
} typelib_CompoundMember_Init; } typelib_CompoundMember_Init;
/** Init struct of interface methods for typelib_typedescription_new(). /** Init struct of interface methods for typelib_typedescription_new().
<br>
*/ */
typedef struct _typelib_Parameter_Init typedef struct _typelib_Parameter_Init
{ {
/** type class of parameter<br> /** type class of parameter
*/ */
typelib_TypeClass eTypeClass; typelib_TypeClass eTypeClass;
/** name of parameter<br> /** name of parameter
*/ */
rtl_uString * pTypeName; rtl_uString * pTypeName;
/** name of parameter<br> /** name of parameter
*/ */
rtl_uString * pParamName; rtl_uString * pParamName;
/** true, if parameter is [in] or [inout]<br> /** true, if parameter is [in] or [inout]
*/ */
sal_Bool bIn; sal_Bool bIn;
/** true, if parameter is [out] or [inout]<br> /** true, if parameter is [out] or [inout]
*/ */
sal_Bool bOut; sal_Bool bOut;
} typelib_Parameter_Init; } typelib_Parameter_Init;
/** Init struct of union types for typelib_typedescription_newUnion(). /** Init struct of union types for typelib_typedescription_newUnion().
<br>
*/ */
typedef struct _typelib_Union_Init typedef struct _typelib_Union_Init
{ {
/** union member discriminant<br> /** union member discriminant
*/ */
sal_Int64 nDiscriminant; sal_Int64 nDiscriminant;
/** union member name<br> /** union member name
*/ */
rtl_uString * pMemberName; rtl_uString * pMemberName;
/** union member type<br> /** union member type
*/ */
typelib_TypeDescriptionReference* pTypeRef; typelib_TypeDescriptionReference* pTypeRef;
} typelib_Union_Init; } typelib_Union_Init;
@@ -498,10 +460,9 @@ typedef struct _typelib_Union_Init
#endif #endif
/** Creates a union type description.<br> /** Creates a union type description. All discriminants are handled as int64 values.
All discriminants are handled as int64 values.
The pDiscriminantTypeRef must be of type byte, short, ..., up to hyper. The pDiscriminantTypeRef must be of type byte, short, ..., up to hyper.
<br>
@param ppRet inout union type description @param ppRet inout union type description
@param pTypeName name of union type @param pTypeName name of union type
@param pDiscriminantTypeRef discriminant type @param pDiscriminantTypeRef discriminant type
@@ -521,7 +482,7 @@ void SAL_CALL typelib_typedescription_newUnion(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Creates an enum type description. /** Creates an enum type description.
<br>
@param ppRet inout enum type description @param ppRet inout enum type description
@param pTypeName name of enum @param pTypeName name of enum
@param nDefaultEnumValue default enum value @param nDefaultEnumValue default enum value
@@ -539,7 +500,7 @@ void SAL_CALL typelib_typedescription_newEnum(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Creates an array type description. /** Creates an array type description.
<br>
@param ppRet inout enum type description @param ppRet inout enum type description
@param pElementTypeRef element type @param pElementTypeRef element type
@param nDimensions number of dimensions @param nDimensions number of dimensions
@@ -553,7 +514,7 @@ void SAL_CALL typelib_typedescription_newArray(
SAL_THROW_EXTERN_C (); SAL_THROW_EXTERN_C ();
/** Creates a new type description. /** Creates a new type description.
<br>
@param ppRet inout type description @param ppRet inout type description
@param eTypeClass type class @param eTypeClass type class
@param pTypeName name of type @param pTypeName name of type
@@ -572,7 +533,7 @@ void SAL_CALL typelib_typedescription_new(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Creates an interface type description. /** Creates an interface type description.
<br>
@param ppRet inout interface type description @param ppRet inout interface type description
@param pTypeName the fully qualified name of the interface. @param pTypeName the fully qualified name of the interface.
@param nUik1 uik part @param nUik1 uik part
@@ -594,7 +555,7 @@ void SAL_CALL typelib_typedescription_newInterface(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Creates an interface method type description. /** Creates an interface method type description.
<br>
@param ppRet inout method type description @param ppRet inout method type description
@param nAbsolutePosition position of member including all members of base interfaces @param nAbsolutePosition position of member including all members of base interfaces
@param bOneWay determines whether method is declared oneway @param bOneWay determines whether method is declared oneway
@@ -620,7 +581,7 @@ void SAL_CALL typelib_typedescription_newInterfaceMethod(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Creates an interface attribute type description. /** Creates an interface attribute type description.
<br>
@param ppRet inout attribute type description @param ppRet inout attribute type description
@param nAbsolutePosition position of this attribute including all members of base interfaces @param nAbsolutePosition position of this attribute including all members of base interfaces
@param pTypeName fully qualified name of attribute including interface name @param pTypeName fully qualified name of attribute including interface name
@@ -637,25 +598,25 @@ void SAL_CALL typelib_typedescription_newInterfaceAttribute(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Increments reference count of given type description. /** Increments reference count of given type description.
<br>
@param pDesc type description @param pDesc type description
*/ */
void SAL_CALL typelib_typedescription_acquire( void SAL_CALL typelib_typedescription_acquire(
typelib_TypeDescription * pDesc ) typelib_TypeDescription * pDesc )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Decrements reference count of given type.<br> /** Decrements reference count of given type. If reference count reaches 0, the trype description
If reference count reaches 0, the trype description is deleted. is deleted.
<br>
@param pDesc type description @param pDesc type description
*/ */
void SAL_CALL typelib_typedescription_release( void SAL_CALL typelib_typedescription_release(
typelib_TypeDescription * pDesc ) typelib_TypeDescription * pDesc )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Registers a type description and creates a type description reference.<br> /** Registers a type description and creates a type description reference. Type descriptions
Type descriptions will be registered automatically if they are provided will be registered automatically if they are provided via the callback chain.
via the callback chain.
@param ppNewDescription inout description to be registered; @param ppNewDescription inout description to be registered;
*/ */
void SAL_CALL typelib_typedescription_register( void SAL_CALL typelib_typedescription_register(
@@ -663,7 +624,7 @@ void SAL_CALL typelib_typedescription_register(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Tests whether two types descriptions are equal, i.e. type class and names are equal. /** Tests whether two types descriptions are equal, i.e. type class and names are equal.
<br>
@param p1 a type description @param p1 a type description
@param p2 another type description @param p2 another type description
@return true, if type descriptions are equal @return true, if type descriptions are equal
@@ -673,7 +634,7 @@ sal_Bool SAL_CALL typelib_typedescription_equals(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Retrieves a type description via its fully qualified name. /** Retrieves a type description via its fully qualified name.
<br>
@param ppRet inout type description; *ppRet is 0, if type description was not found @param ppRet inout type description; *ppRet is 0, if type description was not found
@param pName name demanded type description @param pName name demanded type description
*/ */
@@ -682,16 +643,16 @@ void SAL_CALL typelib_typedescription_getByName(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Sets size of type description cache. /** Sets size of type description cache.
<br>
@param nNewSize new size of cache @param nNewSize new size of cache
*/ */
void SAL_CALL typelib_setCacheSize( void SAL_CALL typelib_setCacheSize(
sal_Int32 nNewSize ) sal_Int32 nNewSize )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Function pointer declaration of callback function get additional descriptions. /** Function pointer declaration of callback function get additional descriptions. Callbacks
Callbacks <b>must</b> provide <b>complete</b> type descriptions! must provide complete type descriptions (see typelib_typedescription_complete())!
<br>
@param pContext callback context @param pContext callback context
@param ppRet inout type description @param ppRet inout type description
@param pTypeName name of demanded type description @param pTypeName name of demanded type description
@@ -700,7 +661,7 @@ typedef void (SAL_CALL * typelib_typedescription_Callback)(
void * pContext, typelib_TypeDescription ** ppRet, rtl_uString * pTypeName ); void * pContext, typelib_TypeDescription ** ppRet, rtl_uString * pTypeName );
/** Registers callback function providing additional type descriptions. /** Registers callback function providing additional type descriptions.
<br>
@param pContext callback context @param pContext callback context
@param pCallback callback function @param pCallback callback function
*/ */
@@ -709,7 +670,7 @@ void SAL_CALL typelib_typedescription_registerCallback(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Revokes a previously registered callback function. /** Revokes a previously registered callback function.
<br>
@param pContext callback context @param pContext callback context
@param pCallback registered callback function @param pCallback registered callback function
*/ */
@@ -722,21 +683,19 @@ void SAL_CALL typelib_typedescription_revokeCallback(
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
/* Returns true, if the type description reference may lose the type /* Returns true, if the type description reference may lose the type description. Otherwise
description. Otherwise pType is a valid pointer and cannot pType is a valid pointer and cannot be discarded through the lifetime of this reference.
be discarded through the lifetime of this reference. Remark: If the pWeakObj of the type is set too, you can avoid the call of
Remark: If the pWeakObj of the type is set too, you can avoid ...getDescription(...) and use the description directly. pWeakObj == 0 means, that the
the call of ...getDescription(...) and use the description description is not initialized.
direct. pWeakObj == 0 means, that the description is not
initialized.
*/ */
#define TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( eTypeClass ) \ #define TYPELIB_TYPEDESCRIPTIONREFERENCE_ISREALLYWEAK( eTypeClass ) \
((eTypeClass) == typelib_TypeClass_INTERFACE_METHOD || \ ((eTypeClass) == typelib_TypeClass_INTERFACE_METHOD || \
(eTypeClass) == typelib_TypeClass_INTERFACE_ATTRIBUTE) (eTypeClass) == typelib_TypeClass_INTERFACE_ATTRIBUTE)
/* Gets a description from the reference. The description may not be locked /* Gets a description from the reference. The description may not be locked by this call.
by this call. You must use the TYPELIB_DANGER_RELEASE macro to release You must use the TYPELIB_DANGER_RELEASE macro to release the description fetched with
the description fetched with this macro. this macro.
*/ */
#define TYPELIB_DANGER_GET( ppDescription, pTypeRef ) \ #define TYPELIB_DANGER_GET( ppDescription, pTypeRef ) \
{ \ { \
@@ -766,10 +725,9 @@ void SAL_CALL typelib_typedescription_revokeCallback(
typelib_typedescription_release( pDescription ); \ typelib_typedescription_release( pDescription ); \
} }
/** Creates a type description reference.<br> /** Creates a type description reference. This is a weak reference not holding the description.
This is a weak reference <b>not</b> holding the description.
If the description is already registered, the previous one is returned. If the description is already registered, the previous one is returned.
<br>
@param ppTDR inout type description reference @param ppTDR inout type description reference
@param eTypeClass type class of type @param eTypeClass type class of type
@param pTypeName name of type @param pTypeName name of type
@@ -780,10 +738,9 @@ void SAL_CALL typelib_typedescriptionreference_new(
rtl_uString * pTypeName ) rtl_uString * pTypeName )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Creates a type description reference.<br> /** Creates a type description reference. This is a weak reference not holding the description.
This is a weak reference <b>not</b> holding the description.
If the description is already registered, the previous one is returned. If the description is already registered, the previous one is returned.
<br>
@param ppTDR inout type description reference @param ppTDR inout type description reference
@param eTypeClass type class of type @param eTypeClass type class of type
@param pTypeName ascii name of type @param pTypeName ascii name of type
@@ -795,25 +752,25 @@ void SAL_CALL typelib_typedescriptionreference_newByAsciiName(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Increments reference count of type description reference. /** Increments reference count of type description reference.
<br>
@param pRef type description reference @param pRef type description reference
*/ */
void SAL_CALL typelib_typedescriptionreference_acquire( void SAL_CALL typelib_typedescriptionreference_acquire(
typelib_TypeDescriptionReference * pRef ) typelib_TypeDescriptionReference * pRef )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Increments reference count of type description reference. /** Increments reference count of type description reference. If the reference count reaches 0,
If the reference count reaches 0, the reference is deleted. then the reference is deleted.
<br>
@param pRef type description reference @param pRef type description reference
*/ */
void SAL_CALL typelib_typedescriptionreference_release( void SAL_CALL typelib_typedescriptionreference_release(
typelib_TypeDescriptionReference * pRef ) typelib_TypeDescriptionReference * pRef )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Retrieves the type description for a given reference.<br> /** Retrieves the type description for a given reference. If it is not possible to resolve the
If it is not possible to resolve the reference, null is returned. reference, null is returned.
<br>
@param ppRet inout type description @param ppRet inout type description
*/ */
void SAL_CALL typelib_typedescriptionreference_getDescription( void SAL_CALL typelib_typedescriptionreference_getDescription(
@@ -821,7 +778,7 @@ void SAL_CALL typelib_typedescriptionreference_getDescription(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Tests whether two types description references are equal, i.e. type class and names are equal. /** Tests whether two types description references are equal, i.e. type class and names are equal.
<br>
@param p1 a type description reference @param p1 a type description reference
@param p2 another type description reference @param p2 another type description reference
@return true, if type description references are equal @return true, if type description references are equal
@@ -831,7 +788,7 @@ sal_Bool SAL_CALL typelib_typedescriptionreference_equals(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Assigns a type. /** Assigns a type.
<br>
@param ppDest destination type @param ppDest destination type
@param pSource source type @param pSource source type
*/ */
@@ -840,10 +797,9 @@ void SAL_CALL typelib_typedescriptionreference_assign(
typelib_TypeDescriptionReference * pSource ) typelib_TypeDescriptionReference * pSource )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Tests if values of type pAssignable can be assigned by values of type pFrom. /** Tests if values of type pAssignable can be assigned by values of type pFrom. This includes
This includes widening conversion (e.g., long assignable from short), as long widening conversion (e.g., long assignable from short), as long as there is no data loss.
as there is <b>no</b> data loss.
<br>
@param pAssignable type description of value to be assigned @param pAssignable type description of value to be assigned
@param pFrom type description of value @param pFrom type description of value
*/ */
@@ -852,10 +808,9 @@ sal_Bool SAL_CALL typelib_typedescription_isAssignableFrom(
typelib_TypeDescription * pFrom ) typelib_TypeDescription * pFrom )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Tests if values of type pAssignable can be assigned by values of type pFrom. /** Tests if values of type pAssignable can be assigned by values of type pFrom. This includes
This includes widening conversion (e.g., long assignable from short), as long widening conversion (e.g., long assignable from short), as long as there is no data loss.
as there is <b>no</b> data loss.
<br>
@param pAssignable type of value to be assigned @param pAssignable type of value to be assigned
@param pFrom type of value @param pFrom type of value
*/ */
@@ -865,12 +820,11 @@ sal_Bool SAL_CALL typelib_typedescriptionreference_isAssignableFrom(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Gets static type reference of standard types by type class. /** Gets static type reference of standard types by type class.
==OPTIMIZATION HACK==: ADDITIONAL OPT: provides Type com.sun.star.uno.Exception for typelib_TypeClass_EXCEPTION
provides Type com.sun.star.uno.Exception for typelib_TypeClass_EXCEPTION and com.sun.star.uno.XInterface for typelib_TypeClass_INTERFACE.
and com.sun.star.uno.XInterface for typelib_TypeClass_INTERFACE.
<br>
Thread synchronizes on typelib mutex. Thread synchronizes on typelib mutex.
<br>
@param eTypeClass type class of basic type @param eTypeClass type class of basic type
@return pointer to type reference pointer @return pointer to type reference pointer
*/ */
@@ -878,9 +832,8 @@ typelib_TypeDescriptionReference ** SAL_CALL typelib_static_type_getByTypeClass(
typelib_TypeClass eTypeClass ) typelib_TypeClass eTypeClass )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Inits static type reference. /** Inits static type reference. Thread synchronizes on typelib init mutex.
Thread synchronizes on typelib init mutex.
<br>
@param ppRef pointer to type reference pointer @param ppRef pointer to type reference pointer
@param eTypeClass type class of type @param eTypeClass type class of type
@param pTypeName ascii name of type @param pTypeName ascii name of type
@@ -890,9 +843,8 @@ void SAL_CALL typelib_static_type_init(
typelib_TypeClass eTypeClass, const sal_Char * pTypeName ) typelib_TypeClass eTypeClass, const sal_Char * pTypeName )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Inits static sequence type reference. /** Inits static sequence type reference. Thread synchronizes on typelib init mutex.
Thread synchronizes on typelib init mutex.
<br>
@param ppRef pointer to type reference pointer @param ppRef pointer to type reference pointer
@param pElementType element type of sequence @param pElementType element type of sequence
*/ */
@@ -901,9 +853,8 @@ void SAL_CALL typelib_static_sequence_type_init(
typelib_TypeDescriptionReference * pElementType ) typelib_TypeDescriptionReference * pElementType )
SAL_THROW_EXTERN_C (); SAL_THROW_EXTERN_C ();
/** Inits static array type reference. /** Inits static array type reference. Thread synchronizes on typelib init mutex.
Thread synchronizes on typelib init mutex.
<br>
@param ppRef pointer to type reference pointer @param ppRef pointer to type reference pointer
@param pElementType element type of sequence @param pElementType element type of sequence
@param nDimensions number of dimensions @param nDimensions number of dimensions
@@ -915,9 +866,8 @@ void SAL_CALL typelib_static_array_type_init(
sal_Int32 nDimensions, ... ) sal_Int32 nDimensions, ... )
SAL_THROW_EXTERN_C (); SAL_THROW_EXTERN_C ();
/** Inits <b>in</b>complete static compound type reference. /** Inits incomplete static compound type reference. Thread synchronizes on typelib init mutex.
Thread synchronizes on typelib init mutex.
<br>
@param ppRef pointer to type reference pointer @param ppRef pointer to type reference pointer
@param eTypeClass typelib_TypeClass_STRUCT or typelib_TypeClass_EXCEPTION @param eTypeClass typelib_TypeClass_STRUCT or typelib_TypeClass_EXCEPTION
@param pTypeName name of type @param pTypeName name of type
@@ -932,9 +882,8 @@ void SAL_CALL typelib_static_compound_type_init(
sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers ) sal_Int32 nMembers, typelib_TypeDescriptionReference ** ppMembers )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Inits <b>in</b>complete static interface type reference. /** Inits incomplete static interface type reference. Thread synchronizes on typelib init mutex.
Thread synchronizes on typelib init mutex.
<br>
@param ppRef pointer to type reference pointer @param ppRef pointer to type reference pointer
@param pTypeName name of interface @param pTypeName name of interface
@param pBaseType base type @param pBaseType base type
@@ -945,9 +894,8 @@ void SAL_CALL typelib_static_interface_type_init(
typelib_TypeDescriptionReference * pBaseType ) typelib_TypeDescriptionReference * pBaseType )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Inits <b>in</b>complete static enum type reference. /** Inits incomplete static enum type reference. Thread synchronizes on typelib init mutex.
Thread synchronizes on typelib init mutex.
<br>
@param ppRef pointer to type reference pointer @param ppRef pointer to type reference pointer
@param pTypeName name of enum @param pTypeName name of enum
@param nDefaultEnumValue default enum value @param nDefaultEnumValue default enum value
@@ -958,11 +906,10 @@ void SAL_CALL typelib_static_enum_type_init(
sal_Int32 nDefaultValue ) sal_Int32 nDefaultValue )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Inits <b>in</b>complete static compound type reference. /** Inits incomplete static compound type reference. Thread synchronizes on typelib init mutex.
Thread synchronizes on typelib init mutex. All discriminants are handled as int64 values. The pDiscriminantTypeRef must be of
All discriminants are handled as int64 values. type byte, short, ..., up to hyper.
The pDiscriminantTypeRef must be of type byte, short, ..., up to hyper.
<br>
@param ppRef pointer to type reference pointer @param ppRef pointer to type reference pointer
@param pTypeName name of union type @param pTypeName name of union type
@param pDiscriminantType discriminant type @param pDiscriminantType discriminant type
@@ -983,11 +930,11 @@ void SAL_CALL typelib_static_union_type_init(
typelib_TypeDescriptionReference ** pMemberTypes ) typelib_TypeDescriptionReference ** pMemberTypes )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Completes a typedescription to be used for, e.g., marshalling values. /** Completes a typedescription to be used for, e.g., marshalling values. COMPOUND, UNION,
COMPOUND, UNION, INTERFACE and ENUM type descriptions may be partly INTERFACE and ENUM type descriptions may be partly initialized (see typelib_static_...(),
initialized (see typelib_static_...(), typelib_TypeDescription::bComplete). typelib_TypeDescription::bComplete). For interface type descriptions, this will also
For interface type descriptions, this will also init index tables. init index tables.
<br>
@param ppTypeDescr [inout] type description to be completed (may be exchanged!) @param ppTypeDescr [inout] type description to be completed (may be exchanged!)
@return true, if type description is complete @return true, if type description is complete
*/ */

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: typedescription.hxx,v $ * $RCSfile: typedescription.hxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2001-03-09 12:10:55 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -85,77 +85,71 @@ namespace uno
{ {
/** C++ wrapper for typelib_TypeDescription. /** C++ wrapper for typelib_TypeDescription.
Constructors by name, type, type description reference will get Constructors by name, type, type description reference will get the full type description.
the full type description.
<br>
*/ */
class TypeDescription class TypeDescription
{ {
/** C typelib type description<br> /** C typelib type description
*/ */
mutable typelib_TypeDescription * _pTypeDescr; mutable typelib_TypeDescription * _pTypeDescr;
public: public:
/** Constructor: /** Constructor:
<br>
@param pTypeDescr a type description @param pTypeDescr a type description
*/ */
inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ) SAL_THROW( () ); inline TypeDescription( typelib_TypeDescription * pTypeDescr = 0 ) SAL_THROW( () );
/** Constructor: /** Constructor:
<br>
@param pTypeDescrRef a type description reference @param pTypeDescrRef a type description reference
*/ */
inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) SAL_THROW( () ); inline TypeDescription( typelib_TypeDescriptionReference * pTypeDescrRef ) SAL_THROW( () );
/** Constructor: /** Constructor:
<br>
@param rType a type @param rType a type
*/ */
inline TypeDescription( const ::com::sun::star::uno::Type & rType ) SAL_THROW( () ); inline TypeDescription( const ::com::sun::star::uno::Type & rType ) SAL_THROW( () );
/** Copy constructor: /** Copy constructor:
<br>
@param rDescr another TypeDescription @param rDescr another TypeDescription
*/ */
inline TypeDescription( const TypeDescription & rDescr ) SAL_THROW( () ); inline TypeDescription( const TypeDescription & rDescr ) SAL_THROW( () );
/** Constructor: /** Constructor:
<br>
@param pTypeName a type name @param pTypeName a type name
*/ */
inline TypeDescription( rtl_uString * pTypeName ) SAL_THROW( () ); inline TypeDescription( rtl_uString * pTypeName ) SAL_THROW( () );
/** Constructor: /** Constructor:
<br>
@param rTypeName a type name @param rTypeName a type name
*/ */
inline TypeDescription( const ::rtl::OUString & rTypeName ) SAL_THROW( () ); inline TypeDescription( const ::rtl::OUString & rTypeName ) SAL_THROW( () );
/** Destructor: /** Destructor: releases type description
<br>
releases type description
*/ */
inline ~TypeDescription() SAL_THROW( () ); inline ~TypeDescription() SAL_THROW( () );
/** Assignment operator: /** Assignment operator: acquires given type description and releases a set one.
acquires given type description and releases a set one.
<br>
@param pTypeDescr another type description @param pTypeDescr another type description
@return this TypeDescription @return this TypeDescription
*/ */
inline TypeDescription & SAL_CALL operator = ( typelib_TypeDescription * pTypeDescr ) SAL_THROW( () ); inline TypeDescription & SAL_CALL operator = ( typelib_TypeDescription * pTypeDescr ) SAL_THROW( () );
/** Assignment operator: /** Assignment operator: acquires given type description and releases a set one.
acquires given type description and releases a set one.
<br>
@param rTypeDescr another type description @param rTypeDescr another type description
@return this TypeDescription @return this TypeDescription
*/ */
inline TypeDescription & SAL_CALL operator =( const TypeDescription & rTypeDescr ) SAL_THROW( () ) inline TypeDescription & SAL_CALL operator =( const TypeDescription & rTypeDescr ) SAL_THROW( () )
{ return this->operator =( rTypeDescr.get() ); } { return this->operator =( rTypeDescr.get() ); }
/** Tests if two type descriptions are equal. /** Tests whether two type descriptions are equal.
<br>
@param pTypeDescr another type description @param pTypeDescr another type description
@return true, if both type descriptions are equal, false otherwise @return true, if both type descriptions are equal, false otherwise
*/ */
inline sal_Bool SAL_CALL equals( const typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () ); inline sal_Bool SAL_CALL equals( const typelib_TypeDescription * pTypeDescr ) const SAL_THROW( () );
/** Tests if two type descriptions are equal. /** Tests whether two type descriptions are equal.
<br>
@param rTypeDescr another type description @param rTypeDescr another type description
@return true, if both type descriptions are equal, false otherwise @return true, if both type descriptions are equal, false otherwise
*/ */
@@ -163,18 +157,17 @@ public:
{ return equals( rTypeDescr._pTypeDescr ); } { return equals( rTypeDescr._pTypeDescr ); }
/** Makes stored type description complete. /** Makes stored type description complete.
<br>
*/ */
inline void SAL_CALL makeComplete() const SAL_THROW( () ); inline void SAL_CALL makeComplete() const SAL_THROW( () );
/** Gets the <b>un</b>acquired type description pointer. /** Gets the UNacquired type description pointer.
<br>
@return stored pointer of type description @return stored pointer of type description
*/ */
inline typelib_TypeDescription * SAL_CALL get() const SAL_THROW( () ) inline typelib_TypeDescription * SAL_CALL get() const SAL_THROW( () )
{ return _pTypeDescr; } { return _pTypeDescr; }
/** Tests if a type description is set. /** Tests if a type description is set.
<br>
@return true, if a type description is set, false otherwise @return true, if a type description is set, false otherwise
*/ */
inline sal_Bool SAL_CALL is() const SAL_THROW( () ) inline sal_Bool SAL_CALL is() const SAL_THROW( () )

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: uik.h,v $ * $RCSfile: uik.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2000-12-21 14:35:25 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -71,7 +71,7 @@
# pragma pack(8) # pragma pack(8)
#endif #endif
/** Binary typelib uik struct. /** Binary typelib uik struct. Currently not used anymore.
*/ */
typedef struct _typelib_Uik typedef struct _typelib_Uik
{ {

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: any2.h,v $ * $RCSfile: any2.h,v $
* *
* $Revision: 1.7 $ * $Revision: 1.8 $
* *
* last change: $Author: dbo $ $Date: 2001-07-06 11:05:13 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -84,7 +84,6 @@ struct _typelib_TypeDescription;
struct _uno_Mapping; struct _uno_Mapping;
/** This is the binary specification of an UNO any. /** This is the binary specification of an UNO any.
<br>
*/ */
typedef struct _uno_Any typedef struct _uno_Any
{ {
@@ -92,8 +91,8 @@ typedef struct _uno_Any
*/ */
struct _typelib_TypeDescriptionReference * pType; struct _typelib_TypeDescriptionReference * pType;
/** pointer to value; this may point to pReserved and thus the uno_Any is not anytime /** pointer to value; this may point to pReserved and thus the uno_Any is not anytime
mem-copyable! You may have to correct the pData pointer to pReserved. mem-copyable! You may have to correct the pData pointer to pReserved. Otherwise you need
Otherwise you need not, because the data is stored in heap space. not, because the data is stored in heap space.
*/ */
void * pData; void * pData;
/** reserved space for storing value /** reserved space for storing value
@@ -107,28 +106,32 @@ typedef struct _uno_Any
#pragma pack() #pragma pack()
#endif #endif
/** Assign an any with a given value. /** Assign an any with a given value. Interfaces are acquired or released by the given callback
Interfaces are acquired or released by the given callback functions. functions.
@param pDest pointer memory of destination any @param pDest pointer memory of destination any
@param pSource pointer to source value; defaults (0) to default constructed value @param pSource pointer to source value; defaults (0) to default constructed value
@param pTypeDescr type description of value; defaults (0) to void @param pTypeDescr type description of value; defaults (0) to void
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
@param release function called each time an interface needs to be released; defaults (0) to uno defaults (0) to uno
@param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_any_assign( void SAL_CALL uno_any_assign(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
struct _typelib_TypeDescription * pTypeDescr, struct _typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Assign an any with a given value. /** Assign an any with a given value. Interfaces are acquired or released by the given callback
Interfaces are acquired or released by the given callback functions. functions.
@param pDest pointer memory of destination any @param pDest pointer memory of destination any
@param pSource pointer to source value; defaults (0) to default constructed value @param pSource pointer to source value; defaults (0) to default constructed value
@param pTypeDescr type description of value; defaults (0) to void @param pTypeDescr type description of value; defaults (0) to void
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
@param release function called each time an interface needs to be released; defaults (0) to uno defaults (0) to uno
@param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_type_any_assign( void SAL_CALL uno_type_any_assign(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
@@ -136,26 +139,26 @@ void SAL_CALL uno_type_any_assign(
uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_AcquireFunc acquire, uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Constructs an any with a given value. /** Constructs an any with a given value. Interfaces are acquired by the given callback function.
Interfaces are acquired by the given callback function.
@param pDest pointer memory of destination any @param pDest pointer memory of destination any
@param pSource pointer to source value; defaults (0) to default constructed value @param pSource pointer to source value; defaults (0) to default constructed value
@param pTypeDescr type description of value; defaults (0) to void @param pTypeDescr type description of value; defaults (0) to void
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
defaults (0) to uno
*/ */
void SAL_CALL uno_any_construct( void SAL_CALL uno_any_construct(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
struct _typelib_TypeDescription * pTypeDescr, struct _typelib_TypeDescription * pTypeDescr,
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Constructs an any with a given value. /** Constructs an any with a given value. Interfaces are acquired by the given callback function.
Interfaces are acquired by the given callback function.
@param pDest pointer memory of destination any @param pDest pointer memory of destination any
@param pSource pointer to source value; defaults (0) to default constructed value @param pSource pointer to source value; defaults (0) to default constructed value
@param pType type of value; defaults (0) to void @param pType type of value; defaults (0) to void
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
defaults (0) to uno
*/ */
void SAL_CALL uno_type_any_construct( void SAL_CALL uno_type_any_construct(
uno_Any * pDest, void * pSource, uno_Any * pDest, void * pSource,
@@ -191,7 +194,8 @@ void SAL_CALL uno_type_any_constructAndConvert(
/** Destructs an any. /** Destructs an any.
@param pValue pointer to any @param pValue pointer to any
@param release function called each time an interface needs to be released. defaults (0) to uno @param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_any_destruct( void SAL_CALL uno_any_destruct(
uno_Any * pValue, uno_ReleaseFunc release ) uno_Any * pValue, uno_ReleaseFunc release )

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: cuno.h,v $ * $RCSfile: cuno.h,v $
* *
* $Revision: 1.1 $ * $Revision: 1.2 $
* *
* last change: $Author: jsc $ $Date: 2001-04-23 10:37:08 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -69,8 +69,8 @@
#define CUNO_ERROR_CALL_FAILED (1 << 31) #define CUNO_ERROR_CALL_FAILED (1 << 31)
#define CUNO_ERROR_EXCEPTION (1 | CUNO_ERROR_CALL_FAILED) #define CUNO_ERROR_EXCEPTION (1 | CUNO_ERROR_CALL_FAILED)
#define CUNO_CALL( p ) (*p) #define CUNO_CALL( interface_pointer ) (*interface_pointer)
#define CUNO_EXCEPTION_OCCURED( x ) (0 != ((x) & CUNO_ERROR_EXCEPTION)) #define CUNO_EXCEPTION_OCCURED( return_code ) (0 != ((return_code) & CUNO_ERROR_EXCEPTION))
typedef sal_Int32 cuno_ErrorCode; typedef sal_Int32 cuno_ErrorCode;

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: data.h,v $ * $RCSfile: data.h,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: dbo $ $Date: 2001-04-17 13:29:24 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -76,7 +76,7 @@ struct _typelib_InterfaceTypeDescription;
struct _uno_Mapping; struct _uno_Mapping;
/** Generic function pointer declaration to query for an interface. /** Generic function pointer declaration to query for an interface.
<br>
@param pInterface interface @param pInterface interface
@param pTypedemanded interface type @param pTypedemanded interface type
@return interface pointer @return interface pointer
@@ -84,20 +84,20 @@ struct _uno_Mapping;
typedef void * (SAL_CALL * uno_QueryInterfaceFunc)( typedef void * (SAL_CALL * uno_QueryInterfaceFunc)(
void * pInterface, struct _typelib_TypeDescriptionReference * pType ); void * pInterface, struct _typelib_TypeDescriptionReference * pType );
/** Generic function pointer declaration to acquire an interface. /** Generic function pointer declaration to acquire an interface.
<br>
@param pInterface interface to be acquired @param pInterface interface to be acquired
*/ */
typedef void (SAL_CALL * uno_AcquireFunc)( typedef void (SAL_CALL * uno_AcquireFunc)(
void * pInterface ); void * pInterface );
/** Generic function pointer declaration to release an interface. /** Generic function pointer declaration to release an interface.
<br>
@param pInterface interface to be release @param pInterface interface to be release
*/ */
typedef void (SAL_CALL * uno_ReleaseFunc)( typedef void (SAL_CALL * uno_ReleaseFunc)(
void * pInterface ); void * pInterface );
/** Tests if two values are equal. May compare different types (e.g., short to long). /** Tests if two values are equal. May compare different types (e.g., short to long).
<br>
@param pVal1 pointer to a value @param pVal1 pointer to a value
@param pVal1TypeDescr type description of pVal1 @param pVal1TypeDescr type description of pVal1
@param pVal2 pointer to another value @param pVal2 pointer to another value
@@ -113,7 +113,7 @@ sal_Bool SAL_CALL uno_equalData(
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Tests if two values are equal. May compare different types (e.g., short to long). /** Tests if two values are equal. May compare different types (e.g., short to long).
<br>
@param pVal1 pointer to a value @param pVal1 pointer to a value
@param pVal1Type type of pVal1 @param pVal1Type type of pVal1
@param pVal2 pointer to another value @param pVal2 pointer to another value
@@ -129,35 +129,36 @@ sal_Bool SAL_CALL uno_type_equalData(
uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Copy construct memory with given value. /** Copy construct memory with given value. The size of the destination value must be larger
The size of the destination value must be larger or equal to the size of the source value. or equal to the size of the source value.
<br>
@param pDest pointer to destination value memory @param pDest pointer to destination value memory
@param pSource pointer to source value @param pSource pointer to source value
@param pTypeDescr type description of source @param pTypeDescr type description of source
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
defaults (0) to uno
*/ */
void SAL_CALL uno_copyData( void SAL_CALL uno_copyData(
void * pDest, void * pSource, void * pDest, void * pSource,
struct _typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire ) struct _typelib_TypeDescription * pTypeDescr, uno_AcquireFunc acquire )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Copy construct memory with given value. /** Copy construct memory with given value. The size of the destination value must be larger
The size of the destination value must be larger or equal to the size of the source value. or equal to the size of the source value.
<br>
@param pDest pointer to destination value memory @param pDest pointer to destination value memory
@param pSource pointer to source value @param pSource pointer to source value
@param pType type of source @param pType type of source
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
defaults (0) to uno
*/ */
void SAL_CALL uno_type_copyData( void SAL_CALL uno_type_copyData(
void * pDest, void * pSource, void * pDest, void * pSource,
struct _typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire ) struct _typelib_TypeDescriptionReference * pType, uno_AcquireFunc acquire )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Copy construct memory with given value. /** Copy construct memory with given value. The size of the destination value must be larger
The size of the destination value must be larger or equal to the size of the source value.<br> or equal to the size of the source value. Interfaces are converted/ mapped by mapping parameter.
Interfaces are converted/ mapped by mapping parameter.
<br>
@param pDest pointer to destination value memory @param pDest pointer to destination value memory
@param pSource pointer to source value @param pSource pointer to source value
@param pTypeDescr type description of source @param pTypeDescr type description of source
@@ -167,10 +168,9 @@ void SAL_CALL uno_copyAndConvertData(
void * pDest, void * pSource, void * pDest, void * pSource,
struct _typelib_TypeDescription * pTypeDescr, struct _uno_Mapping * mapping ) struct _typelib_TypeDescription * pTypeDescr, struct _uno_Mapping * mapping )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Copy construct memory with given value. /** Copy construct memory with given value. The size of the destination value must be larger
The size of the destination value must be larger or equal to the size of the source value.<br> or equal to the size of the source value. Interfaces are converted/ mapped by mapping parameter.
Interfaces are converted/ mapped by mapping parameter.
<br>
@param pDest pointer to destination value memory @param pDest pointer to destination value memory
@param pSource pointer to source value @param pSource pointer to source value
@param pType type of source @param pType type of source
@@ -181,37 +181,37 @@ void SAL_CALL uno_type_copyAndConvertData(
struct _typelib_TypeDescriptionReference * pType, struct _uno_Mapping * mapping ) struct _typelib_TypeDescriptionReference * pType, struct _uno_Mapping * mapping )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Destructs a given value; does <b>not</b> free its memory! /** Destructs a given value; does NOT free its memory!
<br>
@param pValue value to be destructed @param pValue value to be destructed
@param pTypeDescr type description of value @param pTypeDescr type description of value
@param release function called each time an interface pointer needs to be released; defaults (0) to uno @param release function called each time an interface pointer needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_destructData( void SAL_CALL uno_destructData(
void * pValue, struct _typelib_TypeDescription * pTypeDescr, uno_ReleaseFunc release ) void * pValue, struct _typelib_TypeDescription * pTypeDescr, uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Destructs a given value; does <b>not</b> free its memory! /** Destructs a given value; does NOT free its memory!
<br>
@param pValue value to be destructed @param pValue value to be destructed
@param pType type of value @param pType type of value
@param release function called each time an interface pointer needs to be released; defaults (0) to uno @param release function called each time an interface pointer needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_type_destructData( void SAL_CALL uno_type_destructData(
void * pValue, struct _typelib_TypeDescriptionReference * pType, uno_ReleaseFunc release ) void * pValue, struct _typelib_TypeDescriptionReference * pType, uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Default constructs a value. All simple types are set to 0, enums are set to their default /** Default constructs a value. All simple types are set to 0, enums are set to their default value.
value.
<br>
@param pMem pointer to memory of value to be constructed @param pMem pointer to memory of value to be constructed
@param pTypeDescr type description of value to be constructed @param pTypeDescr type description of value to be constructed
*/ */
void SAL_CALL uno_constructData( void SAL_CALL uno_constructData(
void * pMem, struct _typelib_TypeDescription * pTypeDescr ) void * pMem, struct _typelib_TypeDescription * pTypeDescr )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Default constructs a value. All simple types are set to 0, enums are set to their default /** Default constructs a value. All simple types are set to 0, enums are set to their default value.
value.
<br>
@param pMem pointer to memory of value to be constructed @param pMem pointer to memory of value to be constructed
@param pType type of value to be constructed @param pType type of value to be constructed
*/ */
@@ -219,17 +219,21 @@ void SAL_CALL uno_type_constructData(
void * pMem, struct _typelib_TypeDescriptionReference * pType ) void * pMem, struct _typelib_TypeDescriptionReference * pType )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Assigns a destination value with a source value. Widening conversion /** Assigns a destination value with a source value. Widening conversion WITHOUT data loss is
<b>without</b> data loss is allowed (e.g., assigning a long with a short). allowed (e.g., assigning a long with a short). Assignment from any value to a value of type
Assignment from any value to a value of type Any and vice versa is allowed. Any and vice versa is allowed.
<br>
@param pDest pointer to destination value @param pDest pointer to destination value
@param pDestTypeDescr type description of destination value @param pDestTypeDescr type description of destination value
@param pSource pointer to source value; if 0, then destination value will be assigned to default value @param pSource pointer to source value; if 0, then destination value will be assigned
to default value
@param pSourceTypeDescr type destination of source value @param pSourceTypeDescr type destination of source value
@param queryInterface function called each time an interface needs to be queried; defaults (0) to uno @param queryInterface function called each time an interface needs to be queried;
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno defaults (0) to uno
@param release function called each time an interface needs to be released; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
defaults (0) to uno
@param release function called each time an interface needs to be released;
defaults (0) to uno
@return true if destination has been successfully assigned @return true if destination has been successfully assigned
*/ */
sal_Bool SAL_CALL uno_assignData( sal_Bool SAL_CALL uno_assignData(
@@ -237,17 +241,21 @@ sal_Bool SAL_CALL uno_assignData(
void * pSource, struct _typelib_TypeDescription * pSourceTypeDescr, void * pSource, struct _typelib_TypeDescription * pSourceTypeDescr,
uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release ) uno_QueryInterfaceFunc queryInterface, uno_AcquireFunc acquire, uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Assigns a destination value with a source value. Widening conversion /** Assigns a destination value with a source value. Widening conversion WITHOUT data loss is
<b>without</b> data loss is allowed (e.g., assigning a long with a short). allowed (e.g., assigning a long with a short). Assignment from any value to a value of type
Assignment from any value to a value of type Any and vice versa is allowed. Any and vice versa is allowed.
<br>
@param pDest pointer to destination value @param pDest pointer to destination value
@param pDestType type of destination value @param pDestType type of destination value
@param pSource pointer to source value; if 0, then destination value will be assigned to default value @param pSource pointer to source value; if 0, then destination value will be assigned
to default value
@param pSourceType type of source value @param pSourceType type of source value
@param queryInterface function called each time an interface needs to be queried; defaults (0) to uno @param queryInterface function called each time an interface needs to be queried;
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno defaults (0) to uno
@param release function called each time an interface needs to be released; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
defaults (0) to uno
@param release function called each time an interface needs to be released;
defaults (0) to uno
@return true if destination has been successfully assigned @return true if destination has been successfully assigned
*/ */
sal_Bool SAL_CALL uno_type_assignData( sal_Bool SAL_CALL uno_type_assignData(

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: dispatcher.h,v $ * $RCSfile: dispatcher.h,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2001-04-17 13:29:24 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -80,13 +80,12 @@ extern "C"
struct _typelib_TypeDescription; struct _typelib_TypeDescription;
struct _uno_Interface; struct _uno_Interface;
/** Function pointer declaration for the binary C uno dispatch function.<br> /** Function pointer declaration for the binary C uno dispatch function. Any pure out or return
Any pure out or return value will be constructed by the callee, iff value will be constructed by the callee, iff no exception is signalled.
no exception is signalled.<br> If an exception is signalled, the any *ppException is properly constructed by the callee,
If an exception is signalled, the any *ppException is properly constructed otherwise the pointer *ppException is set to 0.
by the callee, otherwise the pointer *ppException is set to 0.<br> An attribute get call is indicated by a non-null return pointer.
An attribute <b>get</b> call is indicated by a non-null return pointer.
<br>
@param pUnoI uno interface the call is performed on @param pUnoI uno interface the call is performed on
@param pMemberType member type description of a method or attribute @param pMemberType member type description of a method or attribute
@param pReturn pointer to return value memory; @param pReturn pointer to return value memory;
@@ -94,7 +93,7 @@ struct _uno_Interface;
@param pArgs an array of pointers to arguments values. @param pArgs an array of pointers to arguments values.
(remark: the value of an interface reference stores a (remark: the value of an interface reference stores a
uno_interface *, so you get it by *(uno_Interface **)pArgs[n]) uno_interface *, so you get it by *(uno_Interface **)pArgs[n])
@param ppException pointer to pointer to unconstructed any to signal an exception. @param ppException pointer to pointer to unconstructed any to signal an exception.
*/ */
typedef void (SAL_CALL * uno_DispatchMethod)( typedef void (SAL_CALL * uno_DispatchMethod)(
struct _uno_Interface * pUnoI, struct _uno_Interface * pUnoI,
@@ -110,17 +109,16 @@ typedef void (SAL_CALL * uno_DispatchMethod)(
#endif #endif
/** The binary C uno interface description. /** The binary C uno interface description.
<br>
*/ */
typedef struct _uno_Interface typedef struct _uno_Interface
{ {
/** Acquires uno interface. /** Acquires uno interface.
<br>
@param pInterface uno interface @param pInterface uno interface
*/ */
void (SAL_CALL * acquire)( struct _uno_Interface * pInterface ); void (SAL_CALL * acquire)( struct _uno_Interface * pInterface );
/** Releases uno interface. /** Releases uno interface.
<br>
@param pInterface uno interface @param pInterface uno interface
*/ */
void (SAL_CALL * release)( struct _uno_Interface * pInterface ); void (SAL_CALL * release)( struct _uno_Interface * pInterface );

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: environment.h,v $ * $RCSfile: environment.h,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: dbo $ $Date: 2001-04-27 08:24:08 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -83,56 +83,54 @@ struct _typelib_InterfaceTypeDescription;
#endif #endif
/** The binary specification of an UNO environment. /** The binary specification of an UNO environment.
<br>
*/ */
typedef struct _uno_Environment typedef struct _uno_Environment
{ {
/** reserved for future use (0 if not used)<br> /** reserved for future use (0 if not used)
*/ */
void * pReserved; void * pReserved;
/** type name of environment<br> /** type name of environment
*/ */
rtl_uString * pTypeName; rtl_uString * pTypeName;
/** free context pointer to be used for specific classes of environments /** free context pointer to be used for specific classes of environments (e.g., a jvm pointer)
(e.g., a jvm pointer)<br>
*/ */
void * pContext; void * pContext;
/** pointer to extended environment (interface registration functionality), if supported<br> /** pointer to extended environment (interface registration functionality), if supported
*/ */
struct _uno_ExtEnvironment * pExtEnv; struct _uno_ExtEnvironment * pExtEnv;
/** Acquires this environment. /** Acquires this environment.
<br>
@param pEnv this environment @param pEnv this environment
*/ */
void (SAL_CALL * acquire)( struct _uno_Environment * pEnv ); void (SAL_CALL * acquire)( struct _uno_Environment * pEnv );
/** Releases this environment; /** Releases this environment; last release of environment will revoke the environment from
last release of environment will revoke the environment from runtime. runtime.
<br>
@param pEnv this environment @param pEnv this environment
*/ */
void (SAL_CALL * release)( struct _uno_Environment * pEnv ); void (SAL_CALL * release)( struct _uno_Environment * pEnv );
/** Acquires this environment weakly. You can only harden a weakly held environment /** Acquires this environment weakly. You can only harden a weakly held environment if it
if it is still acquired hard (acquire()). is still acquired hard (acquire()).
<br>
@param pEnv this environment @param pEnv this environment
*/ */
void (SAL_CALL * acquireWeak)( struct _uno_Environment * pEnv ); void (SAL_CALL * acquireWeak)( struct _uno_Environment * pEnv );
/** Releases this environment weakly in correspondence to acquireWeak(). /** Releases this environment weakly in correspondence to acquireWeak().
<br>
@param pEnv this environment @param pEnv this environment
*/ */
void (SAL_CALL * releaseWeak)( struct _uno_Environment * pEnv ); void (SAL_CALL * releaseWeak)( struct _uno_Environment * pEnv );
/** Makes hard reference out of weak referenced environment. /** Makes hard reference out of weak referenced environment. You can only harden a weakly
You can only harden a weakly held environment if it is still acquired hard (acquire()). held environment if it is still acquired hard (acquire()).
<br>
@param ppHardEnv inout hard referenced environment (has to be released via release()) @param ppHardEnv inout hard referenced environment (has to be released via release())
@param pEnv environment (may be weak referenced) @param pEnv environment (may be weak referenced)
*/ */
@@ -140,10 +138,9 @@ typedef struct _uno_Environment
struct _uno_Environment ** ppHardEnv, struct _uno_Environment ** ppHardEnv,
struct _uno_Environment * pEnv ); struct _uno_Environment * pEnv );
/** Call this function to <b>explicitly</b> dispose this environment /** Call this function to EXPLICITLY dispose this environment (e.g., release all
(e.g., release all interfaces).<br> interfaces). You may want to call this function before shutting down due to a runtime error.
You might want to call this function before shutting down due to a runtime error.
<br>
@param pEnv this environment @param pEnv this environment
*/ */
void (SAL_CALL * dispose)( struct _uno_Environment * pEnv ); void (SAL_CALL * dispose)( struct _uno_Environment * pEnv );
@@ -151,45 +148,42 @@ typedef struct _uno_Environment
/* ===== the following part will be late initialized by a matching bridge ===== * /* ===== the following part will be late initialized by a matching bridge ===== *
* ===== and is NOT for public use. ===== */ * ===== and is NOT for public use. ===== */
/** <b>CALLBACK</b><br> /** CALLBACK function pointer: Disposing callback function pointer that can be set to get
Disposing callback function pointer that can be set to get signalled before the environment signalled before the environment is destroyed.
is destroyed.
<br>
@param pEnv environment that is being disposed @param pEnv environment that is being disposed
*/ */
void (SAL_CALL * environmentDisposing)( struct _uno_Environment * pEnv ); void (SAL_CALL * environmentDisposing)( struct _uno_Environment * pEnv );
} uno_Environment; } uno_Environment;
/** Generic function pointer declaration to free a proxy object if it is not needed /** Generic function pointer declaration to free a proxy object if it is not needed by the
by the environment anymore.<br> environment anymore.
Any proxy object must register itself on first acquire() call and revoke Any proxy object must register itself on first acquire() call and revoke itself on last
itself on last release() call. release() call. This can happen several times because the environment caches proxy objects
This can happen several times because the environment caches proxy objects until the environment explicitly frees the proxy object calling this function.
until the environment <b>explicitly</b> frees the proxy object calling this function.
<br>
@param pEnv environment @param pEnv environment
@param pProxy proxy pointer @param pProxy proxy pointer
*/ */
typedef void (SAL_CALL * uno_freeProxyFunc)( struct _uno_ExtEnvironment * pEnv, void * pProxy ); typedef void (SAL_CALL * uno_freeProxyFunc)( struct _uno_ExtEnvironment * pEnv, void * pProxy );
/** Generic function pointer declaration to allocate memory. Used with getRegisteredInterfaces(). /** Generic function pointer declaration to allocate memory. Used with getRegisteredInterfaces().
<br>
@param nBytes amount of memory in bytes @param nBytes amount of memory in bytes
@return pointer to allocated memory @return pointer to allocated memory
*/ */
typedef void * (SAL_CALL * uno_memAlloc)( sal_uInt32 nBytes ); typedef void * (SAL_CALL * uno_memAlloc)( sal_uInt32 nBytes );
/** The binary specification of an UNO environment supporting interface registration. /** The binary specification of an UNO environment supporting interface registration.
<br>
*/ */
typedef struct _uno_ExtEnvironment typedef struct _uno_ExtEnvironment
{ {
/** inherits all members of an uno_Environment<br> /** inherits all members of an uno_Environment
*/ */
uno_Environment aBase; uno_Environment aBase;
/** Registers an interface of this environment. /** Registers an interface of this environment.
<br>
@param pEnv this environment @param pEnv this environment
@param ppInterface inout parameter of interface to be registered @param ppInterface inout parameter of interface to be registered
@param pOId object id of interface @param pOId object id of interface
@@ -201,9 +195,9 @@ typedef struct _uno_ExtEnvironment
rtl_uString * pOId, rtl_uString * pOId,
struct _typelib_InterfaceTypeDescription * pTypeDescr ); struct _typelib_InterfaceTypeDescription * pTypeDescr );
/** Registers a proxy interface of this environment that can be reanimated and is /** Registers a proxy interface of this environment that can be reanimated and is freed
freed <b>explicitly</b> by this environment. explicitly by this environment.
<br>
@param pEnv this environment @param pEnv this environment
@param ppInterface inout parameter of interface to be registered @param ppInterface inout parameter of interface to be registered
@param freeProxy function to free proxy object @param freeProxy function to free proxy object
@@ -217,9 +211,9 @@ typedef struct _uno_ExtEnvironment
rtl_uString * pOId, rtl_uString * pOId,
struct _typelib_InterfaceTypeDescription * pTypeDescr ); struct _typelib_InterfaceTypeDescription * pTypeDescr );
/** Revokes an interface from this environment.<br> /** Revokes an interface from this environment. You have to revoke any interface that has
You have to revoke <b>any</b> interface that has been registered via this method. been registered via this method.
<br>
@param pEnv this environment @param pEnv this environment
@param pInterface interface to be revoked @param pInterface interface to be revoked
*/ */
@@ -228,7 +222,7 @@ typedef struct _uno_ExtEnvironment
void * pInterface ); void * pInterface );
/** Provides the object id of a given interface. /** Provides the object id of a given interface.
<br>
@param ppOut inout oid @param ppOut inout oid
@param pInterface interface of object @param pInterface interface of object
*/ */
@@ -239,7 +233,7 @@ typedef struct _uno_ExtEnvironment
/** Retrieves an interface identified by its object id and type from this environment. /** Retrieves an interface identified by its object id and type from this environment.
Interfaces are retrieved in the same order as they are registered. Interfaces are retrieved in the same order as they are registered.
<br>
@param pEnv this environment @param pEnv this environment
@param ppInterface inout parameter for the registered interface; (0) if none was found @param ppInterface inout parameter for the registered interface; (0) if none was found
@param pOId object id of interface to be retrieved @param pOId object id of interface to be retrieved
@@ -251,9 +245,9 @@ typedef struct _uno_ExtEnvironment
rtl_uString * pOId, rtl_uString * pOId,
struct _typelib_InterfaceTypeDescription * pTypeDescr ); struct _typelib_InterfaceTypeDescription * pTypeDescr );
/** Returns all currently registered interfaces of this environment. /** Returns all currently registered interfaces of this environment. The memory block
The memory block allocated might be slightly larger than (*pnLen * sizeof(void *)). allocated might be slightly larger than (*pnLen * sizeof(void *)).
<br>
@param pEnv this environment @param pEnv this environment
@param pppInterfaces out param; pointer to array of interface pointers @param pppInterfaces out param; pointer to array of interface pointers
@param pnLen out param; length of array @param pnLen out param; length of array
@@ -266,11 +260,9 @@ typedef struct _uno_ExtEnvironment
uno_memAlloc memAlloc ); uno_memAlloc memAlloc );
/* ===== the following part will be late initialized by a matching bridge ===== * /* ===== the following part will be late initialized by a matching bridge ===== *
* ===== and is NOT for public use. ===== */
/** Computes an object id of the given interface; is called by the environment /** Computes an object id of the given interface; is called by the environment implementation.
implementation.
<br>
@param pEnv corresponding environment @param pEnv corresponding environment
@param ppOId out param: computed id @param ppOId out param: computed id
@param pInterface an interface @param pInterface an interface
@@ -280,7 +272,7 @@ typedef struct _uno_ExtEnvironment
rtl_uString ** ppOId, void * pInterface ); rtl_uString ** ppOId, void * pInterface );
/** Function to acquire an interface. /** Function to acquire an interface.
<br>
@param pEnv corresponding environment @param pEnv corresponding environment
@param pInterface an interface @param pInterface an interface
*/ */
@@ -289,7 +281,7 @@ typedef struct _uno_ExtEnvironment
void * pInterface ); void * pInterface );
/** Function to release an interface. /** Function to release an interface.
<br>
@param pEnv corresponding environment @param pEnv corresponding environment
@param pInterface an interface @param pInterface an interface
*/ */
@@ -305,18 +297,17 @@ typedef struct _uno_ExtEnvironment
#pragma pack() #pragma pack()
#endif #endif
/** Function exported by some bridge library providing /** Function exported by some bridge library providing acquireInterface(), releaseInterface();
acquireInterface(), releaseInterface(); may set a disposing callback. may set a disposing callback.
<br>
@param pEnv environment to be initialized @param pEnv environment to be initialized
*/ */
typedef void (SAL_CALL * uno_initEnvironmentFunc)( uno_Environment * pEnv ); typedef void (SAL_CALL * uno_initEnvironmentFunc)( uno_Environment * pEnv );
#define UNO_INIT_ENVIRONMENT "uno_initEnvironment" #define UNO_INIT_ENVIRONMENT "uno_initEnvironment"
/** Gets a specific environment. If the specified environment does /** Gets a specific environment. If the specified environment does not exist, then a default one
not exist, then a default one is created and registered. is created and registered. The environment revokes itself on last release() call.
The environment revokes itself on last release() call.
<br>
@param ppEnv inout parameter of environment; given environment will be released @param ppEnv inout parameter of environment; given environment will be released
@param pEnvTypeName type name of environment @param pEnvTypeName type name of environment
@param pContext some context pointer (e.g., to distinguish java vm; set 0 if not needed) @param pContext some context pointer (e.g., to distinguish java vm; set 0 if not needed)
@@ -325,9 +316,9 @@ void SAL_CALL uno_getEnvironment(
uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext ) uno_Environment ** ppEnv, rtl_uString * pEnvTypeName, void * pContext )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Gets all specified environments. Caller has to release returned environments and /** Gets all specified environments. Caller has to release returned environments and free allocated
free allocated memory. memory.
<br>
@param pppEnvs out param; pointer to array of environments @param pppEnvs out param; pointer to array of environments
@param pnLen out param; length of array @param pnLen out param; length of array
@param memAlloc function for allocating memory that is passed back @param memAlloc function for allocating memory that is passed back
@@ -338,9 +329,8 @@ void SAL_CALL uno_getRegisteredEnvironments(
rtl_uString * pEnvTypeName ) rtl_uString * pEnvTypeName )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Creates an environment. The new environment is anonymous /** Creates an environment. The new environment is anonymous (NOT publicly registered/ accessible).
(<b>NOT</b> publicly registered/ accessible).
<br>
@param ppEnv out parameter of environment; given environment will be released @param ppEnv out parameter of environment; given environment will be released
@param pEnvTypeName name of environment @param pEnvTypeName name of environment
@param pContext context pointer (e.g., to distinguish java vm); set 0 if not needed @param pContext context pointer (e.g., to distinguish java vm); set 0 if not needed
@@ -350,7 +340,7 @@ void SAL_CALL uno_createEnvironment(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Dumps out environment information, i.e. registered interfaces. /** Dumps out environment information, i.e. registered interfaces.
<br>
@param stream output stream (FILE *) @param stream output stream (FILE *)
@param pEnv environment to be dumped @param pEnv environment to be dumped
@param pFilter if not null, filters output @param pFilter if not null, filters output
@@ -359,7 +349,7 @@ void SAL_CALL uno_dumpEnvironment(
void * stream, uno_Environment * pEnv, const sal_Char * pFilter ) void * stream, uno_Environment * pEnv, const sal_Char * pFilter )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Dumps out environment information, i.e. registered interfaces. /** Dumps out environment information, i.e. registered interfaces.
<br>
@param stream output stream (FILE *) @param stream output stream (FILE *)
@param pEnvTypeName type name of environment to be dumped @param pEnvTypeName type name of environment to be dumped
@param pFilter if not null, filters output @param pFilter if not null, filters output

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: environment.hxx,v $ * $RCSfile: environment.hxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: dbo $ $Date: 2001-03-09 12:10:56 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -83,77 +83,73 @@ namespace uno
{ {
/** C++ wrapper for binary C uno_Environment. /** C++ wrapper for binary C uno_Environment.
<br>
*/ */
class Environment class Environment
{ {
/** binary C uno_Environment<br> /** binary C uno_Environment
*/ */
uno_Environment * _pEnv; uno_Environment * _pEnv;
public: public:
/** Constructor: acquires given environment /** Constructor: acquires given environment
<br>
@param pEnv environment @param pEnv environment
*/ */
inline Environment( uno_Environment * pEnv = 0 ) SAL_THROW( () ); inline Environment( uno_Environment * pEnv = 0 ) SAL_THROW( () );
/** Copy constructor: acquires given environment /** Copy constructor: acquires given environment
<br>
@param rEnv another environment @param rEnv another environment
*/ */
inline Environment( const Environment & rEnv ) SAL_THROW( () ); inline Environment( const Environment & rEnv ) SAL_THROW( () );
/** Destructor: /** Destructor: releases a set environment.
<br>
Releases a set environment.
*/ */
inline ~Environment() SAL_THROW( () ); inline ~Environment() SAL_THROW( () );
/** Sets a given environment, i.e. acquires given one and releases a set one. /** Sets a given environment, i.e. acquires given one and releases a set one.
<br>
@param pEnv another environment @param pEnv another environment
@return this environment @return this environment
*/ */
inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ) SAL_THROW( () ); inline Environment & SAL_CALL operator = ( uno_Environment * pEnv ) SAL_THROW( () );
/** Sets a given environment, i.e. acquires given one and releases a set one. /** Sets a given environment, i.e. acquires given one and releases a set one.
<br>
@param rEnv another environment @param rEnv another environment
@return this environment @return this environment
*/ */
inline Environment & SAL_CALL operator = ( const Environment & rEnv ) SAL_THROW( () ) inline Environment & SAL_CALL operator = ( const Environment & rEnv ) SAL_THROW( () )
{ return operator = ( rEnv._pEnv ); } { return operator = ( rEnv._pEnv ); }
/** Provides <b>un</b>acquired pointer to the set C environment. /** Provides UNacquired pointer to the set C environment.
<br>
@return <b>un</b>acquired pointer to the C environment struct @return UNacquired pointer to the C environment struct
*/ */
inline uno_Environment * SAL_CALL get() const SAL_THROW( () ) inline uno_Environment * SAL_CALL get() const SAL_THROW( () )
{ return _pEnv; } { return _pEnv; }
/** Gets type name of set environment. /** Gets type name of set environment.
<br>
@return type name of set environment @return type name of set environment
*/ */
inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW( () ) inline ::rtl::OUString SAL_CALL getTypeName() const SAL_THROW( () )
{ return _pEnv->pTypeName; } { return _pEnv->pTypeName; }
/** Gets free context pointer of set environment. /** Gets free context pointer of set environment.
<br>
@return free context pointer of set environment @return free context pointer of set environment
*/ */
inline void * SAL_CALL getContext() const SAL_THROW( () ) inline void * SAL_CALL getContext() const SAL_THROW( () )
{ return _pEnv->pContext; } { return _pEnv->pContext; }
/** Tests if a environment is set. /** Tests if a environment is set.
<br>
@return true, if a environment is set, false otherwise @return true, if a environment is set, false otherwise
*/ */
inline sal_Bool SAL_CALL is() const SAL_THROW( () ) inline sal_Bool SAL_CALL is() const SAL_THROW( () )
{ return (_pEnv != 0); } { return (_pEnv != 0); }
/** Releases a set environment. /** Releases a set environment.
<br>
*/ */
inline void SAL_CALL clear() SAL_THROW( () ); inline void SAL_CALL clear() SAL_THROW( () );
}; };

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: lbnames.h,v $ * $RCSfile: lbnames.h,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: dbo $ $Date: 2001-04-12 13:39:23 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -61,28 +61,28 @@
#ifndef _UNO_LBNAMES_H_ #ifndef _UNO_LBNAMES_H_
#define _UNO_LBNAMES_H_ #define _UNO_LBNAMES_H_
/** A java 1.1 compatible virtual machine<br> /** A java 1.1 compatible virtual machine
*/ */
#define UNO_LB_JAVA_NAMESPACE java #define UNO_LB_JAVA_NAMESPACE java
#define UNO_LB_JAVA "java" #define UNO_LB_JAVA "java"
/** ANSI C compilers<br> /** ANSI C compilers
*/ */
#define UNO_LB_C_NAMESPACE c_uno #define UNO_LB_C_NAMESPACE c_uno
#define UNO_LB_C "c" #define UNO_LB_C "c"
/** Miscrosoft VC++ 4.2 - 6.0 compiler; RTTI is not supported<br> /** Miscrosoft VC++ 4.2 - 6.0 compiler; RTTI is not supported
*/ */
#define UNO_LB_MSCI_NAMESPACE msci #define UNO_LB_MSCI_NAMESPACE msci
#define UNO_LB_MSCI "msci" #define UNO_LB_MSCI "msci"
/** GCC 2 with RTTI or compatible; RTTI is not supported<br> /** GCC 2 with RTTI or compatible; RTTI is not supported
*/ */
#define UNO_LB_GCC2_NAMESPACE gcc2 #define UNO_LB_GCC2_NAMESPACE gcc2
#define UNO_LB_GCC2 "gcc2" #define UNO_LB_GCC2 "gcc2"
/** WorkShop Compiler 5.0 or compatible; RTTI is not supported<br> /** WorkShop Compiler 5.0 or compatible; RTTI is not supported
*/ */
#define UNO_LB_SUNPRO5_NAMESPACE sunpro5 #define UNO_LB_SUNPRO5_NAMESPACE sunpro5
#define UNO_LB_SUNPRO5 "sunpro5" #define UNO_LB_SUNPRO5 "sunpro5"
/** Binary C UNO<br> /** Binary C UNO
*/ */
#define UNO_LB_UNO_NAMESPACE uno #define UNO_LB_UNO_NAMESPACE uno
#define UNO_LB_UNO "uno" #define UNO_LB_UNO "uno"

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: mapping.h,v $ * $RCSfile: mapping.h,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: dbo $ $Date: 2001-04-17 13:29:24 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -79,7 +79,7 @@ struct _uno_Mapping;
struct _uno_Environment; struct _uno_Environment;
/** Function pointer declaration to map an interface from one environment to another. /** Function pointer declaration to map an interface from one environment to another.
<br>
@param pMapping mapping @param pMapping mapping
@param ppOut [inout] destination interface; existing interfaces are released @param ppOut [inout] destination interface; existing interfaces are released
@param pInterface source interface @param pInterface source interface
@@ -98,23 +98,21 @@ typedef void (SAL_CALL * uno_MapInterfaceFunc)(
#endif #endif
/** This is the binary specification of a mapping. /** This is the binary specification of a mapping.
<br>
*/ */
typedef struct _uno_Mapping typedef struct _uno_Mapping
{ {
/** Acquires mapping /** Acquires mapping
<br>
@param pMapping mapping @param pMapping mapping
*/ */
void (SAL_CALL * acquire)( struct _uno_Mapping * pMapping ); void (SAL_CALL * acquire)( struct _uno_Mapping * pMapping );
/** Releases mapping. /** Releases mapping. The last release may unload bridges.
The last release may unload bridges.
<br>
@param pMapping mapping @param pMapping mapping
*/ */
void (SAL_CALL * release)( struct _uno_Mapping * pMapping ); void (SAL_CALL * release)( struct _uno_Mapping * pMapping );
/** mapping function<br> /** mapping function
*/ */
uno_MapInterfaceFunc mapInterface; uno_MapInterfaceFunc mapInterface;
} uno_Mapping; } uno_Mapping;
@@ -126,7 +124,7 @@ typedef struct _uno_Mapping
#endif #endif
/** Gets an interface mapping from one environment to another. /** Gets an interface mapping from one environment to another.
<br>
@param ppMapping [inout] mapping; existing mapping will be released @param ppMapping [inout] mapping; existing mapping will be released
@param pFrom source environment @param pFrom source environment
@param pTo destination environment @param pTo destination environment
@@ -142,7 +140,7 @@ void SAL_CALL uno_getMapping(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Callback function pointer declaration to get a mapping. /** Callback function pointer declaration to get a mapping.
<br>
@param ppMapping inout mapping @param ppMapping inout mapping
@param pFrom source environment @param pFrom source environment
@param pTo destination environment @param pTo destination environment
@@ -155,7 +153,7 @@ typedef void (SAL_CALL * uno_getMappingFunc)(
rtl_uString * pAddPurpose ); rtl_uString * pAddPurpose );
/** Registers a callback being called each time a mapping is demanded. /** Registers a callback being called each time a mapping is demanded.
<br>
@param pCallback callback function @param pCallback callback function
*/ */
void SAL_CALL uno_registerMappingCallback( void SAL_CALL uno_registerMappingCallback(
@@ -163,7 +161,7 @@ void SAL_CALL uno_registerMappingCallback(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Revokes a mapping callback registration. /** Revokes a mapping callback registration.
<br>
@param pCallback callback function @param pCallback callback function
*/ */
void SAL_CALL uno_revokeMappingCallback( void SAL_CALL uno_revokeMappingCallback(
@@ -171,16 +169,14 @@ void SAL_CALL uno_revokeMappingCallback(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Function pointer declaration to free a mapping. /** Function pointer declaration to free a mapping.
<br>
@param pMapping mapping to be freed @param pMapping mapping to be freed
*/ */
typedef void (SAL_CALL * uno_freeMappingFunc)( struct _uno_Mapping * pMapping ); typedef void (SAL_CALL * uno_freeMappingFunc)( struct _uno_Mapping * pMapping );
/** Registers a mapping.<br> /** Registers a mapping. A mapping registers itself on first acquire and revokes itself on last
A mapping registers itself on first acquire and revokes itself on last release. release. The given freeMapping function is called by the runtime to cleanup any resources.
The given freeMapping function is called by the runtime to cleanup
any resources.
<br>
@param ppMapping inout mapping to be registered @param ppMapping inout mapping to be registered
@param freeMapping called by runtime to delete mapping @param freeMapping called by runtime to delete mapping
@param pFrom source environment @param pFrom source environment
@@ -192,18 +188,18 @@ void SAL_CALL uno_registerMapping(
struct _uno_Environment * pFrom, struct _uno_Environment * pTo, rtl_uString * pAddPurpose ) struct _uno_Environment * pFrom, struct _uno_Environment * pTo, rtl_uString * pAddPurpose )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Revokes a mapping.<br> /** Revokes a mapping. A mapping registers itself on first acquire and revokes itself on last
A mapping registers itself on first acquire and revokes itself on last release. release.
<br>
@param pMapping mapping to be revoked @param pMapping mapping to be revoked
*/ */
void SAL_CALL uno_revokeMapping( void SAL_CALL uno_revokeMapping(
struct _uno_Mapping * pMapping ) struct _uno_Mapping * pMapping )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Gets an interface mapping from one language environment to another by /** Gets an interface mapping from one language environment to another by corresponding environment
corresponding environment type names. type names.
<br>
@param ppMapping [inout] mapping; existing mapping will be released @param ppMapping [inout] mapping; existing mapping will be released
@param pFrom source environment type name @param pFrom source environment type name
@param pTo destination environment type name @param pTo destination environment type name
@@ -221,9 +217,9 @@ void SAL_CALL uno_getMappingByName(
/* symbol exported by each language binding library */ /* symbol exported by each language binding library */
#define UNO_EXT_GETMAPPING "uno_ext_getMapping" #define UNO_EXT_GETMAPPING "uno_ext_getMapping"
/** Function pointer declaration to get a mapping from a loaded bridge.<br> /** Function pointer declaration to get a mapping from a loaded bridge. Bridges export a function
Bridges export a function called <b>uno_ext_getMapping</b> of this signature. called uno_ext_getMapping() of this signature.
<br>
@param ppMapping [inout] mapping; existing mapping will be released @param ppMapping [inout] mapping; existing mapping will be released
@pFrom source environment @pFrom source environment
@pTo destination environment @pTo destination environment

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: mapping.hxx,v $ * $RCSfile: mapping.hxx,v $
* *
* $Revision: 1.4 $ * $Revision: 1.5 $
* *
* last change: $Author: dbo $ $Date: 2001-04-17 13:29:24 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -96,91 +96,92 @@ namespace uno
{ {
/** C++ wrapper for C uno_Mapping. /** C++ wrapper for C uno_Mapping.
<br>
*/ */
class Mapping class Mapping
{ {
uno_Mapping * _pMapping; uno_Mapping * _pMapping;
public: public:
/** Holds a mapping from the specified source to the specified destination by /** Holds a mapping from the specified source to the specified destination by environment
environment type names. type names.
<br>
@param rFrom type name of source environment @param rFrom type name of source environment
@param rTo type name of destination environment @param rTo type name of destination environment
@param rAddPurpose additional purpose @param rAddPurpose additional purpose
*/ */
inline Mapping( const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo, inline Mapping(
const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) SAL_THROW( () ); const ::rtl::OUString & rFrom, const ::rtl::OUString & rTo,
const ::rtl::OUString & rAddPurpose = ::rtl::OUString() )
SAL_THROW( () );
/** Holds a mapping from the specified source to the specified destination. /** Holds a mapping from the specified source to the specified destination.
<br>
@param pFrom source environment @param pFrom source environment
@param pTo destination environment @param pTo destination environment
@param rAddPurpose additional purpose @param rAddPurpose additional purpose
*/ */
inline Mapping( uno_Environment * pFrom, uno_Environment * pTo, inline Mapping(
const ::rtl::OUString & rAddPurpose = ::rtl::OUString() ) SAL_THROW( () ); uno_Environment * pFrom, uno_Environment * pTo,
const ::rtl::OUString & rAddPurpose = ::rtl::OUString() )
SAL_THROW( () );
/** Constructor. /** Constructor.
<br>
@param pMapping another mapping @param pMapping another mapping
*/ */
inline Mapping( uno_Mapping * pMapping = 0 ) SAL_THROW( () ); inline Mapping( uno_Mapping * pMapping = 0 ) SAL_THROW( () );
/** Copy constructor. /** Copy constructor.
<br>
@param rMapping another mapping @param rMapping another mapping
*/ */
inline Mapping( const Mapping & rMapping ) SAL_THROW( () ); inline Mapping( const Mapping & rMapping ) SAL_THROW( () );
/** Destructor. /** Destructor.
<br>
*/ */
inline ~Mapping() SAL_THROW( () ); inline ~Mapping() SAL_THROW( () );
/** Sets a given mapping. /** Sets a given mapping.
<br>
@param pMapping another mapping @param pMapping another mapping
@return this mapping @return this mapping
*/ */
inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) SAL_THROW( () ); inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) SAL_THROW( () );
/** Sets a given mapping. /** Sets a given mapping.
<br>
@param rMapping another mapping @param rMapping another mapping
@return this mapping @return this mapping
*/ */
inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) SAL_THROW( () ) inline Mapping & SAL_CALL operator = ( const Mapping & rMapping ) SAL_THROW( () )
{ return operator = ( rMapping._pMapping ); } { return operator = ( rMapping._pMapping ); }
/** Provides a pointer to the C mapping. The returned mapping is <b>not</b> acquired! /** Provides a pointer to the C mapping. The returned mapping is NOT acquired!
<br>
@return <b>un</b>acquired C mapping @return UNacquired C mapping
*/ */
inline uno_Mapping * SAL_CALL get() const SAL_THROW( () ) inline uno_Mapping * SAL_CALL get() const SAL_THROW( () )
{ return _pMapping; } { return _pMapping; }
/** Tests if a mapping is set. /** Tests if a mapping is set.
<br>
@return true if a mapping is set @return true if a mapping is set
*/ */
inline sal_Bool SAL_CALL is() const SAL_THROW( () ) inline sal_Bool SAL_CALL is() const SAL_THROW( () )
{ return (_pMapping != 0); } { return (_pMapping != 0); }
/** Releases a set mapping. /** Releases a set mapping.
<br>
*/ */
inline void SAL_CALL clear() SAL_THROW( () ); inline void SAL_CALL clear() SAL_THROW( () );
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br>
@param pInterface source interface @param pInterface source interface
@param pTypeDescr type description of interface @param pTypeDescr type description of interface
@return mapped interface @return mapped interface
*/ */
inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW( () ); inline void * SAL_CALL mapInterface( void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW( () );
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br>
@param pInterface source interface @param pInterface source interface
@param pTypeDescr type description of interface @param pTypeDescr type description of interface
@return mapped interface @return mapped interface
@@ -189,7 +190,7 @@ public:
{ return mapInterface( pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } { return mapInterface( pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); }
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br>
@param pInterface source interface @param pInterface source interface
@param rType type of interface @param rType type of interface
@return mapped interface @return mapped interface
@@ -198,7 +199,7 @@ public:
void * pInterface, const ::com::sun::star::uno::Type & rType ) const SAL_THROW( () ); void * pInterface, const ::com::sun::star::uno::Type & rType ) const SAL_THROW( () );
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br>
@param ppOut inout mapped interface @param ppOut inout mapped interface
@param pInterface source interface @param pInterface source interface
@param pTypeDescr type description of interface @param pTypeDescr type description of interface
@@ -206,7 +207,7 @@ public:
inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW( () ) inline void SAL_CALL mapInterface( void ** ppOut, void * pInterface, typelib_InterfaceTypeDescription * pTypeDescr ) const SAL_THROW( () )
{ (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); } { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, pTypeDescr ); }
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br>
@param ppOut inout mapped interface @param ppOut inout mapped interface
@param pInterface source interface @param pInterface source interface
@param pTypeDescr type description of interface @param pTypeDescr type description of interface
@@ -215,7 +216,7 @@ public:
{ (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); } { (*_pMapping->mapInterface)( _pMapping, ppOut, pInterface, (typelib_InterfaceTypeDescription *)pTypeDescr ); }
/** Maps an interface from one environment to another. /** Maps an interface from one environment to another.
<br>
@param ppOut inout mapped interface @param ppOut inout mapped interface
@param pInterface source interface @param pInterface source interface
@param rType type of interface to be mapped @param rType type of interface to be mapped

View File

@@ -2,9 +2,9 @@
* *
* $RCSfile: sequence2.h,v $ * $RCSfile: sequence2.h,v $
* *
* $Revision: 1.5 $ * $Revision: 1.6 $
* *
* last change: $Author: dbo $ $Date: 2001-04-17 13:29:25 $ * last change: $Author: dbo $ $Date: 2001-08-21 09:17:07 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
@@ -78,11 +78,12 @@ struct _typelib_TypeDescription;
typedef sal_Sequence uno_Sequence; typedef sal_Sequence uno_Sequence;
/** Assign a sequence. /** Assign a sequence.
<br>
@param ppDest destinstaion sequence @param ppDest destinstaion sequence
@param pSource source sequence @param pSource source sequence
@param pTypeDescr type description of the <B>sequence</B> and <b>not</b> of an element @param pTypeDescr type description of the sequence and NOT of an element
@param release function called each time an interface needs to be released; defaults (0) to uno @param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_sequence_assign( void SAL_CALL uno_sequence_assign(
uno_Sequence ** ppDest, uno_Sequence ** ppDest,
@@ -91,11 +92,12 @@ void SAL_CALL uno_sequence_assign(
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Assign a sequence. /** Assign a sequence.
<br>
@param ppDest destinstaion sequence @param ppDest destinstaion sequence
@param pSource source sequence @param pSource source sequence
@param pType type of the <B>sequence</B> and <b>not</b> of an element @param pType type of the sequence and NOT of an element
@param release function called each time an interface needs to be released; defaults (0) to uno @param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_type_sequence_assign( void SAL_CALL uno_type_sequence_assign(
uno_Sequence ** ppDest, uno_Sequence ** ppDest,
@@ -105,12 +107,13 @@ void SAL_CALL uno_type_sequence_assign(
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Constructs a new sequence with given elements. /** Constructs a new sequence with given elements.
<br>
@param ppSequence <b>out</b> parameter sequence @param ppSequence out parameter sequence
@param pTypeDescr type description of the <B>sequence</B> and <b>not</b> of an element @param pTypeDescr type description of the sequence and NOT of an element
@param pElements if 0, then all elements are default constructed @param pElements if 0, then all elements are default constructed
@param len number of elements @param len number of elements
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
defaults (0) to uno
*/ */
void SAL_CALL uno_sequence_construct( void SAL_CALL uno_sequence_construct(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
@@ -119,12 +122,13 @@ void SAL_CALL uno_sequence_construct(
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Constructs a new sequence with given elements. /** Constructs a new sequence with given elements.
<br>
@param ppSequence <b>out</b> parameter sequence @param ppSequence out parameter sequence
@param pType type of the <B>sequence</B> and <b>not</b> of an element @param pType type of the sequence and NOT of an element
@param pElements if 0, then all elements are default constructed @param pElements if 0, then all elements are default constructed
@param len number of elements @param len number of elements
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
defaults (0) to uno
*/ */
void SAL_CALL uno_type_sequence_construct( void SAL_CALL uno_type_sequence_construct(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
@@ -133,13 +137,15 @@ void SAL_CALL uno_type_sequence_construct(
uno_AcquireFunc acquire ) uno_AcquireFunc acquire )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Assures that the reference count of the given sequence is one. /** Assures that the reference count of the given sequence is one. Otherwise a new copy of
Otherwise a new copy of the sequence is created with a reference count of one. the sequence is created with a reference count of one.
<br>
@param ppSequence sequence @param ppSequence sequence
@param pTypeDescr type description of sequence @param pTypeDescr type description of sequence
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
@param release function called each time an interface needs to be released; defaults (0) to uno defaults (0) to uno
@param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_sequence_reference2One( void SAL_CALL uno_sequence_reference2One(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
@@ -147,13 +153,15 @@ void SAL_CALL uno_sequence_reference2One(
uno_AcquireFunc acquire, uno_AcquireFunc acquire,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Assures that the reference count of the given sequence is one. /** Assures that the reference count of the given sequence is one. Otherwise a new copy of
Otherwise a new copy of the sequence is created with a reference count of one. the sequence is created with a reference count of one.
<br>
@param ppSequence sequence @param ppSequence sequence
@param pType type of sequence @param pType type of sequence
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
@param release function called each time an interface needs to be released; defaults (0) to uno defaults (0) to uno
@param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_type_sequence_reference2One( void SAL_CALL uno_type_sequence_reference2One(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
@@ -162,14 +170,16 @@ void SAL_CALL uno_type_sequence_reference2One(
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Reallocates length of a sequence. This truncates a sequence or enlarges it /** Reallocates length of a sequence. This truncates a sequence or enlarges it default
default constructing appended elements. constructing appended elements.
<br>
@param ppSequence sequence @param ppSequence sequence
@param pTypeDescr type description of sequence @param pTypeDescr type description of sequence
@param nSize new size of sequence @param nSize new size of sequence
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
@param release function called each time an interface needs to be released; defaults (0) to uno defaults (0) to uno
@param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_sequence_realloc( void SAL_CALL uno_sequence_realloc(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,
@@ -178,14 +188,16 @@ void SAL_CALL uno_sequence_realloc(
uno_AcquireFunc acquire, uno_AcquireFunc acquire,
uno_ReleaseFunc release ) uno_ReleaseFunc release )
SAL_THROW_EXTERN_C(); SAL_THROW_EXTERN_C();
/** Reallocates length of a sequence. This truncates a sequence or enlarges it /** Reallocates length of a sequence. This truncates a sequence or enlarges it default
default constructing appended elements. constructing appended elements.
<br>
@param ppSequence sequence @param ppSequence sequence
@param pType type of sequence @param pType type of sequence
@param nSize new size of sequence @param nSize new size of sequence
@param acquire function called each time an interface needs to be acquired; defaults (0) to uno @param acquire function called each time an interface needs to be acquired;
@param release function called each time an interface needs to be released; defaults (0) to uno defaults (0) to uno
@param release function called each time an interface needs to be released;
defaults (0) to uno
*/ */
void SAL_CALL uno_type_sequence_realloc( void SAL_CALL uno_type_sequence_realloc(
uno_Sequence ** ppSequence, uno_Sequence ** ppSequence,