CFx SDK Documentation  2022 SP0
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
OdSmartPtr< OdDbDataColumn > OdDbDataColumnPtr
Definition: DbDataTable.h:173
OdSmartPtr< OdDbDataCell > OdDbDataCellPtr
Definition: DbDataTable.h:120
OdSmartPtr< OdDbDataTable > OdDbDataTablePtr
Definition: DbDataTable.h:254
OdArray< OdDbDataCellPtr > OdDbDataCellArray
Definition: DbDataTable.h:122
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
unsigned int OdUInt32
int OdInt32
OdResult
Definition: OdResult.h:29
virtual void set(const OdDbHardPointerId &id)
virtual void get(OdInt32 &i)
virtual void init()
virtual void get(bool &b)
ODDB_DECLARE_MEMBERS(OdDbDataCell)
OdDbDataCell(OdDbDataCellImpl *pValImpl)
virtual void get(OdGePoint3d &pt)
virtual void set(const OdDbHardOwnershipId &id)
virtual void set(const OdDbSoftPointerId &id)
virtual void get(OdString &str)
virtual void set(const OdGeVector3d &vec)
virtual void get(OdDbHardOwnershipId &id)
virtual void get(OdDbHardPointerId &id)
virtual void set(const OdDbDataCell &cell)
OdDbDataCellImpl * m_pImpl
Definition: DbDataTable.h:117
virtual void get(OdDbObjectId &id)
virtual void set(const OdString &str)
virtual void get(OdDbSoftPointerId &id)
virtual void set(const OdGePoint3d &pt)
virtual void get(OdDbDataCell &cell)
virtual void set(const OdDbObjectId &id)
virtual void set(const OdDbSoftOwnershipId &id)
virtual OdDbDataCell::CellType type() const
virtual void set(OdInt32 i)
virtual void set(double d)
virtual void set(bool b)
virtual void get(OdDbSoftOwnershipId &id)
virtual void get(OdGeVector3d &vec)
virtual void get(double &d)
virtual void setPhysicalLength(OdUInt32 n)
virtual OdInt32 getIndexAtCell(const OdDbDataCellPtr &cell) const
OdDbDataColumn(const OdDbDataColumn &rCol)
virtual OdString columnName() const
virtual OdDbDataCell::CellType columnType() const
virtual OdUInt32 physicalLength() const
virtual void setCellAt(OdUInt32 index, const OdDbDataCellPtr cell)
ODDB_DECLARE_MEMBERS(OdDbDataColumn)
OdDbDataColumnImpl * m_pImpl
Definition: DbDataTable.h:170
OdDbDataColumn(OdDbDataColumnImpl *m_pImpl)
virtual void setColumnName(const OdString &pName)
virtual void insertCellAt(OdUInt32 index, const OdDbDataCellPtr &cell)
virtual void removeCellAt(OdUInt32 index)
virtual OdDbDataCellPtr getCellAt(OdUInt32 index) const
virtual void appendCell(const OdDbDataCellPtr cell)
virtual void setGrowLength(OdUInt32 n)
virtual void setColumnType(OdDbDataCell::CellType type)
virtual OdUInt32 numCells() const
virtual OdUInt32 growLength() const
virtual void setTableName(const OdString &pName)
virtual void insertColumnAt(OdUInt32 index, OdDbDataCell::CellType type, const OdString &colName)
virtual void insertRowAt(OdUInt32 index, const OdDbDataCellArray &row, bool bValidate=true)
virtual OdUInt32 numColsPhysicalSize() const
virtual void setNumColsGrowSize(OdUInt32 n)
virtual void removeRowAt(OdUInt32 index)
virtual void appendRow(const OdDbDataCellArray &row, bool bValidate=true)
virtual OdUInt32 numRows() const
virtual OdDbDataColumnPtr getColumnAt(OdUInt32 index) const
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
virtual OdDbDataCellPtr getCellAt(OdUInt32 row, OdUInt32 col) const
virtual OdString columnNameAt(OdUInt32 index) const
ODDB_DECLARE_MEMBERS(OdDbDataTable)
virtual void setCellAt(OdUInt32 row, OdUInt32 col, const OdDbDataCellPtr &cell)
virtual void setNumRowsPhysicalSize(OdUInt32 n)
virtual void removeColumnAt(OdUInt32 index)
virtual OdInt32 columnIndexAtName(const OdString &name) const
virtual OdString tableName() const
virtual OdDbDataCell::CellType columnTypeAt(OdUInt32 index) const
virtual OdUInt32 numColumns() const
virtual OdUInt32 numColsGrowSize() const
virtual void setRowAt(OdUInt32 index, const OdDbDataCellArray &row, bool bValidate=true)
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
virtual void setNumColsPhysicalSize(OdUInt32 n)
virtual OdUInt32 numRowsGrowSize() const
virtual void appendColumn(OdDbDataCell::CellType type, const OdString &colName)
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
virtual void getRowAt(OdUInt32 index, OdDbDataCellArray &outRow) const
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbDataTable(void)
virtual OdUInt32 numRowsPhysicalSize() const
virtual void setNumRowsGrowSize(OdUInt32 n)
GLuint index
Definition: gles2_ext.h:265
GLuint const GLchar * name
Definition: gles2_ext.h:265
GLuint GLsizei GLsizei GLint GLenum * type
Definition: gles2_ext.h:274