Added copy constructor and assignment operator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21729 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
69adf535c1
commit
04ed91ac9c
@ -15,6 +15,7 @@ struct user_disk_system_info;
|
||||
class BDiskSystem {
|
||||
public:
|
||||
BDiskSystem();
|
||||
BDiskSystem(const BDiskSystem& other);
|
||||
~BDiskSystem();
|
||||
|
||||
status_t InitCheck() const;
|
||||
@ -47,6 +48,8 @@ public:
|
||||
bool IsFileSystem() const;
|
||||
bool IsSubSystemFor(BPartition *parent) const;
|
||||
|
||||
BDiskSystem& operator=(const BDiskSystem& other);
|
||||
|
||||
private:
|
||||
status_t _SetTo(disk_system_id id);
|
||||
status_t _SetTo(user_disk_system_info *info);
|
||||
|
@ -18,6 +18,15 @@ BDiskSystem::BDiskSystem()
|
||||
{
|
||||
}
|
||||
|
||||
// copy constructor
|
||||
BDiskSystem::BDiskSystem(const BDiskSystem& other)
|
||||
: fID(other.fID),
|
||||
fName(other.fName),
|
||||
fPrettyName(other.fPrettyName),
|
||||
fFlags(other.fFlags)
|
||||
{
|
||||
}
|
||||
|
||||
// destructor
|
||||
BDiskSystem::~BDiskSystem()
|
||||
{
|
||||
@ -267,6 +276,18 @@ BDiskSystem::IsSubSystemFor(BPartition *parent) const
|
||||
parent->_ChangeCounter()));
|
||||
}
|
||||
|
||||
// =
|
||||
BDiskSystem&
|
||||
BDiskSystem::operator=(const BDiskSystem& other)
|
||||
{
|
||||
fID = other.fID;
|
||||
fName = other.fName;
|
||||
fPrettyName = other.fPrettyName;
|
||||
fFlags = other.fFlags;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
// _SetTo
|
||||
status_t
|
||||
BDiskSystem::_SetTo(disk_system_id id)
|
||||
|
Loading…
Reference in New Issue
Block a user