Avoid lambda being destroyed while it is being called.
[LibreOffice.git] / registry / source / reflread.hxx
blob5fc428212c0376f2c52859ed5207edf5d2f87317
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 <rtl/ustring.hxx>
26 /// Implementation handle
27 typedef void* TypeReaderImpl;
29 /** RegistryTypeReades reads a binary type blob.
31 This class provides the necessary functions to read type information
32 for all kinds of types of a type blob.
34 @deprecated
35 use typereg::Reader instead
37 class RegistryTypeReader
39 public:
41 /** Constructor.
43 @param buffer points to the binary data block.
44 @param bufferLen specifies the size of the binary data block.
46 RegistryTypeReader(const sal_uInt8* buffer,
47 sal_uInt32 bufferLen);
49 /// Destructor. The Destructor frees the data block if the copyData flag was TRUE.
50 ~RegistryTypeReader();
52 /** returns the typeclass of the type represented by this blob.
54 This function will always return the type class without the internal
55 RT_TYPE_PUBLISHED flag set.
57 RTTypeClass getTypeClass() const;
59 /** returns the full qualified name of the type.
61 OUString getTypeName() const;
63 /** returns the full qualified name of the supertype.
65 OUString getSuperTypeName() const;
67 /** returns the number of fields (attributes/properties, enum values or number
68 of constants in a module).
71 sal_uInt32 getFieldCount() const;
73 /** returns the name of the field specified by index.
75 OUString getFieldName( sal_uInt16 index ) const;
77 /** returns the full qualified name of the field specified by index.
79 OUString getFieldType( sal_uInt16 index ) const;
81 /** returns the access mode of the field specified by index.
83 RTFieldAccess getFieldAccess( sal_uInt16 index ) const;
85 /** returns the value of the field specified by index.
87 This function returns the value of an enum value or of a constant.
89 RTConstValue getFieldConstValue( sal_uInt16 index ) const;
91 /** returns the documentation string for the field specified by index.
93 Each field of a type can have their own documentation.
95 OUString getFieldDoku( sal_uInt16 index ) const;
97 /** returns the IDL filename of the field specified by index.
99 The IDL filename of a field can differ from the filename of the ype itself
100 because modules and also constants can be defined in different IDL files.
102 OUString getFieldFileName( sal_uInt16 index ) const;
104 private:
105 RegistryTypeReader(RegistryTypeReader const &) = delete;
106 void operator =(RegistryTypeReader const &) = delete;
108 /// stores the handle of an implementation class
109 TypeReaderImpl m_hImpl;
112 #endif
114 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */