Mobile API Reference  MicroStrategy 2019
DatasetImpl.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : DatasetImpl.h
3 // AUTHOR : Dong Shi & Fangyao Ma
4 // CREATION : 2008-05-15
5 // Copyright (C) MicroStrategy Incorporated 2008
6 // All Rights Reserved
7 //==============================================================================================
8 
9 #ifndef MsiChart_DatasetImpl_h
10 #define MsiChart_DatasetImpl_h
11 
12 #include "../Dataset.h"
13 #include "DatasetHelper.h"
14 #include "PDCHeader/PDCmap"
15 #include "PDCHeader/PDCvector"
16 #include "Synch/Defines/SmartPtr.h"
17 #include "FormatManager.h"
18 
19 #ifdef _VE_CE
20 #else
21 #import "DatasetImplHelper.h"
22 #endif
23 
24 namespace MsiChart
25 {
27  const unsigned Int32 gMaxMDLabel = 32;
28 
29  typedef unsigned char DSSDataFlag;
30  typedef std::pair<Int32, Int32> _PositionIndex;
31  typedef std::pair<Int32, Int32> _PositionAssociatedInfo;
32 
36  class DatasetImpl:public Dataset
37  {
38  public:
39  /***********************************************************
40  * Constructor - for different access mode
41  ***********************************************************/
46  DatasetImpl(Int32 iAccessMode);
48  virtual ~DatasetImpl() throw();
49 
50  // Common option
52  virtual void SetSeriesByColumn(bool iSeriesByColumn);
54  virtual bool GetSeriesByColumn() const;
56  virtual void SetReverseGroup(bool iReverseGroup);
58  virtual bool GetReverseGroup();
60  virtual void SetReverseSeries(bool iRevereSeries);
62  virtual void SetForHistogram(bool iIsForHistogram);
63 
64  virtual float GetMemoryUsageEstimation();
65 
70  virtual HRESULT SetDataGroup(Int32 iDataGroup, bool iIgnoreForNoSeriesOrGroup = true);
71 
72  /************************************************************
73  * Used for renderring - by SeriesID&GroupID
74  ************************************************************/
79  virtual Int32 GetDataGroup();
80 
89  virtual HRESULT GetData(Int32 iSeriesID,Int32 iGroupID, const double*& iorValue, Int32 iColumnOffset = 0, bool iIsForSlice = true);
90  virtual bool IsDataTimeType(Int32 iSeriesID, Int32 iGroupID);
91  virtual HRESULT GetGMPieMaxMin(double& orMax, double& orMin, Int32 iColumnOffset, DATA_RETRIEVAL_TYPE iType = DRT_NORMAL);
92  //Use the Subtotal from AE, passed from Widget.
93  virtual HRESULT GetGMPieSubtotalMaxMin(std::map<std::pair<Int32, Int32>, double> iPieSubtotalMap, double& orMax, double& orMin, Int32 iColumnOffset, DATA_RETRIEVAL_TYPE iType = DRT_NORMAL);
94  virtual HRESULT GetTotalData(Int32 iIndex, bool iIsGroupTotal, Int32 iSpanStartIndex, Int32 iSpanEndIndex, double& iorValue, Int32 iColumnOffset, bool iIsUseAbsValue = false, bool iIsForSlice = true);
95  virtual HRESULT GetTotalData(Int32 iIndex, bool iIsGroupTotal, const std::vector<Int32>& iPickedIndexSet, double& iorValue, Int32 iColumnOffset, bool iIsUseAbsValue = false, bool iIsForSlice = true);
96  virtual HRESULT GetPieSubtotal(std::map<std::pair<Int32, Int32>, double> iPieSubtotalMap, Int32 iGroupId, const std::vector<Int32>& iPickedIndexSet, double& iorValue, Int32 iColumnOffset, bool iIsUseAbsValue = false, bool iIsForSlice = true);
97  virtual void GetSubTotalGlobalRowAndColumnIndex(Int32 iGroupId, const std::vector<Int32>& iPickedIndexSet, Int32 iColumnOffset, Int32 &iorRowOrdinal, Int32 &iorColOrdinal);
98  virtual HRESULT GetPrimaryData(Int32 iSeriesID,Int32 iGroupID, const double*& iorValue,Int32 iPrimaryIndex = 0, bool iIsForColor = false, bool iIsForSlice = true, int iAngleIndex=0, int iSliceIndex=0);
99  virtual HRESULT GetToolTipDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String& orDataString, Int32 iOffset);
104  virtual HRESULT GetSeriesCount(Int32& orSeriesCount);
105 
110  virtual HRESULT GetGroupCount(Int32& orGroupCount);
111 
118  virtual HRESULT GetSeriesLabel(Int32 iSeriesID,MBase::String& orSeriesLabel,bool iSubstitute = true, Int32 iColumnOffset = 0, bool iIsForSlice = true, LABEL_LEVEL_OPTION iOption = LLO_NORMAL, bool iIsEmptyAxisWithTemplateMetrc = false);
119 
125  virtual HRESULT GetGroupLabel(Int32 iGroupID,MBase::String& orGroupLabel, bool iSubstitute = true, Int32 iColumnOffset = 0, bool iIsForSlice = true, LABEL_LEVEL_OPTION iOption = LLO_NORMAL);
126 
131  virtual void GetGroupDimTree(DimTree*& iopDimTree);
132 
133  /*
134  *Get the number format for value axis
135  */
136  virtual HRESULT GetValueAxisNumberFormat(ChartAdvFormat& orFormat, bool iConsiderThresholds = true, Int32 iStartIndex = 0, Int32 iStep = 0);
137  virtual HRESULT GetValueAxisNumberFormat(ChartAdvFormat& orFormat, const std::set<Int32>& irMetricSet);
138 
139  /*
140  *Get the number format for one speicifi data point.
141  */
142  virtual HRESULT GetGridDataFormat(ChartAdvFormat& orFormat, Int32 iSeriesId, Int32 iGroupId, Int32 iColumnOffset, Int32 iAngleId = -3, Int32 iSliceId = -3);
143 
147  virtual HRESULT GetGridDataFormat(ChartAdvFormat& orFormat, Int32 iHostMetricIndex, bool iIsAngleMetrixIndex = false, Int32 iGroupId = 0);
148 
155  virtual HRESULT GetThresholdFillColor(Int32 iSeriesId, Int32 iGroupId, CComVariant* opValue); //not used for now
157 
158  // GM RefLine Support
159  virtual std::vector<double> GetRefLineValues(Int32 iSeriesId);
160  virtual void GetRefLineLable(Int32 iSeriesId, Int32 iRefLineIndex, std::string& iText, bool& orIsShowValue, double& orValue);
161  virtual std::vector<double> GetRefLineValuesForBubble(Int32 iIndex, Int32 iAxisIndex);
162 
163  // GM TrendLine Support
164  virtual std::vector<double> GetTrendLineValuesWithForecast(Int32 iSeriesId);
165  virtual bool IsExpomentialBaseNearOne(Int32 iSeriesId);
166  virtual std::vector<double> GetCoefficients(Int32 iSeriesId);
167 
168  virtual bool GetReplacedText(Int32 iSeriesId, Int32 iGroupId, Int32 iColumnOffset, MBase::String& orReplacedText, Int32& orColor);
169 
170 
171  /***********************************************************
172  * Manual set data - interface for inner class
173  ***********************************************************/
179  virtual HRESULT SetRowAndColumn(Int32 iRowNumber,Int32 iColumnNumber);
186  virtual HRESULT SetData(Int32 iRow,Int32 iCol,double iValue);
187 
193  virtual HRESULT SetRowLabel(Int32 iRow,const wchar_t* ipRowLabel);
194 
200  virtual HRESULT SetColumnLabel(Int32 iColumn,const wchar_t* ipColumnLabel);
201 
202  virtual void Delete();
203 
204 
205  //public:
207  /*
208  *[PREASSUMTION assumed]: 1. Metic is in column tree 2. Metric is the 1st template unit along the column axis
209  *For Drill Support
210  */
211  virtual bool PopulateTokenManager(bool iEnableToken);
212  virtual TokenManager* GetTokenManager();
213  virtual bool PopulateTotalValues(std::wifstream& iFileStream);
214  virtual bool GetTokenFlag();
215  virtual bool GetRowCount(Int32& orCount);
216  //virtual bool GetMetricsCount(Int32& orCount); ///< Get metric element number
217  virtual bool GetRowLabel(Int32 iIndex, MBase::String& orLabel);
218  virtual bool GetMetricsLabel(Int32 iIndex, MBase::String& orLabel);
219  virtual bool Refresh();
220  //[End of Public Methods for TokenManager and Dataset Refreshment]
221 
222  virtual bool IsSubtotalAt(Int32 iRowIndex, Int32 iColIndex, bool& orIsTotal);
223  virtual MetricUnitInfo* GetMetricInfo();
224  virtual bool IsMetricBySeries();
225 
226  public:
228  virtual bool PopulateOneTree(std::wifstream& iFileStream, bool iIsForRow = true);
229  virtual HRESULT GetPeakValuesAcrossSeries(double& orMax, double& orMin, const std::vector<Int32>& irSereisSet, Int32 iColumnOffset = 0);
230  virtual HRESULT GetPeakValuesAcrossSeries(double& orMax, double& orMin, Int32 iBeginSeries, Int32 iEndSeries, Int32 iColumnOffset = 0);
231  //[End of Public Methods for Misc use]
232  virtual void ConvertLocalAEIndexToGlobal(int& ioRowIndex, int& ioColIndex);
233 
234  public:
235  // This section contains Data slice stuff
236  virtual bool PopulateOneSlice(Int32 iBeinSeries, Int32 iEndSeries, Int32 iBeginGroup, Int32 iEndGroup);
237  virtual bool GetOneSliceRange(Int32& iBeinSeries, Int32& iEndSeries, Int32& iBeginGroup, Int32& iEndGroup);
238  virtual bool PopulateOneSlice(const std::vector<Int32>& irSeriesIndex, const std::vector<Int32>& irGroupIndex, SLICE_TYPE = SLICE_STRIPPED);
239  virtual bool GetOneSliceRange(std::vector<Int32>& irSeriesIndex, std::vector<Int32>& irGroupIndex);
240  virtual bool PopulateOneSlice(Int32 iBegin, Int32 iEnd, const std::vector<Int32>& irIndex, SLICE_TYPE iType = SLICE_MIXED_GROUP); //either series or groups are continous
241  virtual bool GetSliceGroupRange(Int32& iBeginGroup, Int32& iEndGroup); //get the index for start & end group of one slice, valid for slice with continous group.
242 
243  virtual void EnableSlices(bool iUseSlice = true);
244  virtual bool IsSliced();
245  virtual bool GetSliceFlag();
246  virtual bool SetActiveSliceIndex(Int32 iIndex = 0);
247  virtual Int32 GetActiveSliceIndex();
248  //virtual Int32 GetSliceNumber(Int32 iGroupPerSlice = -1, Int32 iSeriesPerSlice = -1);/// Get Slice Number
249  virtual bool AdjustGroupRange(Int32 iOffset);
250  virtual bool AdjustGroupRange(Int32 iBeginGroup, Int32 iEndGroup);
251 
252  virtual bool ShuffleIndex(bool iIsOnRow, const std::vector<Int32>& iShuffledIndexList);
254  virtual void RestoreFromShuffle();
255 
256  public:
257  // This section relates to the dim tree info.
258  virtual MBase::String GetTemplateUnitElementName(Int32 iDimLayer, Int32 iIndexInsideDim, bool iIsInRowTree = false, Int32 iFormIndex = 0, MBase::String iSeperator = L" ");
259  //virtual Int32 GetTreeDepth(bool iIsInRowTree);
260  virtual MBase::String GetTemplateUnitName(Int32 iDimLayer, bool iIsInRowTree = false, bool iUseAlias = false);
261  virtual Int32 GetTreeWidth(Int32 iDimLayer, bool iIsInRowTree, bool iIsActualSize = false, bool iIsSqueezeHCG = true);
262  virtual DimTree* GetRowTree();
263  virtual DimTree* GetColTree();
264 
265  public://for metric selection
266  virtual Int32 GetMetricsCount(bool iIsAtTopLevel = false);//note, this is not the same as the TokenManager Version
267 
268  public: //For AE integration
269 #ifndef _VE_CE
270  virtual HRESULT InitFromTemplateAndGrid(DSSTemplate* ipTemplate, DSSRWGridIterator* ipGridIterator, bool iIsParseTotals);
271 #endif
272  virtual bool IsHeaderTreeEmpty(bool iIsForGroup);
273 
274  public:
275  virtual Int32 GetThresholdIndex(Int32 iRowIndex, Int32 iColIndex);
276  virtual Int32 GetMetricIndex(Int32 iRowIndex, Int32 iColIndex);
277  virtual Int32 GetMetricIndex(Int32 iGroupId, Int32 iSeriesId, Int32 iAngleIndex, Int32 iSliceIndex);
278 
279  //for dataset refactor
280  virtual HRESULT GetPieAngleCount(Int32 iGroupId, Int32 iSeriesId, Int32& orAngleCount);
281  virtual HRESULT GetPieSliceCount(Int32 iGroupId, Int32 iSeriesId, Int32 iAngleId, Int32& orSliceCount);
282  virtual HRESULT GetPieSliceData(Int32 iGroupId, Int32 iSeriesId, Int32 iAngleId, Int32 iSliceId, const double*& iorValue, Int32 iColumnOffset = -1);
283  virtual HRESULT GetData(Int32 iGroupId, Int32 iSeriesId, EnumGraphMatrixDataIndexType iDataIndexType, const double*& iorValue, Int32 iAngleId = -3);
284  virtual HRESULT GetDataPositionPartSize(Int32& orDataPositionPartSize);
285  virtual HRESULT GetDataSizeByPartSize(Int32& orDataSizeByPartSize);
286  virtual HRESULT GetDataAdditionPartSize(Int32& orDataAdditionPartSize);
287  virtual void SetGMDataSet(void *pDataSet = NULL);
288  virtual void PrepareIterator();
289  virtual int GetGMColorByIndex(Int32 iSeriesID, Int32 iGroupID, Int32 iAngleIndex = -3, Int32 iColumnOffset = -1);
290  virtual void getLineMarkerColorSetting(std::vector<int>& iSetting);
291  // [GM Partial Rendering Support]
292  virtual bool IsGroupOnScreen(Int32 iGroupId);
293  virtual bool IsSeriesOnScreen(Int32 iSeriesId);
294  // [GM Bullet Chart Suppor]
295  virtual void GetBandDivision(Int32 iGroupId, Int32 iVAIndex, std::vector<double>& iMetrics, std::vector<double>& iRatios);
296  // [GM Combination Graph Support]
297  virtual Int32 GetShapeBySeriesId(Int32 iSeriesId);
298  // In Combination Graph, different shapes can stacked, so, we need to calculate stacked value in dataset, not in SeriesRender
299  virtual HRESULT GetCumulatedData(Int32 iGroupId, Int32 iSeriesId, EnumGraphMatrixDataIndexType iDataIndexType, const double*& iorValue);
300  virtual std::pair<int, int> getOnScreenTextRange(bool isForGroup);
301 
302  // [GM Metric Level Data Label Support]
303  virtual bool IsDataLabelEnaled(Int32 iSeriesId, Int32 iGroupId, Int32 iAngleId = -3, Int32 iSliceId = -3);
304 
305  virtual std::set<int> GetSeriesInSecondaryAxis();
306 
307  //[GM text as shape support]
308  virtual bool GetTextValue(Int32 iSeriesId, Int32 iGroupId,double& orDataValue);
309  //[GM getting properties support]
310  virtual Int32 FindCell(bool iFromSeries,Int32 Index,Int32 Target);
311  virtual bool GetGenericFillFormatColor(RGBColor& orColor, Int32 iSeriesId ,Int32 iGroupId,Int32 iAngleId = -3 , Int32 iSliceId = -3);
312  virtual bool GetGenericFillFormatType(unsigned char& orFillType,Int32 iSeriesId ,Int32 iGroupId,Int32 iAngleId = -3 , Int32 iSliceId = -3);
313  virtual bool GetGenericFillFormatAlpha(unsigned char& orAlpha,Int32 iSeriesId ,Int32 iGroupId,Int32 iAngleId = -3 , Int32 iSliceId = -3);
314  virtual bool GetGenericFillFormatGradient(GraphFillGradient& irFillGradient,Int32 iSeriesId ,Int32 iGroupId, Int32 iSliceId = -3);
315 
316  virtual bool GetTrendLineThickness(Int32& orLineThickness,Int32 iSeriesId,Int32 iGroupId);
317  virtual bool GetTrendLineStyle(unsigned char& orLineStyle,Int32 iSeriesId,Int32 iGroupId);
318  virtual bool GetTrendLineColor(RGBColor& orLineColor,Int32 iSeriesId,Int32 iGroupId);
319 
320  virtual bool GetReferenceLineThickness(Int32& orLineThickness,Int32 iSeriesId,Int32 iGroupId);
321  virtual bool GetReferenceLineStyle(unsigned char& orLineStyle,Int32 iSeriesId,Int32 iGroupId);
322  virtual bool GetReferenceLineColor(RGBColor& orLineColor,Int32 mSeriesId,Int32 iGroupId);
323 
324  virtual bool GetAxisOriginLineThickness(Int32& orLineThickness,Int32 iObjectID);
325  virtual bool GetAxisOriginLineStyle(unsigned char& orLineStyle,Int32 iObjectID);
326  virtual bool GetAxisOriginLineColor(RGBColor& orLineColor,Int32 iObjectID);
327 
328  virtual bool GetGenericLineThickness(Int32& orLineThickness,Int32 iSeriesId ,Int32 iGroupId,Int32 iAngleId = -3 , Int32 iSliceId = -3);
329  virtual bool GetGenericLineStyle(unsigned char& orLineStyle,Int32 iSeriesId ,Int32 iGroupId,Int32 iAngleId = -3 , Int32 iSliceId = -3);
330  virtual bool GetGenericLineColor(RGBColor& orLineColor,Int32 iSeriesId ,Int32 iGroupId,Int32 iAngleId = -3 , Int32 iSliceId = -3);
331 
332  virtual bool GetAxisLineThicknessFormat(Int32& orLineThickness);
333  virtual bool GetAxisLineStyleFormat(unsigned char& orLineStyle);
334  virtual bool GetAxisLineColorFormat(RGBColor& orLineColor);
335 
336  virtual bool GetAxisMajorTickLineThicknessFormat(Int32& orLineThickness,Int32 iObjectID);
337  virtual bool GetAxisMajorTickLineStyleFormat(unsigned char& orLineStyle,Int32 iObjectID);
338  virtual bool GetAxisMajorTickLineColorFormat(RGBColor& orLineColor,Int32 iObjectID);
339 
340  virtual bool GetAxisMinorTickLineThicknessFormat(Int32& orLineThickness,Int32 iObjectID);
341  virtual bool GetAxisMinorTickLineStyleFormat(unsigned char& orLineStyle,Int32 iObjectID);
342  virtual bool GetAxisMinorTickLineColorFormat(RGBColor& orLineColor,Int32 iObjectID);
343 
344  virtual bool GetReferenceLineFontColor(RGBColor& orFontColor,Int32 iSeriesId,Int32 iGroupId);
345  virtual bool GetReferenceLineFontSize(Int32& orFontSize,Int32 iSeriesId,Int32 iGroupId);
346  virtual bool GetReferenceLineFontStyle(unsigned char& orFontStyle,Int32 iSeriesId,Int32 iGroupId);
347  virtual bool GetReferenceLineFontName(MBase::String& orFontName,Int32 iSeriesId,Int32 iGroupId);
348 
349  virtual bool GetDataLableFontAlignment(unsigned char& orFontAlignment);
350  virtual bool GetDataLableFontSize(Int32& orFontSize);
351  virtual bool GetDataLableFontStyle(unsigned char& orFontStyle);
352  virtual bool GetDataLableFontName(MBase::String& orFontName);
353  virtual bool GetDataLableFontBox(unsigned char& orFontBox);
354  virtual bool GetDataLableFontAlpha(unsigned char& orFontAlpha);
355  virtual bool GetDataLabelFontColor(RGBColor& orFontColor);
356 
357  virtual bool GetAxisLabelFontSize(Int32& orFontSize ,Int32 iWhichAxis);
358  virtual bool GetAxisLabelFontName(MBase::String& orFontName ,Int32 iWhichAxis);
359  virtual bool GetAxisLabelFontStyle(unsigned char& orFontStyle ,Int32 iWhichAxis);
360  virtual bool GetAxisLabelFontRotation(unsigned char& orFontRotation ,Int32 iWhichAxis);
361  virtual bool GetAxisLabelFontColor(RGBColor& orFontColor ,Int32 iWhichAxis);
362 
363  virtual bool GetTextAsShapeFontSize(Int32& orFontSize,Int32 iSeriesId ,Int32 iGroupId);
364  virtual bool GetTextAsShapeFontColor(RGBColor& orFontColor,Int32 iSeriesId ,Int32 iGroupId);
365  virtual bool GetTextAsShapeFontName(MBase::String& orFontName,Int32 iSeriesId ,Int32 iGroupId);
366  virtual bool GetTextAsShapeFontStyle(unsigned char& orFontStyle,Int32 iSeriesId ,Int32 iGroupId);
367  virtual bool GetTextAsShapeAlignment(unsigned char& orFontAlignment,Int32 iSeriesId ,Int32 iGroupId);
368 
369  virtual bool GetAxisOriginValue(double& orAxisOriginValue , Int32 iObjectId);
370 
371  private: //For AE integration, helper methods
372 #ifndef _VE_CE
373  bool hPopulateDataCells(DSSRWGridIterator* ipGridIterator, Int32 iRowCount, Int32 iColumnCount);
374  bool hPopulatePlainLabels(bool iIsRow);
375  bool hPopulatePlainLabelsWithIterator(DSSRWGridIterator* ipIterator, bool iIsRow);
376 
377  bool hMoveIteratorByElement(DSSRWGridIterator* ipGridIterator, Int32 iDepth, bool iIsWithBoundaryCheck, bool iIsForRow, bool iIsForward); //To replace the NextXXXNByElement
378  bool hMoveIteratorByElement(DSSRWGridIterator* ipGridIterator, Int32 iDepth, bool iIsForRow = true, bool iIsForward = true); //To replace the NextXXXNByElement
379 #endif
380  void hGetShuffledIndex(Int32& iorRowIndex, Int32& iorColIndex);
381  Int32 hGetShuffledIndexOn(bool iIsOnRow, Int32 iIndex);
382  bool hIsIndexShuffled();
383  private:
384  //This secton contans private helper methods
385  void hTrimSpace(MBase::String& iorLabel);
386 
387  /* used in deciding the value axis number format, to decide how many cells per metric should be scanned.
388  * @param iOnRow, use row count as the max limit or not.
389  * @return the max limit to scan for one single metric.
390  */
391  Int32 hGetScanRange(bool iOnRow, bool iConsiderThresholds);
392 
393  /* Helper function used in GetValueAxisNumberFormat.
394  * @return true, means the result is finalized as a uniform form format.
395  */
396  bool hGetValueAxisNumberFormat(ChartAdvFormat& orFormat, bool iConsiderThresholds, Int32 iStartIndex, Int32 iStep);
397 
401  class SimpleDataset
402  {
403  public:
404  SimpleDataset();
405  ~SimpleDataset();
406  void SetDimension(const Int32 iRowCount, const Int32 iColumnCount);
407  void AddData(const Int32 iRowIndex, const Int32 iColumnIndex, const double* irValue);
408  void GetData(const Int32 iRowIndex, const Int32 iColumnIndex, const double*& orData);
409  Int32 GetRowCount();
410  Int32 GetColumnCount();
411  void Delete();
413  private:
414  Int32 mRowCount;
415  Int32 mColumnCount;
416  double** mpData;
417  };
418 
419 
420 
421  //Methods and Inner Class For template, they are not used by CE for now, maybe will be resued will AE logic steps-in, --dshi
422  private:
426  class BaseForms
427  {
428  public:
429  std::vector<Int32> mBaseFormIDs;
430  std::vector<Int32> mBaseFormTypes;
431  BaseForms& operator = (BaseForms& iBaseForms)
432  {
433  mBaseFormIDs = iBaseForms.mBaseFormIDs;
434  mBaseFormTypes = iBaseForms.mBaseFormTypes;
435  return *this;
436  }
437  };
438  // Private function for parsing template - some from GraphGenImpl.cpp
439  void hGetRowColumnIndex(Int32 iSeriesID, Int32 iGroupID, Int32& orRowIndex, Int32& orColumnIndex, Int32 iColumnOffset = 0);
440 #ifndef _VE_CE
441  void hGetRealRowAndColumnCount(Int32& orRowCount, Int32& orColumnCount, DSSRWGridIterator* ipIterator);
442 #endif
443  //[End of Inner Class and Methods for Template]
444 
445 
446  private:
447 
453  bool hMapIndexToTreeDimInfo(Int32 iIndex, DimNode* ipNode, std::vector<Int32>& orDimIndexSet); //not used now
454  bool hGetLabelPieceAlongPath(MBase::String& orFullLabel, DimTree* ipTree, const std::vector<Int32>& irPath, Int32 iFormat); //not used now
456  bool hPopulateOneDimFromString(const MBase::String& irString, Int32 iDimIndex, DimTree* ipTree);
458  bool hParseElementString(const MBase::String& irString, Int32 iDimIndex, Int32 iElementCount, DimTree* ipTree);
460  bool hPopulateOneDimNode(const MBase::String& irString, Int32 iDim, Int32 iIndex, DimNode* ipParent, DimTree* ipTree);
462  bool hTraverseTreeForCompletion(DimNode* ipNode, DimTree* ipTree);
463  //[End of Tree Population Methods for Generic Data Input]
464 
465 
466 
467  private:
468  MBase::String mPageLabel;
469  bool mShowSubtotalValue;
470  bool mNestedLabel;
471  bool mTrimSpace;
472  bool mIgnoreForNoSeriesOrGroup;
473  bool mSuppressLastLevel;
474  bool mIsConcatenateLabels;
475  bool mIsUseZeroForNullValue;
476 
477  Int32 mDataGroup;
478  Int32 mBeginRow;
479  Int32 mEndRow;
480  Int32 mBeginColumn;
481  Int32 mEndColumn;
482 
483  // [GM Partial Rendering Support]
484  Int32 mOnScreenStartGroupId;
485  Int32 mOnScreenEndGroupId;
486 
487 
488  private:
489  Int32 mAccessMode;
490  DimTree* mpRowTree;
491  DimTree* mpColTree;
492  std::vector<MBase::String> mRowLabels;
493  std::vector<MBase::String> mColumnLabels;
494 
495  bool mUseManualRowLabels;
496  bool mUseManualColumnLabels;
497 
498  Int32 mRowSize;
499  Int32 mColumnSize;
500  //[End of Reused & Old Properties]
501 
502 
503  private:
504  MSynch::SmartPtr<SimpleDataset> mSimpleDatasetPtr;
505  MSynch::SmartPtr<SimpleDataset> mFullDatasetPtr;
506  std::vector<std::vector<MSynch::SmartPtr<SimpleDataset> > > mTotalCollection;
507  //[End of Data Stroage]
508 
509 
510  private:
511  std::vector<DataPiece*> mSliceSet;
512  bool mIsUseSlice;
513  bool mIsSliced;
514  size_t mSliceNumber;
515  size_t mActiveSliceIndex;
516  void hClearUpSlices();
517  //[End of Data Slice]
518 
519  private:
520  SHUFFLE_STATUS mShuffleStatus;
521  std::map<Int32,Int32> mShuffledRowIndexSet;
522  std::map<Int32,Int32> mShuffledColIndexSet;
523 
524  private:
525  TokenManager mTokenManager;
526  bool mIsUseToken;
527  bool hPickCorrectDataTable();
528  //[End of the Drill Support]
529 
530  private:
531  bool mHasMetrics;
532  bool mIsMetricInRow;
533  std::vector<MBase::String> mMetricElements;
534 
535  Int32 mMetricIndexAlongAxis;
536  std::map<Int32, bool> mRowSubTotalsMap;
537  std::map<Int32, bool> mColSubTotalsMap;
538  std::map<Int32, Int32> mRowIndexToGlobalIndex;
539  std::map<Int32, Int32> mColIndexToGlobalIndex;
540  std::map<Int32, Int32> mGlobalIndexToRowIndex;
541  std::map<Int32, Int32> mGlobalIndexToColIndex;
542  std::set<Int32> mTotalsInRow;
543  std::set<Int32> mTotalsInCol;
544 
545  Int32 hMapLocalTableIndexToGlobalIndex(Int32 iIndex, bool iIsForRow);
546  //[End of AE integration]
547 
548 
549  private:
550 #ifndef _VE_CE
551  DSSTemplate* mpTemplate;
552  DSSRWGridIterator* mpGridIterator; //< Iterator with the data table that is already sliced by group-by.
553  DSSRWGridIterator* mpGlobalIterator; //< Iterator with the whole data table. Used in Colorby support.
554 #endif
555  Int32 mSliceID; //< SliceId for group-by
556  Int32 mTableRowCount;
557  Int32 mTableColCount;
558 
559  bool mIsRowHeaderEmpty;
560  bool mIsColHeaderEmpty;
561  bool mSeriesByColumn;
562  bool mIsDataBackedUp;
563  bool mIsReformed;
564  MetricUnitInfo::Ptr mMetricPtr;
565 #ifndef _VE_CE
566  DataTableReformer::Ptr mDataTableReformerPtr;
567 #endif
568  DataGroupInfo mDataGroupInfo;
569  std::vector<int> mAxisInfo;
570  std::vector<Int32> mSeriesIndexPieces;
571  std::vector<Int32> mSeriesPiecesStartIndex;
572  Int32 mPieGroupDepth;
573 
574  Int32 mBalancedGroupCount;
575 
582  bool hIsHeaderEmpty(bool iIsForRow = true, Int32 iAccessMode = DM_TEMPLATE);
583  void hPopulateMetricInfo();
584 
585  public:
586 
592 #ifndef _VE_CE
593  virtual HRESULT InitFromTemplateSlice(DSSTemplate* ipTemplate, DSSRWGridIterator* ipGridIterator, Int32 iSliceID, bool iIsCacheData = false, bool iIncludeSubtotal = true);
594 #endif
595 
598  virtual bool IsHeaderEmpty(bool iIsForRow = true);
599 
602  virtual bool GetAvgValue(double& orValue, Int32 iIndex, Int32 iColumnOffset = 0, bool iIsForSeries = true, bool iIsForSlice = false);
603 
608  virtual void SetTreeInstance(DimTree* ipTree, bool iIsForRowTree);
609 
613  virtual Int32 GetAESliceId();
614 
622  virtual Int32 GetAggregationResult(double& orValue, Int32 iIndex, bool iIsForSeries = true, AGG_TYPE iAggType = AGG_TYPE_AVG); //return valide data cell.
623 
626  //virtual Int32 GetUnitWidth(Int32 iIndex, bool iIsInRow);
627 
633  virtual DATASET_STATUS GetStatus(bool iIsGraph, bool iIsDummyGridChart);
634 
638  virtual Int32 GetColorStyleIndex(Int32 iLocalIndex);
639 
643  virtual Int32 GetColorStyleIndex(Int32 iSeriesID, Int32 iGroupID, Int32 iColumnOffset = 0, bool iIsConsiderSubtotal = true);
644 
648  virtual std::string GetGMColorByKey(std::vector<std::pair<Int32, Int32> > iColorByUnitsIndex, Int32 iSeriesID, Int32 iGroupID, Int32 iColumnOffset = 0, bool iIsConsiderSubtotal = true);
649 
654  virtual MBase::String GetColorStyleLabel(Int32 iSeriesID, Int32 iGroupID, Int32 iColumnOffset, bool iIsConsiderSubtotal = true);
655 
659  virtual Int32 GetColorStyleNumber();
660 
665  virtual void SetColorSlices(std::vector<Int32>& irRowUnits, std::vector<Int32> irColumnUnits);
666 
670  virtual MBase::String GetColorStyleLabel(Int32 iLocalColorIndex);
671 #ifndef _VE_CE
672 
675  virtual void SetGlobalIterator(DSSRWGridIterator* ipIterator);
676 #endif
677  virtual void GetSliceLabel(Int32 iOrdinal, bool iIsForRow, MBase::String& orCollection); //< Data Label for GM in Pie chart, show Text
678  virtual void GetTextDataLabel(Int32 iGroupId, Int32 iSeriesId, std::string& orCollection, Int32 iAngleId = -3, Int32 iSliceId = -3);
679  virtual void GetTextDataLabel(Int32 iOrdinal, std::string& orCollection);
680  virtual void GetBreakByLabel(Int32 iOrdinal, bool iIsForRow, MBase::String& orCollection); //< Data Label for GM, show Text
681  virtual void GetDataTextLabel(Int32 iOrdinal, bool iIsForRow, MBase::String& orCollection, int iDepth);
682  virtual void GetLabelCollection(Int32 iOrdinal, bool iIsForRow, std::vector<std::string>&orCollection);
683 #ifndef _VE_CE
684  virtual DataTableReformer* GetDataReformer() const;
685 #endif
686  Int32 GetBalancedCount(bool iIsForGroup);
688  virtual void GetUnitNameCollection(bool iIsForRow, std::vector<std::string>&orCollection);
689 #ifndef _VE_CE
690  virtual bool PopulateReformer(DSSRWGridIterator* ipGridIterator, DataSetReformInfo* ipReformInfo);
691 #endif
692  virtual bool IsReformed();
693  virtual const DataGroupInfo* GetDataGroupInfo();
694  virtual void SetDatagroupInfo(const DataGroupInfo& irInfo);
695  virtual const std::vector<int> GetAxisInfo();
696  virtual void SetAxisInfo(const std::vector<int> &irAxisInfo);
697  virtual void GetSeriesSplitVector(std::vector<Int32>& orVec);
698  virtual void SetSeriesSplitVector(const std::vector<Int32>& irVec);
699  virtual void SetPieGroupDetph(Int32 irDetph);
700  virtual void GetPieGroupDetph(Int32 &orDepth);
701  virtual Int32 GetSeriesPieceStartIndex(Int32 iIndex);
702  virtual void DumpDataSet(bool iIsNaive, bool isGlobalIterator = false);
703 
704  private:
707  void hPopulateCETable();
708 
709  /* For Widgets Get data from the internal data table.
710  */
711  void hGetDataFromAETable(const Int32 iRowIndex, const Int32 iColumnIndex, double*& orData);
712  void hConvertToDoubleValue4Data(double*& iorData, const void * ipData, int iSizeInByte, int iDataType, int iFlag);
713 
714  /* For Widgets Get label string from the internal data table.
715  */
716  //void hGetConcatenatedLabel(bool iIsRowAxis, Int32 iOrdinal, bool iIsInclusive, std::string iSeperator, MBase::String& orText, bool iIsForColorBy = false);
717 
724  bool hGetLabelCombination(const std::vector<Int32>& irSliceUnits, std::vector<MBase::String>& orResultLabels, bool iIsForRow);
725 #ifndef _VE_CE
726 
736  std::string hGetAttrElementPieceFromOneFrom(DSSTemplateUnit* ipUnit, Int32 iAxisId, Int32 iOrdinal, Int32 iDepth, Int32 iFormId, Int32 iFormType, LINK_TEXT_TYPE iLinkType = LINK_TEXT_DISPLAY);
737  std::string hGetAttrElementPieceFromOneFromForGM(DSSTemplateUnit* ipUnit, Int32 iAxisId, Int32 iOrdinal, Int32 iDepth, Int32 iFormId, Int32 iFormType, LINK_TEXT_TYPE iLinkType = LINK_TEXT_DISPLAY);
738 #endif
739 
742  void hBuildColorSliceInfo();
743 
744  // use static is not thread safe, 890344
745  static double sDataCellValue; //< We use its address to get data.
746  static double sDataCellColor; //< We use its address to get fill color for each cell.
747  std::map<_PositionIndex, _PositionAssociatedInfo> mDataCellInfoPool; //< Data cell info for easier use position -> info
748  DATASET_STATUS mStatus; //< Dataset status.
749  std::vector<Int32> mRowColorByUnits; //< ColorBy units on Row axis
750  std::vector<Int32> mColColorByUnits; //< ColorBy units on Col axis
751  std::map<Int32, MBase::String> mColorByLabelMap; //< Map: color by index to one label string.
752  std::map<Int32, Int32> mColorIndexMap; //< Map: local color Index to global color index
753  Int32 mColorNumber; //< The availible color in one slice.
763  void hGetConcatenatedLabel(bool iIsRowAxis, Int32 iOrdinal, bool iIsInclusive, std::string iSeperator, MBase::String& orText, LABEL_LEVEL_OPTION iOption = LLO_NORMAL, bool iIsForColorBy = false);
764  //[Max /Min Row Col to display starts]
765  public:
766  virtual bool NextSliceToDisplay(bool iIsPrevious, bool iIsStaring = false);
768  virtual void CurrentSlicePosition(Int32& orRowIndex, Int32& orColIndex);
769  virtual void SeriesGroupIndexToRowColumnIndex(Int32 iSeriesID, Int32 iGroupID, Int32& orRowIndex, Int32& orColumnIndex, Int32 iColumnOffset, Int32 iAngleId = -3, Int32 iSliceId = -3, bool iIsConsiderSubtotal = true);
770  virtual void GetRowAndColumnIndexForMinMaxMetrixIndex(bool iIsForMax, std::vector<Int32> iMetricIndex, Int32& orRowIndex, Int32& orColumnIndex);
771  virtual void SetFormatManager(FormatManager* ipFormatManager);
772  virtual bool IsDisplaySliceInvalid();
773  virtual bool GetSeriesGroupIdsFromIndex(std::vector<std::pair<Int32, Int32> >& iorSGPairs, const std::vector<Int32>& irRowIndexSet, const std::vector<Int32>& irColIndexSet);
774  virtual std::string GetLabelInDrillPath(bool iIsByRow, Int32 iIndex, const std::string& irCandiate, bool iIncludeAllForms = false);
775 
776  //void DumpDataSet(bool iIsNaive, bool isGlobalIterator);
777  bool IsEmpty();
778  inline void setPropertyTreatEmptyAsEmpty(bool iValue) {mTreatEmptyAsEmpty = iValue;};
779 
780  private:
781  bool mReverseGroup;
782  bool mReverseSeries;
783  bool mIsForHistogram;
784 
785  bool mTreatEmptyAsEmpty; // DE32547
786 
787  //[Max /Min Row Col to display]
788  Int32 mTotalBlocksToDisplay;
789  Int32 mCurrentDisplayBlockIndex;
790  Int32 mMaxRowToDisplay;
791  Int32 mMaxColToDisplay;
792  Int32 mDisplayBlocksPerRow;
793  Int32 mDisplayBlocksPerCol;
794  Int32 mLeftoverOnCol;
795  Int32 mLeftoverOnRow;
796  bool mIsUseMaxGroupAsMinBound; //reuse the max group value, but as the minimal bound.
797  bool mIsDisplaySliceInvalid;
798  FormatManager::Ptr mpFormatManager;
799 
800  bool hGetSeriesCroupRangeForOneDisplayBlock(Int32 iDisplayBlockIndex);
801  bool hPopulateDisplayBlocks(bool iIsRowHeaderEmpty, bool iIsColHeaderEmpty);
802 #ifndef _VE_CE
803  bool hGetGradientPropertyForThreshold(DSSFormat* ipFormat, CComVariant* orValue);
804 #endif
805  bool hIsInEmptyDataZone(Int32 iGroupID);
806  bool hIsSupprestLastLevelLabel();
807  bool hIsConcatedLabels();
808  bool hIsUseZeroForNullValue();
809  CComVariant* hGetOneGraphPropertyFromTemplate(const std::string& irPropertyName);
810 
811  private:
812  std::map<std::pair<Int32, Int32>, double> mPerfMapFormatIndexToColorValue;
813  bool hGetColorValueFromFormatIndexMap(const std::pair<Int32, Int32>& iKey, double& orValue);
814  void hSetColorValueFromFormatIndexMap(const std::pair<Int32, Int32>& iKey, double orValue);
822  void hConcatenateLabel(MBase::String& iorLabel, Int32 iStartIndex, Int32 iSpan, bool iIsForRow);
823 
824  Int32 hRowSize()
825  {
826  return mUseManualRowLabels ?(Int32)mRowLabels.size() : mRowSize;
827  }
828  Int32 hColumnSize()
829  {
830  return mUseManualColumnLabels ? (Int32)mColumnLabels.size() : mColumnSize;
831  }
832  Int32 hGetSize(bool iIsForRow)
833  {
834  return iIsForRow ? hRowSize() : hColumnSize();
835  }
836  MBase::String hGetRowLabel(Int32 iIndex)
837  {
838  if (mUseManualRowLabels) {
839  return mRowLabels[iIndex];
840  }
841  else {
842  return mpRowTree->GetPlainLabels(iIndex, mSuppressLastLevel);
843  }
844  }
845  MBase::String hGetColumnLabel(Int32 iIndex)
846  {
847  if (mUseManualColumnLabels) {
848  return mColumnLabels[iIndex];
849  }
850  else {
851  return mpColTree->GetPlainLabels(iIndex, mSuppressLastLevel);
852  }
853  }
854 
855 
856  Int32 hCheckIndexValidity(Int32 iIndex, Int32 iIndexSetSize);
857  Int32 hGetCoveredIndexByCurrentBlock(bool iIsByRow);
867  MBase::String hGetLabel(bool iIsForRow, Int32 iLabelIndex, Int32 iColumnOffset, LABEL_LEVEL_OPTION iOption, bool iNeedConcated = false);
868 
869 //===============[thresh hold fill style]============================
870  private:
871 
872  THRESHOLD_FILL_STYLE mCurrentThresholdStyle;
873  bool hGetDrillLabelsFromIterator(bool iIsByRow, Int32 iOrdinal, const std::string& irSeperator, std::string& iorLabels, bool iIncludeAllForms = false);
874 
875  double hGetThresholdBackgroundColor(Int32 iMetrixId, Int32 iThresholdId, double iDefaultColorValue);
876 
877  void hGetTotalPositonsFromIterator();
878  bool hHasChosenControlsOnAxis(int iAxis);
879  public:
880  void PopulateOneMetricThresholdSuite(Int32 iRow, Int32 iCol, Int32 iMetricId, Int32 iThresholdId);
882  bool GetMetricAndTresholdID(Int32 iSeriesId, Int32 iGroupId, Int32 iColumnOffset, Int32& orMetricId, Int32& orThresholdId);
883  void* GetThresholdWithId(Int32 iMetricId, Int32 iThresholdId);
884 //===============for code seperation (DatasetImplHelper)==============
885  public:
886  int GetGlobalIteratorElementValueAt(int iAxis, int iOrdinal, int iDepth, int iBaseForm, const void **oppData, int *opDataSize, EnumDSSDataType *opDataType, DSSDataFlag *opDataFlag);
887 #ifndef _VE_CE
889 #endif
890  bool ShowSubtotalValue();
891  void GetRowSubTotalsMap(std::map<Int32, bool> &orRowSubTotalsMap);
892  void GetColSubTotalsMap(std::map<Int32, bool> &orColSubTotalsMap);
893  bool IsUseZeroForNullValue();
894  void AddDataToSimpleDataset(const Int32 iRowIndex, const Int32 iColumnIndex, const double* irValue);
896  void SetCurrentThresholdSytle(THRESHOLD_FILL_STYLE iCurrentThresholdStyle);
897  private:
898 #ifdef _VE_CE
899 #else
900  DatasetImplHelper *mpDatasetImplHelper;
901 #endif
902  };
903 
905  {
906  return mShowSubtotalValue;
907  }
908  inline void DatasetImpl::GetRowSubTotalsMap(std::map<Int32, bool> &orRowSubTotalsMap)
909  {
910  orRowSubTotalsMap = mRowSubTotalsMap;
911  }
912  inline void DatasetImpl::GetColSubTotalsMap(std::map<Int32, bool> &orColSubTotalsMap)
913  {
914  orColSubTotalsMap = mColSubTotalsMap;
915  }
917  {
918  return mIsUseZeroForNullValue;
919  }
920  inline void DatasetImpl::AddDataToSimpleDataset(const Int32 iRowIndex, const Int32 iColumnIndex, const double* irValue)
921  {
922  mSimpleDatasetPtr->AddData(iRowIndex, iColumnIndex, irValue);
923  }
925  {
926  return mAccessMode;
927  }
928 }
929 
930 #endif
931 
932 
933 
virtual bool PopulateOneSlice(Int32 iBeinSeries, Int32 iEndSeries, Int32 iBeginGroup, Int32 iEndGroup)
assume we are dealing with the simplest case
virtual HRESULT GetGMPieMaxMin(double &orMax, double &orMin, Int32 iColumnOffset, DATA_RETRIEVAL_TYPE iType=DRT_NORMAL)
virtual bool GetAxisOriginValue(double &orAxisOriginValue, Int32 iObjectId)
virtual bool GetDataLableFontAlignment(unsigned char &orFontAlignment)
virtual bool GetDataLableFontAlpha(unsigned char &orFontAlpha)
virtual Int32 CurrentSliceNumberToDisplay()
virtual HRESULT GetData(Int32 iSeriesID, Int32 iGroupID, const double *&iorValue, Int32 iColumnOffset=0, bool iIsForSlice=true)
virtual void EnableSlices(bool iUseSlice=true)
unsigned char DSSDataFlag
Definition: DSSIPhoneEnums.h:784
virtual DimTree * GetColTree()
virtual bool GetAxisMajorTickLineColorFormat(RGBColor &orLineColor, Int32 iObjectID)
virtual bool GetAxisLabelFontName(MBase::String &orFontName, Int32 iWhichAxis)
virtual Int32 GetAESliceId()
unsigned char DSSDataFlag
Definition: Dataset.h:45
virtual bool GetMetricsLabel(Int32 iIndex, MBase::String &orLabel)
Get the name of the metric element indexed by iIndex.
virtual bool GetAvgValue(double &orValue, Int32 iIndex, Int32 iColumnOffset=0, bool iIsForSeries=true, bool iIsForSlice=false)
virtual Int32 GetActiveSliceIndex()
virtual ~DatasetImpl()
Destructor, release resource.
SHUFFLE_STATUS
Definition: Dataset.h:88
std::pair< Int32, Int32 > _PositionIndex
Definition: DatasetImpl.h:30
Definition: DatasetHelper.h:925
virtual bool GetAxisLineColorFormat(RGBColor &orLineColor)
virtual HRESULT GetGroupLabel(Int32 iGroupID, MBase::String &orGroupLabel, bool iSubstitute=true, Int32 iColumnOffset=0, bool iIsForSlice=true, LABEL_LEVEL_OPTION iOption=LLO_NORMAL)
virtual void ConvertLocalAEIndexToGlobal(int &ioRowIndex, int &ioColIndex)
virtual HRESULT GetPieSliceCount(Int32 iGroupId, Int32 iSeriesId, Int32 iAngleId, Int32 &orSliceCount)
virtual HRESULT InitFromTemplateAndGrid(DSSTemplate *ipTemplate, DSSRWGridIterator *ipGridIterator, bool iIsParseTotals)
virtual void GetSliceLabel(Int32 iOrdinal, bool iIsForRow, MBase::String &orCollection)
virtual bool GetReferenceLineFontSize(Int32 &orFontSize, Int32 iSeriesId, Int32 iGroupId)
virtual void GetBandDivision(Int32 iGroupId, Int32 iVAIndex, std::vector< double > &iMetrics, std::vector< double > &iRatios)
virtual bool GetTrendLineColor(RGBColor &orLineColor, Int32 iSeriesId, Int32 iGroupId)
virtual void GetGroupDimTree(DimTree *&iopDimTree)
Definition: DatasetHelper.h:52
virtual void GetPieGroupDetph(Int32 &orDepth)
virtual bool AdjustGroupRange(Int32 iOffset)
void setPropertyTreatEmptyAsEmpty(bool iValue)
Definition: DatasetImpl.h:778
virtual bool GetAxisLabelFontStyle(unsigned char &orFontStyle, Int32 iWhichAxis)
virtual bool GetTextAsShapeFontStyle(unsigned char &orFontStyle, Int32 iSeriesId, Int32 iGroupId)
virtual MBase::String GetColorStyleLabel(Int32 iSeriesID, Int32 iGroupID, Int32 iColumnOffset, bool iIsConsiderSubtotal=true)
virtual HRESULT GetDataAdditionPartSize(Int32 &orDataAdditionPartSize)
virtual void SetReverseSeries(bool iRevereSeries)
Set "Reverse Series" flag.
virtual HRESULT GetPrimaryData(Int32 iSeriesID, Int32 iGroupID, const double *&iorValue, Int32 iPrimaryIndex=0, bool iIsForColor=false, bool iIsForSlice=true, int iAngleIndex=0, int iSliceIndex=0)
virtual const DataGroupInfo * GetDataGroupInfo()
virtual bool GetSliceFlag()
virtual bool GetReferenceLineThickness(Int32 &orLineThickness, Int32 iSeriesId, Int32 iGroupId)
virtual bool IsSubtotalAt(Int32 iRowIndex, Int32 iColIndex, bool &orIsTotal)
virtual bool NextSliceToDisplay(bool iIsPrevious, bool iIsStaring=false)
virtual bool PopulateTokenManager(bool iEnableToken)
This section include the methods for token manger and the refreshment.
virtual std::string GetLabelInDrillPath(bool iIsByRow, Int32 iIndex, const std::string &irCandiate, bool iIncludeAllForms=false)
virtual void getLineMarkerColorSetting(std::vector< int > &iSetting)
virtual Int32 GetSeriesPieceStartIndex(Int32 iIndex)
virtual bool IsDataLabelEnaled(Int32 iSeriesId, Int32 iGroupId, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual HRESULT GetSeriesLabel(Int32 iSeriesID, MBase::String &orSeriesLabel, bool iSubstitute=true, Int32 iColumnOffset=0, bool iIsForSlice=true, LABEL_LEVEL_OPTION iOption=LLO_NORMAL, bool iIsEmptyAxisWithTemplateMetrc=false)
virtual HRESULT GetPieSliceData(Int32 iGroupId, Int32 iSeriesId, Int32 iAngleId, Int32 iSliceId, const double *&iorValue, Int32 iColumnOffset=-1)
This struct is from ChartCtrl.h.
Definition: NumberObject.h:38
virtual std::vector< double > GetRefLineValues(Int32 iSeriesId)
virtual HRESULT GetGridDataFormat(ChartAdvFormat &orFormat, Int32 iSeriesId, Int32 iGroupId, Int32 iColumnOffset, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual DimTree * GetRowTree()
Get the number of dim node in one dim.
virtual bool GetReverseGroup()
Get "Reverse Group" flag.
virtual bool GetAxisMajorTickLineThicknessFormat(Int32 &orLineThickness, Int32 iObjectID)
Definition: DSSTemplateUnit.h:19
virtual bool GetDataLableFontName(MBase::String &orFontName)
virtual bool GetAxisMinorTickLineThicknessFormat(Int32 &orLineThickness, Int32 iObjectID)
virtual bool IsHeaderTreeEmpty(bool iIsForGroup)
long HRESULT
Definition: FragmentedString.h:20
virtual void SetSeriesByColumn(bool iSeriesByColumn)
Set "Series by Column" flag.
virtual bool GetTextAsShapeAlignment(unsigned char &orFontAlignment, Int32 iSeriesId, Int32 iGroupId)
virtual Int32 GetMetricsCount(bool iIsAtTopLevel=false)
virtual HRESULT GetPieSubtotal(std::map< std::pair< Int32, Int32 >, double > iPieSubtotalMap, Int32 iGroupId, const std::vector< Int32 > &iPickedIndexSet, double &iorValue, Int32 iColumnOffset, bool iIsUseAbsValue=false, bool iIsForSlice=true)
virtual void GetLabelCollection(Int32 iOrdinal, bool iIsForRow, std::vector< std::string > &orCollection)
virtual bool GetReferenceLineFontColor(RGBColor &orFontColor, Int32 iSeriesId, Int32 iGroupId)
DatasetImpl(Int32 iAccessMode)
virtual bool GetTrendLineThickness(Int32 &orLineThickness, Int32 iSeriesId, Int32 iGroupId)
virtual SHUFFLE_STATUS GetShuffledStatus()
Definition: DSSRWGridIterator.h:68
virtual std::vector< double > GetTrendLineValuesWithForecast(Int32 iSeriesId)
Int32 Index
Definition: Matrix.H:3
virtual std::set< int > GetSeriesInSecondaryAxis()
virtual bool IsReformed()
virtual float GetMemoryUsageEstimation()
virtual bool GetDataLableFontSize(Int32 &orFontSize)
virtual std::pair< int, int > getOnScreenTextRange(bool isForGroup)
Definition: DSSTemplate.h:29
virtual bool GetReplacedText(Int32 iSeriesId, Int32 iGroupId, Int32 iColumnOffset, MBase::String &orReplacedText, Int32 &orColor)
virtual Int32 GetMetricIndex(Int32 iRowIndex, Int32 iColIndex)
virtual void GetTextDataLabel(Int32 iGroupId, Int32 iSeriesId, std::string &orCollection, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual void GetRefLineLable(Int32 iSeriesId, Int32 iRefLineIndex, std::string &iText, bool &orIsShowValue, double &orValue)
virtual void SeriesGroupIndexToRowColumnIndex(Int32 iSeriesID, Int32 iGroupID, Int32 &orRowIndex, Int32 &orColumnIndex, Int32 iColumnOffset, Int32 iAngleId=-3, Int32 iSliceId=-3, bool iIsConsiderSubtotal=true)
AGG_TYPE
Definition: Dataset.h:61
SLICE_TYPE
Definition: Dataset.h:77
virtual bool GetAxisOriginLineStyle(unsigned char &orLineStyle, Int32 iObjectID)
virtual void SetGMDataSet(void *pDataSet=NULL)
Definition: Dataset.h:142
Definition: Dataset.h:198
virtual HRESULT GetSeriesCount(Int32 &orSeriesCount)
virtual HRESULT GetToolTipDataString(Int32 iSeriesID, Int32 iGroupID, MBase::String &orDataString, Int32 iOffset)
Definition: Dataset.h:84
virtual const std::vector< int > GetAxisInfo()
virtual MBase::String GetTemplateUnitElementName(Int32 iDimLayer, Int32 iIndexInsideDim, bool iIsInRowTree=false, Int32 iFormIndex=0, MBase::String iSeperator=L" ")
virtual TokenManager * GetTokenManager()
Returen the reference of the tokenmanager.
int GetGlobalIteratorElementValueAt(int iAxis, int iOrdinal, int iDepth, int iBaseForm, const void **oppData, int *opDataSize, EnumDSSDataType *opDataType, DSSDataFlag *opDataFlag)
Definition: Dataset.h:56
virtual void SetTreeInstance(DimTree *ipTree, bool iIsForRowTree)
virtual bool GetAxisLabelFontSize(Int32 &orFontSize, Int32 iWhichAxis)
void PopulateOneMetricThresholdSuite(Int32 iRow, Int32 iCol, Int32 iMetricId, Int32 iThresholdId)
void GetRowSubTotalsMap(std::map< Int32, bool > &orRowSubTotalsMap)
Definition: DatasetImpl.h:908
virtual Int32 GetAggregationResult(double &orValue, Int32 iIndex, bool iIsForSeries=true, AGG_TYPE iAggType=AGG_TYPE_AVG)
virtual Int32 GetThresholdIndex(Int32 iRowIndex, Int32 iColIndex)
MBase::String GetPlainLabels(unsigned Int32 iGroupIndex, bool iSuppressLastLevel=false, LABEL_LEVEL_OPTION iOption=LLO_NORMAL)
Get plain label with specified GroupIndex.
DATASET_STATUS
Definition: Dataset.h:97
virtual bool IsExpomentialBaseNearOne(Int32 iSeriesId)
virtual void GetBreakByLabel(Int32 iOrdinal, bool iIsForRow, MBase::String &orCollection)
virtual Int32 GetColorStyleNumber()
EnumDSSDataType
Definition: DSSIPhoneEnums.h:39
virtual void SetForHistogram(bool iIsForHistogram)
Set "Is For Histogram" flag.
Definition: DatasetHelper.h:385
virtual bool ShuffleIndex(bool iIsOnRow, const std::vector< Int32 > &iShuffledIndexList)
virtual bool GetGenericFillFormatAlpha(unsigned char &orAlpha, Int32 iSeriesId, Int32 iGroupId, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual bool IsHeaderEmpty(bool iIsForRow=true)
Int32 GetAccessMode()
Definition: DatasetImpl.h:924
#define Int32
Definition: BasicTypes.h:20
THRESHOLD_FILL_STYLE
Definition: Dataset.h:105
virtual HRESULT SetData(Int32 iRow, Int32 iCol, double iValue)
virtual bool IsDisplaySliceInvalid()
virtual void SetReverseGroup(bool iReverseGroup)
Set "Reverse Group" flag.
virtual void PrepareIterator()
DSSRWGridIterator * GetGridIterator()
virtual bool IsSliced()
virtual void GetUnitNameCollection(bool iIsForRow, std::vector< std::string > &orCollection)
virtual bool GetDataLableFontStyle(unsigned char &orFontStyle)
virtual bool GetGenericFillFormatGradient(GraphFillGradient &irFillGradient, Int32 iSeriesId, Int32 iGroupId, Int32 iSliceId=-3)
virtual bool GetAxisOriginLineThickness(Int32 &orLineThickness, Int32 iObjectID)
virtual void GetDataTextLabel(Int32 iOrdinal, bool iIsForRow, MBase::String &orCollection, int iDepth)
virtual bool GetAxisOriginLineColor(RGBColor &orLineColor, Int32 iObjectID)
virtual void SetColorSlices(std::vector< Int32 > &irRowUnits, std::vector< Int32 > irColumnUnits)
virtual bool GetAxisMinorTickLineStyleFormat(unsigned char &orLineStyle, Int32 iObjectID)
virtual bool GetAxisLineStyleFormat(unsigned char &orLineStyle)
virtual HRESULT GetCumulatedData(Int32 iGroupId, Int32 iSeriesId, EnumGraphMatrixDataIndexType iDataIndexType, const double *&iorValue)
Int32 GetBalancedCount(bool iIsForGroup)
virtual bool GetDataLableFontBox(unsigned char &orFontBox)
virtual bool GetTextAsShapeFontColor(RGBColor &orFontColor, Int32 iSeriesId, Int32 iGroupId)
virtual DataTableReformer * GetDataReformer() const
virtual bool GetTrendLineStyle(unsigned char &orLineStyle, Int32 iSeriesId, Int32 iGroupId)
void SetCurrentThresholdSytle(THRESHOLD_FILL_STYLE iCurrentThresholdStyle)
virtual void CurrentSlicePosition(Int32 &orRowIndex, Int32 &orColIndex)
Definition: DatasetHelper.h:1170
LINK_TEXT_TYPE
Definition: DatasetHelper.h:48
virtual bool PopulateTotalValues(std::wifstream &iFileStream)
Populate the total info into the table pool.
Definition: Dataset.h:116
virtual HRESULT SetDataGroup(Int32 iDataGroup, bool iIgnoreForNoSeriesOrGroup=true)
virtual void DumpDataSet(bool iIsNaive, bool isGlobalIterator=false)
Definition: DatasetHelper.h:608
bool ShowSubtotalValue()
Definition: DatasetImpl.h:904
virtual std::vector< double > GetCoefficients(Int32 iSeriesId)
bool GetMetricAndTresholdID(Int32 iSeriesId, Int32 iGroupId, Int32 iColumnOffset, Int32 &orMetricId, Int32 &orThresholdId)
virtual DATASET_STATUS GetStatus(bool iIsGraph, bool iIsDummyGridChart)
Definition: DatasetImpl.h:36
std::basic_string< WCHAR, std::char_traits< WCHAR >, Allocator< WCHAR > > String
Definition: BaseString.h:26
virtual Int32 GetTreeWidth(Int32 iDimLayer, bool iIsInRowTree, bool iIsActualSize=false, bool iIsSqueezeHCG=true)
virtual bool GetSliceGroupRange(Int32 &iBeginGroup, Int32 &iEndGroup)
virtual bool PopulateReformer(DSSRWGridIterator *ipGridIterator, DataSetReformInfo *ipReformInfo)
virtual bool GetTextValue(Int32 iSeriesId, Int32 iGroupId, double &orDataValue)
Definition: Dataset.h:63
Definition: ABLPlot.h:21
virtual void SetGlobalIterator(DSSRWGridIterator *ipIterator)
virtual bool GetDataLabelFontColor(RGBColor &orFontColor)
virtual bool Refresh()
virtual std::string GetGMColorByKey(std::vector< std::pair< Int32, Int32 > > iColorByUnitsIndex, Int32 iSeriesID, Int32 iGroupID, Int32 iColumnOffset=0, bool iIsConsiderSubtotal=true)
virtual bool GetAxisLineThicknessFormat(Int32 &orLineThickness)
virtual HRESULT SetRowAndColumn(Int32 iRowNumber, Int32 iColumnNumber)
virtual bool GetAxisMajorTickLineStyleFormat(unsigned char &orLineStyle, Int32 iObjectID)
virtual bool GetSeriesGroupIdsFromIndex(std::vector< std::pair< Int32, Int32 > > &iorSGPairs, const std::vector< Int32 > &irRowIndexSet, const std::vector< Int32 > &irColIndexSet)
virtual MBase::String GetTemplateUnitName(Int32 iDimLayer, bool iIsInRowTree=false, bool iUseAlias=false)
virtual HRESULT SetRowLabel(Int32 iRow, const wchar_t *ipRowLabel)
virtual HRESULT SetColumnLabel(Int32 iColumn, const wchar_t *ipColumnLabel)
virtual int GetGMColorByIndex(Int32 iSeriesID, Int32 iGroupID, Int32 iAngleIndex=-3, Int32 iColumnOffset=-1)
virtual bool GetReferenceLineFontName(MBase::String &orFontName, Int32 iSeriesId, Int32 iGroupId)
virtual HRESULT GetGroupCount(Int32 &orGroupCount)
virtual HRESULT GetValueAxisNumberFormat(ChartAdvFormat &orFormat, bool iConsiderThresholds=true, Int32 iStartIndex=0, Int32 iStep=0)
virtual bool GetGenericLineThickness(Int32 &orLineThickness, Int32 iSeriesId, Int32 iGroupId, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual void GetSubTotalGlobalRowAndColumnIndex(Int32 iGroupId, const std::vector< Int32 > &iPickedIndexSet, Int32 iColumnOffset, Int32 &iorRowOrdinal, Int32 &iorColOrdinal)
virtual bool IsGroupOnScreen(Int32 iGroupId)
Definition: Dataset.h:71
keep gradient options.
Definition: FormatFill.h:79
void * GetThresholdWithId(Int32 iMetricId, Int32 iThresholdId)
virtual void GetSeriesSplitVector(std::vector< Int32 > &orVec)
virtual Int32 GetColorStyleIndex(Int32 iLocalIndex)
virtual HRESULT GetDataPositionPartSize(Int32 &orDataPositionPartSize)
virtual Int32 GetShapeBySeriesId(Int32 iSeriesId)
Definition: Msi_ccomvariant.h:24
virtual bool IsDataTimeType(Int32 iSeriesID, Int32 iGroupID)
LABEL_LEVEL_OPTION
Definition: Dataset.h:114
virtual HRESULT GetDataSizeByPartSize(Int32 &orDataSizeByPartSize)
virtual bool GetGenericLineStyle(unsigned char &orLineStyle, Int32 iSeriesId, Int32 iGroupId, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual bool GetReferenceLineStyle(unsigned char &orLineStyle, Int32 iSeriesId, Int32 iGroupId)
virtual bool GetGenericFillFormatColor(RGBColor &orColor, Int32 iSeriesId, Int32 iGroupId, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual bool IsMetricBySeries()
virtual void SetAxisInfo(const std::vector< int > &irAxisInfo)
virtual Int32 GetDataGroup()
virtual bool GetRowCount(Int32 &orCount)
Get the row of the subtree rooted by current token manger&#39;s position.
virtual bool GetAxisLabelFontColor(RGBColor &orFontColor, Int32 iWhichAxis)
virtual void GetRowAndColumnIndexForMinMaxMetrixIndex(bool iIsForMax, std::vector< Int32 > iMetricIndex, Int32 &orRowIndex, Int32 &orColumnIndex)
virtual bool GetTextAsShapeFontName(MBase::String &orFontName, Int32 iSeriesId, Int32 iGroupId)
virtual HRESULT GetPeakValuesAcrossSeries(double &orMax, double &orMin, const std::vector< Int32 > &irSereisSet, Int32 iColumnOffset=0)
Get the Max/Min Value across the specified sereis collection, no matter slice is used or not...
virtual bool SetActiveSliceIndex(Int32 iIndex=0)
Definition: Dataset.h:82
virtual void SetFormatManager(FormatManager *ipFormatManager)
virtual bool GetGenericLineColor(RGBColor &orLineColor, Int32 iSeriesId, Int32 iGroupId, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual MetricUnitInfo * GetMetricInfo()
void AddDataToSimpleDataset(const Int32 iRowIndex, const Int32 iColumnIndex, const double *irValue)
Definition: DatasetImpl.h:920
Definition: DatasetHelper.h:490
virtual void SetSeriesSplitVector(const std::vector< Int32 > &irVec)
virtual bool GetAxisLabelFontRotation(unsigned char &orFontRotation, Int32 iWhichAxis)
Definition: RGBColor.h:21
virtual bool IsSeriesOnScreen(Int32 iSeriesId)
virtual bool GetTokenFlag()
Get the flag to see if token manager is active.
virtual bool GetOneSliceRange(Int32 &iBeinSeries, Int32 &iEndSeries, Int32 &iBeginGroup, Int32 &iEndGroup)
assume we are dealing with the simplest case
#define NULL
Definition: Null.h:10
virtual HRESULT GetGMPieSubtotalMaxMin(std::map< std::pair< Int32, Int32 >, double > iPieSubtotalMap, double &orMax, double &orMin, Int32 iColumnOffset, DATA_RETRIEVAL_TYPE iType=DRT_NORMAL)
std::pair< Int32, Int32 > _PositionAssociatedInfo
Definition: DatasetImpl.h:31
virtual std::vector< double > GetRefLineValuesForBubble(Int32 iIndex, Int32 iAxisIndex)
virtual void Delete()
virtual bool GetRowLabel(Int32 iIndex, MBase::String &orLabel)
Get row label for the child indexed by iIndex of the node positioned by the token manager...
virtual HRESULT GetThresholdFillColor(Int32 iSeriesId, Int32 iGroupId, CComVariant *opValue)
virtual bool GetAxisMinorTickLineColorFormat(RGBColor &orLineColor, Int32 iObjectID)
virtual bool GetSeriesByColumn() const
Get "Series by Column" flag.
const unsigned Int32 gMaxMDLabel
Maximum number of Multi Dimensional Label supported.
Definition: DatasetImpl.h:27
virtual bool PopulateOneTree(std::wifstream &iFileStream, bool iIsForRow=true)
This section include methods for misc uses.
void ResetCurrentThresholdStyle()
EnumGraphMatrixDataIndexType
Definition: Dataset.h:125
virtual bool GetTextAsShapeFontSize(Int32 &orFontSize, Int32 iSeriesId, Int32 iGroupId)
DATA_RETRIEVAL_TYPE
Definition: Dataset.h:70
virtual HRESULT GetPieAngleCount(Int32 iGroupId, Int32 iSeriesId, Int32 &orAngleCount)
void GetColSubTotalsMap(std::map< Int32, bool > &orColSubTotalsMap)
Definition: DatasetImpl.h:912
bool IsUseZeroForNullValue()
Definition: DatasetImpl.h:916
Definition: Dataset.h:152
virtual void SetDatagroupInfo(const DataGroupInfo &irInfo)
virtual bool GetReferenceLineFontStyle(unsigned char &orFontStyle, Int32 iSeriesId, Int32 iGroupId)
Definition: DSSFormat.h:35
virtual bool GetGenericFillFormatType(unsigned char &orFillType, Int32 iSeriesId, Int32 iGroupId, Int32 iAngleId=-3, Int32 iSliceId=-3)
virtual THRESHOLD_FILL_STYLE GetCurrentTreshHoldFillType()
virtual HRESULT GetTotalData(Int32 iIndex, bool iIsGroupTotal, Int32 iSpanStartIndex, Int32 iSpanEndIndex, double &iorValue, Int32 iColumnOffset, bool iIsUseAbsValue=false, bool iIsForSlice=true)
virtual HRESULT InitFromTemplateSlice(DSSTemplate *ipTemplate, DSSRWGridIterator *ipGridIterator, Int32 iSliceID, bool iIsCacheData=false, bool iIncludeSubtotal=true)
< Refactory into a lighter component
virtual bool GetReferenceLineColor(RGBColor &orLineColor, Int32 mSeriesId, Int32 iGroupId)
virtual void SetPieGroupDetph(Int32 irDetph)
Definition: FormatManager.h:157
virtual void RestoreFromShuffle()
virtual Int32 FindCell(bool iFromSeries, Int32 Index, Int32 Target)