libzypp: zypp/ng/sat/stringpool.h Source File

libzypp 17.38.15

stringpool.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8----------------------------------------------------------------------/
9*
10* This file contains private API, this might break at any time between releases.
11* You have been warned!
12*
13*/
14// LEGACY-REQUIRED
15//
16// This header is consumed by Tier-3 (zypp/) and/or Tier-2 (zypp-logic/) code
17// and therefore must remain in zypp-logic/. Do not migrate or delete until
18// `grep -rn 'zypp/ng/sat/stringpool' zypp/ zypp-logic/` returns no hits.
19#ifndef ZYPPNG_SAT_STRINGPOOL_H_INCLUDED
20#define ZYPPNG_SAT_STRINGPOOL_H_INCLUDED
21
22// poolconstants.h has been migrated to zyppng:sat_poolconstants module partition.
23// StringPool only needs the raw C types from libsolv + PoolDefines — include directly.
24extern "C" {
25#include <solv/pool.h>
26#include <solv/pool_parserpmrichdep.h>
27}
28#include <zypp/sat/detail/PoolDefines.h>
29
30namespace zyppng::sat {
31
46 class StringPool {
47
48 public:
52 static StringPool &instance();
53
58 ~StringPool();
59
64 zypp::sat::detail::CPool * operator->()
65 { return _pool; }
66
71 zypp::sat::detail::CPool * getPool() const
72 { return _pool; }
73
75 zypp::sat::detail::IdType parserpmrichdep( const char * capstr_r )
76 { return ::pool_parserpmrichdep( _pool, capstr_r ); }
77
78 /* Delete copy and move semantics to maintain singleton integrity */
79 StringPool(const StringPool &) = delete;
80 StringPool(StringPool &&) = delete;
81 StringPool &operator=(const StringPool &) = delete;
82 StringPool &operator=(StringPool &&) = delete;
83
84 private:
85 StringPool();
86
87 private:
90 zypp::sat::detail::CPool * _pool;
91 };
92
93}
94#endif
95
PoolDefines.h
zypp::StringPool::StringPool
StringPool(const StringPool &)=delete
zypp::StringPool::instance
static StringPool & instance()
Access the global StringPool instance.
Definition stringpool.cc:18
zyppng::sat::StringPool::StringPool
StringPool()
Definition stringpool.cc:29
zyppng::sat::StringPool::operator->
zypp::sat::detail::CPool * operator->()
Pointer style access forwarded to the raw sat-pool.
Definition stringpool.h:64
zyppng::sat::StringPool::StringPool
StringPool(const StringPool &)=delete
zyppng::sat::StringPool::getPool
zypp::sat::detail::CPool * getPool() const
Explicit accessor for the raw sat-pool.
Definition stringpool.h:71
zyppng::sat::StringPool::operator=
StringPool & operator=(StringPool &&)=delete
zyppng::sat::StringPool::operator=
StringPool & operator=(const StringPool &)=delete
zyppng::sat::StringPool::StringPool
StringPool(StringPool &&)=delete
zyppng::sat::StringPool::_pool
zypp::sat::detail::CPool * _pool
Internal pointer to the libsolv pool structure (CPool).
Definition stringpool.h:90
zyppng::sat::StringPool::parserpmrichdep
zypp::sat::detail::IdType parserpmrichdep(const char *capstr_r)
libsolv capability parser
Definition stringpool.h:75
zypp::sat::detail::IdType
int IdType
Generic Id type.
Definition PoolDefines.h:44
zypp::sat::detail::CPool
::s_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
Definition PoolDefines.h:36
zyppng::sat
Definition stringpool.cc:16