LibreOffice Module registry (master)  1
Public Member Functions | Private Attributes | List of all members
typereg::Reader Class Reference

A type reader working on a binary blob that represents a UNOIDL type. More...

#include <reader.hxx>

Public Member Functions

 Reader (void const *buffer, sal_uInt32 length)
 Creates a type reader. More...
 
 Reader (Reader const &other)
 Shares a type reader between two Reader instances. More...
 
 ~Reader ()
 Destroys this Reader instance. More...
 
Readeroperator= (Reader const &other)
 Replaces the underlying type reader. More...
 
bool isValid () const
 Returns whether this type reader is valid. More...
 
typereg_Version getVersion () const
 Returns the binary blob version of this type reader. More...
 
OUString getDocumentation () const
 Returns the documentation of this type reader. More...
 
OUString getFileName () const
 Returns the file name of this type reader. More...
 
RTTypeClass getTypeClass () const
 Returns the type class of this type reader. More...
 
bool isPublished () const
 Returns whether this type reader is published. More...
 
OUString getTypeName () const
 Returns the type name of this type reader. More...
 
sal_uInt16 getSuperTypeCount () const
 Returns the number of super types of this type reader. More...
 
OUString getSuperTypeName (sal_uInt16 index) const
 Returns the type name of a super type of this type reader. More...
 
sal_uInt16 getFieldCount () const
 Returns the number of fields of this type reader. More...
 
OUString getFieldDocumentation (sal_uInt16 index) const
 Returns the documentation of a field of this type reader. More...
 
OUString getFieldFileName (sal_uInt16 index) const
 Returns the file name of a field of this type reader. More...
 
RTFieldAccess getFieldFlags (sal_uInt16 index) const
 Returns the flags of a field of this type reader. More...
 
OUString getFieldName (sal_uInt16 index) const
 Returns the name of a field of this type reader. More...
 
OUString getFieldTypeName (sal_uInt16 index) const
 Returns the type name of a field of this type reader. More...
 
RTConstValue getFieldValue (sal_uInt16 index) const
 Returns the value of a field of this type reader. More...
 
sal_uInt16 getMethodCount () const
 Returns the number of methods of this type reader. More...
 
OUString getMethodDocumentation (sal_uInt16 index) const
 Returns the documentation of a method of this type reader. More...
 
RTMethodMode getMethodFlags (sal_uInt16 index) const
 Returns the flags of a method of this type reader. More...
 
OUString getMethodName (sal_uInt16 index) const
 Returns the name of a method of this type reader. More...
 
OUString getMethodReturnTypeName (sal_uInt16 index) const
 Returns the return type name of a method of this type reader. More...
 
sal_uInt16 getMethodParameterCount (sal_uInt16 index) const
 Returns the number of parameters of a method of this type reader. More...
 
RTParamMode getMethodParameterFlags (sal_uInt16 methodIndex, sal_uInt16 parameterIndex) const
 Returns the flags of a parameter of a method of this type reader. More...
 
OUString getMethodParameterName (sal_uInt16 methodIndex, sal_uInt16 parameterIndex) const
 Returns the name of a parameter of a method of this type reader. More...
 
OUString getMethodParameterTypeName (sal_uInt16 methodIndex, sal_uInt16 parameterIndex) const
 Returns the type name of a parameter of a method of this type reader. More...
 
sal_uInt16 getMethodExceptionCount (sal_uInt16 index) const
 Returns the number of exceptions of a method of this type reader. More...
 
OUString getMethodExceptionTypeName (sal_uInt16 methodIndex, sal_uInt16 exceptionIndex) const
 Returns the type name of an exception of a method of this type reader. More...
 
sal_uInt16 getReferenceCount () const
 Returns the number of references of this type reader. More...
 
OUString getReferenceDocumentation (sal_uInt16 index) const
 Returns the documentation of a reference of this type reader. More...
 
RTFieldAccess getReferenceFlags (sal_uInt16 index) const
 Returns the flags of a reference of this type reader. More...
 
RTReferenceType getReferenceSort (sal_uInt16 index) const
 Returns the sort of a reference of this type reader. More...
 
