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

void * m_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: \n UDK 3.2.0

Definition at line 41 of file reader.hxx.

Constructor & Destructor Documentation

◆ Reader() [1/2]

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 57 of file reader.hxx.

References length, m_handle, and typereg_reader_create().

◆ Reader() [2/2]

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

Shares a type reader between two Reader instances.

Parameters
otheranother Reader instance

Definition at line 70 of file reader.hxx.

References m_handle, and typereg_reader_acquire().

◆ ~Reader()

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 80 of file reader.hxx.

References m_handle, and typereg_reader_release().

Member Function Documentation

◆ getDocumentation()

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 125 of file reader.hxx.

References m_handle, and typereg_reader_getDocumentation().

◆ getFieldCount()

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 228 of file reader.hxx.

References m_handle, and typereg_reader_getFieldCount().

◆ getFieldDocumentation()

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 241 of file reader.hxx.

References index, m_handle, and typereg_reader_getFieldDocumentation().

◆ getFieldFileName()

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 260 of file reader.hxx.

References index, m_handle, and typereg_reader_getFieldFileName().

◆ getFieldFlags()

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 276 of file reader.hxx.

References index, m_handle, and typereg_reader_getFieldFlags().

◆ getFieldName()

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 289 of file reader.hxx.

References index, m_handle, and typereg_reader_getFieldName().

◆ getFieldTypeName()

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 307 of file reader.hxx.

References index, m_handle, and typereg_reader_getFieldTypeName().

◆ getFieldValue()

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 325 of file reader.hxx.

References index, m_handle, typereg_reader_getFieldValue(), and v.

◆ getFileName()

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 143 of file reader.hxx.

References m_handle, and typereg_reader_getFileName().

◆ getMethodCount()

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 341 of file reader.hxx.

References m_handle, and typereg_reader_getMethodCount().

◆ getMethodDocumentation()

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 354 of file reader.hxx.

References index, m_handle, and typereg_reader_getMethodDocumentation().

◆ getMethodExceptionCount()

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 496 of file reader.hxx.

References index, m_handle, and typereg_reader_getMethodExceptionCount().

◆ getMethodExceptionTypeName()

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 513 of file reader.hxx.

References m_handle, and typereg_reader_getMethodExceptionTypeName().

◆ getMethodFlags()

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 370 of file reader.hxx.

References index, m_handle, and typereg_reader_getMethodFlags().

◆ getMethodName()

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 383 of file reader.hxx.

References index, m_handle, and typereg_reader_getMethodName().

◆ getMethodParameterCount()

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 417 of file reader.hxx.

References index, m_handle, and typereg_reader_getMethodParameterCount().

◆ getMethodParameterFlags()

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 432 of file reader.hxx.

References m_handle, and typereg_reader_getMethodParameterFlags().

◆ getMethodParameterName()

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 452 of file reader.hxx.

References m_handle, and typereg_reader_getMethodParameterName().

◆ getMethodParameterTypeName()

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 477 of file reader.hxx.

References m_handle, and typereg_reader_getMethodParameterTypeName().

◆ getMethodReturnTypeName()

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 401 of file reader.hxx.

References index, m_handle, and typereg_reader_getMethodReturnTypeName().

◆ getReferenceCount()

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 531 of file reader.hxx.

References m_handle, and typereg_reader_getReferenceCount().

◆ getReferenceDocumentation()

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 545 of file reader.hxx.

References index, m_handle, and typereg_reader_getReferenceDocumentation().

◆ getReferenceFlags()

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 562 of file reader.hxx.

References index, m_handle, and typereg_reader_getReferenceFlags().

◆ getReferenceSort()

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 574 of file reader.hxx.

References index, m_handle, and typereg_reader_getReferenceSort().

◆ getReferenceTypeName()

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 588 of file reader.hxx.

References index, m_handle, and typereg_reader_getReferenceTypeName().

◆ getSuperTypeCount()

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 199 of file reader.hxx.

References m_handle, and typereg_reader_getSuperTypeCount().

◆ getSuperTypeName()

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 213 of file reader.hxx.

References index, m_handle, and typereg_reader_getSuperTypeName().

◆ getTypeClass()

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 162 of file reader.hxx.

References m_handle, and typereg_reader_getTypeClass().

◆ getTypeName()

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 184 of file reader.hxx.

References m_handle, and typereg_reader_getTypeName().

◆ getVersion()

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 113 of file reader.hxx.

References m_handle, and typereg_reader_getVersion().

◆ isPublished()

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 172 of file reader.hxx.

References m_handle, and typereg_reader_isPublished().

◆ isValid()

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

Returns whether this type reader is valid.

Returns
true iff this type reader is valid

Definition at line 102 of file reader.hxx.

References m_handle.

◆ operator=()

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

Replaces the underlying type reader.

Parameters
otherany Reader instance
Returns
this Reader instance

Definition at line 91 of file reader.hxx.

References m_handle.

Member Data Documentation

◆ m_handle

void* typereg::Reader::m_handle
private

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