Deactivate copy constructor and assignment operator with "= delete"

This commit is contained in:
Markus Gans 2018-12-09 22:04:55 +01:00
parent 7ef9b154b9
commit fe0c22abe4
55 changed files with 297 additions and 387 deletions

View File

@ -1,5 +1,6 @@
2018-12-09 Markus Gans <guru.mail@muenster.de>
* Better handling of the scrollbar maximum
* Deactivate copy constructor and assignment operator with "= delete"
2018-12-06 Markus Gans <guru.mail@muenster.de>
* Easier handling of fc::SpecialCharacter

View File

@ -59,9 +59,15 @@ class FClassName
// Constructors
FClassName();
// Disable copy constructor
FClassName (const FClassName&) = delete;
// Destructor
~FClassName();
// Disable assignment operator (=)
FClassName& operator = (const FClassName&) = delete;
// Overloaded operators
// Accessors
@ -100,12 +106,6 @@ class FClassName
// Constants
// Disable copy constructor
FClassName (const FClassName&);
// Disable assignment operator (=)
FClassName& operator = (const FClassName&);
// Accessors
// Inquiries

View File

@ -40,15 +40,15 @@ class CheckList : public finalcut::FDialog
public:
// Constructor
explicit CheckList (finalcut::FWidget* = 0);
// Disable copy constructor
CheckList (const CheckList&) = delete;
// Destructor
~CheckList();
private:
// Disable copy constructor
CheckList (const CheckList&);
// Disable assignment operator (=)
CheckList& operator = (const CheckList&);
CheckList& operator = (const CheckList&) = delete;
private:
// Method
void populate();

View File

@ -78,15 +78,15 @@ class Listbox : public finalcut::FDialog
public:
// Constructor
explicit Listbox (FWidget* = 0);
// Disable copy constructor
Listbox (const Listbox&) = delete;
// Destructor
~Listbox();
private:
// Disable copy constructor
Listbox (const Listbox&);
// Disable assignment operator (=)
Listbox& operator = (const Listbox&);
Listbox& operator = (const Listbox&) = delete;
private:
// Event handlers
virtual void onClose (finalcut::FCloseEvent*);

View File

@ -40,15 +40,15 @@ class Listview : public finalcut::FDialog
public:
// Constructor
explicit Listview (finalcut::FWidget* = 0);
// Disable copy constructor
Listview (const Listview&) = delete;
// Destructor
~Listview();
private:
// Disable copy constructor
Listview (const Listview&);
// Disable assignment operator (=)
Listview& operator = (const Listview&);
Listview& operator = (const Listview&) = delete;
private:
// Method
void populate();

View File

@ -35,17 +35,15 @@ class Menu : public finalcut::FDialog
public:
// Constructor
explicit Menu (finalcut::FWidget* = 0);
// Disable copy constructor
Menu (const Menu&) = delete;
// Destructor
~Menu();
private:
// Disable copy constructor
Menu (const Menu&);
// Disable assignment operator (=)
Menu& operator = (const Menu&);
Menu& operator = (const Menu&) = delete;
private:
// Methods
void configureFileMenuItems();
void configureEditMenuItems();

View File

@ -35,20 +35,19 @@ class ColorChooser : public finalcut::FWidget
public:
// Constructor
explicit ColorChooser (finalcut::FWidget* = 0);
// Disable copy constructor
ColorChooser (const ColorChooser&) = delete;
// Destructor
~ColorChooser();
// Disable assignment operator (=)
ColorChooser& operator = (const ColorChooser&) = delete;
// Accessors
FColor getForeground();
FColor getBackground();
private:
// Disable copy constructor
ColorChooser (const ColorChooser&);
// Disable assignment operator (=)
ColorChooser& operator = (const ColorChooser&);
// Method
virtual void draw();
@ -172,10 +171,14 @@ class Brushes : public finalcut::FWidget
public:
// Constructor
explicit Brushes (finalcut::FWidget* = 0);
// Disable copy constructor
Brushes (const Brushes&) = delete;
// Destructor
~Brushes();
// Disable assignment operator (=)
Brushes& operator = (const Brushes&) = delete;
// Accessor
wchar_t getBrush();
@ -184,11 +187,6 @@ class Brushes : public finalcut::FWidget
void setBackground (FColor);
private:
// Disable copy constructor
Brushes (const Brushes&);
// Disable assignment operator (=)
Brushes& operator = (const Brushes&);
// Method
virtual void draw();
@ -311,10 +309,14 @@ class MouseDraw : public finalcut::FDialog
// Constructor
explicit MouseDraw (finalcut::FWidget* = 0);
// Disable copy constructor
MouseDraw (const MouseDraw&) = delete;
// Destructor
~MouseDraw();
// Disable assignment operator (=)
MouseDraw& operator = (const MouseDraw&) = delete;
// Methods
void setGeometry (int, int, std::size_t, std::size_t, bool = true);
@ -323,11 +325,6 @@ class MouseDraw : public finalcut::FDialog
virtual void onClose (finalcut::FCloseEvent*);
private:
// Disable copy constructor
MouseDraw (const MouseDraw&);
// Disable assignment operator (=)
MouseDraw& operator = (const MouseDraw&);
// Methods
virtual void draw();
void drawBrush (int, int, bool = false);

View File