OUString getReferenceTypeName (sal_uInt16 index) const
 Returns the type name of a reference of this type reader. More...
 

Private Attributes

voidm_handle
 

Detailed Description

A type reader working on a binary blob that represents a UNOIDL type.

Instances of this class are not multi-thread–safe.

Available since:
UDK 3.2.0

Definition at line 42 of file reader.hxx.

Constructor & Destructor Documentation

typereg::Reader::Reader ( void const *  buffer,
sal_uInt32  length 
)
inline

Creates a type reader.

If the given binary blob is malformed, or of a version larger than maxVersion, the created type reader is flagged as invalid.

Parameters
bufferthe binary blob representing the type; must point to at least length bytes, and need only be byte-aligned
lengththe size in bytes of the binary blob representing the type
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 58 of file reader.hxx.

References m_handle, and typereg_reader_create().

typereg::Reader::Reader ( Reader const &  other)
inline

Shares a type reader between two Reader instances.

Parameters
otheranother Reader instance

Definition at line 71 of file reader.hxx.

References m_handle, and typereg_reader_acquire().

typereg::Reader::~Reader ( )
inline

Destroys this Reader instance.

The underlying type reader is only destroyed if this instance was its last user.

Definition at line 81 of file reader.hxx.

References m_handle, and typereg_reader_release().

Member Function Documentation

OUString typereg::Reader::getDocumentation ( ) const
inline

Returns the documentation of this type reader.

Returns
the documentation of this type reader; if this type reader is invalid, an empty string is returned
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 126 of file reader.hxx.

References m_handle, and typereg_reader_getDocumentation().

sal_uInt16 typereg::Reader::getFieldCount ( ) const
inline

Returns the number of fields of this type reader.

Returns
the number of fields of this type reader; if this type reader is invalid, zero is returned

Definition at line 229 of file reader.hxx.

References m_handle, and typereg_reader_getFieldCount().

OUString typereg::Reader::getFieldDocumentation ( sal_uInt16  index) const
inline

Returns the documentation of a field of this type reader.

Parameters
indexa valid index into the range of fields of this type reader
Returns
the documentation of the given field
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 242 of file reader.hxx.

References m_handle, and typereg_reader_getFieldDocumentation().

OUString typereg::Reader::getFieldFileName ( sal_uInt16  index) const
inline

Returns the file name of a field of this type reader.

Parameters
indexa valid index into the range of fields of this type reader
Returns
the file name of the given field
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs
Deprecated:

Definition at line 261 of file reader.hxx.

References m_handle, and typereg_reader_getFieldFileName().

RTFieldAccess typereg::Reader::getFieldFlags ( sal_uInt16  index) const
inline

Returns the flags of a field of this type reader.

Parameters
indexa valid index into the range of fields of this type reader
Returns
the flags of the given field

Definition at line 277 of file reader.hxx.

References m_handle, and typereg_reader_getFieldFlags().

OUString typereg::Reader::getFieldName ( sal_uInt16  index) const
inline

Returns the name of a field of this type reader.

Parameters
indexa valid index into the range of fields of this type reader
Returns
the name of the given field
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 290 of file reader.hxx.

References m_handle, and typereg_reader_getFieldName().

OUString typereg::Reader::getFieldTypeName ( sal_uInt16  index) const
inline

Returns the type name of a field of this type reader.

Parameters
indexa valid index into the range of fields of this type reader
Returns
the type name of the given field
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 308 of file reader.hxx.

References m_handle, and typereg_reader_getFieldTypeName().

RTConstValue typereg::Reader::getFieldValue ( sal_uInt16  index) const
inline

Returns the value of a field of this type reader.

Parameters
indexa valid index into the range of fields of this type reader
Returns
the value of the given field
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 326 of file reader.hxx.

References m_handle, RTConstValue::m_type, RTConstValue::m_value, typereg_reader_getFieldValue(), and v.

OUString typereg::Reader::getFileName ( ) const
inline

Returns the file name of this type reader.

Returns
the file name of this type reader; if this type reader is invalid, an empty string is returned
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs
Deprecated:

Definition at line 144 of file reader.hxx.

References m_handle, and typereg_reader_getFileName().

