2 * Copyright 2013, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Ingo Weinhold <ingo_weinhold@gmx.de>
10 #include <package/solver/SolverPackage.h>
13 namespace BPackageKit
{
16 BSolverPackage::BSolverPackage(BSolverRepository
* repository
,
17 const BPackageInfo
& packageInfo
)
19 fRepository(repository
),
25 BSolverPackage::BSolverPackage(const BSolverPackage
& other
)
27 fRepository(other
.fRepository
),
33 BSolverPackage::~BSolverPackage()
39 BSolverPackage::Repository() const
46 BSolverPackage::Info() const
53 BSolverPackage::Name() const
60 BSolverPackage::VersionedName() const
62 if (fInfo
.Version().InitCheck() != B_OK
)
64 BString result
= Name();
65 return result
<< '-' << fInfo
.Version().ToString();
69 const BPackageVersion
&
70 BSolverPackage::Version() const
72 return fInfo
.Version();
77 BSolverPackage::operator=(const BSolverPackage
& other
)
79 fRepository
= other
.fRepository
;
85 } // namespace BPackageKit