LibreOffice Module vcl (master)  1
pdfobjectcontainer.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  */
9 
10 #pragma once
11 
12 #include <sal/types.h>
13 
14 namespace vcl
15 {
17 class SAL_NO_VTABLE SAL_DLLPUBLIC_RTTI PDFObjectContainer
18 {
19 public:
20  /* adds an entry to m_aObjects and returns its index+1,
21  * sets the offset to ~0
22  */
23  virtual sal_Int32 createObject() = 0;
24  /* sets the offset of object n to the current position of output file+1
25  */
26  virtual bool updateObject(sal_Int32 n) = 0;
27 
28  // Write pBuffer to the end of the output.
29  virtual bool writeBuffer(const void* pBuffer, sal_uInt64 nBytes) = 0;
30 
31 protected:
32  ~PDFObjectContainer() noexcept = default;
33 };
34 }
35 
36 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sal_Int64 n
#define SAL_NO_VTABLE
Allows creating, updating and writing PDF objects in a container.