@ -35,19 +35,18 @@ class Scrollview : public finalcut::FScrollView
public:
// Constructor
explicit Scrollview (finalcut::FWidget* = 0);
// Disable copy constructor
Scrollview (const Scrollview&) = delete;
// Destructor
~Scrollview ();
// Disable assignment operator (=)
Scrollview& operator = (const Scrollview&) = delete;
// Mutator
void setScrollSize (std::size_t, std::size_t);
private:
// Disable copy constructor
Scrollview (const Scrollview&);
// Disable assignment operator (=)
Scrollview& operator = (const Scrollview&);
// Method
virtual void draw();

View File

@ -35,10 +35,14 @@ class AttribDlg : public finalcut::FDialog
public:
// Constructor
explicit AttribDlg (finalcut::FWidget* = 0);
// Disable copy constructor
AttribDlg (const AttribDlg&) = delete;
// Destructor
~AttribDlg();
// Disable assignment operator (=)
AttribDlg& operator = (const AttribDlg&) = delete;
// Event handlers
virtual void onAccel (finalcut::FAccelEvent*);
virtual void onWheel (finalcut::FWheelEvent*);
@ -52,11 +56,6 @@ class AttribDlg : public finalcut::FDialog
FColor bgcolor;
private:
// Disable copy constructor
AttribDlg (const AttribDlg&);
// Disable assignment operator (=)
AttribDlg& operator = (const AttribDlg&);
// Method
virtual void adjustSize();

View File

@ -43,17 +43,15 @@ class Transparent : public finalcut::FDialog
// Constructor
explicit Transparent (finalcut::FWidget* = 0, trans_type = transparent);
// Disable copy constructor
Transparent (const Transparent&) = delete;
// Destructor
~Transparent();
private:
// Disable copy constructor
Transparent (const Transparent&);
// Disable assignment operator (=)
Transparent& operator = (const Transparent&);
Transparent& operator = (const Transparent&) = delete;
private:
// Method
virtual void draw();
@ -152,15 +150,16 @@ class MainWindow : public finalcut::FDialog
public:
// Constructor
explicit MainWindow (finalcut::FWidget* = 0);
// Disable copy constructor
MainWindow (const MainWindow&) = delete;
// Destructor
~MainWindow();
private:
// Disable copy constructor
MainWindow (const MainWindow&);
// Disable assignment operator (=)
MainWindow& operator = (const MainWindow&);
MainWindow& operator = (const MainWindow&) = delete;
private:
// Method
virtual void draw();
// Event handlers

View File

@ -115,18 +115,18 @@ class Treeview : public finalcut::FDialog
public:
// Constructor
explicit Treeview (finalcut::FWidget* = 0);
// Disable copy constructor
Treeview (const Treeview&) = delete;
// Destructor
~Treeview();
// Disable assignment operator (=)
Treeview& operator = (const Treeview&) = delete;
private:
// Typedefs
struct TreeItem; // forward declaration
// Disable copy constructor
Treeview (const Treeview&);
// Disable assignment operator (=)
Treeview& operator = (const Treeview&);
// Methods
virtual void adjustSize();

View File

@ -41,11 +41,12 @@ class ProgressDialog : public finalcut::FDialog
explicit ProgressDialog (finalcut::FWidget* = 0);
// Disable copy constructor
ProgressDialog (const ProgressDialog&) = delete;
// Disable assignment operator (=)
ProgressDialog& operator = (const ProgressDialog&) = delete;
// Destructor
~ProgressDialog();
// Disable assignment operator (=)
ProgressDialog& operator = (const ProgressDialog&) = delete;
private:
// Event handlers
virtual void onShow (finalcut::FShowEvent*);
@ -183,11 +184,12 @@ class TextWindow : public finalcut::FDialog
explicit TextWindow (finalcut::FWidget* = 0);
// Disable copy constructor
TextWindow (const TextWindow&) = delete;
// Disable assignment operator (=)
TextWindow& operator = (const TextWindow&) = delete;
// Destructor
~TextWindow();
// Disable assignment operator (=)
TextWindow& operator = (const TextWindow&) = delete;
// Method
void append (const finalcut::FString&);
@ -250,11 +252,12 @@ class MyDialog : public finalcut::FDialog
explicit MyDialog (finalcut::FWidget* = 0);
// Disable copy constructor
MyDialog (const MyDialog&) = delete;
// Disable assignment operator (=)
MyDialog& operator = (const MyDialog&) = delete;
// Destructor
~MyDialog();
// Disable assignment operator (=)
MyDialog& operator = (const MyDialog&) = delete;
private:
// Method
void initMenu();

View File

@ -36,10 +36,14 @@ class Watch : public finalcut::FDialog
public:
// Constructor
explicit Watch (finalcut::FWidget* = 0);
// Disable copy constructor
Watch (const Watch&) = delete;
// Destructor
~Watch();
// Disable assignment operator (=)
Watch& operator = (const Watch&) = delete;
// Method
void printTime();
@ -56,12 +60,6 @@ class Watch : public finalcut::FDialog
virtual void adjustSize();
private:
// Disable copy constructor
Watch (const Watch&);
// Disable assignment operator (=)
Watch& operator = (const Watch&);
// Data Members
bool sec{true};
finalcut::FLabel time_label{L"Time", this};

View File

