Orcus
Toggle main menu visibility
Loading...
Searching...
No Matches
include
orcus
string_pool.hpp
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This Source Code Form is subject to the terms of the Mozilla Public
4
* License, v. 2.0. If a copy of the MPL was not distributed with this
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
*/
7
8
#ifndef INCLUDED_ORCUS_STRING_POOL_HPP
9
#define INCLUDED_ORCUS_STRING_POOL_HPP
10
11
#include "env.hpp"
12
13
#include <string>
14
#include <memory>
15
#include <vector>
16
17
namespace
orcus {
18
25
class
ORCUS_PSR_DLLPUBLIC string_pool
26
{
27
public
:
28
string_pool(
const
string_pool&) =
delete
;
29
string_pool& operator=(
const
string_pool&) =
delete
;
30
31
string_pool();
32
string_pool(string_pool&& other);
33
~string_pool();
34
44
std::pair<std::string_view, bool>
intern
(std::string_view str);
45
51
std::vector<std::string_view>
get_interned_strings
()
const
;
52
58
void
dump
()
const
;
59
63
void
clear
();
64
70
size_t
size
()
const
;
71
78
void
swap
(string_pool& other);
79
89
void
merge
(string_pool& other);
90
91
private
:
92
struct
impl;
93
std::unique_ptr<impl> mp_impl;
94
};
95
96
}
97
98
#endif
99
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
orcus::string_pool::dump
void dump() const
orcus::string_pool::intern
std::pair< std::string_view, bool > intern(std::string_view str)
orcus::string_pool::swap
void swap(string_pool &other)
orcus::string_pool::clear
void clear()
orcus::string_pool::merge
void merge(string_pool &other)
orcus::string_pool::get_interned_strings
std::vector< std::string_view > get_interned_strings() const
orcus::string_pool::size
size_t size() const
Generated on
for Orcus by
1.17.0