sal_uInt16 typereg::Reader::getMethodCount ( ) const
inline

Returns the number of methods of this type reader.

Returns
the number of methods of this type reader; if this type reader is invalid, zero is returned

Definition at line 342 of file reader.hxx.

References m_handle, and typereg_reader_getMethodCount().

OUString typereg::Reader::getMethodDocumentation ( sal_uInt16  index) const
inline

Returns the documentation of a method of this type reader.

Parameters
indexa valid index into the range of methods of this type reader
Returns
the documentation of the given method
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 355 of file reader.hxx.

References m_handle, and typereg_reader_getMethodDocumentation().

sal_uInt16 typereg::Reader::getMethodExceptionCount ( sal_uInt16  index) const
inline

Returns the number of exceptions of a method of this type reader.

Parameters
indexa valid index into the range of methods of this type reader
Returns
the number of exceptions of the given method

Definition at line 497 of file reader.hxx.

References m_handle, and typereg_reader_getMethodExceptionCount().

OUString typereg::Reader::getMethodExceptionTypeName ( sal_uInt16  methodIndex,
sal_uInt16  exceptionIndex 
) const
inline

Returns the type name of an exception of a method of this type reader.

Parameters
methodIndexa valid index into the range of methods of this type reader
exceptionIndexa valid index into the range of exceptions of the given method
Returns
the type name of the given method exception
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 514 of file reader.hxx.

References m_handle, and typereg_reader_getMethodExceptionTypeName().

RTMethodMode typereg::Reader::getMethodFlags ( sal_uInt16  index) const
inline

Returns the flags of a method of this type reader.

Parameters
indexa valid index into the range of methods of this type reader
Returns
the flags of the given method

Definition at line 371 of file reader.hxx.

References m_handle, and typereg_reader_getMethodFlags().

OUString typereg::Reader::getMethodName ( sal_uInt16  index) const
inline

Returns the name of a method of this type reader.

Parameters
indexa valid index into the range of methods of this type reader
Returns
the name of the given method
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 384 of file reader.hxx.

References m_handle, and typereg_reader_getMethodName().

sal_uInt16 typereg::Reader::getMethodParameterCount ( sal_uInt16  index) const
inline

Returns the number of parameters of a method of this type reader.

Parameters
indexa valid index into the range of methods of this type reader
Returns
the number of parameters of the given method

Definition at line 418 of file reader.hxx.

References m_handle, and typereg_reader_getMethodParameterCount().

RTParamMode typereg::Reader::getMethodParameterFlags ( sal_uInt16  methodIndex,
sal_uInt16  parameterIndex 
) const
inline

Returns the flags of a parameter of a method of this type reader.

Parameters
methodIndexa valid index into the range of methods of this type reader
parameterIndexa valid index into the range of parameters of the given method
Returns
the flags of the given method parameter

Definition at line 433 of file reader.hxx.

References m_handle, and typereg_reader_getMethodParameterFlags().

OUString typereg::Reader::getMethodParameterName ( sal_uInt16  methodIndex,
sal_uInt16  parameterIndex 
) const
inline

Returns the name of a parameter of a method of this type reader.

Parameters
methodIndexa valid index into the range of methods of this type reader
parameterIndexa valid index into the range of parameters of the given method
Returns
the name of the given method parameter
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 453 of file reader.hxx.

References m_handle, and typereg_reader_getMethodParameterName().

OUString typereg::Reader::getMethodParameterTypeName ( sal_uInt16  methodIndex,
sal_uInt16  parameterIndex 
) const
inline

Returns the type name of a parameter of a method of this type reader.

Parameters
methodIndexa valid index into the range of methods of this type reader
parameterIndexa valid index into the range of parameters of the given method
Returns
the type name of the given method parameter
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 478 of file reader.hxx.

References m_handle, and typereg_reader_getMethodParameterTypeName().

OUString typereg::Reader::getMethodReturnTypeName ( sal_uInt16  index) const
inline

Returns the return type name of a method of this type reader.

Parameters
indexa valid index into the range of methods of this type reader
Returns
the return type name of the given method
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 402 of file reader.hxx.

References m_handle, and typereg_reader_getMethodReturnTypeName().