@ -36,17 +36,15 @@ class SmallWindow : public finalcut::FDialog
public:
// Constructor
explicit SmallWindow (finalcut::FWidget* = 0);
// Disable copy constructor
SmallWindow (const SmallWindow&) = delete;
// Destructor
~SmallWindow();
private:
// Disable copy constructor
SmallWindow (const SmallWindow&);
// Disable assignment operator (=)
SmallWindow& operator = (const SmallWindow&);
SmallWindow& operator = (const SmallWindow&) = delete;
private:
// Method
virtual void adjustSize();
@ -167,42 +165,39 @@ class Window : public finalcut::FDialog
public:
// Constructor
explicit Window (finalcut::FWidget* = 0);
// Disable copy constructor
Window (const Window&) = delete;
// Destructor
~Window();
// Disable assignment operator (=)
Window& operator = (const Window&) = delete;
private:
// Typedefs
typedef void (Window::*WindowCallback)(finalcut::FWidget*, data_ptr);
typedef void (finalcut::FApplication::*FAppCallback)(finalcut::FWidget*, data_ptr);
class win_data
struct win_data
{
public:
// Constructor
win_data()
: is_open(false)
, title()
, dgl(0)
{ }
// Disable copy constructor
win_data (const win_data&) = delete;
// Disable assignment operator (=)
win_data& operator = (const win_data&) = delete;
// Data Members
bool is_open;
finalcut::FString title;
SmallWindow* dgl;
private:
// Disable copy constructor
win_data (const win_data&);
// Disable assignment operator (=)
win_data& operator = (const win_data&);
};
// Disable copy constructor
Window (const Window&);
// Disable assignment operator (=)
Window& operator = (const Window&);
// Method
void configureFileMenuItems();
void configureDialogButtons();

View File

@ -45,20 +45,19 @@ namespace fc
class emptyFString
{
public:
emptyFString()
{ }
// Constructors
emptyFString() = default;
// Disable copy constructor
emptyFString (const emptyFString&) = delete;
// Disable assignment operator (=)
emptyFString& operator = (const emptyFString&) = delete;
static bool isNull();
static const FString& get();
static void clear();
private:
// Disable copy constructor
emptyFString (const emptyFString&);
// Disable assignment operator (=)
emptyFString& operator = (const emptyFString&);
// Data Member
static const FString* empty_string;
};

View File

@ -84,10 +84,14 @@ class FApplication : public FWidget
public:
// Constructor
FApplication (const int&, char*[], bool = false);
// Disable copy constructor
FApplication (const FApplication&) = delete;
// Destructor
virtual ~FApplication();
// Disable assignment operator (=)
FApplication& operator = (const FApplication&) = delete;
// Accessors
const char* getClassName() const;
int getArgc() const;
@ -127,12 +131,6 @@ class FApplication : public FWidget
// Constants
static const int NEED_MORE_DATA = -1; // parseKeyString return value
// Disable copy constructor
FApplication (const FApplication&);
// Disable assignment operator (=)
FApplication& operator = (const FApplication&);
// Methods
void init (long, long);
void cmd_options (const int&, char*[]);

View File

@ -70,10 +70,14 @@ class FButton : public FWidget
// Constructors
explicit FButton (FWidget* = 0);
explicit FButton (const FString&, FWidget* = 0);
// Disable copy constructor
FButton (const FButton&) = delete;
// Destructor
virtual ~FButton();
// Disable assignment operator (=)
FButton& operator = (const FButton&) = delete;
// Accessors
const char* getClassName() const;
FString& getText();
@ -133,12 +137,6 @@ class FButton : public FWidget
// Constants
static const std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Disable copy constructor
FButton (const FButton&);
// Disable assignment operator (=)
FButton& operator = (const FButton&);
// Methods
void init();
uChar getHotkey();

View File

@ -74,10 +74,14 @@ class FButtonGroup : public FScrollView
// Constructors
explicit FButtonGroup (FWidget* = 0);
explicit FButtonGroup (const FString&, FWidget* = 0);
// Disable copy constructor
FButtonGroup (const FButtonGroup&) = delete;
// Destructor
virtual ~FButtonGroup();
// Disable assignment operator (=)
FButtonGroup& operator = (const FButtonGroup&) = delete;
// Accessor
const char* getClassName() const;
FToggleButton* getFirstButton();
@ -128,12 +132,6 @@ class FButtonGroup : public FScrollView
// Constants
static const std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Disable copy constructor
FButtonGroup (const FButtonGroup&);
// Disable assignment operator (=)
FButtonGroup& operator = (const FButtonGroup&);
// Inquiries
bool isRadioButton (FToggleButton*) const;

View File

@ -75,20 +75,18 @@ class FCheckBox : public FToggleButton
// Constructors
explicit FCheckBox (FWidget* = 0);
explicit FCheckBox (const FString&, FWidget* = 0);
// Disable copy constructor
FCheckBox (const FCheckBox&) = delete;
// Destructor
virtual ~FCheckBox();
// Disable assignment operator (=)
FCheckBox& operator = (const FCheckBox&) = delete;
// Accessor
const char* getClassName() const;
private:
// Disable copy constructor
FCheckBox (const FCheckBox&);
// Disable assignment operator (=)
FCheckBox& operator = (const FCheckBox&);
// Methods
void init();
virtual void draw();

View File

@ -75,20 +75,18 @@ class FCheckMenuItem : public FMenuItem
// Constructors
explicit FCheckMenuItem (FWidget* = 0);
explicit FCheckMenuItem (const FString&, FWidget* = 0);
// Disable copy constructor
FCheckMenuItem (const FCheckMenuItem&) = delete;
// Destructor
virtual ~FCheckMenuItem();
// Disable assignment operator (=)
FCheckMenuItem& operator = (const FCheckMenuItem&) = delete;
// Accessor
const char* getClassName() const;
private:
// Disable copy constructor
FCheckMenuItem (const FCheckMenuItem&);
// Disable assignment operator (=)
FCheckMenuItem& operator = (const FCheckMenuItem&);
// Methods
void init (FWidget*);
void processToggle();

View File

@ -89,10 +89,14 @@ class FDialog : public FWindow
// Constructors
explicit FDialog (FWidget* = 0);
explicit FDialog (const FString&, FWidget* = 0);
// Disable copy constructor
FDialog (const FDialog&) = delete;
// Destructor
virtual ~FDialog();
// Disable assignment operator (=)
FDialog& operator = (const FDialog&) = delete;
// Accessors
virtual const char* getClassName() const;
FString getText() const;
@ -172,12 +176,6 @@ class FDialog : public FWindow
// Using-declaration
using FWidget::drawBorder;
// Disable copy constructor
FDialog (const FDialog&);
// Disable assignment operator (=)
FDialog& operator = (const FDialog&);
// Methods
void init();
void initDialogMenu();

View File

@ -81,20 +81,18 @@ class FDialogListMenu : public FMenu
// Constructors
explicit FDialogListMenu (FWidget* = 0);
explicit FDialogListMenu (const FString&, FWidget* = 0);
// Disable copy constructor
FDialogListMenu (const FDialogListMenu&) = delete;
// Destructor
virtual ~FDialogListMenu();
// Disable assignment operator (=)
FDialogListMenu& operator = (const FDialogListMenu&) = delete;
// Accessors
virtual const char* getClassName() const;
private:
// Disable copy constructor
FDialogListMenu (const FDialogListMenu&);
// Disable assignment operator (=)
FDialogListMenu& operator = (const FDialogListMenu&);
// Method
void init();
};

View File

@ -236,7 +236,9 @@ class FAccelEvent : public FEvent // focus event
public:
FAccelEvent() = default;
FAccelEvent (int, void*);
FAccelEvent (const FAccelEvent&) = delete;
~FAccelEvent();
FAccelEvent& operator = (const FAccelEvent&) = delete;
void* focusedWidget() const;
bool isAccepted() const;
@ -246,12 +248,6 @@ class FAccelEvent : public FEvent // focus event
protected:
bool accpt{false};
void* focus_widget;
private:
// Disable copy constructor
FAccelEvent (const FAccelEvent&);
// Disable assignment operator (=)
FAccelEvent& operator = (const FAccelEvent&);
};
#pragma pack(pop)

View File

@ -91,10 +91,14 @@ class FKeyboard
// Constructor
FKeyboard();
// Disable copy constructor
FKeyboard (const FKeyboard&) = delete;
// Destructor
virtual ~FKeyboard();
// Disable assignment operator (=)
FKeyboard& operator = (const FKeyboard&) = delete;
// Accessors
virtual const char* getClassName() const;
FKey getKey();
@ -134,12 +138,6 @@ class FKeyboard
static const std::size_t READ_BUF_SIZE{1024};
static const FKey NOT_SET = static_cast<FKey>(-1);
// Disable copy constructor
FKeyboard (const FKeyboard&);
// Disable assignment operator (=)
FKeyboard& operator = (const FKeyboard&);
// Accessors
FKey getMouseProtocolKey();
FKey getTermcapKey();

View File

@ -75,10 +75,14 @@ class FLabel : public FWidget
// Constructor
explicit FLabel (FWidget* = 0);
explicit FLabel (const FString&, FWidget* = 0);
// Disable copy constructor
FLabel (const FLabel&) = delete;
// Destructor
virtual ~FLabel();
// Disable assignment operator (=)
FLabel& operator = (const FLabel&) = delete;
// Overloaded operators
FLabel& operator = (const FString&);
FLabel& operator << (const FString&);
@ -135,12 +139,6 @@ class FLabel : public FWidget
// Constants
static const std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Disable copy constructor
FLabel (const FLabel&);
// Disable assignment operator (=)
FLabel& operator = (const FLabel&);
// Methods
void init();
uChar getHotkey();

View File

@ -78,10 +78,14 @@ class FLineEdit : public FWidget
// Constructor
explicit FLineEdit (FWidget* = 0);
explicit FLineEdit (const FString&, FWidget* = 0);
// Disable copy constructor
FLineEdit (const FLineEdit&) = delete;
// Destructor
virtual ~FLineEdit();
// Disable assignment operator (=)
FLineEdit& operator = (const FLineEdit&) = delete;
// Overloaded operators
FLineEdit& operator = (const FString&);
FLineEdit& operator << (const FString&);
@ -147,12 +151,6 @@ class FLineEdit : public FWidget
scrollRight = 2
};
// Disable copy constructor
FLineEdit (const FLineEdit&);
// Disable assignment operator (=)
FLineEdit& operator = (const FLineEdit&);
// Methods
void init();
bool hasHotkey();

View File

@ -151,10 +151,14 @@ class FListBox : public FWidget
FListBox (Iterator, Iterator, InsertConverter, FWidget* = 0);
template <typename Container, typename LazyConverter>
FListBox (Container, LazyConverter, FWidget* = 0);
// Disable copy constructor
FListBox (const FListBox&) = delete;
// Destructor
virtual ~FListBox();
// Disable assignment operator (=)
FListBox& operator = (const FListBox&) = delete;
// Accessors
const char* getClassName() const;
std::size_t getCount() const;
@ -233,12 +237,6 @@ class FListBox : public FWidget
lazy_convert = 2
};
// Disable copy constructor
FListBox (const FListBox&);
// Disable assignment operator (=)
FListBox& operator = (const FListBox&);
// Accessors
static FString& getString (listBoxItems::iterator);

View File

@ -273,10 +273,14 @@ class FListView : public FWidget
// Constructor
explicit FListView (FWidget* = 0);
// Disable copy constructor
FListView (const FListView&) = delete;
// Destructor
virtual ~FListView();
// Disable assignment operator (=)
FListView& operator = (const FListView&) = delete;
// Accessors
const char* getClassName() const;
std::size_t getCount();
@ -356,12 +360,6 @@ class FListView : public FWidget
// Constants
static const int USE_MAX_SIZE = -1;
// Disable copy constructor
FListView (const FListView&);
// Disable assignment operator (=)
FListView& operator = (const FListView&);
// Methods
void init();
template <typename Compare>

View File

@ -80,10 +80,14 @@ class FMenu : public FWindow, public FMenuList
// Constructor
explicit FMenu (FWidget* = 0);
explicit FMenu (const FString&, FWidget* = 0);
// Disable copy constructor
FMenu (const FMenu&) = delete;
// Destructor
virtual ~FMenu();
// Disable assignment operator (=)
FMenu& operator = (const FMenu&) = delete;
// Accessors
virtual const char* getClassName() const;
FString getText() const;
@ -150,12 +154,6 @@ class FMenu : public FWindow, public FMenuList
// Constants
static const bool SELECT_ITEM = true;
// Disable copy constructor
FMenu (const FMenu&);
// Disable assignment operator (=)
FMenu& operator = (const FMenu&);
// Accessors
FWidget* getSuperMenu() const;

View File

@ -78,10 +78,14 @@ class FMenuBar : public FWindow, public FMenuList
public:
// Constructor
explicit FMenuBar (FWidget* = 0);
// Disable copy constructor
FMenuBar (const FMenuBar&) = delete;
// Destructor
virtual ~FMenuBar();
// Disable assignment operator (=)
FMenuBar& operator = (const FMenuBar&) = delete;
// Accessors
virtual const char* getClassName() const;
@ -114,12 +118,6 @@ class FMenuBar : public FWindow, public FMenuList
bool no_underline;
} menuText;
// Disable copy constructor
FMenuBar (const FMenuBar&);
// Disable assignment operator (=)
FMenuBar& operator = (const FMenuBar&);
// Inquiry
bool isMenu (FMenuItem*) const;

View File

@ -85,10 +85,14 @@ class FMenuItem : public FWidget
explicit FMenuItem (FWidget* = 0);
explicit FMenuItem (const FString&, FWidget* = 0);
FMenuItem (FKey, const FString&, FWidget* = 0);
// Disable copy constructor
FMenuItem (const FMenuItem&) = delete;
// Destructor
virtual ~FMenuItem();
// Disable assignment operator (=)
FMenuItem& operator = (const FMenuItem&) = delete;
// Accessors
const char* getClassName() const;
uChar getHotkey() const;
@ -160,12 +164,6 @@ class FMenuItem : public FWidget
FDialog* associated_window{0};
private:
// Disable copy constructor
FMenuItem (const FMenuItem&);
// Disable assignment operator (=)
FMenuItem& operator = (const FMenuItem&);
// Accessor
FMenuList* getFMenuList (FWidget&);

View File

@ -63,10 +63,14 @@ class FMenuList
public:
// Constructor
FMenuList() = default;
// Disable copy constructor
FMenuList (const FMenuList&) = delete;
// Destructor
virtual ~FMenuList();
// Disable assignment operator (=)
FMenuList& operator = (const FMenuList&) = delete;
// Accessors
virtual const char* getClassName() const;
std::size_t getCount() const;
@ -93,13 +97,6 @@ class FMenuList
protected:
FMenuItem* selected_item{};
std::vector<FMenuItem*> item_list{};
private:
// Disable copy constructor
FMenuList (const FMenuList&);
// Disable assignment operator (=)
FMenuList& operator = (const FMenuList&);
};
#pragma pack(pop)

View File

@ -72,10 +72,14 @@ class FObject
// Constructor
explicit FObject (FObject* = 0);
// Disable copy constructor
FObject (const FObject&) = delete;
// Destructor
virtual ~FObject();
// Disable assignment operator (=)
FObject& operator = (const FObject&) = delete;
// Accessors
virtual const char* getClassName() const;
FObject* getParent() const;
@ -136,12 +140,6 @@ class FObject
virtual void onTimer (FTimerEvent*);
private:
// Disable copy constructor
FObject (const FObject&);
// Disable assignment operator (=)
FObject& operator = (const FObject&);
// Method
virtual void performTimerAction (const FObject*, const FEvent*);

View File

@ -157,10 +157,14 @@ class FOptiAttr
// Constructor
FOptiAttr();
// Disable copy constructor
FOptiAttr (const FOptiAttr&) = delete;
// Destructor
virtual ~FOptiAttr();
// Disable assignment operator (=)
FOptiAttr& operator = (const FOptiAttr&) = delete;
// Friend operator functions
friend bool operator == (const charData&, const charData&);
friend bool operator != (const charData&, const charData&);
@ -258,12 +262,6 @@ class FOptiAttr
no_mode = 65536
};
// Disable copy constructor
FOptiAttr (const FOptiAttr&);
// Disable assignment operator (=)
FOptiAttr& operator = (const FOptiAttr&);
// Mutators
bool setTermBold (charData*&);
bool unsetTermBold (charData*&);

View File

@ -75,20 +75,18 @@ class FRadioButton : public FToggleButton
// Constructors
explicit FRadioButton (FWidget* = 0);
explicit FRadioButton (const FString&, FWidget* = 0);
// Disable copy constructor
FRadioButton (const FRadioButton&) = delete;
// Destructor
virtual ~FRadioButton();
// Disable assignment operator (=)
FRadioButton& operator = (const FRadioButton&) = delete;
// Accessor
const char* getClassName() const;
private:
// Disable copy constructor
FRadioButton (const FRadioButton&);
// Disable assignment operator (=)
FRadioButton& operator = (const FRadioButton&);
// Methods
void init();
virtual void draw();

View File

@ -75,20 +75,18 @@ class FRadioMenuItem : public FMenuItem
// Constructors
explicit FRadioMenuItem (FWidget* = 0);
explicit FRadioMenuItem (const FString&, FWidget* = 0);
// Disable copy constructor
FRadioMenuItem (const FRadioMenuItem&) = delete;
// Destructor
virtual ~FRadioMenuItem();
// Disable assignment operator (=)
FRadioMenuItem& operator = (const FRadioMenuItem&) = delete;
// Accessor
const char* getClassName() const;
private:
// Disable copy constructor
FRadioMenuItem (const FRadioMenuItem&);
// Disable assignment operator (=)
FRadioMenuItem& operator = (const FRadioMenuItem&);
// Methods
void init (FWidget*);
void processToggle();

View File

@ -86,10 +86,14 @@ class FScrollbar : public FWidget
// Constructors
explicit FScrollbar (FWidget* = 0);
explicit FScrollbar (int = fc::vertical, FWidget* = 0);
// Disable copy constructor
FScrollbar (const FScrollbar&) = delete;
// Destructor
virtual ~FScrollbar();
// Disable assignment operator (=)
FScrollbar& operator = (const FScrollbar&) = delete;
// Accessors
const char* getClassName() const;
int getValue() const;
@ -121,12 +125,6 @@ class FScrollbar : public FWidget
virtual void onTimer (FTimerEvent*);
private:
// Disable copy constructor
FScrollbar (const FScrollbar&);
// Disable assignment operator (=)
FScrollbar& operator = (const FScrollbar&);
// Methods
void init();
virtual void draw();

View File

@ -76,10 +76,14 @@ class FScrollView : public FWidget
// Constructor
explicit FScrollView (FWidget* = 0);
// Disable copy constructor
FScrollView (const FScrollView&) = delete;
// Destructor
virtual ~FScrollView();
// Disable assignment operator (=)
FScrollView& operator = (const FScrollView&) = delete;
// Accessors
const char* getClassName() const;
std::size_t getViewportWidth() const;
@ -150,12 +154,6 @@ class FScrollView : public FWidget
static const int vertical_border_spacing = 2;
static const int horizontal_border_spacing = 2;
// Disable copy constructor
FScrollView (const FScrollView&);
// Disable assignment operator (=)
FScrollView& operator = (const FScrollView&);
// Accessors
FPoint getViewportCursorPos();

View File

@ -82,10 +82,14 @@ class FStatusKey : public FWidget
// Constructors
explicit FStatusKey (FWidget* = 0);
FStatusKey (FKey, const FString&, FWidget* = 0);
// Disable copy constructor
FStatusKey (const FStatusKey&) = delete;
// Destructor
virtual ~FStatusKey();
// Disable assignment operator (=)
FStatusKey& operator = (const FStatusKey&) = delete;
// Accessors
virtual const char* getClassName() const;
virtual FKey getKey() const;
@ -108,12 +112,6 @@ class FStatusKey : public FWidget
virtual void onAccel (FAccelEvent*);
private:
// Disable copy constructor
FStatusKey (const FStatusKey&);
// Disable assignment operator (=)
FStatusKey& operator = (const FStatusKey&);
// Methods
void init (FWidget*);
void processActivate();
@ -195,10 +193,14 @@ class FStatusBar : public FWindow
public:
// Constructor
explicit FStatusBar (FWidget* = 0);
// Disable copy constructor
FStatusBar (const FStatusBar&) = delete;
// Destructor
virtual ~FStatusBar();
// Disable assignment operator (=)
FStatusBar& operator = (const FStatusBar&) = delete;
// Accessors
virtual const char* getClassName() const;
FStatusKey* getStatusKey (int) const;
@ -236,12 +238,6 @@ class FStatusBar : public FWindow
// Typedef
typedef std::vector<FStatusKey*> keyList;
// Disable copy constructor
FStatusBar (const FStatusBar&);
// Disable assignment operator (=)
FStatusBar& operator = (const FStatusBar&);
// Methods
void init();
virtual void draw();

View File

@ -263,9 +263,9 @@ class FString
private:
// Constants
static const uInt FWDBUFFER = 15;
static const uInt INPBUFFER = 200;
static const uInt CHAR_SIZE = sizeof(wchar_t); // bytes per character
static const uInt FWDBUFFER = 15;
static const uInt INPBUFFER = 200;
static const uInt CHAR_SIZE = sizeof(wchar_t); // bytes per character
// Methods
void initLength (std::size_t);

View File

