Forbid copying and assignment in layout classes.

Specifically in:
 * BAbstractLayout
 * BAbstractLayoutItem
 * BGridLayout
 * BGridView
 * BGroupLayout
 * BGroupView
 * BLayout
 * BSplitView
 * BTwoDimensionalLayout
This commit is contained in:
Alex Wilson 2011-11-04 22:23:22 -06:00
parent 8151838e38
commit e044d51aa8
9 changed files with 41 additions and 0 deletions

View File

@ -57,6 +57,10 @@ private:
virtual void _ReservedAbstractLayout9();
virtual void _ReservedAbstractLayout10();
// forbidden methods
BAbstractLayout(const BAbstractLayout&);
void operator =(const BAbstractLayout&);
struct Proxy;
struct ViewProxy;
struct DataProxy;

View File

@ -47,6 +47,10 @@ private:
virtual void _ReservedAbstractLayoutItem9();
virtual void _ReservedAbstractLayoutItem10();
// forbidden methods
BAbstractLayoutItem(const BAbstractLayoutItem&);
void operator =(const BAbstractLayoutItem&);
BSize fMinSize;
BSize fMaxSize;
BSize fPreferredSize;

View File

@ -111,6 +111,10 @@ private:
virtual void _ReservedGridLayout9();
virtual void _ReservedGridLayout10();
// forbidden methods
BGridLayout(const BGridLayout&);
void operator =(const BGridLayout&);
BLayoutItem*** fGrid;
int32 fColumnCount;
int32 fRowCount;

View File

@ -24,6 +24,12 @@ public:
BGridLayout* GridLayout() const;
static BArchivable* Instantiate(BMessage* from);
private:
// forbidden methods
BGridView(const BGridView&);
void operator =(const BGridView&);
};

View File

@ -75,6 +75,10 @@ private:
virtual void _ReservedGroupLayout9();
virtual void _ReservedGroupLayout10();
// forbidden methods
BGroupLayout(const BGroupLayout&);
void operator =(const BGroupLayout&);
struct ItemLayoutData;
ItemLayoutData* _LayoutDataForItem(BLayoutItem* item) const;

View File

@ -25,6 +25,12 @@ public:
BGroupLayout* GroupLayout() const;
static BArchivable* Instantiate(BMessage* from);
private:
// forbidden methods
BGroupView(const BGroupView&);
void operator =(const BGroupView&);
};

View File

@ -104,6 +104,10 @@ private:
virtual void _ReservedLayout9();
virtual void _ReservedLayout10();
// forbidden methods
BLayout(const BLayout&);
void operator =(const BLayout&);
friend class BView;
void SetOwner(BView* owner);

View File

@ -93,6 +93,10 @@ private:
virtual void _ReservedSplitView9();
virtual void _ReservedSplitView10();
// forbidden methods
BSplitView(const BSplitView&);
void operator =(const BSplitView&);
static void _DrawDefaultSplitter(BView* view, BRect frame,
const BRect& updateRect,
enum orientation orientation,

View File

@ -110,6 +110,11 @@ private:
virtual void _ReservedTwoDimensionalLayout9();
virtual void _ReservedTwoDimensionalLayout10();
// forbidden methods
BTwoDimensionalLayout(
const BTwoDimensionalLayout&);
void operator =(const BTwoDimensionalLayout&);
LocalLayouter* fLocalLayouter;
uint32 _reserved[5];