BPicture: Fix archive constructor.
[haiku.git] / src / kits / package / solver / SolverPackageSpecifier.cpp
blob686e7532dd2d2943eb5843fec7b6a619aca736a0
1 /*
2 * Copyright 2013, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Ingo Weinhold <ingo_weinhold@gmx.de>
7 */
10 #include <package/solver/SolverPackageSpecifier.h>
13 namespace BPackageKit {
16 BSolverPackageSpecifier::BSolverPackageSpecifier()
18 fType(B_UNSPECIFIED),
19 fPackage(NULL),
20 fSelectString()
25 BSolverPackageSpecifier::BSolverPackageSpecifier(BSolverPackage* package)
27 fType(B_PACKAGE),
28 fPackage(package),
29 fSelectString()
34 BSolverPackageSpecifier::BSolverPackageSpecifier(const BString& selectString)
36 fType(B_SELECT_STRING),
37 fPackage(NULL),
38 fSelectString(selectString)
43 BSolverPackageSpecifier::BSolverPackageSpecifier(
44 const BSolverPackageSpecifier& other)
46 fType(other.fType),
47 fPackage(other.fPackage),
48 fSelectString(other.fSelectString)
53 BSolverPackageSpecifier::~BSolverPackageSpecifier()
58 BSolverPackageSpecifier::BType
59 BSolverPackageSpecifier::Type() const
61 return fType;
65 BSolverPackage*
66 BSolverPackageSpecifier::Package() const
68 return fPackage;
72 const BString&
73 BSolverPackageSpecifier::SelectString() const
75 return fSelectString;
79 BSolverPackageSpecifier&
80 BSolverPackageSpecifier::operator=(const BSolverPackageSpecifier& other)
82 fType = other.fType;
83 fPackage = other.fPackage;
84 fSelectString = other.fSelectString;
85 return *this;
89 } // namespace BPackageKit