sal_uInt16 typereg::Reader::getReferenceCount ( ) const
inline

Returns the number of references of this type reader.

Returns
the number of references of this type reader; if this type reader is invalid, zero is returned

Definition at line 532 of file reader.hxx.

References m_handle, and typereg_reader_getReferenceCount().

OUString typereg::Reader::getReferenceDocumentation ( sal_uInt16  index) const
inline

Returns the documentation of a reference of this type reader.

Parameters
indexa valid index into the range of references of this type reader
Returns
the documentation of the given reference
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 546 of file reader.hxx.

References m_handle, and typereg_reader_getReferenceDocumentation().

RTFieldAccess typereg::Reader::getReferenceFlags ( sal_uInt16  index) const
inline

Returns the flags of a reference of this type reader.

Parameters
indexa valid index into the range of references of this type reader
Returns
the flags of the given reference

Definition at line 563 of file reader.hxx.

References m_handle, and typereg_reader_getReferenceFlags().

RTReferenceType typereg::Reader::getReferenceSort ( sal_uInt16  index) const
inline

Returns the sort of a reference of this type reader.

Parameters
indexa valid index into the range of references of this type reader
Returns
the sort of the given reference

Definition at line 575 of file reader.hxx.

References m_handle, and typereg_reader_getReferenceSort().

OUString typereg::Reader::getReferenceTypeName ( sal_uInt16  index) const
inline

Returns the type name of a reference of this type reader.

Parameters
indexa valid index into the range of references of this type reader
Returns
the type name of the given reference
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 589 of file reader.hxx.

References m_handle, and typereg_reader_getReferenceTypeName().

sal_uInt16 typereg::Reader::getSuperTypeCount ( ) const
inline

Returns the number of super types of this type reader.

Returns
the number of super types of this type reader; if this type reader is invalid, zero is returned

Definition at line 200 of file reader.hxx.

References m_handle, and typereg_reader_getSuperTypeCount().

OUString typereg::Reader::getSuperTypeName ( sal_uInt16  index) const
inline

Returns the type name of a super type of this type reader.

Parameters
indexa valid index into the range of super types of this type reader
Returns
the type name of the given super type
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 214 of file reader.hxx.

References m_handle, and typereg_reader_getSuperTypeName().

RTTypeClass typereg::Reader::getTypeClass ( ) const
inline

Returns the type class of this type reader.

This function will always return the type class without the internal RT_TYPE_PUBLISHED flag set. Use isPublished to determine whether this type reader is published.

Returns
the type class of this type reader; if this type reader is invalid, RT_TYPE_INVALID is returned

Definition at line 163 of file reader.hxx.

References m_handle, and typereg_reader_getTypeClass().

OUString typereg::Reader::getTypeName ( ) const
inline

Returns the type name of this type reader.

Returns
the type name of this type reader; if this type reader is invalid, an empty string is returned
Exceptions
std::bad_allocis raised if an out-of-memory condition occurs

Definition at line 185 of file reader.hxx.

References m_handle, and typereg_reader_getTypeName().

typereg_Version typereg::Reader::getVersion ( ) const
inline

Returns the binary blob version of this type reader.

Returns
the version of the binary blob from which this type reader was constructed; if this type reader is invalid, TYPEREG_VERSION_0 is returned

Definition at line 114 of file reader.hxx.

References m_handle, and typereg_reader_getVersion().

bool typereg::Reader::isPublished ( ) const
inline

Returns whether this type reader is published.

Returns
whether this type reader is published; if this type reader is invalid, false is returned

Definition at line 173 of file reader.hxx.

References m_handle, and typereg_reader_isPublished().

bool typereg::Reader::isValid ( ) const
inline

Returns whether this type reader is valid.

Returns
true iff this type reader is valid

Definition at line 103 of file reader.hxx.

References m_handle.

Reader& typereg::Reader::operator= ( Reader const &  other)
inline

Replaces the underlying type reader.

Parameters
otherany Reader instance
Returns
this Reader instance

Definition at line 92 of file reader.hxx.

References m_handle.

Member Data Documentation

void* typereg::Reader::m_handle
private

The documentation for this class was generated from the following file: