2010-10-27 13:11:31 +01:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 15:18:56 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 10:53:21 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2005-09-29 12:03:19 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2005-09-29 12:03:19 +00:00
|
|
|
*
|
2008-04-11 10:53:21 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-11 10:53:21 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-11 10:53:21 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-11 10:53:21 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
2008-04-11 10:53:21 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 15:18:56 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#ifndef _BUFFER_HXX
|
|
|
|
#define _BUFFER_HXX
|
|
|
|
|
|
|
|
#include <tools/solar.h>
|
|
|
|
#include <tools/string.hxx>
|
|
|
|
|
|
|
|
class SbiParser;
|
|
|
|
|
|
|
|
class SbiBuffer { // Code/Konstanten-Puffer:
|
|
|
|
SbiParser* pParser; // fuer Fehlermeldungen
|
|
|
|
char* pBuf; // Puffer-Pointer
|
|
|
|
char* pCur; // aktueller Puffer-Pointer
|
2011-01-10 14:40:57 +01:00
|
|
|
sal_uInt32 nOff; // aktuelles Offset
|
|
|
|
sal_uInt32 nSize; // aktuelle Groesse
|
2000-09-18 15:18:56 +00:00
|
|
|
short nInc; // Inkrement
|
2011-01-10 14:40:57 +01:00
|
|
|
sal_Bool Check( sal_uInt16 ); // Buffergroesse testen
|
2000-09-18 15:18:56 +00:00
|
|
|
public:
|
|
|
|
SbiBuffer( SbiParser*, short ); // Inkrement
|
|
|
|
~SbiBuffer();
|
2011-01-10 14:40:57 +01:00
|
|
|
void Patch( sal_uInt32, sal_uInt32 ); // Patchen
|
|
|
|
void Chain( sal_uInt32 ); // Back-Chain
|
|
|
|
void Align( sal_Int32 ); // Alignment
|
|
|
|
sal_Bool Add( const void*, sal_uInt16 );// Element anfuegen
|
|
|
|
sal_Bool operator += (const String&);// Basic-String speichern
|
|
|
|
sal_Bool operator += (sal_Int8); // Zeichen speichern
|
|
|
|
sal_Bool operator += (sal_Int16); // Integer speichern
|
|
|
|
sal_Bool operator += (sal_uInt8); // Zeichen speichern
|
|
|
|
sal_Bool operator += (sal_uInt16); // Integer speichern
|
|
|
|
sal_Bool operator += (sal_uInt32); // Integer speichern
|
|
|
|
sal_Bool operator += (sal_Int32); // Integer speichern
|
2000-09-18 15:18:56 +00:00
|
|
|
char* GetBuffer(); // Puffer rausgeben (selbst loeschen!)
|
2006-11-01 15:15:15 +00:00
|
|
|
char* GetBufferPtr(){ return pBuf; }
|
2011-01-10 14:40:57 +01:00
|
|
|
sal_uInt32 GetSize() { return nOff; }
|
2000-09-18 15:18:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2010-10-27 13:11:31 +01:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|