DbLinkedTableData.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright 2015 Autodesk, Inc. All rights reserved.
  4. //
  5. // Use of this software is subject to the terms of the Autodesk license
  6. // agreement provided at the time of installation or download, or which
  7. // otherwise accompanies this software in either electronic or hard copy form.
  8. //
  9. //////////////////////////////////////////////////////////////////////////////
  10. //
  11. //
  12. // Name: DbLinkedTableData.h
  13. //
  14. // Description: Contains the following classes:
  15. // AcDbLinkedTableData
  16. //////////////////////////////////////////////////////////////////////////////
  17. #pragma once
  18. #include "DbLinkedData.h"
  19. #include "DbTableIterator.h"
  20. #include "AcCell.h"
  21. //*************************************************************************
  22. // AcDbLinkedTableData
  23. //*************************************************************************
  24. class AcDbLinkedTableData : public AcDbLinkedData
  25. {
  26. public:
  27. ACDB_DECLARE_MEMBERS(AcDbLinkedTableData);
  28. ACDB_PORT AcDbLinkedTableData(void);
  29. ACDB_PORT virtual ~AcDbLinkedTableData(void);
  30. ACDB_PORT virtual Acad::ErrorStatus clear(void);
  31. ACDB_PORT virtual Acad::ErrorStatus copyFrom(const AcDbLinkedTableData* pSrc,
  32. AcDb::TableCopyOption nOption);
  33. ACDB_PORT virtual Acad::ErrorStatus copyFrom(const AcDbLinkedTableData* pSrc,
  34. AcDb::TableCopyOption nOption,
  35. const AcCellRange& srcRange,
  36. const AcCellRange& targetRange,
  37. AcCellRange* pNewTargetRange);
  38. ACDB_PORT AcDbTableIterator* getIterator(void) const;
  39. ACDB_PORT AcDbTableIterator* getIterator(const AcCellRange* pRange,
  40. AcDb::TableIteratorOption nOption) const;
  41. ACDB_PORT virtual Acad::ErrorStatus setSize(int nRows, int nCols);
  42. ACDB_PORT virtual int numColumns (void) const;
  43. ACDB_PORT virtual const ACHAR* getColumnName(int nIndex) const;
  44. ACDB_PORT virtual Acad::ErrorStatus setColumnName(int nIndex,
  45. const ACHAR* pszName);
  46. ACDB_PORT virtual int appendColumn (int nNumCols);
  47. ACDB_PORT virtual int insertColumn (int nIndex,
  48. int nNumCols);
  49. ACDB_PORT virtual Acad::ErrorStatus deleteColumn(int nIndex,
  50. int nNumColsToDelete);
  51. ACDB_PORT virtual int numRows (void) const;
  52. ACDB_PORT virtual bool canInsert (int nIndex,
  53. bool bRow) const;
  54. ACDB_PORT virtual int appendRow (int nNumRows);
  55. ACDB_PORT virtual int insertRow (int nIndex,
  56. int nNumRows);
  57. ACDB_PORT virtual bool canDelete (int nIndex,
  58. int nCount,
  59. bool bRow) const;
  60. ACDB_PORT virtual Acad::ErrorStatus deleteRow(int nIndex,
  61. int nNumRowsToDelete);
  62. ACDB_PORT virtual bool isContentEditable(int nRow,
  63. int nCol) const;
  64. ACDB_PORT virtual AcDb::CellState cellState(int nRow,
  65. int nCol) const;
  66. ACDB_PORT virtual Acad::ErrorStatus setCellState(int nRow,
  67. int nCol,
  68. AcDb::CellState nCellState);
  69. ACDB_PORT virtual AcString getToolTip (int nRow,
  70. int nCol) const;
  71. ACDB_PORT virtual Acad::ErrorStatus setToolTip(int nRow,
  72. int nCol,
  73. const ACHAR* pszToolTip);
  74. ACDB_PORT virtual int getCustomData (int nRow,
  75. int nCol) const;
  76. ACDB_PORT virtual Acad::ErrorStatus setCustomData(int nRow,
  77. int nCol,
  78. int nData);
  79. ACDB_PORT virtual Acad::ErrorStatus getCustomData(int nRow,
  80. int nCol,
  81. const ACHAR* pszKey,
  82. AcValue* pData) const;
  83. ACDB_PORT virtual Acad::ErrorStatus setCustomData(int nRow,
  84. int nCol,
  85. const ACHAR* pszKey,
  86. const AcValue* pData);
  87. ACDB_PORT virtual bool isLinked (int nRow,
  88. int nCol) const;
  89. ACDB_PORT virtual AcDbObjectId getDataLink(int nRow,
  90. int nCol) const;
  91. ACDB_PORT virtual Acad::ErrorStatus getDataLink(int nRow,
  92. int nCol,
  93. AcDbDataLink*& pDataLink,
  94. AcDb::OpenMode mode) const;
  95. ACDB_PORT virtual int getDataLink (const AcCellRange* pRange,
  96. AcDbObjectIdArray& dataLinkIds) const;
  97. ACDB_PORT virtual Acad::ErrorStatus setDataLink(int nRow,
  98. int nCol,
  99. const AcDbObjectId& idDataLink,
  100. bool bUpdate);
  101. ACDB_PORT virtual Acad::ErrorStatus setDataLink(const AcCellRange& range,
  102. const AcDbObjectId& idDataLink,
  103. bool bUpdate);
  104. ACDB_PORT virtual AcCellRange getDataLinkRange(int nRow,
  105. int nCol) const;
  106. ACDB_PORT virtual Acad::ErrorStatus removeDataLink(int nRow,
  107. int nCol);
  108. ACDB_PORT virtual Acad::ErrorStatus removeDataLink(void);
  109. ACDB_PORT virtual Acad::ErrorStatus updateDataLink(int nRow,
  110. int nCol,
  111. AcDb::UpdateDirection nDir,
  112. AcDb::UpdateOption nOption);
  113. ACDB_PORT virtual Acad::ErrorStatus updateDataLink(AcDb::UpdateDirection nDir,
  114. AcDb::UpdateOption nOption);
  115. ACDB_PORT virtual int numContents (int nRow,
  116. int nCol) const;
  117. ACDB_PORT virtual int createContent (int nRow,
  118. int nCol,
  119. int nIndex);
  120. ACDB_PORT virtual Acad::ErrorStatus moveContent(int nRow,
  121. int nCol,
  122. int nFromIndex,
  123. int nToIndex);
  124. ACDB_PORT virtual Acad::ErrorStatus deleteContent(int nRow,
  125. int nCol,
  126. int nContent);
  127. ACDB_PORT virtual Acad::ErrorStatus deleteContent(int nRow,
  128. int nCol);
  129. ACDB_PORT virtual Acad::ErrorStatus deleteContent(const AcCellRange& range);
  130. ACDB_PORT virtual AcDb::CellContentType contentType(int nRow,
  131. int nCol) const;
  132. ACDB_PORT virtual AcDb::CellContentType contentType(int nRow,
  133. int nCol,
  134. int nContent) const;
  135. ACDB_PORT virtual Acad::ErrorStatus getDataType(int nRow,
  136. int nCol,
  137. AcValue::DataType& nDataType,
  138. AcValue::UnitType& nUnitType) const;
  139. ACDB_PORT virtual Acad::ErrorStatus getDataType(int nRow,
  140. int nCol,
  141. int nContent,
  142. AcValue::DataType& nDataType,
  143. AcValue::UnitType& nUnitType) const;
  144. ACDB_PORT virtual Acad::ErrorStatus setDataType(int nRow,
  145. int nCol,
  146. AcValue::DataType nDataType,
  147. AcValue::UnitType nUnitType);
  148. ACDB_PORT virtual Acad::ErrorStatus setDataType(int nRow,
  149. int nCol,
  150. int nContent,
  151. AcValue::DataType nDataType,
  152. AcValue::UnitType nUnitType);
  153. ACDB_PORT virtual AcString dataFormat (int nRow,
  154. int nCol) const;
  155. ACDB_PORT virtual AcString dataFormat (int nRow,
  156. int nCol,
  157. int nContent) const;
  158. ACDB_PORT virtual Acad::ErrorStatus setDataFormat(int nRow,
  159. int nCol,
  160. const ACHAR* pszFormat);
  161. ACDB_PORT virtual Acad::ErrorStatus setDataFormat(int nRow,
  162. int nCol,
  163. int nContent,
  164. const ACHAR* pszFormat);
  165. ACDB_PORT virtual Acad::ErrorStatus getValue(int nRow,
  166. int nCol,
  167. AcValue& value) const;
  168. ACDB_PORT virtual Acad::ErrorStatus getValue(int nRow,
  169. int nCol,
  170. int nContent,
  171. AcValue::FormatOption nOption,
  172. AcValue& value) const;
  173. ACDB_PORT virtual Acad::ErrorStatus setValue(int nRow,
  174. int nCol,
  175. const AcValue& value);
  176. ACDB_PORT virtual Acad::ErrorStatus setValue(int nRow,
  177. int nCol,
  178. int nContent,
  179. const AcValue& value);
  180. ACDB_PORT virtual Acad::ErrorStatus setValue(int nRow,
  181. int nCol,
  182. int nContent,
  183. const AcValue& value,
  184. AcValue::ParseOption nOption);
  185. ACDB_PORT virtual AcString getText (int nRow,
  186. int nCol) const;
  187. ACDB_PORT virtual AcString getText (int nRow,
  188. int nCol,
  189. int nContent) const;
  190. ACDB_PORT virtual AcString getText (int nRow,
  191. int nCol,
  192. int nContent,
  193. AcValue::FormatOption nOption) const;
  194. ACDB_PORT virtual Acad::ErrorStatus setText(int nRow,
  195. int nCol,
  196. const ACHAR* pszText);
  197. ACDB_PORT virtual Acad::ErrorStatus setText(int nRow,
  198. int nCol,
  199. int nContent,
  200. const ACHAR* pszText);
  201. ACDB_PORT virtual bool hasFormula (int nRow,
  202. int nCol,
  203. int nContent) const;
  204. ACDB_PORT virtual AcString getFormula (int nRow,
  205. int nCol,
  206. int nContent) const;
  207. ACDB_PORT virtual Acad::ErrorStatus setFormula(int nRow,
  208. int nCol,
  209. int nContent,
  210. const ACHAR* pszFormula);
  211. ACDB_PORT virtual AcDbObjectId getFieldId(int nRow,
  212. int nCol) const;
  213. ACDB_PORT virtual AcDbObjectId getFieldId(int nRow,
  214. int nCol,
  215. int nContent) const;
  216. ACDB_PORT virtual Acad::ErrorStatus setFieldId(int nRow,
  217. int nCol,
  218. const AcDbObjectId& idField);
  219. ACDB_PORT virtual Acad::ErrorStatus setFieldId(int nRow,
  220. int nCol,
  221. int nContent,
  222. const AcDbObjectId& idField);
  223. ACDB_PORT virtual Acad::ErrorStatus getField(int nRow,
  224. int nCol,
  225. int nContent,
  226. AcDbField*& pField,
  227. AcDb::OpenMode mode) const;
  228. ACDB_PORT virtual AcDbObjectId getBlockTableRecordId(int nRow,
  229. int nCol) const;
  230. ACDB_PORT virtual AcDbObjectId getBlockTableRecordId(int nRow,
  231. int nCol,
  232. int nContent) const;
  233. ACDB_PORT virtual Acad::ErrorStatus setBlockTableRecordId(int nRow,
  234. int nCol,
  235. const AcDbObjectId& idBTR);
  236. ACDB_PORT virtual Acad::ErrorStatus setBlockTableRecordId(int nRow,
  237. int nCol,
  238. int nContent,
  239. const AcDbObjectId& idBTR);
  240. ACDB_PORT virtual AcString getBlockAttributeValue(int nRow,
  241. int nCol,
  242. const AcDbObjectId& idAttDef) const;
  243. ACDB_PORT virtual AcString getBlockAttributeValue(int nRow,
  244. int nCol,
  245. int nContent,
  246. const AcDbObjectId& idAttDef) const;
  247. ACDB_PORT virtual Acad::ErrorStatus setBlockAttributeValue(int nRow,
  248. int nCol,
  249. const AcDbObjectId& idAttDef,
  250. const ACHAR* pszAttValue);
  251. ACDB_PORT virtual Acad::ErrorStatus setBlockAttributeValue(int nRow,
  252. int nCol,
  253. int nContent,
  254. const AcDbObjectId& idAttDef,
  255. const ACHAR* pszAttValue);
  256. ACDB_PORT virtual Acad::ErrorStatus evaluateFormula(void);
  257. ACDB_PORT virtual Acad::ErrorStatus dwgInFields(AcDbDwgFiler* pFiler);
  258. ACDB_PORT virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
  259. ACDB_PORT virtual Acad::ErrorStatus dxfInFields(AcDbDxfFiler* pFiler);
  260. ACDB_PORT virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler* pFiler) const;
  261. };