void cxProjectInfo::SetFilters(const wxArrayString& ind, const wxArrayString& exd, const wxArrayString& inf, const wxArrayString& exf) { ClearFilters(); includeDirs = ind; excludeDirs = exd; includeFiles = inf; excludeFiles = exf; hasFilters = true; }
void LoomExitProcess() { unsigned i; LoomExitThread(1/* Forced */); if (StopDaemon() == -1) { fprintf(stderr, "failed to stop the loom daemon\n"); } ClearFilters(); for (i = 0; i < MaxNumInsts; ++i) assert(LoomOperations[i] == NULL); fprintf(stderr, "***** LoomExitProcess *****\n"); }
NTSTATUS HsUnloadFilterDriver(PUNLOAD_FILTER UnloadFilter) { NTSTATUS Status; DbgPrint("FilterType: %d\r\n",UnloadFilter->Type); DbgPrint("DeviceObject: %d\r\n",UnloadFilter->DeviceObject); switch(UnloadFilter->Type) { case Disk: { Status = ClearFilters(L"\\Driver\\Disk", UnloadFilter->DeviceObject); break; } default: { } } return Status; }
bool CPluginFilter::LoadHideFilters(std::vector<std::wstring> filters) { ClearFilters(); bool isRead = false; CPluginClient* client = CPluginClient::GetInstance(); // Parse hide string int pos = 0; CriticalSection::Lock filterEngineLock(s_criticalSectionFilterMap); { for (std::vector<std::wstring>::iterator it = filters.begin(); it < filters.end(); ++it) { CString filter((*it).c_str()); // If the line is not commented out if (!filter.Trim().IsEmpty() && filter.GetAt(0) != '!' && filter.GetAt(0) != '[') { int filterType = 0; // See http://adblockplus.org/en/filters for further documentation try { AddFilterElementHide(filter); } catch(...) { #ifdef ENABLE_DEBUG_RESULT CPluginDebug::DebugResult(L"Error loading hide filter: " + ToWstring(filter)); #endif } } } } return isRead; }
/** * VCI HW Class Destructor. */ VCI::~VCI() { Disconnect(); ClearFilters(); }
// --------------------------------------------------------- // RFavouritesSrvTable::SetFiltersL // --------------------------------------------------------- // void RFavouritesSrvTable::SetFiltersL( const TFavouritesFilter& aFilter ) { HBufC* buf = HBufC::NewLC( KFavouritesMaxSql ); TPtr sql = buf->Des(); HBufC* tmpBuf = HBufC::NewLC( KFavouritesMaxSql ); TPtr tmpPtr = tmpBuf->Des(); _LIT( KNone, "" ); _LIT( KAnd, "and" ); TPtrC sConn; sConn.Set( KNone ); if ( aFilter.iName ) { // "name like 'foo*'" _LIT( KFormat1, "%S like '" ); sql.Format( KFormat1, &KFavouritesDbNameColName ); AppendEscaped( sql, *aFilter.iName ); sql.Append( TChar('\'') ); sConn.Set( KAnd ); } if ( aFilter.iType != CFavouritesItem::ENone ) { // "and type = 0" _LIT( KFormat2, " %S %S = %d" ); tmpPtr.Format ( KFormat2, &sConn, &KFavouritesDbTypeColName, aFilter.iType ); sConn.Set( KAnd ); sql.Append( tmpPtr ); } if ( aFilter.iParentFolder != KFavouritesNullUid ) { // "and parent = 7" _LIT( KFormat3, " %S %S = %d" ); tmpPtr.Format( KFormat3, &sConn, &KFavouritesDbParentColName, aFilter.iParentFolder ); sConn.Set( KAnd ); sql.Append( tmpPtr ); } if ( aFilter.iContextId != KFavouritesNullContextId ) { // "and contextid = 7" _LIT( KFormat3, " %S %S = %d" ); tmpPtr.Format( KFormat3, &sConn, &KFavouritesDbContextIdColName, aFilter.iContextId ); sConn.Set( KAnd ); sql.Append( tmpPtr ); } // Clear old one, if any. ClearFilters(); if ( sql.Length() > 0 ) { // Make new constraint, if there is any filter set. // Otherwise there will be no constraint. User::LeaveIfError ( iFilter.Open( *this, TDbQuery( sql, EDbCompareFolded ) ) ); iFiltering = ETrue; } CleanupStack::PopAndDestroy( 2 ); // tmpBuf, buf }
// --------------------------------------------------------- // RFavouritesSrvTable::Close // --------------------------------------------------------- // void RFavouritesSrvTable::Close() { ClearFilters(); RDbTable::Close(); }
CPluginFilter::CPluginFilter(const CString& dataPath) : m_dataPath(dataPath) { ClearFilters(); }
//------------------------------------------------------------------------------ void MissionTreeToolBar::OnViewByCategory(wxCommandEvent& event) { wxArrayString cmdsToInclude; ToggleTool(TOOL_LEVEL_ALL, false); ToggleTool(TOOL_LEVEL_1, false); ToggleTool(TOOL_LEVEL_2, false); ToggleTool(TOOL_LEVEL_3, false); // Expand Level, Include category and Exclude category are mutually exclusive. // So for example, if an include button is clicked and then an exclude // button is clicked it will toggle off the includ button. int eventId = event.GetId(); #ifdef DEBUG_MISSION_VIEW_CONTROL MessageInterface::ShowMessage ("MissionTreeToolBar::OnViewByCategory() entered, eventId = %d, mLastIncCategoryClicked = %d, " "mLastExcCategoryClicked = %d\n", eventId, mLastIncCategoryClicked, mLastExcCategoryClicked); #endif switch (eventId) { case TOOL_CLEAR_FILTERS: // Stay toggled on if the last one reclicked if (eventId == mLastIncCategoryClicked) { ToggleTool(eventId, true); return; } ClearFilters(); break; case TOOL_INC_PHYSICS: case TOOL_INC_SOLVER: case TOOL_INC_SCRIPT: case TOOL_INC_CONTROL: // Stay toggled on if the last one reclicked // Actually it should be toggled off and remove all filters which shows // all levels (LOJ: 2012.12.10) if (eventId == mLastIncCategoryClicked) { //ToggleTool(eventId, true); ToggleTool(eventId, false); ClearFilters(); return; } ResetMissionTreeExcludeCategory(); ToggleTool(TOOL_CLEAR_FILTERS, false); // Include Physics based if (GetToolState(TOOL_INC_PHYSICS)) { cmdsToInclude.Add("Propagate"); cmdsToInclude.Add("Maneuver"); cmdsToInclude.Add("BeginFiniteBurn"); cmdsToInclude.Add("EndFiniteBurn"); } // Include Solver related if (GetToolState(TOOL_INC_SOLVER)) { cmdsToInclude.Add("Target"); cmdsToInclude.Add("Optimize"); cmdsToInclude.Add("Vary"); cmdsToInclude.Add("Achieve"); cmdsToInclude.Add("NonlinearConstraint"); cmdsToInclude.Add("Minimize"); } // Include ScriptEvent if (GetToolState(TOOL_INC_SCRIPT)) { cmdsToInclude.Add("BeginScript"); } // Include ControlFlow if (GetToolState(TOOL_INC_CONTROL)) { cmdsToInclude.Add("If"); cmdsToInclude.Add("While"); cmdsToInclude.Add("For"); } mLastIncCategoryClicked = GetOnlyOneClicked(1); mMissionTree->SetViewCommands(cmdsToInclude); break; case TOOL_EXC_REPORT: case TOOL_EXC_EQUATION: case TOOL_EXC_PLOT: case TOOL_EXC_CALL: // Stay toggled on if the same one reclicked // Actually it should be toggled off and remove all filters which shows // all levels (LOJ: 2012.12.10) if (eventId == mLastExcCategoryClicked) { //ToggleTool(eventId, true); ToggleTool(eventId, false); ClearFilters(); return; } ResetMissionTreeIncludeCategory(); ToggleTool(TOOL_CLEAR_FILTERS, false); cmdsToInclude = mMissionTree->GetCommandList(true); #ifdef DEBUG_MISSION_VIEW_CONTROL MessageInterface::ShowMessage ("Before exclusion: cmdsToInclude has %d commands\n", cmdsToInclude.GetCount()); for (unsigned int i = 0; i < cmdsToInclude.size(); i++) MessageInterface::ShowMessage(" '%s'\n", cmdsToInclude[i].c_str()); #endif // Exclude Report if (GetToolState(TOOL_EXC_REPORT)) cmdsToInclude.Remove("Report"); // Exclude Equation if (GetToolState(TOOL_EXC_EQUATION)) cmdsToInclude.Remove("GMAT"); // Exclude Subscriber related if (GetToolState(TOOL_EXC_PLOT)) { cmdsToInclude.Remove("ClearPlot"); cmdsToInclude.Remove("MarkPoint"); cmdsToInclude.Remove("PenUp"); cmdsToInclude.Remove("PenDown"); cmdsToInclude.Remove("Toggle"); } // Exclude CallGMATFunction, CallMatlabFunction, Save, SaveMission if (GetToolState(TOOL_EXC_CALL)) { cmdsToInclude.Remove("CallGmatFunction"); cmdsToInclude.Remove("CallMatlabFunction"); cmdsToInclude.Remove("Save"); cmdsToInclude.Remove("SaveMission"); } mLastExcCategoryClicked = GetOnlyOneClicked(2); #ifdef DEBUG_MISSION_VIEW_CONTROL MessageInterface::ShowMessage (" After exclusion: cmdsToInclude has %d commands\n", cmdsToInclude.GetCount()); for (unsigned int i = 0; i < cmdsToInclude.size(); i++) MessageInterface::ShowMessage(" '%s'\n", cmdsToInclude[i].c_str()); MessageInterface::ShowMessage("==> Calling mMissionTree->SetViewCommands()\n"); #endif mMissionTree->SetViewCommands(cmdsToInclude); break; default: break; } #ifdef DEBUG_MISSION_VIEW_CONTROL MessageInterface::ShowMessage ("MissionTreeToolBar::OnViewByCategory() leaving\n"); #endif }
void ClearAllGlobals (void) { ClearFilters(); }
GmJobFilter::~GmJobFilter () { ClearFilters (); }