Files
libreoffice/registry/source/reflread.hxx

116 lines
3.7 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2012-07-02 17:12:00 +01:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 14:18:43 +00:00
#ifndef INCLUDED_REGISTRY_SOURCE_REFLREAD_HXX
#define INCLUDED_REGISTRY_SOURCE_REFLREAD_HXX
2000-09-18 14:18:43 +00:00
#include <registry/refltype.hxx>
#include <registry/regtype.h>
#include <rtl/ustring.hxx>
2000-09-18 14:18:43 +00:00
2001-11-15 17:01:32 +00:00
/// Implememetation handle
2000-09-18 14:18:43 +00:00
typedef void* TypeReaderImpl;
2001-11-15 17:01:32 +00:00
/** RegistryTypeReades reads a binary type blob.
This class provides the necessary functions to read type information
2001-11-15 17:01:32 +00:00
for all kinds of types of a type blob.
@deprecated
use typereg::Reader instead
2000-09-18 14:18:43 +00:00
*/
class RegistryTypeReader
{
public:
/** Constructor.
2001-11-15 17:01:32 +00:00
@param buffer points to the binary data block.
2012-02-21 23:16:31 +01:00
@param bufferLen specifies the size of the binary data block.
2001-11-15 17:01:32 +00:00
*/
RegistryTypeReader(const sal_uInt8* buffer,
sal_uInt32 bufferLen);
2001-11-15 17:01:32 +00:00
/// Destructor. The Destructor frees the data block if the copyData flag was TRUE.
~RegistryTypeReader();
2000-09-18 14:18:43 +00:00
2001-11-15 17:01:32 +00:00
/** returns the typeclass of the type represented by this blob.
This function will always return the type class without the internal
RT_TYPE_PUBLISHED flag set.
2001-11-15 17:01:32 +00:00
*/
RTTypeClass getTypeClass() const;
2001-11-15 17:01:32 +00:00
/** returns the full qualified name of the type.
*/
rtl::OUString getTypeName() const;
2001-11-15 17:01:32 +00:00
/** returns the full qualified name of the supertype.
*/
rtl::OUString getSuperTypeName() const;
2001-11-15 17:01:32 +00:00
/** returns the number of fields (attributes/properties, enum values or number
of constants in a module).
*/
sal_uInt32 getFieldCount() const;
2001-11-15 17:01:32 +00:00
/** returns the name of the field specified by index.
*/
rtl::OUString getFieldName( sal_uInt16 index ) const;
2001-11-15 17:01:32 +00:00
/** returns the full qualified name of the field specified by index.
*/
rtl::OUString getFieldType( sal_uInt16 index ) const;
2001-11-15 17:01:32 +00:00
/** returns the access mode of the field specified by index.
*/
RTFieldAccess getFieldAccess( sal_uInt16 index ) const;
2001-11-15 17:01:32 +00:00
/** returns the value of the field specified by index.
This function returns the value of an enum value or of a constant.
*/
RTConstValue getFieldConstValue( sal_uInt16 index ) const;
2001-11-15 17:01:32 +00:00
/** returns the documentation string for the field specified by index.
Each field of a type can have their own documentation.
*/
rtl::OUString getFieldDoku( sal_uInt16 index ) const;
2001-11-15 17:01:32 +00:00
/** returns the IDL filename of the field specified by index.
The IDL filename of a field can differ from the filename of the ype itself
because modules and also constants can be defined in different IDL files.
*/
rtl::OUString getFieldFileName( sal_uInt16 index ) const;
2001-11-15 17:01:32 +00:00
private:
RegistryTypeReader(RegistryTypeReader &) = delete;
void operator =(RegistryTypeReader) = delete;
2000-09-18 14:18:43 +00:00
2001-11-15 17:01:32 +00:00
/// stores the handle of an implementation class
2001-03-14 08:37:08 +00:00
TypeReaderImpl m_hImpl;
2000-09-18 14:18:43 +00:00
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */