summaryrefslogtreecommitdiff
path: root/swig/NVRA.i
blob: f62d52985d305295a78c8d03e29e84fce0c0d069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
struct NVRA : public NVR
  {
    /** Default ctor */
    NVRA()
    {}

    /** Ctor */
    explicit
    NVRA( const std::string & name_r,
          const zypp::Edition & edition_r = Edition(),
          const Arch & arch_r = Arch() )
    : NVR( name_r, edition_r )
    , arch( arch_r )
    {}

    /** Ctor */
    explicit
    NVRA( const NVR & nvr_r,
          const Arch & arch_r = Arch() )
    : NVR( nvr_r )
    , arch( arch_r )
    {}

    /** Ctor from Resolvable::constPtr */
    explicit
    NVRA( ResTraits<Resolvable>::constPtrType res_r );

    /**  */
    Arch arch;

  public:
    /** Comparison mostly for std::container */
    static int compare( const NVRA & lhs, const NVRA & rhs )
    {
      int res = NVR::compare( lhs, rhs );
      if ( res )
        return res;
      return lhs.arch.compare( rhs.arch );
    }
  };