CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbBlockPropertiesTable.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, 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 Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 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#ifndef _DbBlockPropertiesTable_h_Included_
25#define _DbBlockPropertiesTable_h_Included_
26
27#include "DbBlock1PtParameter.h"
28#include "DbBlockGrips.h"
29#include "Int32Array.h" //FELIX_CHANGE
30
36{
37public:
38 //DOM-IGNORE-BEGIN
40 //DOM-IGNORE-END
41
46
51 {
53 kDistance = 0,
55 kArea = 1,
57 kVolume = 2,
59 kReal = 3,
61 kAngle = 4,
63 kString = 5
64 };
65
72
79
88 //OdResult setUserVarName(const OdString&);
89
90 /*
91
92 virtual OdString expression()const;
93 virtual void setExpression(const OdString&);
94
95 virtual UserParameterType userParameterType()const;
96 virtual void setUserParameterType(UserParameterType t);
97
98 virtual OdString userVarDescription()const;
99 virtual void setUserVarDescription(const OdString&);
100
101
102 OdResult convertValue(OdResBuf*)const;
103*/
104
105 OdDbObjectId GetVariableId() const; //FELIX_CHANGE
106
107};
108
113
119{
120public:
143 };
144
151
158 void getCellIndex(int& row, int& col)const { row = m_nRow; col = m_nCol; }
159
165 int getColumnIndex()const { return m_nCol; }
166
172 OdIntArray getRowIndex() const { return m_Rows; }
173
179 int getUnmatchedValueIndex()const { return m_nRow; }
180protected:
185};
186
192{
193public:
194 //DOM-IGNORE-BEGIN
196 //DOM-IGNORE-END
197
202
208 int numberOfColumns() const;
209
215 int numberOfRows() const;
216
225 OdResult getCellValue(int column, int row, OdResBufPtr &rb) const;
226
235 OdResult setCellValue(int column, int row, const OdResBuf* rb);
236
245 OdResult getCellValueString(int column, int row, OdString &s) const;
246
247 // column flags
256 bool constant(int column) const;
257
265 OdResult setConstant(int column, bool val);
266
275 bool editable(int column) const;
276
284 OdResult setEditable(int column, bool val);
285
294 bool removable(int column) const;
295
303 OdResult setRemovable(int column, bool val);
304
313 bool isAngular(int column) const;
314
323 bool isAttribute(int) const;
324
325 // column properties
336
345 void setCustomProperties(int column, const OdDbObjectId& id);
346
355 OdResBufPtr defaultValue(int column) const;
356
365 void setDefaultValue(int column, const OdResBuf* rb);
366
375 OdString format(int column) const;
376
385 void setFormat(int column, const OdString& f);
386
387 // if the values of the parameters must match some rows
393 bool mustMatch() const;
394
400 void setMustMatch(bool b);
401
402 // what is used in the context menu if parameter values do not match anything
411 void setUnmatchedValue(int column, const OdResBuf* rb);
412
421 OdResBufPtr unmatchedValue(int column) const;
422
436 OdString getColumnName(int column) const;
437
438 //FELIX_CHANGE_BEGIN
439 OdString GetName( OdInt32 iColumn ) const;
440
444
445 const OdDbObjectId& GetParameterId( OdInt32 iColumn ) const;
446 const OdResBufPtr GetValue( OdInt32 iColumn, OdInt32 iRow ) const;
447 //FELIX_CHANGE_END
448
449 // Table description (used as a property description)
458
467
468 // Table name (used as a property name)
484 void setTableName(const OdString& s);
485
486 // rows may be reordered, but each row has unique (within the table) id that will not change
496 int idOfRow(int index) const;
497
507 int indexOfRow(int id) const;
508
518 void insertColumn(const OdDbObjectId& param, const OdString& connection, int after);
519
527 void insertRow(int after);
528
536 void removeColumn(int column);
537
545 void removeRow(int row);
546
553 void appendColumn(const OdDbObjectId& param, const OdString& connection);
554
558 void appendRow();
559
569 void moveColumn(int from, int to);
570
580 void moveRow(int from, int to);
581
592 virtual void erased(const OdDbObject* , bool) ODRX_OVERRIDE;
594
595 // Look for a row matching default parameter values
604
605 // this function actually changes default values of the parameters used in the table
613 void setDefaultActiveRow(int row);
614
623 bool columnValuesAreUnique(int col)const;
624 // (not implemented, no idea what it does)
625
632
633 // doesn't seem to have any effect besides the flag
640
647
648 // look at the OdDbBPTAuditError::BPTAuditErrorType for possible error types
656
657 // sort the rows (duh)
666 void sortRows(int column, bool ascending);
667};
668
673
679{
680public:
681 //DOM-IGNORE-BEGIN
683 //DOM-IGNORE-END
684
689};
690
695
696#endif //_DbBlockPropertiesTable_h_Included_
OdSmartPtr< OdDbBlockUserParameter > OdDbBlockUserParameterPtr
OdSmartPtr< OdDbBlockPropertiesTableGrip > OdDbBlockPropertiesTableGripPtr
OdSmartPtr< OdDbBlockPropertiesTable > OdDbBlockPropertiesTablePtr
#define DYNBLOCKS_EXPORT
Definition: DbEvalGraph.h:91
unsigned long OdDbEvalNodeId
Definition: DbEvalGraph.h:60
int OdInt32
#define ODRX_OVERRIDE
OdResult
Definition: OdResult.h:29
BPTAuditErrorType m_Type
OdIntArray getRowIndex() const
BPTAuditErrorType errorType() const
int getUnmatchedValueIndex() const
void getCellIndex(int &row, int &col) const
ODDB_DECLARE_MEMBERS(OdDbBlockPropertiesTableGrip)
bool columnValuesAreUnique(int col) const
OdResult getCellValueString(int column, int row, OdString &s) const
bool disabledInDrawingEditor() const
OdResult setCellValue(int column, int row, const OdResBuf *rb)
void moveColumn(int from, int to)
bool isAngular(int column) const
void setFormat(int column, const OdString &f)
int getDefaultActiveRow() const
int idOfRow(int index) const
int indexOfRow(int id) const
ODDB_EVAL_DECLARE_MEMBERS(OdDbBlockPropertiesTable)
OdResBufPtr unmatchedValue(int column) const
void setRuntimeParametersOnly(bool b)
void setUnmatchedValue(int column, const OdResBuf *rb)
void setDefaultValue(int column, const OdResBuf *rb)
void removeColumn(int column)
virtual void addedToGraph(OdDbEvalGraph *) ODRX_OVERRIDE
void setCustomProperties(int column, const OdDbObjectId &id)
OdResult setEditable(int column, bool val)
OdResBufPtr defaultValue(int column) const
OdResult getCellValue(int column, int row, OdResBufPtr &rb) const
virtual void erased(const OdDbObject *, bool) ODRX_OVERRIDE
OdString format(int column) const
OdInt32 GetColumnCount() const
bool removable(int column) const
void tableAudit(OdArray< OdDbBPTAuditError > &)
void sortRows(int column, bool ascending)
virtual void removedFromGraph(OdDbEvalGraph *gr) ODRX_OVERRIDE
OdString GetName(OdInt32 iColumn) const
void setTableDescription(const OdString &s)
void moveRow(int from, int to)
bool runtimeParametersOnly() const
static OdDbEvalNodeId bptNodeId(const OdDbEvalGraph *gr)
bool constant(int column) const
OdResult setRemovable(int column, bool val)
OdInt32 GetRowCount() const
OdResult setConstant(int column, bool val)
void setTableName(const OdString &s)
void appendColumn(const OdDbObjectId &param, const OdString &connection)
const OdDbObjectId & GetParameterId(OdInt32 iColumn) const
OdDbObjectId customProperties(int column) const
const OdResBufPtr GetValue(OdInt32 iColumn, OdInt32 iRow) const
bool editable(int column) const
OdString tableDescription() const
bool isAttribute(int) const
void insertRow(int after)
void insertColumn(const OdDbObjectId &param, const OdString &connection, int after)
OdString getColumnName(int column) const
OdString tableName() const
void setDefaultActiveRow(int row)
const OdInt32Array & GetRowIndices() const
ODDB_EVAL_DECLARE_MEMBERS(OdDbBlockUserParameter)
OdString userVarName() const
OdDbObjectId assocVarId() const
void setAssocVarId(OdDbObjectId id)
OdDbObjectId GetVariableId() const
GLfloat f
Definition: gles2_ext.h:564
GLuint index
Definition: gles2_ext.h:265