Mobile API Reference  MicroStrategy 2019
Common.h
Go to the documentation of this file.
1 //========================================================
2 // Filename: Kernel/SourceCode/IPhoneChart/Common.h
3 // Date: 2008-05-20
4 // Authors: Bing Huang
5 
6 // Copyright (C) 1997-2008 MicroStrategy Incorporated
7 // All rights reserved
8 //========================================================
9 
10 #ifndef MsiChart_Common_h
11 #define MsiChart_Common_h
12 
13 #include <vector>
14 
16 
17 // #include "Chart/Chart/ImageMap.h"
18 
20 const int DssGraphTypeGridChart = 20000;
21 const int DssGraphRangeLegendFrame = 10001;
22 
23 #ifdef _VE_CE
24 typedef char JSONChar;
25 #define JSONString MBase::String;
26 #define JSONscanf sscanf
27 #define ToDecimalJSONString ToDecimalString
28 #define JSONStringToUTF8(x) x
29 #define ToJSONString(x) x
30 #define ToWideString(x) x
31 #endif
32 
33 //Bayer hiChart, defined for CE internal use.
34 typedef enum
35 {
36  DssGraphTypeBudgetLipStick_Veritical = 207, //DssGraphTypeVerticalHichertLipStick,
37  DssGraphTypeBudgetLipStick_Horizontal,// = DssGraphTypeHorizontalHichertLipStick,
38  DssGraphTypeBudgetOverlapBar_Veritical,// = DssGraphTypeVerticalHichertOverlappingBars,
39  DssGraphTypeBudgetOverlapBar_Horizontal,// = DssGraphTypeHorizontalHichertOverlappingBars,
41 const int DssPlotWrapper = 30000;
42 const int DssIdSpan = 800;
43 // TQMS: 635507, by zshe
44 typedef enum
45 {
51 
52 #ifndef _VE_CE
53 // The following code comes from a later version of GraphStyle.idl. Will be removed in the next rebase.
54 // typedef enum
55 // {
56 // DssGraphOffScaleHide = 0,
57 // DssGraphOffScaleClip = 1,
58 // DssGraphOffScaleShow = 2,
59 // } EnumDSSGraphOffScaleType;
60 #endif
61 typedef enum
62 {
63  UCM_BYX = 0,
64  UCM_BYY = 1,
67 
68 typedef enum
69 {
70  GMCM_BYX = 0,
71  GMCM_BYY = 1,
73  GMCM_SPECIFIC = 3, //< color by a specific metric
74  GMCM_COLORBY = 4, //< combination of color-by unit
76 
77 typedef enum{
82 
83 typedef enum
84 {
88 
89 typedef enum
90 {
95 
96 typedef enum
97 {
100 
101 typedef enum
102 {
107 
108 typedef enum
109 {
110  GMNCDM_ALL = 0, //< all the value under all the metric will be condensed
114 
115 typedef enum
116 {
122 
123 typedef enum
124 {
130 
131 typedef enum
132 {
139 
140 typedef enum
141 {
147 
148 typedef enum {
155 
156 // clark, move EnumDSSExtraGraphProperty to DSSiphoneenums.h
157 
158 typedef enum
159 {
160  // Interlaced grids
169 
170  // Quality Bands
173 
174  // iPad charting start from 21000
175  // Support second user line for Graph Matrix.
177 
178  // Warning message for non-supported chart type.
180 
181  // 412906, bracket line of O1 axis.
183 
184  // the highlight layerobject triple id
186 
187  // Base layer
189 
190  // Middle wall layer in BiPolar chart with depth.
192 
193  // Plot layer
195 
196  // Renderer layer
198 
199  // Graph container
201 
202  //GraphMatrix widget start from 22000
212  DssGraphMatrixTickObject, //< For tick mode.
213 
214 
215 
217 
218 typedef enum
219 {
224 
225 namespace MsiChart
226 {
229  const Int32 gNullObjectId = -3;
230  const Int32 gNullSeriesId = -3;
231  const Int32 gNullGroupId = -3;
232  const Int32 gNullAngleId = -3;
233  const Int32 gNullSlcieId = -3;
234  const Int32 gMaxSeries = 20;
235 
237  {
256  GMT_GRID //GridChart used in GraphMatrix
257  };
258 
259  typedef enum
260  {
261  // Make this list consistent with EnumFileType in ChartCtrl.h.
264  PFT_BMP = 7,
265  PFT_GIF = 100,
266  PFT_PDF = 102,
270 
271  // reference: pgsdk.h
272  // This emumeration is not continuous since we need to maintain compatibility
273  // with web GUI code.
274  typedef enum
275  {
277  OS_LINE = 5,
280  OS_WEDGE = 12,
282  OS_POLYLINE = 18,
283  OS_PATH =24,
284  } EnumObjectShape;
285 
295  GIPWidth = 9,
320  };
321 
322  //This enum is used in time series chart to distinguish different usage of image output. Different items can be combined if necessary.
323  typedef enum
324  {
330  }EnumImageUsage; //Added by lliu
331 #ifdef _VE_CE
332  typedef enum
333  {
334  LJT_MITER = 0,
335  LJT_BEVEL = 1,
336  LJT_ROUND = 2,
338 #endif
339  typedef enum
341  {
350 
352  typedef enum
353  {
360 
361  typedef enum
362  {
367  }EnumBox;
368 
369  //Struct InfoId is added for the object needs more infoindex than TripleId.
371  typedef enum
372  {
376 
377 
378  struct InfoId //For some objects, such as Pie slice, TripleID is not enough to indentify a object, need more info, such as AngleId, SliceId.
379  {
380  InfoId(const std::vector<int>& iInfoIndexSet, Int32 iInfoIndexNum)
381  {
382  mInfoNumber = iInfoIndexNum;
383  mInfoIndexSet.resize(iInfoIndexNum);
384  mInfoIndexSet.assign(iInfoIndexSet.begin(), iInfoIndexSet.end());
385  }
386 
388  {
389  mInfoNumber = EnumInfoIndexNumber; //Note, when we add other enumtype we add to modify the EnumInfoIndexNumber, currently it's 2(AngleIndex, SliceIndex)
390  mInfoIndexSet.resize(mInfoNumber, -3);
391  }
392 
393  std::vector<int> mInfoIndexSet;
395  };
396 
397  struct TripleId : public InfoId
398  {
399 
400  TripleId(Int32 iObjectId = gNullObjectId, Int32 iSeriesId = gNullSeriesId, Int32 iGroupId = gNullGroupId)
401  :InfoId(),mObjectId(iObjectId), mSeriesId(iSeriesId), mGroupId(iGroupId){}
402 
403  TripleId(const TripleId& irTripleId)
404  :InfoId(irTripleId.mInfoIndexSet, irTripleId.mInfoNumber), mObjectId(irTripleId.mObjectId), mSeriesId(irTripleId.mSeriesId), mGroupId(irTripleId.mGroupId){}
405 
409  bool operator < (const TripleId& iTripleId) const
410  {
411  if (mObjectId < iTripleId.mObjectId)
412  {
413  return true;
414  }
415  else if (mObjectId == iTripleId.mObjectId)
416  {
417  if (mSeriesId < iTripleId.mSeriesId)
418  {
419  return true;
420  }
421  else if (mSeriesId == iTripleId.mSeriesId)
422  {
423  if (mGroupId < iTripleId.mGroupId)
424  {
425  return true;
426  }
427  else if (mGroupId == iTripleId.mGroupId)
428  {
429  for (int i = 0; i < iTripleId.mInfoNumber; i ++)
430  {
431  if (mInfoIndexSet[i] == iTripleId.mInfoIndexSet[i])
432  continue;
433  return mInfoIndexSet[i] < iTripleId.mInfoIndexSet[i];
434  }
435  return false;
436  }
437  else
438  return false;
439  }
440  else
441  return false;
442  }
443  else
444  return false;
445  }
446 
447  bool operator == (const TripleId& iTripleId) const
448  {
449  bool lIsTripleIdEquals = (mObjectId == iTripleId.mObjectId && mSeriesId == iTripleId.mSeriesId && mGroupId == iTripleId.mGroupId);
450  if (!lIsTripleIdEquals)
451  return false;
452  for (int i = 0; i < iTripleId.mInfoNumber; i ++)
453  {
454  if (mInfoIndexSet[i] == iTripleId.mInfoIndexSet[i])
455  continue;
456  else
457  return false;
458  }
459 
460  return true;
461  }
462  };
463 }
464 
465 
466 #endif
EnumGraphMajorType
Definition: Common.h:236
Definition: Common.h:240
Definition: Common.h:345
Definition: Common.h:48
EnumDssGraphMatrixSizeMode
Definition: Common.h:83
EnumDSSGraphGridType
Definition: Common.h:218
Definition: Common.h:206
TripleId(Int32 iObjectId=gNullObjectId, Int32 iSeriesId=gNullSeriesId, Int32 iGroupId=gNullGroupId)
Definition: Common.h:400
EnumGradientProps
Helper enum for gradient properties.
Definition: Common.h:340
Definition: Common.h:80
Definition: Common.h:112
Definition: Common.h:357
Definition: Common.h:244
Definition: Common.h:105
Definition: Common.h:265
Definition: Common.h:46
Definition: Common.h:143
Definition: Common.h:49
Definition: Common.h:222
Definition: Common.h:313
Definition: Common.h:211
Definition: Common.h:294
Definition: Common.h:126
Definition: Common.h:266
Definition: Common.h:71
Definition: Common.h:64
Definition: Common.h:291
Definition: Common.h:356
Definition: Common.h:220
const Int32 gVirtualCoordinateWidth
Definition: Common.h:227
Definition: Common.h:309
Int32 mObjectId
Definition: Common.h:406
Definition: Common.h:318
Definition: Common.h:150
Definition: Common.h:79
Definition: Common.h:149
Definition: Common.h:305
Definition: Common.h:293
EnumObjectShape
Definition: Common.h:274
Definition: Common.h:289
Definition: Common.h:276
Definition: Common.h:167
Definition: Common.h:209
Definition: Common.h:280
const Int32 gNullSlcieId
Definition: Common.h:233
Definition: Common.h:164
Definition: Common.h:314
Definition: Common.h:137
Definition: Common.h:302
EnumPieSliceIndex
Definition: Common.h:371
Definition: Common.h:205
Definition: Common.h:348
Definition: Common.h:296
DssTimeSeriesItems
Definition: Common.h:148
Definition: Common.h:354
Definition: Common.h:263
GraphInfoProperty
Definition: Common.h:286
Definition: Common.h:119
const int DssIdSpan
Definition: Common.h:42
Definition: Common.h:346
Definition: Common.h:287
Definition: Common.h:278
Definition: Common.h:252
Definition: Common.h:307
Definition: Common.h:208
Definition: Common.h:317
EnumDssGraphMatrixExtraPaddingPosition
Definition: Common.h:115
Definition: Common.h:179
Definition: Common.h:268
Definition: Common.h:168
EnumLineJoinType
Definition: ChartCanvas.h:22
Definition: Common.h:363
const Int32 gMaxSeries
Definition: Common.h:234
Use current image as the fisrt image of scroll view.
Definition: Common.h:326
Definition: Common.h:172
InfoId(const std::vector< int > &iInfoIndexSet, Int32 iInfoIndexNum)
Definition: Common.h:380
DssGraphTypeHiChecrt
Definition: Common.h:34
Definition: Common.h:245
Definition: Common.h:145
Definition: Common.h:200
TripleId(const TripleId &irTripleId)
Definition: Common.h:403
EnumDssGraphMatrixGridStyle
Definition: Common.h:96
const Int32 gNullGroupId
Definition: Common.h:231
const Int32 gNullAngleId
Definition: Common.h:232
Definition: Common.h:308
bool operator==(const TripleId &iTripleId) const
Definition: Common.h:447
Definition: Common.h:303
Use current image as the second image of scroll view.
Definition: Common.h:327
Definition: Common.h:110
Definition: Common.h:210
Definition: Common.h:365
Definition: ChartCanvas.h:24
EnumDssGraphMatrixMetricCategory
Definition: Common.h:123
Definition: Common.h:72
Definition: Common.h:144
Definition: Common.h:166
Definition: Common.h:78
Definition: Common.h:298
Definition: Common.h:264
Definition: Common.h:290
bool operator<(const TripleId &iTripleId) const
Definition: Common.h:409
#define Int32
Definition: BasicTypes.h:20
Definition: Common.h:162
Definition: Common.h:163
EnumDSSGraphMatrixNumberCondenseMode
Definition: Common.h:108
Definition: Common.h:153
Definition: Common.h:282
Definition: Common.h:134
Definition: Common.h:118
Definition: Common.h:98
Definition: Common.h:125
Definition: Common.h:92
Definition: Common.h:319
Definition: Common.h:91
Definition: Common.h:117
Definition: Common.h:70
Definition: Common.h:176
Definition: Common.h:283
Definition: Common.h:74
Definition: Common.h:161
EnumDssGraphMatrixExtraMarkerShape
Definition: Common.h:140
Definition: Common.h:281
Int32 mGroupId
Definition: Common.h:408
Definition: Common.h:238
Definition: Common.h:185
Definition: Common.h:246
Definition: Common.h:295
Definition: Common.h:191
Definition: Common.h:378
EnumDssGraphNumberFormatAsAxis
Definition: Common.h:44
Definition: Common.h:197
const int DssGraphTypeGridChart
Definition: Common.h:20
Definition: Common.h:262
Definition: Common.h:73
General image usage.
Definition: Common.h:325
Definition: Common.h:247
EnumDSSExtraGraphObject
Definition: Common.h:158
Int32 mSeriesId
Definition: Common.h:407
Definition: Common.h:111
Definition: Common.h:306
Definition: ChartCanvas.h:25
Definition: Common.h:86
Definition: Common.h:364
Definition: Common.h:47
Definition: Common.h:203
Definition: Common.h:310
Definition: Common.h:288
Definition: Common.h:256
Definition: Common.h:152
Definition: Common.h:253
Definition: Common.h:103
Definition: Common.h:279
Use current image as an empty image for elastic effect.
Definition: Common.h:329
Definition: ABLPlot.h:21
Definition: Common.h:128
Definition: Common.h:292
Definition: Common.h:355
EnumBevelProps
Helper enum for bevel properties.
Definition: Common.h:352
EnumDssGraphMatrixElementSizeMode
Definition: Common.h:89
EnumDssGraphMatrixColorMode
Definition: Common.h:68
Definition: Common.h:104
Definition: Common.h:241
Definition: Common.h:204
Definition: Common.h:85
Definition: Common.h:248
EnumDssGraphMatrixXAxisLabelRotation
Definition: Common.h:77
const Int32 gNullObjectId
Definition: Common.h:229
Definition: Common.h:165
Definition: Common.h:300
EnumDssGraphMatrixDataLabelPosition
Definition: Common.h:131
Definition: Common.h:93
const Int32 gNullSeriesId
Definition: Common.h:230
Definition: Common.h:249
Definition: Common.h:207
Definition: Common.h:133
Definition: Common.h:221
Definition: Common.h:297
Definition: Common.h:188
const int DssPlotWrapper
Definition: Common.h:41
Definition: Common.h:315
Definition: Common.h:277
Definition: Common.h:304
Definition: Common.h:63
Definition: Common.h:151
EnumDssGraphGridChartUniformColorMode
Definition: Common.h:61
Definition: Common.h:316
Definition: Common.h:171
Definition: Common.h:135
const Int32 EnumInfoIndexNumber
Definition: Common.h:370
Definition: Common.h:311
std::vector< int > mInfoIndexSet
Definition: Common.h:393
EnumPictureFormatType
Definition: Common.h:259
const int DssGraphRangeLegendFrame
Definition: Common.h:21
Definition: Common.h:358
const Int32 gVirtualCoordinateHeight
Definition: Common.h:228
Definition: Common.h:212
Definition: Common.h:254
Definition: Common.h:301
Definition: Common.h:136
Definition: Common.h:243
Definition: Common.h:120
Definition: Common.h:344
Definition: Common.h:242
Definition: Common.h:299
Definition: Common.h:142
Definition: Common.h:194
Definition: Common.h:251
Use current image as a piece of scroll view.
Definition: Common.h:328
Definition: Common.h:182
Int32 mInfoNumber
Definition: Common.h:394
Definition: Common.h:343
Definition: Common.h:366
EnumDssGraphAnimationOrientation
Definition: Common.h:101
Definition: Common.h:255
EnumBox
Definition: Common.h:361
Definition: Common.h:312
Definition: Common.h:347
Definition: Common.h:65
Definition: Common.h:239
Definition: Common.h:127
EnumImageUsage
Definition: Common.h:323
Definition: ChartCanvas.h:26
Definition: Common.h:397
Definition: Common.h:267
Definition: Common.h:342
Definition: Common.h:250
InfoId()
Definition: Common.h:387