libzypp  13.10.6
Capability.cc
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #include <iostream>
13 #include "zypp/base/Logger.h"
14 
15 #include "zypp/base/String.h"
16 #include "zypp/base/Regex.h"
17 #include "zypp/base/Gettext.h"
18 #include "zypp/base/Exception.h"
19 
20 #include "zypp/Arch.h"
21 #include "zypp/Rel.h"
22 #include "zypp/Edition.h"
23 #include "zypp/Capability.h"
24 
26 #include "zypp/sat/Pool.h"
27 #include "zypp/ResPool.h"
28 
29 using std::endl;
30 
32 namespace zypp
33 {
34  namespace
36  {
37 
39  inline std::string::size_type backskipWs( const std::string & str_r, std::string::size_type pos_r )
40  {
41  for ( ; pos_r != std::string::npos; --pos_r )
42  {
43  char ch = str_r[pos_r];
44  if ( ch != ' ' && ch != '\t' )
45  break;
46  }
47  return pos_r;
48  }
49 
51  inline std::string::size_type backskipNWs( const std::string & str_r, std::string::size_type pos_r )
52  {
53  for ( ; pos_r != std::string::npos; --pos_r )
54  {
55  char ch = str_r[pos_r];
56  if ( ch == ' ' || ch == '\t' )
57  break;
58  }
59  return pos_r;
60  }
61 
63  void splitOpEdition( std::string & str_r, Rel & op_r, Edition & ed_r )
64  {
65  if ( str_r.empty() )
66  return;
67  std::string::size_type ch( str_r.size()-1 );
68 
69  // check whether the one but last word is a valid Rel:
70  if ( (ch = backskipWs( str_r, ch )) != std::string::npos )
71  {
72  std::string::size_type ee( ch );
73  if ( (ch = backskipNWs( str_r, ch )) != std::string::npos )
74  {
75  std::string::size_type eb( ch );
76  if ( (ch = backskipWs( str_r, ch )) != std::string::npos )
77  {
78  std::string::size_type oe( ch );
79  ch = backskipNWs( str_r, ch ); // now before 'op'? begin
80  if ( op_r.parseFrom( str_r.substr( ch+1, oe-ch ) ) )
81  {
82  // found a legal 'op'
83  ed_r = Edition( str_r.substr( eb+1, ee-eb ) );
84  if ( ch != std::string::npos ) // 'op' is not at str_r begin, so skip WS
85  ch = backskipWs( str_r, ch );
86  str_r.erase( ch+1 );
87  return;
88  }
89  }
90  }
91  }
92  // HERE: Didn't find 'name op edition'
93  // As a convenience we check for an embeded 'op' (not surounded by WS).
94  // But just '[<=>]=?|!=' and not inside '()'.
95  ch = str_r.find_last_of( "<=>)" );
96  if ( ch != std::string::npos && str_r[ch] != ')' )
97  {
98  std::string::size_type oe( ch );
99 
100  // do edition first:
101  ch = str_r.find_first_not_of( " \t", oe+1 );
102  if ( ch != std::string::npos )
103  ed_r = Edition( str_r.substr( ch ) );
104 
105  // now finish op:
106  ch = oe-1;
107  if ( str_r[oe] != '=' ) // '[<>]'
108  {
109  op_r = ( str_r[oe] == '<' ) ? Rel::LT : Rel::GT;
110  }
111  else
112  { // '?='
113  if ( ch != std::string::npos )
114  {
115  switch ( str_r[ch] )
116  {
117  case '<': --ch; op_r = Rel::LE; break;
118  case '>': --ch; op_r = Rel::GE; break;
119  case '!': --ch; op_r = Rel::NE; break;
120  case '=': --ch; // fall through
121  default: op_r = Rel::EQ; break;
122  }
123  }
124  }
125 
126  // finally name:
127  if ( ch != std::string::npos ) // 'op' is not at str_r begin, so skip WS
128  ch = backskipWs( str_r, ch );
129  str_r.erase( ch+1 );
130  return;
131  }
132  // HERE: It's a plain 'name'
133  }
134 
137  sat::detail::IdType relFromStr( ::_Pool * pool_r,
138  const Arch & arch_r,
139  const std::string & name_r,
140  Rel op_r,
141  const Edition & ed_r,
142  const ResKind & kind_r )
143  {
144  // First build the name, non-packages prefixed by kind
145  sat::Solvable::SplitIdent split( kind_r, name_r );
146  sat::detail::IdType nid( split.ident().id() );
147 
148  if ( split.kind() == ResKind::srcpackage )
149  {
150  // map 'kind srcpackage' to 'arch src', the pseudo architecture
151  // libsolv uses.
152  nid = ::pool_rel2id( pool_r, nid, IdString(ARCH_SRC).id(), REL_ARCH, /*create*/true );
153  }
154 
155  // Extend name by architecture, if provided and not a srcpackage
156  if ( ! arch_r.empty() && kind_r != ResKind::srcpackage )
157  {
158  nid = ::pool_rel2id( pool_r, nid, arch_r.id(), REL_ARCH, /*create*/true );
159  }
160 
161  // Extend 'op edition', if provided
162  if ( op_r != Rel::ANY && ed_r != Edition::noedition )
163  {
164  nid = ::pool_rel2id( pool_r, nid, ed_r.id(), op_r.bits(), /*create*/true );
165  }
166 
167  return nid;
168  }
169 
173  sat::detail::IdType relFromStr( ::_Pool * pool_r,
174  const std::string & name_r, Rel op_r, const Edition & ed_r,
175  const ResKind & kind_r )
176  {
177  static const Arch srcArch( IdString(ARCH_SRC).asString() );
178  static const std::string srcKindPrefix( ResKind::srcpackage.asString() + ':' );
179 
180  // check for an embedded 'srcpackage:foo' to be mapped to 'foo' and 'ResKind::srcpackage'.
181  if ( kind_r.empty() && str::hasPrefix( name_r, srcKindPrefix ) )
182  {
183  return relFromStr( pool_r, Arch_empty, name_r.substr( srcKindPrefix.size() ), op_r, ed_r, ResKind::srcpackage );
184  }
185 
186  Arch arch( Arch_empty );
187  std::string name( name_r );
188 
189  std::string::size_type asep( name_r.rfind( "." ) );
190  if ( asep != std::string::npos )
191  {
192  Arch ext( name_r.substr( asep+1 ) );
193  if ( ext.isBuiltIn() || ext == srcArch )
194  {
195  arch = ext;
196  name.erase( asep );
197  }
198  }
199 
200  return relFromStr( pool_r, arch, name, op_r, ed_r, kind_r );
201  }
202 
205  sat::detail::IdType relFromStr( ::_Pool * pool_r,
206  const Arch & arch_r, // parse from name if empty
207  const std::string & str_r, const ResKind & kind_r,
208  Capability::CtorFlag flag_r )
209  {
210  std::string name( str_r );
211  Rel op;
212  Edition ed;
213  if ( flag_r == Capability::UNPARSED )
214  {
215  splitOpEdition( name, op, ed );
216  }
217 
218  if ( arch_r.empty() )
219  return relFromStr( pool_r, name, op, ed, kind_r ); // parses for name[.arch]
220  // else
221  return relFromStr( pool_r, arch_r, name, op, ed, kind_r );
222  }
223 
225  } // namespace
227 
228  const Capability Capability::Null( STRID_NULL );
229  const Capability Capability::Empty( STRID_EMPTY );
230 
232 
233  Capability::Capability( const char * str_r, const ResKind & prefix_r, CtorFlag flag_r )
234  : _id( relFromStr( myPool().getPool(), Arch_empty, str_r, prefix_r, flag_r ) )
235  {}
236 
237  Capability::Capability( const std::string & str_r, const ResKind & prefix_r, CtorFlag flag_r )
238  : _id( relFromStr( myPool().getPool(), Arch_empty, str_r.c_str(), prefix_r, flag_r ) )
239  {}
240 
241  Capability::Capability( const Arch & arch_r, const char * str_r, const ResKind & prefix_r, CtorFlag flag_r )
242  : _id( relFromStr( myPool().getPool(), arch_r, str_r, prefix_r, flag_r ) )
243  {}
244 
245  Capability::Capability( const Arch & arch_r, const std::string & str_r, const ResKind & prefix_r, CtorFlag flag_r )
246  : _id( relFromStr( myPool().getPool(), arch_r, str_r.c_str(), prefix_r, flag_r ) )
247  {}
248 
249  Capability::Capability( const char * str_r, CtorFlag flag_r, const ResKind & prefix_r )
250  : _id( relFromStr( myPool().getPool(), Arch_empty, str_r, prefix_r, flag_r ) )
251  {}
252 
253  Capability::Capability( const std::string & str_r, CtorFlag flag_r, const ResKind & prefix_r )
254  : _id( relFromStr( myPool().getPool(), Arch_empty, str_r, prefix_r, flag_r ) )
255  {}
256 
257  Capability::Capability( const Arch & arch_r, const char * str_r, CtorFlag flag_r, const ResKind & prefix_r )
258  : _id( relFromStr( myPool().getPool(), arch_r, str_r, prefix_r, flag_r ) )
259  {}
260 
261  Capability::Capability( const Arch & arch_r, const std::string & str_r, CtorFlag flag_r, const ResKind & prefix_r )
262  : _id( relFromStr( myPool().getPool(), arch_r, str_r, prefix_r, flag_r ) )
263  {}
264 
266  // Ctor from <name[.arch] op edition>.
268 
269  Capability::Capability( const std::string & name_r, const std::string & op_r, const std::string & ed_r, const ResKind & prefix_r )
270  : _id( relFromStr( myPool().getPool(), name_r, Rel(op_r), Edition(ed_r), prefix_r ) )
271  {}
272  Capability::Capability( const std::string & name_r, Rel op_r, const std::string & ed_r, const ResKind & prefix_r )
273  : _id( relFromStr( myPool().getPool(), name_r, op_r, Edition(ed_r), prefix_r ) )
274  {}
275  Capability::Capability( const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r )
276  : _id( relFromStr( myPool().getPool(), name_r, op_r, ed_r, prefix_r ) )
277  {}
278 
280  // Ctor from <arch name op edition>.
282 
283  Capability::Capability( const std::string & arch_r, const std::string & name_r, const std::string & op_r, const std::string & ed_r, const ResKind & prefix_r )
284  : _id( relFromStr( myPool().getPool(), Arch(arch_r), name_r, Rel(op_r), Edition(ed_r), prefix_r ) )
285  {}
286  Capability::Capability( const std::string & arch_r, const std::string & name_r, Rel op_r, const std::string & ed_r, const ResKind & prefix_r )
287  : _id( relFromStr( myPool().getPool(), Arch(arch_r), name_r, op_r, Edition(ed_r), prefix_r ) )
288  {}
289  Capability::Capability( const std::string & arch_r, const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r )
290  : _id( relFromStr( myPool().getPool(), Arch(arch_r), name_r, op_r, ed_r, prefix_r ) )
291  {}
292  Capability::Capability( const Arch & arch_r, const std::string & name_r, const std::string & op_r, const std::string & ed_r, const ResKind & prefix_r )
293  : _id( relFromStr( myPool().getPool(), arch_r, name_r, Rel(op_r), Edition(ed_r), prefix_r ) )
294  {}
295  Capability::Capability( const Arch & arch_r, const std::string & name_r, Rel op_r, const std::string & ed_r, const ResKind & prefix_r )
296  : _id( relFromStr( myPool().getPool(), arch_r, name_r, op_r, Edition(ed_r), prefix_r ) )
297  {}
298  Capability::Capability( const Arch & arch_r, const std::string & name_r, Rel op_r, const Edition & ed_r, const ResKind & prefix_r )
299  : _id( relFromStr( myPool().getPool(), arch_r, name_r, op_r, ed_r, prefix_r ) )
300  {}
301 
302  const char * Capability::c_str() const
303  { return( _id ? ::pool_dep2str( myPool().getPool(), _id ) : "" ); }
304 
306  {
307 #warning MIGRATE TO SAT
308 #warning TESTCASE
309  if ( lhs == rhs )
310  return CapMatch::yes;
311 
312  CapDetail l( lhs );
313  CapDetail r( rhs );
314 
315  switch ( l.kind() )
316  {
317  case CapDetail::NOCAP:
318  return( r.kind() == CapDetail::NOCAP ); // NOCAP matches NOCAP only
319  break;
321  return CapMatch::irrelevant;
322  break;
323  case CapDetail::NAMED:
325  break;
326  }
327 
328  switch ( r.kind() )
329  {
330  case CapDetail::NOCAP:
331  return CapMatch::no; // match case handled above
332  break;
334  return CapMatch::irrelevant;
335  break;
336  case CapDetail::NAMED:
338  break;
339  }
340  // comparing two simple caps:
341  if ( l.name() != r.name() )
342  return CapMatch::no;
343 
344  // if both are arch restricted they must match
345  if ( l.arch() != r.arch()
346  && ! ( l.arch().empty() || r.arch().empty() ) )
347  return CapMatch::no;
348 
349  // isNamed matches ANY edition:
350  if ( l.isNamed() || r.isNamed() )
351  return CapMatch::yes;
352 
353  // both are versioned:
354  return overlaps( Edition::MatchRange( l.op(), l.ed() ),
355  Edition::MatchRange( r.op(), r.ed() ) );
356  }
357 
358  bool Capability::isInterestingFileSpec( const char * name_r )
359  {
360  static str::smatch what;
361  static const str::regex filenameRegex(
362  "/(s?bin|lib(64)?|etc)/|^/usr/(games/|share/(dict/words|magic\\.mime)$)|^/opt/gnome/games/",
364 
365  return str::regex_match( name_r, what, filenameRegex );
366  }
367 
368  Capability Capability::guessPackageSpec( const std::string & str_r, bool & rewrote_r )
369  {
370  Capability cap( str_r );
371  CapDetail detail( cap.detail() );
372 
373  // str_r might be the form "libzypp-1.2.3-4.5(.arch)'
374  // correctly parsed as name capability by the ctor.
375  if ( detail.isNamed() && ::strrchr( detail.name().c_str(), '-' ) && sat::WhatProvides( cap ).empty() )
376  {
377  Arch origArch( detail.arch() ); // to support a trailing .arch
378 
379  std::string guess( detail.name().asString() );
380  std::string::size_type pos( guess.rfind( '-' ) );
381  guess[pos] = '=';
382 
383  Capability guesscap( origArch, guess );
384  detail = guesscap.detail();
385 
386  ResPool pool( ResPool::instance() );
387  // require name part matching a pool items name (not just provides!)
388  if ( pool.byIdentBegin( detail.name() ) != pool.byIdentEnd( detail.name() ) )
389  {
390  rewrote_r = true;
391  return guesscap;
392  }
393 
394  // try the one but last '-'
395  if ( pos )
396  {
397  guess[pos] = '-';
398  if ( (pos = guess.rfind( '-', pos-1 )) != std::string::npos )
399  {
400  guess[pos] = '=';
401 
402  guesscap = Capability( origArch, guess );
403  detail = guesscap.detail();
404 
405  // require name part matching a pool items name (not just provides!)
406  if ( pool.byIdentBegin( detail.name() ) != pool.byIdentEnd( detail.name() ) )
407  {
408  rewrote_r = true;
409  return guesscap;
410  }
411  }
412  }
413  }
414 
415  rewrote_r = false;
416  return cap;
417  }
418 
419  Capability Capability::guessPackageSpec( const std::string & str_r )
420  {
421  bool dummy;
422  return guessPackageSpec( str_r, dummy );
423  }
424 
425  /******************************************************************
426  **
427  ** FUNCTION NAME : operator<<
428  ** FUNCTION TYPE : std::ostream &
429  */
430  std::ostream & operator<<( std::ostream & str, const Capability & obj )
431  {
432  return str << obj.detail();
433  }
434 
435  std::ostream & dumpOn( std::ostream & str, const Capability & obj )
436  {
437  return str << obj.detail();
438  }
439 
441  //
442  // CLASS NAME : CapDetail
443  //
445 
447  {
448  // : _kind( NOCAP ), _lhs( id_r ), _rhs( 0 ), _flag( 0 ), _archIfSimple( 0 )
449 
451  return; // NOCAP
452 
453  if ( ! ISRELDEP(_lhs) )
454  {
455  // this is name without arch!
456  _kind = NAMED;
457  return;
458  }
459 
460  ::Reldep * rd = GETRELDEP( myPool().getPool(), _lhs );
461  _lhs = rd->name;
462  _rhs = rd->evr;
463  _flag = rd->flags;
464 
465  if ( Rel::isRel( _flag ) )
466  {
467  _kind = VERSIONED;
468  // Check for name.arch...
469  if ( ! ISRELDEP(_lhs) )
470  return; // this is name without arch!
471  rd = GETRELDEP( myPool().getPool(), _lhs );
472  if ( rd->flags != CAP_ARCH )
473  return; // this is not name.arch
474  // This is name.arch:
475  _lhs = rd->name;
476  _archIfSimple = rd->evr;
477  }
478  else if ( rd->flags == CAP_ARCH )
479  {
480  _kind = NAMED;
481  // This is name.arch:
482  _lhs = rd->name;
483  _archIfSimple = rd->evr;
484  }
485  else
486  {
487  _kind = EXPRESSION;
488  return;
489  }
490  // map back libsolvs pseudo arch 'src' to kind srcpackage
491  if ( _archIfSimple == ARCH_SRC )
492  {
493  _lhs = IdString( (ResKind::srcpackage.asString() + ":" + IdString(_lhs).c_str()).c_str() ).id();
494  _archIfSimple = 0;
495  }
496  }
497 
498  /******************************************************************
499  **
500  ** FUNCTION NAME : operator<<
501  ** FUNCTION TYPE : std::ostream &
502  */
503  std::ostream & operator<<( std::ostream & str, const CapDetail & obj )
504  {
505  static const char archsep = '.';
506  switch ( obj.kind() )
507  {
508  case CapDetail::NOCAP:
509  return str << "<NoCap>";
510  break;
511  case CapDetail::NAMED:
512  str << obj.name();
513  if ( obj.hasArch() )
514  str << archsep << obj.arch();
515  return str;
516  break;
518  str << obj.name();
519  if ( obj.hasArch() )
520  str << archsep << obj.arch();
521  return str << " " << obj.op() << " " << obj.ed();
522  break;
524  switch ( obj.capRel() )
525  {
526  case CapDetail::REL_NONE:
527  case CapDetail::CAP_AND:
528  case CapDetail::CAP_OR:
529  case CapDetail::CAP_WITH:
530  case CapDetail::CAP_ARCH:
531  return str << obj.lhs().detail() << " " << obj.capRel() << " " << obj.rhs().detail();
532  break;
534  return str << obj.lhs().detail() << "(" << obj.rhs().detail() << ")";
535  }
536  break;
537  }
538  return str << "<UnknownCap>";
539  }
540 
541  std::ostream & operator<<( std::ostream & str, CapDetail::Kind obj )
542  {
543  switch ( obj )
544  {
545  case CapDetail::NOCAP: return str << "NoCap"; break;
546  case CapDetail::NAMED: return str << "NamedCap"; break;
547  case CapDetail::VERSIONED: return str << "VersionedCap"; break;
548  case CapDetail::EXPRESSION: return str << "CapExpression"; break;
549  }
550  return str << "UnknownCap";
551  }
552 
553  std::ostream & operator<<( std::ostream & str, CapDetail::CapRel obj )
554  {
555  switch ( obj )
556  {
557  case CapDetail::REL_NONE: return str << "NoCapRel"; break;
558  case CapDetail::CAP_AND: return str << "&"; break; // AND
559  case CapDetail::CAP_OR: return str << "|"; break; // OR
560  case CapDetail::CAP_WITH: return str << "+"; break; // WITH
561  case CapDetail::CAP_NAMESPACE: return str << "NAMESPACE"; break;
562  case CapDetail::CAP_ARCH: return str << "ARCH"; break;
563  }
564  return str << "UnknownCapRel";
565  }
566 
568 } // namespace zypp
Interface to gettext.
static const Rel NE
Definition: Rel.h:51
static const Rel LT
Definition: Rel.h:52
int IdType
Generic Id type.
Definition: PoolMember.h:82
static const Rel GT
Definition: Rel.h:54
Container of Solvable providing a Capability (read only).
Definition: WhatProvides.h:87
Regular expression.
Definition: Regex.h:86
CapRel capRel() const
Definition: Capability.h:344
static CapMatch _doMatch(sat::detail::IdType lhs, sat::detail::IdType rhs)
Match two Capabilities.
Definition: Capability.cc:305
static Capability guessPackageSpec(const std::string &str_r)
Capability parser also guessing &quot;libzypp-1.2.3-4.5.x86_64&quot; formats.
Definition: Capability.cc:419
Helper providing more detailed information about a Capability.
Definition: Capability.h:289
unsigned split(const C_Str &line_r, _OutputIterator result_r, const C_Str &sepchars_r=" \t")
Split line_r into words.
Definition: String.h:394
Architecture.
Definition: Arch.h:36
bool empty() const
Whether the container is empty.
IdType id() const
Expert backdoor.
Definition: IdString.h:103
Relational operators.
Definition: Rel.h:43
static const CapMatch no
Definition: CapMatch.h:52
static const Rel EQ
Definition: Rel.h:50
bool isNamed() const
Definition: Capability.h:327
const Arch Arch_empty(IdString::Empty)
static const Rel LE
Definition: Rel.h:53
static const ResKind srcpackage
Definition: ResKind.h:47
Access to the sat-pools string space.
Definition: IdString.h:39
Edition represents [epoch:]version[-release]
Definition: Edition.h:60
static const Rel ANY
Definition: Rel.h:56
byIdent_iterator byIdentEnd(const ByIdent &ident_r) const
Definition: ResPool.h:178
static bool isInterestingFileSpec(const IdString &name_r)
Test for a filename that is likely being REQUIRED.
Definition: Capability.h:207
Support for substring addressing of matches is not required.
Definition: Regex.h:92
std::string asString() const
Conversion to std::string
Definition: IdString.h:83
Capability lhs() const
Definition: Capability.h:343
static const CapMatch irrelevant
Definition: CapMatch.h:53
CapDetail detail() const
Helper providing more detailed information about a Capability.
Definition: Capability.h:370
static const IdType emptyId(1)
static bool isRel(unsigned bits_r)
Test whether bits_r is a valid Rel (no extra bits set).
Definition: Rel.h:111
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:120
Kind kind() const
Definition: Capability.h:325
static const Rel GE
Definition: Rel.h:55
IdString arch() const
Definition: Capability.h:335
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
Definition: Capability.cc:435
static PoolImpl & myPool()
Definition: PoolImpl.cc:164
Tri state Capability match result.
Definition: CapMatch.h:37
const char * c_str() const
Conversion to const char *
Definition: IdString.cc:42
static const Capability Null
No or Null Capability ( Id 0 ).
Definition: Capability.h:128
SolvableIdType size_type
Definition: PoolMember.h:99
std::string asString(const Patch::SeverityFlag &obj)
Definition: Patch.cc:149
bool overlaps(const Range< _Tp, _Compare > &lhs, const Range< _Tp, _Compare > &rhs)
Definition: Range.h:68
Regular expression match result.
Definition: Regex.h:145
Global ResObject pool.
Definition: ResPool.h:48
sat::detail::IdType _lhs
Definition: Capability.h:352
sat::detail::IdType _archIfSimple
Definition: Capability.h:355
A sat capability.
Definition: Capability.h:59
unsigned _flag
Definition: Capability.h:354
static const IdType noId(0)
Edition ed() const
Definition: Capability.h:338
sat::detail::IdType _id
Definition: Capability.h:250
static const Capability Empty
Empty Capability.
Definition: Capability.h:131
Capability()
Default ctor, Empty capability.
Definition: Capability.h:66
bool regex_match(const std::string &s, smatch &matches, const regex &regex)
regex ZYPP_STR_REGEX regex ZYPP_STR_REGEX
Definition: Regex.h:70
const char * c_str() const
Conversion to const char *
Definition: Capability.cc:302
Capability rhs() const
Definition: Capability.h:345
sat::detail::IdType _rhs
Definition: Capability.h:353
bool empty() const
Whether the string is empty.
Definition: IdString.h:72
CapRel
Enum values corresponding with libsolv defines.
Definition: Capability.h:303
static const CapMatch yes
Definition: CapMatch.h:51
Resolvable kinds.
Definition: ResKind.h:35
Rel op() const
Definition: Capability.h:337
byIdent_iterator byIdentBegin(const ByIdent &ident_r) const
Definition: ResPool.h:147
bool hasPrefix(const C_Str &str_r, const C_Str &prefix_r)
Return whether str_r has prefix prefix_r.
Definition: String.h:828
IdString name() const
Definition: Capability.h:336
bool hasArch() const
Definition: Capability.h:334
static const Edition noedition
Value representing noedition (&quot;&quot;) This is in fact a valid Edition.
Definition: Edition.h:73
static ResPool instance()
Singleton ctor.
Definition: ResPool.cc:33