Kaydet (Commit) f43ceb03 authored tarafından Kohei Yoshida's avatar Kohei Yoshida Kaydeden (comit) Kohei Yoshida

Group by Field struct, instead of keeping 2 dimensional arrays in each.

üst 68c1a733
...@@ -55,12 +55,12 @@ class ScDPItemData; ...@@ -55,12 +55,12 @@ class ScDPItemData;
class SC_DLLPUBLIC ScDPCache : boost::noncopyable class SC_DLLPUBLIC ScDPCache : boost::noncopyable
{ {
public: public:
typedef ::boost::ptr_vector<ScDPItemData> DataListType; typedef boost::ptr_vector<ScDPItemData> DataListType;
typedef std::set<ScDPObject*> ObjectSetType; typedef std::set<ScDPObject*> ObjectSetType;
typedef std::vector<rtl::OUString> LabelsType; typedef std::vector<rtl::OUString> LabelsType;
typedef std::vector<SCROW> IndexArrayType;
private: private:
typedef ::boost::ptr_vector<DataListType> DataGridType;
typedef ::boost::ptr_vector< ::std::vector<SCROW> > RowGridType;
ScDocument* mpDoc; ScDocument* mpDoc;
long mnColumnCount; long mnColumnCount;
...@@ -70,30 +70,31 @@ private: ...@@ -70,30 +70,31 @@ private:
*/ */
mutable ObjectSetType maRefObjects; mutable ObjectSetType maRefObjects;
/** struct Field : boost::noncopyable
* This container stores only the unique instances of item data in each {
* column. Duplicates are not allowed. DataListType maItems; /// Unique values in the field.
*/
DataGridType maTableDataValues; /**
* Original source data represented as indices to the unique value
/** * list. The order of the data is as they appear in the original
* This container stores indices within maTableDataValues pointing to the * data source.
* data. The order of data are exactly as they appear in the original */
* data source. IndexArrayType maData;
*/
RowGridType maSourceData; /**
* Ascending order of field items.
/** */
* This container stores indices within maTableDataValues. The order of IndexArrayType maGlobalOrder;
* indices in each column represents ascending order of the actual data.
*/ /**
RowGridType maGlobalOrder; * Ranks of each unique data represented by their index. It's a
* reverse mapping of item index to global order index.
/** */
* This container stores the ranks of each unique data represented by mutable IndexArrayType maIndexOrder;
* their index. };
*/
mutable RowGridType maIndexOrder; typedef boost::ptr_vector<Field> FieldsType;
FieldsType maFields;
LabelsType maLabelNames; // Stores dimension names. LabelsType maLabelNames; // Stores dimension names.
std::vector<bool> mbEmptyRow; // Keeps track of empty rows. std::vector<bool> mbEmptyRow; // Keeps track of empty rows.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment