Mobile API Reference  MicroStrategy 2019
ImageMap.h
Go to the documentation of this file.
1 //========================================================
2 // Filename: 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_ImageMap_h
11 #define MsiChart_ImageMap_h
12 
13 #include "PDCHeader/PDCvector"
14 #include "Base/Base/BaseString.h"
15 #include "Synch/Defines/SmartPtr.h"
16 
17  // copy from Z:/Kernel/Chart/Chart/ImageMap.h
18  // Use smart pointer for AreaRec.
19 #ifndef IMAGEMAP_H
20  class AreaRec
21  {
22  public:
23  // typedef MSynch::SmartPtr<AreaRec> Ptr;
24 
25  AreaRec(Int32 iShape, Int32 iObjectID, Int32 iSeriesID, Int32 iGroupID,
26  const wchar_t* iCoordinates) :
27  mShape(iShape),
28  mObjectID(iObjectID),
29  mSeriesID(iSeriesID),
30  mGroupID(iGroupID),
31  mCoordinates(iCoordinates)
32  {
33  }
34 
35  ~AreaRec() throw()
36  {
37  }
38 
39  AreaRec(const AreaRec& iAreaRec) :
40  mShape(iAreaRec.mShape),
41  mObjectID(iAreaRec.mObjectID),
42  mSeriesID(iAreaRec.mSeriesID),
43  mGroupID(iAreaRec.mGroupID),
44  mCoordinates(iAreaRec.mCoordinates),
45  mToolTip(iAreaRec.mToolTip)
46  {
47  }
48 
49  const AreaRec& operator =(const AreaRec& iAreaRec)
50  {
51  if(this == &iAreaRec)
52  return *this;
53 
54  mShape = iAreaRec.mShape;
55  mObjectID = iAreaRec.mObjectID;
56  mSeriesID = iAreaRec.mSeriesID;
57  mGroupID = iAreaRec.mGroupID;
58  mCoordinates = iAreaRec.mCoordinates;
59  mToolTip = iAreaRec.mToolTip;
60 
61  return *this;
62  }
63 
65  {
66  return mShape;
67  }
68 
70  {
71  return mObjectID;
72  }
73 
75  {
76  return mSeriesID;
77  }
78 
80  {
81  return mGroupID;
82  }
83 
84  const wchar_t* GetCoordinates()
85  {
86  return mCoordinates.c_str();
87  }
88 
89 
90  private:
91  Int32 mShape;
92  Int32 mObjectID;
93  Int32 mSeriesID;
94  Int32 mGroupID;
95  MBase::String mCoordinates;
96  MBase::String mToolTip;
97  };
98 
99  typedef std::vector<AreaRec*> ImageMap;
100  #define IMAGEMAP_H
101 
102 #endif
103 
104 
105 #endif
Int32 GetGroupID()
Definition: ImageMap.h:79
AreaRec(Int32 iShape, Int32 iObjectID, Int32 iSeriesID, Int32 iGroupID, const wchar_t *iCoordinates)
Definition: ImageMap.h:25
~AreaRec()
Definition: ImageMap.h:35
Int32 GetShape()
Definition: ImageMap.h:64
const wchar_t * GetCoordinates()
Definition: ImageMap.h:84
#define Int32
Definition: BasicTypes.h:20
AreaRec(const AreaRec &iAreaRec)
Definition: ImageMap.h:39
Definition: ImageMap.h:20
std::basic_string< WCHAR, std::char_traits< WCHAR >, Allocator< WCHAR > > String
Definition: BaseString.h:26
Int32 GetObjectID()
Definition: ImageMap.h:69
std::vector< AreaRec * > ImageMap
Definition: ImageMap.h:99
Int32 GetSeriesID()
Definition: ImageMap.h:74
const AreaRec & operator=(const AreaRec &iAreaRec)
Definition: ImageMap.h:49