/* private */ bool BufferInputLineSimplifier::deleteShallowConcavities() { /** * Do not simplify end line segments of the line string. * This ensures that end caps are generated consistently. */ size_t index = 1; auto midIndex = findNextNonDeletedIndex(index); auto lastIndex = findNextNonDeletedIndex(midIndex); bool isChanged = false; while (lastIndex < inputLine.size()) { // test triple for shallow concavity bool isMiddleVertexDeleted = false; if (isDeletable(index, midIndex, lastIndex, distanceTol)) { isDeleted[midIndex] = DELETE; isMiddleVertexDeleted = true; isChanged = true; } // move simplification window forward if (isMiddleVertexDeleted) index = lastIndex; else index = midIndex; midIndex = findNextNonDeletedIndex(index); lastIndex = findNextNonDeletedIndex(midIndex); } return isChanged; }
ImplicitList::~ImplicitList() { if (isDeletable() == true) { if (m_poStart) { m_poStart->DecreaseRef(); m_poStart->killMe(); } if (m_poStep) { m_poStep->DecreaseRef(); m_poStep->killMe(); } if (m_poEnd) { m_poEnd->DecreaseRef(); m_poEnd->killMe(); } } #ifndef NDEBUG Inspector::removeItem(this); #endif }
String::~String() { if (isDeletable() == true) { deleteAll(); } #ifndef NDEBUG Inspector::removeItem(this); #endif }
QString TabWidget::commonScript() const{ QString text_; for(int i=0;i<this->count();i++){ if(!isDeletable(i)){ text_=this->text(i); break; } } return text_; }
QList<QPair<QString, QString> > TabWidget::scripts() const{ QList< QPair<QString,QString> > s; for(int i=0;i<this->count();i++){ if(!isDeletable(i)){ continue; } QPair<QString,QString> p; p.first=this->tabText(i); p.second=this->text(i); s.append(p); } return s; }
bool ConfigDatabase::createSystemItems(PServer server, bool forceCreate) { checkCheckedOut(); bool dbChanged = NormalDatabase::createSystemItems(server, forceCreate); if (getName() == Server::NAME_CONFIG_DATABASE) { PDatabase db = COMMITABLE_CAST(Database, shared_from_this()); checkAndCreateDimension(server, db, NAME_CONNECTIONS_DIMENSION, 0, 0, CONNECTIONS_ATTR_ITEMS, CONNECTIONS_ATTR_ITEMS + array_size(CONNECTIONS_ATTR_ITEMS), dbChanged); checkAndCreateDimension(server, db, NAME_CONFIG_DIMENSION, CONFIG_ITEMS, CONFIG_ITEMS + array_size(CONFIG_ITEMS), CONFIG_ATTR_ITEMS, CONFIG_ATTR_ITEMS + array_size(CONFIG_ATTR_ITEMS), dbChanged); PDimension taskPropsDim = checkAndCreateDimension(server, db, NAME_TASKPROPS_DIMENSION, TASKPROPS_ITEMS, TASKPROPS_ITEMS + array_size(TASKPROPS_ITEMS), dbChanged); PDimension notifTypesDim = checkAndCreateDimension(server, db, NAME_NOTIFTYPES_DIMENSION, NOTIFTYPES_ITEMS, NOTIFTYPES_ITEMS + array_size(NOTIFTYPES_ITEMS), dbChanged); PDimension tasksDim = checkAndCreateDimension(server, db, NAME_TASKS_DIMENSION, 0, 0, dbChanged); checkAndCreateDimension(server, db, NAME_VARSETS_DIMENSION, 0, 0, VARSETS_ATTR_ITEMS, VARSETS_ATTR_ITEMS + array_size(VARSETS_ATTR_ITEMS), dbChanged); PDimension etls = checkAndCreateDimension(server, db, NAME_ETLS_DIMENSION, 0, 0, dbChanged); PDimension etlprops = checkAndCreateDimension(server, db, NAME_ETLPROPS_DIMENSION, ETLPROPS_ITEMS, ETLPROPS_ITEMS + array_size(ETLPROPS_ITEMS), dbChanged); IdentifiersType dims; dims.push_back(etls->getId()); dims.push_back(etlprops->getId()); checkAndCreateCube(server, db, NAME_ETLS_CUBE, dims, dbChanged); dims[0] = tasksDim->getId(); dims[1] = taskPropsDim->getId(); checkAndCreateCube(server, db, NAME_TASKS_CUBE, dims, dbChanged); PDimension userDim = lookupDimensionByName(SystemDatabase::NAME_USER_DIMENSION, false); dims[1] = notifTypesDim->getId(); dims.push_back(userDim->getId()); checkAndCreateCube(server, db, NAME_TASKS_NOTIF_CUBE, dims, dbChanged); dims[1] = taskPropsDim->getId(); checkAndCreateCube(server, db, NAME_TASKS_PRIVATE_CUBE, dims, dbChanged); checkConfigCube(server, db, dbChanged); if (isDeletable()) { setDeletable(false); dbChanged = true; } if (isRenamable()) { setRenamable(false); dbChanged = true; } protect = true; } return dbChanged; }
Cell::~Cell() { if (isDeletable() == true) { for (int i = 0; i < m_iSizeMax; i++) { m_pRealData[i]->DecreaseRef(); m_pRealData[i]->killMe(); } } delete[] m_pRealData; #ifndef NDEBUG Inspector::removeItem(this); #endif }