1 /* 2 * Copyright 2013, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Ingo Weinhold <ingo_weinhold@gmx.de> 7 */ 8 9 10 #include <package/solver/SolverPackageSpecifier.h> 11 12 13 namespace BPackageKit { 14 15 16 BSolverPackageSpecifier::BSolverPackageSpecifier() 17 : 18 fRepository(NULL), 19 fExpression() 20 { 21 } 22 23 24 BSolverPackageSpecifier::BSolverPackageSpecifier( 25 const BPackageResolvableExpression& expression) 26 : 27 fRepository(NULL), 28 fExpression(expression) 29 { 30 } 31 32 33 BSolverPackageSpecifier::BSolverPackageSpecifier(BSolverRepository* repository, 34 const BPackageResolvableExpression& expression) 35 : 36 fRepository(repository), 37 fExpression(expression) 38 { 39 } 40 41 42 BSolverPackageSpecifier::BSolverPackageSpecifier( 43 const BSolverPackageSpecifier& other) 44 : 45 fRepository(other.fRepository), 46 fExpression(other.fExpression) 47 { 48 } 49 50 51 BSolverPackageSpecifier::~BSolverPackageSpecifier() 52 { 53 } 54 55 56 BSolverRepository* 57 BSolverPackageSpecifier::Repository() const 58 { 59 return fRepository; 60 } 61 62 63 const BPackageResolvableExpression& 64 BSolverPackageSpecifier::Expression() const 65 { 66 return fExpression; 67 } 68 69 70 BSolverPackageSpecifier& 71 BSolverPackageSpecifier::operator=(const BSolverPackageSpecifier& other) 72 { 73 fRepository = other.fRepository; 74 fExpression = other.fExpression; 75 return *this; 76 } 77 78 79 } // namespace BPackageKit 80