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:
@@ -15,6 +15,7 @@ struct user_disk_system_info;
|
|||||||
class BDiskSystem {
|
class BDiskSystem {
|
||||||
public:
|
public:
|
||||||
BDiskSystem();
|
BDiskSystem();
|
||||||
|
BDiskSystem(const BDiskSystem& other);
|
||||||
~BDiskSystem();
|
~BDiskSystem();
|
||||||
|
|
||||||
status_t InitCheck() const;
|
status_t InitCheck() const;
|
||||||
@@ -47,6 +48,8 @@ public:
|
|||||||
bool IsFileSystem() const;
|
bool IsFileSystem() const;
|
||||||
bool IsSubSystemFor(BPartition *parent) const;
|
bool IsSubSystemFor(BPartition *parent) const;
|
||||||
|
|
||||||
|
BDiskSystem& operator=(const BDiskSystem& other);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
status_t _SetTo(disk_system_id id);
|
status_t _SetTo(disk_system_id id);
|
||||||
status_t _SetTo(user_disk_system_info *info);
|
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
|
// destructor
|
||||||
BDiskSystem::~BDiskSystem()
|
BDiskSystem::~BDiskSystem()
|
||||||
{
|
{
|
||||||
@@ -267,6 +276,18 @@ BDiskSystem::IsSubSystemFor(BPartition *parent) const
|
|||||||
parent->_ChangeCounter()));
|
parent->_ChangeCounter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// =
|
||||||
|
BDiskSystem&
|
||||||
|
BDiskSystem::operator=(const BDiskSystem& other)
|
||||||
|
{
|
||||||
|
fID = other.fID;
|
||||||
|
fName = other.fName;
|
||||||
|
fPrettyName = other.fPrettyName;
|
||||||
|
fFlags = other.fFlags;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
// _SetTo
|
// _SetTo
|
||||||
status_t
|
status_t
|
||||||
BDiskSystem::_SetTo(disk_system_id id)
|
BDiskSystem::_SetTo(disk_system_id id)
|
||||||
|
|||||||
Reference in New Issue
Block a user