Files
libreoffice/registry/source/reflwrit.hxx

103 lines
3.8 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_REFLWRIT_HXX
#define INCLUDED_REGISTRY_SOURCE_REFLWRIT_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* TypeWriterImpl;
2001-11-15 17:01:32 +00:00
/** RegistryTypeWriter writes/creates a binary type blob.
This class provides the necessary functions to write type information
2001-11-15 17:01:32 +00:00
for all kinds of types into a blob.
@deprecated
use typereg::Writer instead
2000-09-18 14:18:43 +00:00
*/
class RegistryTypeWriter
{
public:
/** Constructor.
2001-11-15 17:01:32 +00:00
@param RTTypeClass specifies the type of the new blob.
@param typeName specifies the full qualified type name with '/' as separator.
@param superTypeName specifies the full qualified type name of the base type
with '/' as separator.
@param fieldCount specifies the number of fields (eg. number of attrbutes/properties,
enum values or constants).
*/
RegistryTypeWriter(RTTypeClass RTTypeClass,
const rtl::OUString& typeName,
const rtl::OUString& superTypeName,
sal_uInt16 fieldCount);
2000-09-18 14:18:43 +00:00
2001-11-15 17:01:32 +00:00
/** Destructor. The Destructor frees the internal data block.
The pointer (returned by getBlop) will be set to NULL.
*/
~RegistryTypeWriter();
2000-09-18 14:18:43 +00:00
2001-11-15 17:01:32 +00:00
/** sets the data for a field member of a type blob.
@param index indicates the index of the field.
@param name specifies the name.
@param typeName specifies the full qualified typename.
@param doku specifies the documentation string of the field.
@param fileName specifies the name of the IDL file where the field is defined.
@param access specifies the access mode of the field.
@param constValue specifies the value of the field. The value is only interesting
for enum values or constants.
*/
void setFieldData( sal_uInt16 index,
const rtl::OUString& name,
const rtl::OUString& typeName,
const rtl::OUString& doku,
const rtl::OUString& fileName,
RTFieldAccess access,
const RTConstValue& constValue);
2000-09-18 14:18:43 +00:00
2001-11-15 17:01:32 +00:00
/** returns a pointer to the new type blob.
The pointer will be invalid (NULL) if the instance of
the RegistryTypeWriter will be destroyed.
*/
const sal_uInt8* getBlop();
2001-11-15 17:01:32 +00:00
/** returns the size of the new type blob in bytes.
*/
sal_uInt32 getBlopSize();
2000-09-18 14:18:43 +00:00
private:
RegistryTypeWriter(RegistryTypeWriter &) = delete;
void operator =(RegistryTypeWriter) = delete;
2000-09-18 14:18:43 +00:00
2001-11-15 17:01:32 +00:00
/// stores the handle of an implementation class
2000-09-18 14:18:43 +00:00
TypeWriterImpl m_hImpl;
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */