add const synonyms for wxGridTableBase::GetNumberRows/Cols(), using const_cast<> all the time is painful

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-09-20 22:03:27 +00:00
parent dfa569f0f9
commit 77d2c45c38
2 changed files with 45 additions and 2 deletions

View File

@@ -86,12 +86,42 @@ public:
/// Destructor frees the attribute provider if it was created.
virtual ~wxGridTableBase();
/// Must be overridden to return the number of rows in the table.
/**
Must be overridden to return the number of rows in the table.
For backwards compatibility reasons, this method is not const.
Use GetRowsCount() instead of it in const methods of derived table
classes.
*/
virtual int GetNumberRows() = 0;
/// Must be overridden to return the number of columns in the table.
/**
Must be overridden to return the number of columns in the table.
For backwards compatibility reasons, this method is not const.
Use GetColsCount() instead of it in const methods of derived table
classes,
*/
virtual int GetNumberCols() = 0;
/**
Return the number of rows in the table.
This method is not virtual and is only provided as a convenience for
the derived classes which can't call GetNumberRows() without a @c
const_cast from their const methods.
*/
int GetRowsCount() const;
/**
Return the number of columns in the table.
This method is not virtual and is only provided as a convenience for
the derived classes which can't call GetNumberCols() without a @c
const_cast from their const methods.
*/
int GetColsCount() const;
/**
Accessing table cells.