//--------------------------------------------------------------------------- void __fastcall TWndVocabEdit::UpdateVocabEditVisuals() { if(LOADING_VOCAB) return; ListView->OnChange = NULL; // Show the group number Panel4->Caption = "Group "+IntToStr(currentGroup); // Show the words in the group ListBox->Items->BeginUpdate(); ListBox->Items->Clear(); for(int i = 0; i < vocGroups[currentGroup]->Strings->Count; i++) { ListBox->Items->Add(vocGroups[currentGroup]->Strings->Strings[i]); } // Show the types set for the group for(int i=0;i<TOTAL_VT;i++) TypeListBox->Checked[i] = FALSE; if(vocGroups[currentGroup]->Type==vtNO_WORD) { TypeListBox->Checked[vtiNO_WORD] = TRUE; } else if(vocGroups[currentGroup]->Type==vtANY_WORD) { TypeListBox->Checked[vtiANY_WORD] = TRUE; } else { for(int i=1;i<TOTAL_VT-1;i++) { if(HasType(vocGroups[currentGroup]->Type,i)==1) TypeListBox->Checked[i] = TRUE; } } ListBox->Items->EndUpdate(); ListView->OnChange = ListViewChange; }
BOOL WebFeedContentElement::IsXML() const { if (!HasType()) return FALSE; const uni_char* type = m_type.CStr(); UINT type_len = m_type.Length(); return (uni_strni_eq_lower(type, UNI_L("application/"), 12) && // starts with "application/" uni_stri_eq(type + (type_len - 3), "XML")); // ends with "xml" }
FreeScript::TESForm* GetWornForm(FreeScript::Actor* ptr, uint32_t mask) { if(!ptr) return nullptr; FreeScript::ExtraContainerChanges* pContainerChanges = ptr->extraData.GetExtraContainerChanges(); if (pContainerChanges) { for(auto node = pContainerChanges->data->objList->Head(); node ; node = node->next) { if(node->item) { auto extendList = node->item->extendDataList; auto matcher = [mask](FreeScript::TESForm* pForm) -> bool { if (pForm) { FreeScript::BGSBipedObjectForm* pBip = rtti_cast(pForm, TESForm, BGSBipedObjectForm); if (pBip) return (pBip->data.parts & mask) != 0; } return false; }; if (matcher(node->item->type)) { unsigned i = 0; auto extraDataList = extendList->At(i); while (extraDataList) { if (extraDataList->HasType(22) || extraDataList->HasType(23)) return node->item->type; ++i; extraDataList = extendList->At(i); } } } } } return nullptr; }
void PedestrianDirectionsEngine::CalculateTurns(IRoadGraph const & graph, vector<Edge> const & routeEdges, Route::TTurns & turns, my::Cancellable const & cancellable) const { for (size_t i = 0; i < routeEdges.size(); ++i) { if (cancellable.IsCancelled()) return; Edge const & edge = routeEdges[i]; feature::TypesHolder types; graph.GetEdgeTypes(edge, types); if (HasType(m_typeSteps, types)) { if (edge.IsForward()) turns.emplace_back(i, turns::PedestrianDirection::Upstairs); else turns.emplace_back(i, turns::PedestrianDirection::Downstairs); } else { graph.GetJunctionTypes(edge.GetStartJunction(), types); if (HasType(m_typeLiftGate, types)) turns.emplace_back(i, turns::PedestrianDirection::LiftGate); else if (HasType(m_typeGate, types)) turns.emplace_back(i, turns::PedestrianDirection::Gate); } } // direction "arrival" // (index of last junction is the same as number of edges) turns.emplace_back(routeEdges.size(), turns::PedestrianDirection::ReachedYourDestination); }
int CClause::GetMainWordOfTheClauseForThisVariant(const CMorphVariant& M, const CClauseRelation& R ) const { int MainWord = -1; EClauseType t = (M.m_ClauseTypeNo == -1) ? UnknownSyntaxElement : m_vectorTypes[M.m_ClauseTypeNo].m_Type; if ( R.m_ClauseTypes.empty() || ( find(R.m_ClauseTypes.begin(), R.m_ClauseTypes.end(), t ) != R.m_ClauseTypes.end()) ) MainWord = (M.m_ClauseTypeNo == -1) ? -1 : m_vectorTypes[M.m_ClauseTypeNo].m_Root.m_WordNo ; if (MainWord == -1 ) if ( (GetOpt()->m_Language == morphRussian) && HasType( GetOpt()->m_RusParenthesis )) // find the first word which starts an oborot for ( int i = m_iFirstWord; i <= m_iLastWord; i++ ) if ( GetWords()[i].HasOborot1() ) { MainWord = i; } return MainWord; };
bool wxSheetCellAttr::HasReadWriteMode() const { return HasType(wxSHEET_AttrReadType_Mask); }
bool wxSheetCellAttr::HasShowEditorMode() const { return HasType(wxSHEET_AttrShowEditorType_Mask); }
bool wxSheetCellAttr::HasOverflowMarkerMode() const { return HasType(wxSHEET_AttrOverflowMarkerType_Mask); }
bool wxSheetCellAttr::HasLevel() const { return HasType(wxSHEET_AttrLevelType_Mask); }
bool TeamDebugInfo::TypeExistsByName(const BString& name, const TypeLookupConstraints& constraints) { return HasType(fTypeCache, name, constraints); }
BOOL WebFeedContentElement::IsBinary() const { return HasType() && !IsMarkup() && !IsPlainText(); }