libzypp  17.38.17
zypp-core-ng-fwd.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \----------------------------------------------------------------------/
9 *
10 * Forward declarations for zypp-core pointer/reference types.
11 *
12 * Include this in a module GMF (#include inside the module; block) whenever
13 * a cppm purview needs only Ref/WeakRef/Ptr aliases or forward-declared types
14 * — not their full definitions.
15 *
16 * Rules:
17 * - Only types used purely by pointer, reference, or as opaque return/param
18 * types in declarations belong here.
19 * - Types used as base classes, by-value members, or in template
20 * instantiations that require the template body require their full header.
21 * - Types used by macros that expand inline (e.g. ZYPP_DEFINE_ID_HASHABLE)
22 * require their full header.
23 * - Add new entries as cppm files require them — do not pre-populate
24 * speculatively.
25 *
26 * Mirror of zypp-media/ng/providefwd.h for the zypp-core layer.
27 */
28 #ifndef ZYPP_CORE_NG_FWD_H_INCLUDED
29 #define ZYPP_CORE_NG_FWD_H_INCLUDED
30 
31 // Provides ZYPP_FWD_DECL_TYPE_WITH_REFS, Ref<T>, WeakRef<T>
33 
34 // ---------------------------------------------------------------------------
35 // zyppng:: types — used by Ref/WeakRef (std::shared_ptr / std::weak_ptr)
36 // ---------------------------------------------------------------------------
37 namespace zyppng {
38 
39  // Add further zyppng types below as cppm files require them.
40  ZYPP_FWD_DECL_TYPE_WITH_REFS( EventDispatcher );
41 
42 } // namespace zyppng
43 
44 // ---------------------------------------------------------------------------
45 // zypp:: types — forward declarations sufficient for cppm interface units.
46 //
47 // Rule: only add types here if they are used EXCLUSIVELY as const-ref / ref
48 // parameters or plain type aliases in cppm purviews. Types returned by value
49 // or used in inline function bodies require their full header in the cppm GMF
50 // — forward-declaring them triggers a GCC 16 ICE (is_really_empty_class) when
51 // incomplete return types propagate through the module graph.
52 //
53 // Types explicitly NOT listed here for this reason:
54 // zypp::ByteCount — returned by value from Solvable
55 // zypp::CheckSum — returned by value from Solvable
56 // zypp::Date — returned by value from Solvable and Repository
57 // zypp::Pathname — returned by value and used in inline bodies in Pool
58 //
59 // Note on zypp:: legacy pointer types: zypp uses boost::intrusive_ptr (via
60 // zypp::intrusive_ptr) — there is no std:: equivalent. Types needing _Ptr
61 // typedefs require PtrTypes.h and DEFINE_PTR_TYPE; add them only when the
62 // #if 0 blocks gating legacy integration are lifted.
63 // ---------------------------------------------------------------------------
64 namespace zypp {
65 
66  // Used as const-ref parameter in declarations only.
67  class InputStream;
68 
69  // Used as type aliases and const-ref in lookupattr / strmatcher interfaces.
70  class Match;
71  class StrMatcher;
72  struct MatchException;
73 
74  // Add further zypp:: types below as cppm files require them.
75 
76 } // namespace zypp
77 
78 #endif // ZYPP_CORE_NG_FWD_H_INCLUDED
ZYPP_FWD_DECL_TYPE_WITH_REFS(EventDispatcher)
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1