@ -75,10 +75,14 @@ class FSwitch : public FToggleButton
// Constructors
explicit FSwitch (FWidget* = 0);
explicit FSwitch (const FString&, FWidget* = 0);
// Disable copy constructor
FSwitch (const FSwitch&) = delete;
// Destructor
virtual ~FSwitch();
// Disable assignment operator (=)
FSwitch& operator = (const FSwitch&) = delete;
// Accessor
const char* getClassName() const;
@ -91,12 +95,6 @@ class FSwitch : public FToggleButton
virtual void onMouseUp (FMouseEvent*);
private:
// Disable copy constructor
FSwitch (const FSwitch&);
// Disable assignment operator (=)
FSwitch& operator = (const FSwitch&);
// Methods
virtual void draw();
void drawCheckButton();

View File

@ -161,10 +161,14 @@ class FTerm
// Constructor
explicit FTerm (bool = false);
// Disable copy constructor
FTerm (const FTerm&) = delete;
// Destructor
virtual ~FTerm();
// Disable assignment operator (=)
FTerm& operator = (const FTerm&) = delete;
// Accessors
virtual const char* getClassName() const;
static FKeyboard* getKeyboard();
@ -328,11 +332,6 @@ class FTerm
} init_values;
private:
// Disable copy constructor
FTerm (const FTerm&);
// Disable assignment operator (=)
FTerm& operator = (const FTerm&);
// Methods
static void init_global_values (bool);
static void init_terminal_device_path();

View File

@ -60,7 +60,6 @@ class FTermBuffer
// Constructor
FTermBuffer() = default;
// Destructor
virtual ~FTermBuffer();

View File

@ -64,7 +64,7 @@
// FTermcap string macro
#define TCAP(s) tcap[(s)].string
#define TCAP(...) tcap[__VA_ARGS__].string
namespace finalcut
{

View File

@ -61,10 +61,14 @@ class FTermData
// Constructors
FTermData() = default;
// Disable copy constructor
FTermData (const FTermData&) = delete;
// Destructor
~FTermData() = default;
// Disable assignment operator (=)
FTermData& operator = (const FTermData&) = delete;
// Accessors
const char* getClassName() const;
encodingMap& getEncodingList();
@ -121,12 +125,6 @@ class FTermData
#endif
private:
// Disable copy constructor
FTermData (const FTermData&);
// Disable assignment operator (=)
FTermData& operator = (const FTermData&);
// Data Members
encodingMap encoding_list{};
fc::encoding term_encoding{fc::UNKNOWN};

View File

@ -48,10 +48,14 @@ class FTermDebugData
public:
// Constructors
FTermDebugData() = default;
// Disable copy constructor
FTermDebugData (const FTermDebugData&) = delete;
// Destructor
~FTermDebugData() = default;
// Disable assignment operator (=)
FTermDebugData& operator = (const FTermDebugData&) = delete;
// Accessors
const FString& getAnswerbackString();
const FString& getSecDAString();
@ -66,12 +70,6 @@ class FTermDebugData
void setFTermData (FTermData*);
private:
// Disable copy constructor
FTermDebugData (const FTermDebugData&);
// Disable assignment operator (=)
FTermDebugData& operator = (const FTermDebugData&);
// Data Members
FTermDetection* term_detection{0};
FTermData* data{0};

View File

@ -64,10 +64,14 @@ class FTermFreeBSD
// Constructors
FTermFreeBSD() = default;
// Disable copy constructor
FTermFreeBSD (const FTermFreeBSD&) = delete;
// Destructor
virtual ~FTermFreeBSD() = default;
// Disable assignment operator (=)
FTermFreeBSD& operator = (const FTermFreeBSD&) = delete;
// Accessors
const char* getClassName() const;
static CursorStyle getCursorStyle();
@ -89,12 +93,6 @@ class FTermFreeBSD
static void restoreCursorStyle();
private:
// Disable copy constructor
FTermFreeBSD (const FTermFreeBSD&);
// Disable assignment operator (=)
FTermFreeBSD& operator = (const FTermFreeBSD&);
// Methods
static bool saveFreeBSDAltKey();
static bool setFreeBSDAltKey (uInt);

View File

@ -71,10 +71,14 @@ class FTermLinux
public:
// Constructors
FTermLinux() = default;
// Disable copy constructor
FTermLinux (const FTermLinux&) = delete;
// Destructor
virtual ~FTermLinux();
// Disable assignment operator (=)
FTermLinux& operator = (const FTermLinux&) = delete;
// Accessors
const char* getClassName() const;
static fc::linuxConsoleCursorStyle getCursorStyle();
@ -130,12 +134,6 @@ class FTermLinux
rgb color[16];
} ColorMap;
// Disable copy constructor
FTermLinux (const FTermLinux&);
// Disable assignment operator (=)
FTermLinux& operator = (const FTermLinux&);
// Accessors
static int getFramebuffer_bpp();
static bool getScreenFont();

View File

@ -57,10 +57,14 @@ class FTermOpenBSD
public:
// Constructors
FTermOpenBSD() = default;
// Disable copy constructor
FTermOpenBSD (const FTermOpenBSD&) = delete;
// Destructor
virtual ~FTermOpenBSD() = default;
// Disable assignment operator (=)
FTermOpenBSD& operator = (const FTermOpenBSD&) = delete;
// Accessor
const char* getClassName() const;
@ -76,12 +80,6 @@ class FTermOpenBSD
static void finish();
private:
// Disable copy constructor
FTermOpenBSD (const FTermOpenBSD&);
// Disable assignment operator (=)
FTermOpenBSD& operator = (const FTermOpenBSD&);
#if defined(__NetBSD__) || defined(__OpenBSD__)
// Methods
static bool saveBSDConsoleEncoding();

View File

