JX Application Framework
|
#include <JPackedTableData.h>
Public Member Functions | |
JPackedTableData (const T &defValue) | |
JPackedTableData (const JPackedTableData< T > &source) | |
~JPackedTableData () override | |
const JRunArray< T > & | GetData () const |
T | GetItem (const JIndex row, const JIndex col) const |
T | GetItem (const JPoint &cell) const |
void | SetItem (const JIndex row, const JIndex col, const T &data) |
void | SetItem (const JPoint &cell, const T &data) |
void | GetRow (const JIndex index, JList< T > *rowData) const |
void | SetRow (const JIndex index, const JList< T > &rowData) |
void | SetRow (const JIndex index, const T &data) |
void | SetPartialRow (const JIndex rowIndex, const JIndex firstColIndex, const JIndex lastColIndex, const T &data) |
void | GetCol (const JIndex index, JList< T > *colData) const |
void | SetCol (const JIndex index, const JList< T > &colData) |
void | SetCol (const JIndex index, const T &data) |
void | SetPartialCol (const JIndex colIndex, const JIndex firstRowIndex, const JIndex lastRowIndex, const T &data) |
void | SetRect (const JRect &rect, const T &data) |
void | SetRect (const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h, const T &data) |
void | ApplyToRect (const JRect &rect, T(*f)(const T &)) |
void | ApplyToRect (const JCoordinate x, const JCoordinate y, const JCoordinate w, const JCoordinate h, T(*f)(const T &)) |
void | InsertRows (const JIndex index, const JSize count, const JList< T > *initData=nullptr) |
void | PrependRows (const JSize count, const JList< T > *initData=nullptr) |
void | AppendRows (const JSize count, const JList< T > *initData=nullptr) |
void | DuplicateRow (const JIndex origIndex, const JIndex newIndex) |
void | RemoveRow (const JIndex index) |
void | RemoveNextRows (const JIndex firstIndex, const JSize count) |
void | RemovePrevRows (const JIndex lastIndex, const JSize count) |
void | RemoveAllRows () |
void | MoveRow (const JIndex origIndex, const JIndex newIndex) |
void | InsertCols (const JIndex index, const JSize count, const JList< T > *initData=nullptr) |
void | PrependCols (const JSize count, const JList< T > *initData=nullptr) |
void | AppendCols (const JSize count, const JList< T > *initData=nullptr) |
void | DuplicateCol (const JIndex origIndex, const JIndex newIndex) |
void | RemoveCol (const JIndex index) |
void | RemoveNextCols (const JIndex firstIndex, const JSize count) |
void | RemovePrevCols (const JIndex lastIndex, const JSize count) |
void | RemoveAllCols () |
void | MoveCol (const JIndex origIndex, const JIndex newIndex) |
void | SetAllElements (const T &data) |
void | ClearAllElements () |
bool | AllItemsEqual (T *data=nullptr) const |
JSize | CountElementsWithValue (const T &data) const |
const T | GetDefaultValue () const |
void | SetDefaultValue (const T &data) |
![]() | |
JTableData () | |
JTableData (const JTableData &source) | |
~JTableData () override | |
JTableData & | operator= (const JTableData &source) |
bool | IsEmpty () const |
JSize | GetRowCount () const |
bool | RowIndexValid (const JIndex index) const |
JSize | GetColCount () const |
bool | ColIndexValid (const JIndex index) const |
bool | CellValid (const JPoint &cell) const |
![]() | |
JBroadcaster () | |
virtual | ~JBroadcaster () |
JBroadcaster & | operator= (const JBroadcaster &source) |
bool | HasSenders () const |
JSize | GetSenderCount () const |
bool | HasRecipients () const |
JSize | GetRecipientCount () const |
virtual JString | ToString () const |
template<class T > | |
void | ListenTo (const JBroadcaster *sender, const std::function< void(const T &)> &f) |
Additional Inherited Members | |
![]() | |
static const JUtf8Byte * | kRowsInserted = "RowsInserted::JTableData" |
static const JUtf8Byte * | kRowDuplicated = "RowDuplicated::JTableData" |
static const JUtf8Byte * | kRowsRemoved = "RowsRemoved::JTableData" |
static const JUtf8Byte * | kRowMoved = "RowMoved::JTableData" |
static const JUtf8Byte * | kColsInserted = "ColsInserted::JTableData" |
static const JUtf8Byte * | kColDuplicated = "ColDuplicated::JTableData" |
static const JUtf8Byte * | kColsRemoved = "ColsRemoved::JTableData" |
static const JUtf8Byte * | kColMoved = "ColMoved::JTableData" |
static const JUtf8Byte * | kRectChanged = "RectChanged::JTableData" |
![]() | |
void | RowsAdded (const JSize count) |
void | RowsDeleted (const JSize count) |
void | SetRowCount (const JSize newRowCount) |
void | ColsAdded (const JSize count) |
void | ColsDeleted (const JSize count) |
void | SetColCount (const JSize newColCount) |
![]() | |
JBroadcaster (const JBroadcaster &source) | |
void | ListenTo (const JBroadcaster *sender) |
void | StopListening (const JBroadcaster *sender) |
void | ClearWhenGoingAway (const JBroadcaster *sender, void *pointerToMember) |
void | StopListening (const JBroadcaster *sender, const std::type_info &messageType) |
template<class T > | |
void | Send (JBroadcaster *recipient, const T &message) |
template<class T > | |
void | Broadcast (const T &message) |
virtual void | Receive (JBroadcaster *sender, const Message &message) |
void | SendWithFeedback (JBroadcaster *recipient, Message *message) |
void | BroadcastWithFeedback (Message *message) |
virtual void | ReceiveWithFeedback (JBroadcaster *sender, Message *message) |
virtual void | ReceiveGoingAway (JBroadcaster *sender) |
JPackedTableData< T >::JPackedTableData | ( | const T & | defValue | ) |
Template for storing values and structs in a table. The data is grouped by column into a single JRunArray.
Since we use a JRunArray, this class cannot be use to store objects. Use JObjTableData instead.
JPackedTableData< T >::JPackedTableData | ( | const JPackedTableData< T > & | source | ) |
|
override |
bool JPackedTableData< T >::AllItemsEqual | ( | T * | data = nullptr | ) | const |
If all the elements are equal, this function returns true and sets data to the single value.
If there are no elements, it returns false, mainly because the second version of the function doesn't have any data to return.
void JPackedTableData< T >::AppendCols | ( | const JSize | count, |
const JList< T > * | initData = nullptr |
||
) |
void JPackedTableData< T >::AppendRows | ( | const JSize | count, |
const JList< T > * | initData = nullptr |
||
) |
void JPackedTableData< T >::ApplyToRect | ( | const JCoordinate | x, |
const JCoordinate | y, | ||
const JCoordinate | w, | ||
const JCoordinate | h, | ||
T(*)(const T &) | f | ||
) |
void JPackedTableData< T >::ApplyToRect | ( | const JRect & | rect, |
T(*)(const T &) | f | ||
) |
This ought to be done one -run- at a time, and should be implemented in JRunArray.
void JPackedTableData< T >::ClearAllElements | ( | ) |
Sets all elements to the default value.
JSize JPackedTableData< T >::CountElementsWithValue | ( | const T & | data | ) | const |
void JPackedTableData< T >::DuplicateCol | ( | const JIndex | origIndex, |
const JIndex | newIndex | ||
) |
void JPackedTableData< T >::DuplicateRow | ( | const JIndex | origIndex, |
const JIndex | newIndex | ||
) |
void JPackedTableData< T >::GetCol | ( | const JIndex | index, |
JList< T > * | colData | ||
) | const |
const JRunArray< T > & JPackedTableData< T >::GetData | ( | ) | const |
const T JPackedTableData< T >::GetDefaultValue | ( | ) | const |
T JPackedTableData< T >::GetItem | ( | const JIndex | row, |
const JIndex | col | ||
) | const |
T JPackedTableData< T >::GetItem | ( | const JPoint & | cell | ) | const |
void JPackedTableData< T >::GetRow | ( | const JIndex | index, |
JList< T > * | rowData | ||
) | const |
void JPackedTableData< T >::InsertCols | ( | const JIndex | index, |
const JSize | count, | ||
const JList< T > * | initData = nullptr |
||
) |
void JPackedTableData< T >::InsertRows | ( | const JIndex | index, |
const JSize | count, | ||
const JList< T > * | initData = nullptr |
||
) |
void JPackedTableData< T >::MoveCol | ( | const JIndex | origIndex, |
const JIndex | newIndex | ||
) |
void JPackedTableData< T >::MoveRow | ( | const JIndex | origIndex, |
const JIndex | newIndex | ||
) |
void JPackedTableData< T >::PrependCols | ( | const JSize | count, |
const JList< T > * | initData = nullptr |
||
) |
void JPackedTableData< T >::PrependRows | ( | const JSize | count, |
const JList< T > * | initData = nullptr |
||
) |
void JPackedTableData< T >::RemoveAllCols | ( | ) |
void JPackedTableData< T >::RemoveAllRows | ( | ) |
void JPackedTableData< T >::RemoveCol | ( | const JIndex | index | ) |
void JPackedTableData< T >::RemoveNextCols | ( | const JIndex | firstIndex, |
const JSize | count | ||
) |
void JPackedTableData< T >::RemoveNextRows | ( | const JIndex | firstIndex, |
const JSize | count | ||
) |
void JPackedTableData< T >::RemovePrevCols | ( | const JIndex | lastIndex, |
const JSize | count | ||
) |
void JPackedTableData< T >::RemovePrevRows | ( | const JIndex | lastIndex, |
const JSize | count | ||
) |
void JPackedTableData< T >::RemoveRow | ( | const JIndex | index | ) |
void JPackedTableData< T >::SetAllElements | ( | const T & | data | ) |
void JPackedTableData< T >::SetCol | ( | const JIndex | index, |
const JList< T > & | colData | ||
) |
void JPackedTableData< T >::SetCol | ( | const JIndex | index, |
const T & | data | ||
) |
void JPackedTableData< T >::SetDefaultValue | ( | const T & | data | ) |
void JPackedTableData< T >::SetItem | ( | const JIndex | row, |
const JIndex | col, | ||
const T & | data | ||
) |
void JPackedTableData< T >::SetItem | ( | const JPoint & | cell, |
const T & | data | ||
) |
void JPackedTableData< T >::SetPartialCol | ( | const JIndex | colIndex, |
const JIndex | firstRowIndex, | ||
const JIndex | lastRowIndex, | ||
const T & | data | ||
) |
void JPackedTableData< T >::SetPartialRow | ( | const JIndex | rowIndex, |
const JIndex | firstColIndex, | ||
const JIndex | lastColIndex, | ||
const T & | data | ||
) |
void JPackedTableData< T >::SetRect | ( | const JCoordinate | x, |
const JCoordinate | y, | ||
const JCoordinate | w, | ||
const JCoordinate | h, | ||
const T & | data | ||
) |
void JPackedTableData< T >::SetRect | ( | const JRect & | rect, |
const T & | data | ||
) |
void JPackedTableData< T >::SetRow | ( | const JIndex | index, |
const JList< T > & | rowData | ||
) |
void JPackedTableData< T >::SetRow | ( | const JIndex | index, |
const T & | data | ||
) |