CFx SDK Documentation  2020SP3
DbDataTable.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, Open Design Alliance (the "Alliance").
3 // All rights reserved.
4 //
5 // This software and its documentation and related materials are owned by
6 // the Alliance. The software may only be incorporated into application
7 // programs owned by members of the Alliance, subject to a signed
8 // Membership Agreement and Supplemental Software License Agreement with the
9 // Alliance. The structure and organization of this software are the valuable
10 // trade secrets of the Alliance and its suppliers. The software is also
11 // protected by copyright law and international treaty provisions. Application
12 // programs incorporating this software must include the following statement
13 // with their copyright notices:
14 //
15 // This application incorporates Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 by Open Design Alliance.
18 // All rights reserved.
19 //
20 // By use of this software, its documentation or related materials, you
21 // acknowledge and accept the above terms.
23 
24 
25 #ifndef OD_DBDATATABLE_H
26 #define OD_DBDATATABLE_H
27 
28 #include "TD_PackPush.h"
29 #include "RxObject.h"
30 #include "DbObject.h"
31 
32 class OdDbDataCellImpl;
38 {
39 public:
40  enum CellType {
41  kUnknown = 0,
42  kInteger = 1,
43  kDouble = 2,
44  kCharPtr = 3,
45  kPoint = 4,
46  kObjectId = 5,
47  kHardOwnerId = 6,
48  kSoftOwnerId = 7,
49  kHardPtrId = 8,
50  kSoftPtrId = 9,
51  kBool = 10,
52  kVector = 11
53  };
55 
56  // Constructors
57 
59 
60  /*
61  OdDbDataCell(const OdDbDataCell& rCell);
62 
63  OdDbDataCell(bool b);
64  OdDbDataCell(int i);
65  OdDbDataCell(double d);
66  OdDbDataCell(const OdString& str);
67  OdDbDataCell(const OdGePoint3d& point);
68  OdDbDataCell(const OdGeVector3d& vec);
69  OdDbDataCell(const OdDbObjectId& id);
70  OdDbDataCell(const OdDbHardOwnershipId& id);
71  OdDbDataCell(const OdDbSoftOwnershipId& id);
72  OdDbDataCell(const OdDbHardPointerId& id);
73  OdDbDataCell(const OdDbSoftPointerId& id);
74 
75  virtual ~OdDbDataCell();
76 
77  */
78 
79  virtual void init();
80 
81  virtual void set(const OdDbDataCell& cell);
82  virtual void set(bool b);
83  virtual void set(OdInt32 i);
84  virtual void set(double d);
85  virtual void set(const OdString& str);
86  virtual void set(const OdGePoint3d& pt);
87  virtual void set(const OdGeVector3d& vec);
88  virtual void set(const OdDbObjectId& id);
89  virtual void set(const OdDbHardOwnershipId& id);
90  virtual void set(const OdDbSoftOwnershipId& id);
91  virtual void set(const OdDbHardPointerId& id);
92  virtual void set(const OdDbSoftPointerId& id);
93 
94  virtual void get(OdDbDataCell& cell);
95  virtual void get(bool& b);
96  virtual void get(OdInt32& i);
97  virtual void get(double& d);
98  virtual void get(OdString& str);
99  virtual void get(OdGePoint3d& pt);
100  virtual void get(OdGeVector3d& vec);
101  virtual void get(OdDbObjectId& id);
102  virtual void get(OdDbHardOwnershipId& id);
103  virtual void get(OdDbSoftOwnershipId& id);
104  virtual void get(OdDbHardPointerId& id);
105  virtual void get(OdDbSoftPointerId& id);
106 
107 /*
108  virtual bool operator == (const OdDbDataCell &cell) const;
109  virtual bool operator != (const OdDbDataCell &cell) const;
110 */
111 
112  virtual OdDbDataCell::CellType type() const;
113  OdDbDataCell(OdDbDataCellImpl* pValImpl);
114 
115 protected:
116  friend class OdDbSystemInternals;
117  OdDbDataCellImpl* m_pImpl;
118 };
119 
121 
123 
124 class OdDbDataColumnImpl;
125 
131 {
132 public:
136 // OdDbDataColumn(const OdDbDataCell::CellType type,
137 // const OdString pColName = NULL);
138 
139 // virtual ~OdDbDataColumn();
140 
141  virtual OdUInt32 physicalLength() const;
142  virtual OdUInt32 growLength() const;
143 
144  virtual void setPhysicalLength(OdUInt32 n);
145  virtual void setGrowLength(OdUInt32 n);
146 
147 // virtual OdDbDataColumn& operator = (const OdDbDataColumn& col);
148 
151 
152  virtual void setColumnName(const OdString& pName);
153  virtual OdString columnName() const;
154 
156  virtual void setCellAt(OdUInt32 index, const OdDbDataCellPtr cell);
157 
158  virtual void appendCell(const OdDbDataCellPtr cell);
159 
160  virtual void insertCellAt(OdUInt32 index, const OdDbDataCellPtr& cell);
161  virtual void removeCellAt(OdUInt32 index);
162  virtual OdInt32 getIndexAtCell(const OdDbDataCellPtr& cell) const;
163 
164  virtual OdUInt32 numCells() const;
165 
166  OdDbDataColumn(OdDbDataColumnImpl* m_pImpl);
167 
168 protected:
169  friend class OdDbSystemInternals;
170  OdDbDataColumnImpl* m_pImpl;
171 };
172 
174 
175 class OdDbDataTableImpl;
176 
182 {
183 public:
185 
187 
188 // virtual OdDbDataTable& operator = (const OdDbDataTable& table);
189 
190  virtual OdUInt32 numColumns() const;
191  virtual OdUInt32 numRows() const;
192 
194  virtual void setNumRowsGrowSize(OdUInt32 n);
195 
196  virtual OdUInt32 numRowsPhysicalSize() const;
197  virtual OdUInt32 numRowsGrowSize() const;
198 
200  virtual void setNumColsGrowSize(OdUInt32 n);
201 
202  virtual OdUInt32 numColsPhysicalSize() const;
203  virtual OdUInt32 numColsGrowSize() const;
204 
205  virtual OdString tableName() const;
206  virtual void setTableName(const OdString& pName);
207 
210 
212  virtual OdInt32 columnIndexAtName (const OdString& name) const;
213 
214  virtual void appendColumn(
215  OdDbDataCell::CellType type, const OdString& colName);
217  OdDbDataCell::CellType type, const OdString& colName);
219 
220  virtual void getRowAt(OdUInt32 index,
221  OdDbDataCellArray& outRow) const;
222  virtual void setRowAt(OdUInt32 index,
223  const OdDbDataCellArray& row, bool bValidate = true);
224 
225  virtual void appendRow(
226  const OdDbDataCellArray& row, bool bValidate = true);
227 
228  virtual void insertRowAt(OdUInt32 index,
229  const OdDbDataCellArray& row, bool bValidate = true);
230 
231  virtual void removeRowAt(OdUInt32 index);
232 
233  virtual OdDbDataCellPtr getCellAt(OdUInt32 row, OdUInt32 col) const;
234  virtual void setCellAt(OdUInt32 row, OdUInt32 col,
235  const OdDbDataCellPtr& cell);
236 
237  //********************************************************************
238  // Overridden methods from OdDbObject
239  //********************************************************************
240  //
241 
243  OdDbDwgFiler* pFiler);
244  virtual void dwgOutFields(
245  OdDbDwgFiler* pFiler) const;
247  OdDbDxfFiler* pFiler);
248  virtual void dxfOutFields(
249  OdDbDxfFiler* pFiler) const;
250 
251  // virtual audit(OdDbAuditInfo* pAuditInfo);
252 };
253 
255 
256 #include "TD_PackPop.h"
257 
258 #endif
OdDbDataColumn::setColumnType
virtual void setColumnType(OdDbDataCell::CellType type)
OdDbDataCell::set
virtual void set(const OdDbDataCell &cell)
OdResult
OdResult
Definition: OdResult.h:29
OdDbDataColumn::OdDbDataColumn
OdDbDataColumn()
OdDbDataCell::get
virtual void get(OdGeVector3d &vec)
OdGeVector3d
Definition: GeVector3d.h:54
OdString
Definition: OdString.h:95
OdDbDataTable::tableName
virtual OdString tableName() const
OdDbDataCell::set
virtual void set(const OdDbObjectId &id)
OdDbDataCell::get
virtual void get(OdDbDataCell &cell)
OdDbDataTablePtr
OdSmartPtr< OdDbDataTable > OdDbDataTablePtr
Definition: DbDataTable.h:254
OdDbDataTable::numColumns
virtual OdUInt32 numColumns() const
name
GLuint const GLchar * name
Definition: gles2_ext.h:265
OdDbDataCell::OdDbDataCell
OdDbDataCell()
OdDbDataTable::numRows
virtual OdUInt32 numRows() const
OdDbDataTable::setNumColsGrowSize
virtual void setNumColsGrowSize(OdUInt32 n)
OdDbDataTable::numColsGrowSize
virtual OdUInt32 numColsGrowSize() const
DbObject.h
OdDbDataColumn::appendCell
virtual void appendCell(const OdDbDataCellPtr cell)
type
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274
OdDbDataColumn::setPhysicalLength
virtual void setPhysicalLength(OdUInt32 n)
OdDbDataCell::get
virtual void get(OdDbObjectId &id)
OdDbDataCell::set
virtual void set(bool b)
OdRxObject
Definition: RxObject.h:564
OdDbObjectId
Definition: DbObjectId.h:99
OdDbDataTable::setNumRowsPhysicalSize
virtual void setNumRowsPhysicalSize(OdUInt32 n)
OdDbDataCell::get
virtual void get(OdString &str)
OdDbDataCell::set
virtual void set(const OdDbHardPointerId &id)
OdDbDataTable::setNumColsPhysicalSize
virtual void setNumColsPhysicalSize(OdUInt32 n)
OdDbDataCell::get
virtual void get(OdInt32 &i)
OdDbHardOwnershipId
Definition: DbObjectId.h:356
OdDbDataTable::numColsPhysicalSize
virtual OdUInt32 numColsPhysicalSize() const
OdArray
Definition: OdArray.h:591
OdDbDataTable::insertRowAt
virtual void insertRowAt(OdUInt32 index, const OdDbDataCellArray &row, bool bValidate=true)
TD_PackPop.h
OdDbDataTable::columnTypeAt
virtual OdDbDataCell::CellType columnTypeAt(OdUInt32 index) const
OdDbDataTable::insertColumnAt
virtual void insertColumnAt(OdUInt32 index, OdDbDataCell::CellType type, const OdString &colName)
kUnknown
@ kUnknown
Definition: DbManagerSubentData.h:39
OdDbDataTable::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
RxObject.h
OdUInt32
unsigned int OdUInt32
Definition: OdPlatformSettings.h:783
OdDbDataColumn::setGrowLength
virtual void setGrowLength(OdUInt32 n)
index
GLuint index
Definition: gles2_ext.h:265
OdDbDataColumn::columnName
virtual OdString columnName() const
OdDbSoftOwnershipId
Definition: DbObjectId.h:406
OdDbDataCell::get
virtual void get(OdDbHardOwnershipId &id)
OdDbDataColumn
Definition: DbDataTable.h:131
OdDbDataTable::setCellAt
virtual void setCellAt(OdUInt32 row, OdUInt32 col, const OdDbDataCellPtr &cell)
OdDbDataColumn::getCellAt
virtual OdDbDataCellPtr getCellAt(OdUInt32 index) const
OdDbDataCell::init
virtual void init()
OdDbDataTable::setTableName
virtual void setTableName(const OdString &pName)
OdDbDataCell::set
virtual void set(OdInt32 i)
OdDbDataCell::get
virtual void get(OdDbSoftOwnershipId &id)
OdDbDataColumn::removeCellAt
virtual void removeCellAt(OdUInt32 index)
OdSmartPtr
Definition: SmartPtr.h:58
OdGePoint3d
Definition: GePoint3d.h:55
OdDbDataCell::get
virtual void get(OdGePoint3d &pt)
OdDbDataTable::OdDbDataTable
OdDbDataTable(void)
OdDbDataCell::m_pImpl
OdDbDataCellImpl * m_pImpl
Definition: DbDataTable.h:117
OdInt32
int OdInt32
Definition: OdPlatformSettings.h:782
OdDbDataCell::set
virtual void set(const OdDbSoftOwnershipId &id)
OdDbDataColumn::OdDbDataColumn
OdDbDataColumn(OdDbDataColumnImpl *m_pImpl)
OdDbDataTable::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbDataTable)
OdDbHardPointerId
Definition: DbObjectId.h:453
OdDbDataColumn::physicalLength
virtual OdUInt32 physicalLength() const
OdDbDataTable::columnIndexAtName
virtual OdInt32 columnIndexAtName(const OdString &name) const
OdDbDataTable::setRowAt
virtual void setRowAt(OdUInt32 index, const OdDbDataCellArray &row, bool bValidate=true)
OdDbDataCell::set
virtual void set(const OdDbHardOwnershipId &id)
OdDbDataColumn::columnType
virtual OdDbDataCell::CellType columnType() const
OdDbDataTable::numRowsPhysicalSize
virtual OdUInt32 numRowsPhysicalSize() const
OdDbDataCellPtr
OdSmartPtr< OdDbDataCell > OdDbDataCellPtr
Definition: DbDataTable.h:120
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbDataTable::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdDbDataCell::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbDataCell)
OdDbDataTable::setNumRowsGrowSize
virtual void setNumRowsGrowSize(OdUInt32 n)
OdDbDataColumn::insertCellAt
virtual void insertCellAt(OdUInt32 index, const OdDbDataCellPtr &cell)
OdDbDataTable::getRowAt
virtual void getRowAt(OdUInt32 index, OdDbDataCellArray &outRow) const
TD_PackPush.h
OdDbDataCell::type
virtual OdDbDataCell::CellType type() const
OdDbSoftPointerId
Definition: DbObjectId.h:501
OdDbDataCell::set
virtual void set(double d)
OdDbDataColumn::m_pImpl
OdDbDataColumnImpl * m_pImpl
Definition: DbDataTable.h:170
OdDbDataTable::numRowsGrowSize
virtual OdUInt32 numRowsGrowSize() const
OdDbDataTable::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbDataColumn::setCellAt
virtual void setCellAt(OdUInt32 index, const OdDbDataCellPtr cell)
OdDbDataCell::get
virtual void get(OdDbSoftPointerId &id)
OdDbDataTable::getColumnAt
virtual OdDbDataColumnPtr getColumnAt(OdUInt32 index) const
OdDbDataCell::CellType
CellType
Definition: DbDataTable.h:40
OdDbDataTable
Definition: DbDataTable.h:182
OdDbDataTable::getCellAt
virtual OdDbDataCellPtr getCellAt(OdUInt32 row, OdUInt32 col) const
OdDbDataCell::set
virtual void set(const OdGePoint3d &pt)
OdDbDataCell::get
virtual void get(OdDbHardPointerId &id)
OdDbDataTable::appendRow
virtual void appendRow(const OdDbDataCellArray &row, bool bValidate=true)
OdDbDataCellArray
OdArray< OdDbDataCellPtr > OdDbDataCellArray
Definition: DbDataTable.h:122
OdDbDataCell::get
virtual void get(bool &b)
OdDbDataColumnPtr
OdSmartPtr< OdDbDataColumn > OdDbDataColumnPtr
Definition: DbDataTable.h:173
OdDbDataColumn::numCells
virtual OdUInt32 numCells() const
OdDbDataColumn::getIndexAtCell
virtual OdInt32 getIndexAtCell(const OdDbDataCellPtr &cell) const
OdDbDataTable::removeColumnAt
virtual void removeColumnAt(OdUInt32 index)
OdDbDataColumn::OdDbDataColumn
OdDbDataColumn(const OdDbDataColumn &rCol)
OdDbDataCell::set
virtual void set(const OdDbSoftPointerId &id)
OdDbDataTable::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbDataCell
Definition: DbDataTable.h:38
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbDataColumn::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbDataColumn)
OdDbDataCell::get
virtual void get(double &d)
OdDbDataColumn::growLength
virtual OdUInt32 growLength() const
OdDbDataTable::removeRowAt
virtual void removeRowAt(OdUInt32 index)
OdDbDataCell::set
virtual void set(const OdString &str)
OdDbObject
Definition: DbObject.h:211
OdDbDataColumn::setColumnName
virtual void setColumnName(const OdString &pName)
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbDataTable::columnNameAt
virtual OdString columnNameAt(OdUInt32 index) const
OdDbDataCell::set
virtual void set(const OdGeVector3d &vec)
OdDbDataTable::appendColumn
virtual void appendColumn(OdDbDataCell::CellType type, const OdString &colName)
OdDbDataCell::OdDbDataCell
OdDbDataCell(OdDbDataCellImpl *pValImpl)