@ -78,10 +78,14 @@ class FTextView : public FWidget
// Constructor
explicit FTextView (FWidget* = 0);
// Disable copy constructor
FTextView (const FTextView&) = delete;
// Destructor
virtual ~FTextView();
// Disable assignment operator (=)
FTextView& operator = (const FTextView&) = delete;
// Accessors
const char* getClassName() const;
std::size_t getColumns() const;
@ -123,12 +127,6 @@ class FTextView : public FWidget
virtual void adjustSize();
private:
// Disable copy constructor
FTextView (const FTextView&);
// Disable assignment operator (=)
FTextView& operator = (const FTextView&);
// Accessors
std::size_t getTextHeight();
std::size_t getTextWidth();

View File

@ -76,10 +76,14 @@ class FToggleButton : public FWidget
// Constructors
explicit FToggleButton (FWidget* = 0);
explicit FToggleButton (const FString&, FWidget* = 0);
// Disable copy constructor
FToggleButton (const FToggleButton&) = delete;
// Destructor
virtual ~FToggleButton();
// Disable assignment operator (=)
FToggleButton& operator = (const FToggleButton&) = delete;
// Accessors
virtual const char* getClassName() const;
FString& getText();
@ -146,12 +150,6 @@ class FToggleButton : public FWidget
// Constants
static const std::size_t NOT_SET = static_cast<std::size_t>(-1);
// Disable copy constructor
FToggleButton (const FToggleButton&);
// Disable assignment operator (=)
FToggleButton& operator = (const FToggleButton&);
// Mutator
void setGroup (FButtonGroup*);

View File

@ -77,10 +77,14 @@ class FToolTip : public FWindow
// Constructor
explicit FToolTip (FWidget* = 0);
explicit FToolTip (const FString&, FWidget* = 0);
// Disable copy constructor
FToolTip (const FToolTip&) = delete;
// Destructor
virtual ~FToolTip ();
// Disable assignment operator (=)
FToolTip& operator = (const FToolTip&) = delete;
// Accessors
const char* getClassName() const;
const FString getText() const;
@ -97,12 +101,6 @@ class FToolTip : public FWindow
virtual void onMouseDown (FMouseEvent*);
private:
// Disable copy constructor
FToolTip (const FToolTip&);
// Disable assignment operator (=)
FToolTip& operator = (const FToolTip&);
// Methods
void init();
void calculateDimensions();

View File

@ -118,10 +118,14 @@ class FVTerm
// Constructor
explicit FVTerm (bool, bool = false);
// Disable copy constructor
FVTerm (const FVTerm&) = delete;
// Destructor
virtual ~FVTerm();
// Disable assignment operator (=)
FVTerm& operator = (const FVTerm&) = delete;
// Overloaded operators
template <typename type>
FVTerm& operator << (const type&);
@ -445,12 +449,6 @@ class FVTerm
static const uInt TERMINAL_OUTPUT_BUFFER_SIZE = 32768;
// Buffer size for character output on the terminal
// Disable copy constructor
FVTerm (const FVTerm&);
// Disable assignment operator (=)
FVTerm& operator = (const FVTerm&);
// Mutators
void setPrintArea (term_area*);
@ -528,9 +526,16 @@ class FVTerm
struct FVTerm::term_area // define virtual terminal character properties
{
public:
// Constructor
term_area() = default;
// Disable copy constructor
term_area (const term_area&) = delete;
// Destructor
~term_area() = default;
// Disable assignment operator (=)
term_area& operator = (const term_area&) = delete;
int offset_left{0}; // Distance from left terminal side
int offset_top{0}; // Distance from top of the terminal
int width{-1}; // Window width
@ -548,12 +553,6 @@ struct FVTerm::term_area // define virtual terminal character properties
bool input_cursor_visible{false};
bool has_changes{false};
bool visible{false};
private:
// Disable copy constructor
term_area (const term_area&);
// Disable assignment operator (=)
term_area& operator = (const term_area&);
};
#pragma pack(pop)

View File

@ -167,10 +167,14 @@ class FWidget : public FVTerm, public FObject
// Constructor
explicit FWidget (FWidget* = 0, bool = false);
// Disable copy constructor
FWidget (const FWidget&) = delete;
// Destructor
virtual ~FWidget();
// Disable assignment operator (=)
FWidget& operator = (const FWidget&) = delete;
// Accessors
const char* getClassName() const;
FWidget* getRootWidget() const;
@ -406,12 +410,6 @@ class FWidget : public FVTerm, public FObject
CallbackObjects callback_objects{};
private:
// Disable copy constructor
FWidget (const FWidget&);
// Disable assignment operator (=)
FWidget& operator = (const FWidget&);
// Methods
void init();
void finish();

View File

@ -83,10 +83,14 @@ class FWindow : public FWidget
// Constructor
explicit FWindow (FWidget* = 0);
// Disable copy constructor
FWindow (const FWindow&) = delete;
// Destructor
virtual ~FWindow ();
// Disable assignment operator (=)
FWindow& operator = (const FWindow&) = delete;
// Accessors
const char* getClassName() const;
static FWindow* getWindowWidget (const FWidget*);
@ -168,12 +172,6 @@ class FWindow : public FWidget
static FWindow* previous_window;
private:
// Disable copy constructor
FWindow (const FWindow&);
// Disable assignment operator (=)
FWindow& operator = (const FWindow&);
// Methods
static void deleteFromAlwaysOnTopList (FWidget*);
static void processAlwaysOnTop();