Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a330baf5da | |||
| ea103f3849 | |||
| 664fdaf39a | |||
| cdd4df09ca |
@@ -88,6 +88,26 @@ BIMRecordIDList BIMElementDatabase::getTables(std::optional<TableType> targetTyp
|
||||
} //BIMElementDatabase::getTables
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Get the default dbase table
|
||||
|
||||
return: The default dbase table (nullopt if no table is available)
|
||||
--------------------------------------------------------------------*/
|
||||
std::optional<BIMRecordID> BIMElementDatabase::getDefaultTable() const {
|
||||
return m_engine->getDefaultTable();
|
||||
} //BIMElementDatabase::getDefaultTable
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Set the default dbase table
|
||||
|
||||
tableID: The new default dbase table
|
||||
--------------------------------------------------------------------*/
|
||||
void BIMElementDatabase::setDefaultTable(const BIMRecordID& tableID) const {
|
||||
m_engine->setDefaultTable(tableID);
|
||||
} //BIMElementDatabase::setDefaultTable
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Bring the view of this database to the front (i.e. so the user sees it)
|
||||
|
||||
|
||||
@@ -43,6 +43,16 @@ namespace speckle::database {
|
||||
@return A set of available tables
|
||||
*/
|
||||
BIMRecordIDList getTables(std::optional<TableType> targetType) const;
|
||||
/*!
|
||||
Get the default dbase table
|
||||
@return The default dbase table (nullopt if no table is available)
|
||||
*/
|
||||
std::optional<BIMRecordID> getDefaultTable() const;
|
||||
/*!
|
||||
Set the default dbase table
|
||||
@param tableID The new default dbase table
|
||||
*/
|
||||
void setDefaultTable(const BIMRecordID& tableID) const;
|
||||
/*!
|
||||
Bring the view of this database to the front (i.e. so the user sees it)
|
||||
@param tableID The ID of the table to bring to the front
|
||||
|
||||
+24
@@ -110,6 +110,10 @@ namespace {
|
||||
return std::make_unique<Slab>(elementData, tableID);
|
||||
case API_WallID:
|
||||
return std::make_unique<Wall>(elementData, tableID);
|
||||
case API_ObjectID:
|
||||
// POC: change this case once we are ready to convert Grid Elements
|
||||
if (elementData.header.type.variationID == APIVarId_GridElement)
|
||||
return nullptr;
|
||||
default:
|
||||
return std::make_unique<GenericModelElement>(elementData, tableID);
|
||||
}
|
||||
@@ -212,6 +216,26 @@ ArchicadElementDBaseEngine::TableIDList ArchicadElementDBaseEngine::getTables(st
|
||||
} //ArchicadElementDBaseEngine::getTables
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Get the default dbase table
|
||||
|
||||
return: The default dbase table (nullopt if no table is available)
|
||||
--------------------------------------------------------------------*/
|
||||
std::optional<BIMRecordID> ArchicadElementDBaseEngine::getDefaultTable() const {
|
||||
return ArchicadElementDBaseEngine::getActiveTable();
|
||||
} //ArchicadElementDBaseEngine::getDefaultTable
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Set the default dbase table
|
||||
|
||||
tableID: The new default dbase table
|
||||
--------------------------------------------------------------------*/
|
||||
void ArchicadElementDBaseEngine::setDefaultTable(const BIMRecordID& tableID) const {
|
||||
setActiveTable(tableID);
|
||||
} //ArchicadElementDBaseEngine::setDefaultTable
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
Find a filtered list of objects
|
||||
|
||||
|
||||
+10
@@ -79,6 +79,16 @@ namespace speckle::database {
|
||||
@return A list of available tables
|
||||
*/
|
||||
TableIDList getTables(std::optional<TableType> targetType) const override;
|
||||
/*!
|
||||
Get the default dbase table
|
||||
@return The default dbase table (nullopt if no table is available)
|
||||
*/
|
||||
std::optional<BIMRecordID> getDefaultTable() const;
|
||||
/*!
|
||||
Set the default dbase table
|
||||
@param tableID The new default dbase table
|
||||
*/
|
||||
void setDefaultTable(const BIMRecordID& tableID) const;
|
||||
/*!
|
||||
Find a filtered list of objects
|
||||
@param filter The object filter (nullptr = find all objects)
|
||||
|
||||
@@ -31,7 +31,8 @@ namespace {
|
||||
switch (elemType->notifID)
|
||||
{
|
||||
case APINotifyElement_New: {
|
||||
ACAPI_Element_AttachObserver(elemType->elemHead.guid);
|
||||
// POC: Put this back once we decide to use Object Tracking
|
||||
// ACAPI_Element_AttachObserver(elemType->elemHead.guid);
|
||||
addon()->publishExternal(ElementEvent{newElem, ElementID{elemType->elemHead.guid}});
|
||||
} break;
|
||||
case APINotifyElement_Change: {
|
||||
|
||||
Reference in New Issue
Block a user