LibreOffice Module svl (master) 1
sharedstringpool.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#ifndef INCLUDED_SVL_SHAREDSTRINGPOOL_HXX
11#define INCLUDED_SVL_SHAREDSTRINGPOOL_HXX
12
13#include <svl/svldllapi.h>
14#include <rtl/ustring.hxx>
15#include <memory>
16
17class CharClass;
18
19namespace svl
20{
21class SharedString;
22
29{
30 struct Impl;
31 std::unique_ptr<Impl> mpImpl;
32
35
36public:
37 SharedStringPool(const CharClass& rCharClass);
39
48 SharedString intern(const OUString& rStr);
49
54 void purge();
55
56 // For unit tests. Note that an "empty" pool may contain some internal items,
57 // such as SharedString::getEmptyString().
58 size_t getCount() const;
59 size_t getCountIgnoreCase() const;
60};
61}
62
63#endif
64
65/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Storage for pool of shared strings.
SharedStringPool & operator=(const SharedStringPool &)=delete
SharedStringPool(const SharedStringPool &)=delete
std::unique_ptr< Impl > mpImpl
#define SVL_DLLPUBLIC
Definition: svldllapi.h:28