Mobile API Reference  MicroStrategy 2019
GenericContext.h
Go to the documentation of this file.
1 //==============================================================================================
2 // FILENAME : GenericContext.h
3 // AUTHOR : Liang Liu
4 // CREATION : 2008-10-31
5 // Copyright (C) MicroStrategy Incorporated 2008
6 // All Rights Reserved
7 //==============================================================================================
8 #ifndef MsiChart_GenericContext_h
9 #define MsiChart_GenericContext_h
10 
11 #include "ChartContext.h"
12 //#include "FormatManager.h"
13 
14 namespace MsiChart
15 {
20  {
21  public:
22  GenericContext(Dataset::Ptr iDatasetPtr);
23  GenericContext(Dataset::Ptr iDatasetPtr, const char* ipGDFFileName);
24  GenericContext(Dataset::Ptr iDatasetPtr, FormatManager::Ptr iFormatManagerPtr, const char* ipGDFFileName);
25  virtual ~GenericContext();
26 
27  //Factory methods for FormatLine/FormatFill/FormatFont
28  virtual FormatLine::Ptr GetFormatLine(const TripleId& irTripleId, Int32 iCollectionType,EnumShapeType iShape = _GENERIC) const;
29  virtual FormatFill::Ptr GetFormatFill(const TripleId& irTripleId, Int32 iCollectionType,EnumShapeType iShape = _GENERIC) const;
30  virtual FormatFont::Ptr GetFormatFont(const TripleId& irTripleId) const;
31  virtual bool GetProperty(Int32 iPropertyId, const TripleId& irTripleId, CComVariant* opValue) const;
32  virtual void PutProperty(Int32 iPropertyId, const TripleId& irTripleId, CComVariant* ipValue);
33  virtual bool IsGenericContext() const;
34 
35  private:
40  bool hIsVertical() const;
41 
46  void hLoadGDF(const char* ipGDFFileName);
47 
48  bool hIsAutoAxis(Int32 iObjectId) const;
49 
50  //FormatManager::Ptr mFormatManagerPtr;
51  Int32 hGetColorIndexForFill(const TripleId& irTripleId, FormatFill::Ptr iFormatFillPtr) const;
52 
53  virtual Int32 hGetGMColorIndex(const TripleId& irTripleId, Int32 iDefaultIndex, Int32 iColColorIndexOffset = -1) const; //Get Color Index according to various color option in Graph matrix.
54 
55  FormatLine::Ptr hSpecialLineEffect(FormatLine::Ptr iFormatLinePtr, const TripleId& irTripleId, Int32 iCollectionType) const; //< Hard coded, special handling cases...
56  void hResolveFontFormat(FormatFont* ioFormatFont,const TripleId& irTripleId) const;
57  void hResolveLineFormat(FormatLine* ioFormatLine,const TripleId& irTripleId,EnumShapeType iShape = _GENERIC) const;
58  void hResolveFillFormat(FormatFill* ioFormatFill,const TripleId& irTripleId,EnumShapeType iShape = _GENERIC) const;
59 
60  };
61 
63  {
64  return true;
65  }
66 }
67 
68 #endif
Definition: FormatFill.h:160
virtual FormatLine::Ptr GetFormatLine(const TripleId &irTripleId, Int32 iCollectionType, EnumShapeType iShape=_GENERIC) const
Definition: ChartContext.h:149
EnumShapeType
Definition: ChartContext.h:147
virtual FormatFill::Ptr GetFormatFill(const TripleId &irTripleId, Int32 iCollectionType, EnumShapeType iShape=_GENERIC) const
Definition: FormatLine.h:59
virtual bool GetProperty(Int32 iPropertyId, const TripleId &irTripleId, CComVariant *opValue) const
Definition: Dataset.h:198
#define Int32
Definition: BasicTypes.h:20
Definition: ChartContext.h:542
virtual void PutProperty(Int32 iPropertyId, const TripleId &irTripleId, CComVariant *ipValue)
Definition: ABLPlot.h:21
GenericContext(Dataset::Ptr iDatasetPtr)
Definition: GenericContext.h:19
Definition: Msi_ccomvariant.h:24
virtual bool IsGenericContext() const
Definition: GenericContext.h:62
virtual FormatFont::Ptr GetFormatFont(const TripleId &irTripleId) const
Definition: Common.h:397
Definition: FormatFont.h:86
Definition: FormatManager.h:157