1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_REGISTRY_SOURCE_REFLREAD_HXX
21 #define INCLUDED_REGISTRY_SOURCE_REFLREAD_HXX
23 #include <registry/refltype.hxx>
24 #include <registry/regtype.h>
25 #include <rtl/ustring.hxx>
27 /// Implememetation handle
28 typedef void* TypeReaderImpl
;
30 /** RegistryTypeReades reads a binary type blob.
32 This class provides the necessary functions to read type information
33 for all kinds of types of a type blob.
36 use typereg::Reader instead
38 class RegistryTypeReader
44 @param buffer points to the binary data block.
45 @param bufferLen specifies the size of the binary data block.
47 RegistryTypeReader(const sal_uInt8
* buffer
,
48 sal_uInt32 bufferLen
);
50 /// Destructor. The Destructor frees the data block if the copyData flag was TRUE.
51 ~RegistryTypeReader();
53 /** returns the typeclass of the type represented by this blob.
55 This function will always return the type class without the internal
56 RT_TYPE_PUBLISHED flag set.
58 RTTypeClass
getTypeClass() const;
60 /** returns the full qualified name of the type.
62 rtl::OUString
getTypeName() const;
64 /** returns the full qualified name of the supertype.
66 rtl::OUString
getSuperTypeName() const;
68 /** returns the number of fields (attributes/properties, enum values or number
69 of constants in a module).
72 sal_uInt32
getFieldCount() const;
74 /** returns the name of the field specified by index.
76 rtl::OUString
getFieldName( sal_uInt16 index
) const;
78 /** returns the full qualified name of the field specified by index.
80 rtl::OUString
getFieldType( sal_uInt16 index
) const;
82 /** returns the access mode of the field specified by index.
84 RTFieldAccess
getFieldAccess( sal_uInt16 index
) const;
86 /** returns the value of the field specified by index.
88 This function returns the value of an enum value or of a constant.
90 RTConstValue
getFieldConstValue( sal_uInt16 index
) const;
92 /** returns the documentation string for the field specified by index.
94 Each field of a type can have their own documentation.
96 rtl::OUString
getFieldDoku( sal_uInt16 index
) const;
98 /** returns the IDL filename of the field specified by index.
100 The IDL filename of a field can differ from the filename of the ype itself
101 because modules and also constants can be defined in different IDL files.
103 rtl::OUString
getFieldFileName( sal_uInt16 index
) const;
106 RegistryTypeReader(RegistryTypeReader
&) = delete;
107 void operator =(RegistryTypeReader
) = delete;
109 /// stores the handle of an implementation class
110 TypeReaderImpl m_hImpl
;
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */