libzypp 17.38.6
capabilities.cc
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12
13#include "capabilities.h"
14
15#include <iostream>
17
18using std::endl;
19
20namespace zyppng::sat
21{
23 : _begin( base_r )
24 {
25 if ( ! _begin )
26 return;
27
28 if ( skip_r )
29 {
30 for ( const sat::detail::IdType * end = _begin; *end; ++end )
31 {
32 if ( *end == skip_r )
33 {
34 _begin = end+1;
35 return;
36 }
37 }
38 }
39 // skipp all ==> empty
40 _begin = 0;
41 }
42
43
45 {
46 if ( ! _begin )
47 return 0;
48
49 // jump over libsolvs internal ids.
51 for ( const sat::detail::IdType * end = _begin; *end; ++end )
52 {
54 ++ret;
55 }
56 return ret;
57 }
58} // namespace zyppng::sat
59
size_type size() const
Number of capabilities inside.
Capabilities()
Default ctor.
const_iterator end() const
Iterator pointing behind the last Capability.
const sat::detail::IdType * _begin
bool isDepMarkerId(IdType id_r)
Test for internal ids satlib includes in dependencies.
Definition PoolDefines.h:57
zypp::sat::detail::IdType IdType
This file contains private API, this might break at any time between releases.