RDialog* CLoadProf::MakeSheet(int uid) { typedef HideEdgeControl EDGE; CString wildcard="*.prf"; selectedfile= Save_Data.lastpackname; RDialog* rv= MakeTopDialog(::Place(POSN_CENTRE,POSN_CENTRE), DialList(DialBox(FIL_NULL/*IDB_BBC3*/,new CLoadProf(uid),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), //rdh HTabBox(FIL_NULL,IdList(IDS_STANDARD,IDS_USERSTRIKE,IDS_USERCAP),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_LOAD,LSD_LOAD_DESELECT ,FIL_STANDARD_PROFILES_DIR_LONG, wildcard,CLoadProf::selectedfile,StdProf((UniqueID)uid))), DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_LOAD,LSD_LOAD_DESELECT ,FIL_USER_PROFILES_DIR, wildcard,CLoadProf::selectedfile,UserProfAttack((UniqueID)uid))), DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_LOAD,LSD_LOAD_DESELECT ,FIL_USER_PROFILES_DIR, wildcard,CLoadProf::selectedfile,UserProfPatrol((UniqueID)uid))) ) ) ); CRTabs* tab=(CRTabs*)rv->fchild->GetDlgItem(IDJ_TABCTRL); RDialog* tabs=rv->fchild->fchild; //OnSelecttab int tabnum=2; if (((RowanDialog*)rv)->acnum==0) tabnum=0; else for (;tabnum>0;tabnum--,tabs=tabs->sibling) //JIM 15/04/99 if (tabs==(RDialog*)(((RowanDialog*)rv)->acnum)) break; tab->SelectTab(tabnum); return rv; }
void CMiscToolbar::OnClickedFiles() { if (RDialog::m_pView->m_currentpage != 0) //RJS 29Oct00 return; //RJS 29Oct00 typedef HideEdgeControl EDGE; CString wildcard="*.bs"; CFiling::selectedfile=Save_Data.lastsavegame; if (Todays_Packages.localplayer==NAT_RAF) wildcard+="R"; else wildcard+="L"; // CFiling::selectedfile="test.sav"; if (!LoggedChild(FILES)) { LogChild(FILES, RDialog::MakeTopDialog(Place(POSN_CENTRE,POSN_CENTRE), DialList(DialBox(FIL_NULL/*IDB_BBC3*/,new CFiling,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), //rdh HTabBox(FIL_NULL,IdList(IDS_SAVE,IDS_LOAD),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(FIL_D_BLANK/*IDB_BBC3*/,new CLoad(IDDX_SAVE,LSD_SAVE, FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile)), DialBox(FIL_D_BLANK/*IDB_BBC3*/,new CLoad(IDDX_LOAD,LSD_LOAD_DESELECT,FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile)) ) ) ) ); } else CloseLoggedChild(FILES); }
CArmyRequests* CArmyRequests::MakeSheet(CRect r,UniqueID item,UniqueID force) { CArmyRequests* armysheet; MakeTopDialog(r, DialList(DialBox(FIL_MAP_ARMY/*IDB_BBC3*/,armysheet = new CArmyRequests,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), HTabBox(FIL_NULL,IdList(IDS_UNFORCES,IDS_REDFORCES),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(FIL_NULL/*IDB_BBC3*/,new CBattleDetail(item,force,0)), DialBox(FIL_NULL/*IDB_BBC3*/,new CBattleDetail(item,force,1)) ) ) ); return armysheet; }
void CMiscToolbar::OpenSaveOnly(bool quitafter) { typedef HideEdgeControl EDGE; CString wildcard="*.sav"; CFiling::selectedfile=Save_Data.lastsavegame; if (!LoggedChild(FILES)) LogChild(FILES, RDialog::MakeTopDialog(Place(POSN_CENTRE,POSN_CENTRE), DialList(DialBox(FIL_NULL/*IDB_BBC3*/,new CFiling(true),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), //rdh HTabBox(FIL_NULL,IdList(IDS_QUITSAVE),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_SAVE,LSD_SAVE, FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile)) ) ) ) ); else ;//bring to front... }
RDialog* LWRouteTop::Make() { CString tabtitle[6]; tabtitle[0] = RESSTRING(TAKEOFF); tabtitle[1] = RESSTRING(MAINROUTE); tabtitle[2] = RESSTRING(STRIKE); tabtitle[3] = RESSTRING(AIRCOVER); tabtitle[4] = RESSTRING(LANDING); return MakeTopDialog(::Place(POSN_CENTRE,POSN_MIN), DialList(DialBox(FIL_NULL,new LWRouteTop(),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), HTabBox(FIL_NULL,IdList(tabtitle[0],tabtitle[1],tabtitle[2],tabtitle[3],tabtitle[4]),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), //DEADCODE 23/02/00 DialBox(FIL_D_ROUTE,new LWRouteAirfield()), //DEADCODE 23/02/00 DialBox(FIL_D_ROUTE,new LWRouteMain()), //DEADCODE 23/02/00 DialBox(FIL_D_ROUTE,new LWRouteAirfield()), //DEADCODE 23/02/00 DialBox(FIL_D_ROUTE,new LWRouteAirfield()), //DEADCODE 23/02/00 DialBox(FIL_D_ROUTE,new LWRouteAirfield()) DialBox(FIL_D_ROUTE,new LWRouteMain(0)), DialBox(FIL_D_ROUTE,new LWRouteMain(1)), DialBox(FIL_D_ROUTE,new LWRouteMain(2)), DialBox(FIL_D_ROUTE,new LWRouteMain(3)), DialBox(FIL_D_ROUTE,new LWRouteMain(4)) ) ) ); //DEADCODE RDH 18/11/99 return //DEADCODE RDH 18/11/99 MakeTopDialog(::Place(POSN_CENTRE,POSN_CENTRE), //DEADCODE RDH 18/11/99 DialBox(FIL_D_INTERCEPTOFFERED,new LWRouteTop()) //DEADCODE RDH 18/11/99 ); }
// // This file contains the C++ code from Program 16.9 of // "Data Structures and Algorithms // with Object-Oriented Design Patterns in C++" // by Bruno R. Preiss. // // Copyright (c) 1998 by Bruno R. Preiss, P.Eng. All rights reserved. // // http://www.pads.uwaterloo.ca/Bruno.Preiss/books/opus4/programs/pgm16_09.cpp // void Digraph::TopologicalOrderTraversal (Visitor& visitor) const { Array<unsigned int> inDegree (numberOfVertices); for (Vertex::Number v = 0; v < numberOfVertices; ++v) inDegree [v] = 0; Iterator& p = Edges (); while (!p.IsDone ()) { Edge& edge = dynamic_cast<Edge&> (*p); ++inDegree [edge.V1 ()]; ++p; } delete &p; Queue& queue = *new QueueAsLinkedList (); queue.RescindOwnership (); for (Vertex::Number v = 0; v < numberOfVertices; ++v) if (inDegree [v] == 0) queue.Enqueue (SelectVertex (v)); while (!queue.IsEmpty () && !visitor.IsDone ()) { Vertex& vertex = dynamic_cast<Vertex&> (queue.Dequeue ()); visitor.Visit (vertex); Iterator& q = EmanatingEdges (vertex); while (!q.IsDone ()) { Edge& edge = dynamic_cast<Edge&> (*q); Vertex& to = edge.V1 (); if (--inDegree [to] == 0) queue.Enqueue (to); ++q; } delete &q; } delete &queue; }
int AddVertex(VertexId newvert){ int id = _maxid; _maxid++; _data.insert(std::pair<int, VertexId>(id, newvert)); _vertexes.insert(std::pair<int, Edges>(id, Edges())); return id; };
RDialog* BasesLuftflotte::Make() { //DeadCode JIM 20Oct00 int numopts = 1; //DeadCode JIM 20Oct00 DialBox* ND = NULL; CString tabtitle[4]; //DEADCODE RDH 06/04/00 if (RFullPanelDial::gameside == RFullPanelDial::SIDE_LW) //DEADCODE RDH 06/04/00 { //DEADCODE RDH 06/04/00 tabtitle[0] = RESSTRING(L_JAGD); //DEADCODE RDH 06/04/00 tabtitle[1] = RESSTRING(ZEROSTORER); //DEADCODE RDH 06/04/00 tabtitle[2] = RESSTRING(KAMPF); //DEADCODE RDH 06/04/00 tabtitle[3] = RESSTRING(STUKA); //DEADCODE RDH 06/04/00 return //DEADCODE RDH 06/04/00 MakeTopDialog(::Place(POSN_MIN,POSN_MIN), //DEADCODE RDH 06/04/00 DialList(DialBox(FIL_NULL,new BasesLuftflotte,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), //DEADCODE RDH 06/04/00 HTabBox(FIL_NULL,IdList(tabtitle[0],tabtitle[1],tabtitle[2],tabtitle[3]),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), //DEADCODE RDH 06/04/00 DialBox(FIL_D_GESCH,new GroupGeschwader(0)), //DEADCODE RDH 06/04/00 DialBox(FIL_D_GESCH,new GroupGeschwader(1)), //DEADCODE RDH 06/04/00 DialBox(FIL_D_GESCH,new GroupGeschwader(2)), //DEADCODE RDH 06/04/00 DialBox(FIL_D_GESCH,new GroupGeschwader(3)) //DEADCODE RDH 06/04/00 //DEADCODE RDH 06/04/00 ) ) ); //DEADCODE RDH 06/04/00 //DEADCODE RDH 06/04/00 }else { tabtitle[0] = RESSTRING(GROUP10); tabtitle[1] = RESSTRING(GROUP11); tabtitle[2] = RESSTRING(GROUP12); tabtitle[3] = RESSTRING(GROUP13); return MakeTopDialog(::Place(POSN_MIN,POSN_MIN), DialList(DialBox(FIL_NULL,new BasesLuftflotte,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), HTabBox(FIL_NULL,IdList(tabtitle[0],tabtitle[1],tabtitle[2],tabtitle[3]),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(FIL_D_GROUPS,new GroupGeschwader(IDS_GROUP_10)), DialBox(FIL_D_GROUPS,new GroupGeschwader(IDS_GROUP_11)), DialBox(FIL_D_GROUPS,new GroupGeschwader(IDS_GROUP_12)), DialBox(FIL_D_GROUPS,new GroupGeschwader(IDS_GROUP_13)) ) ) ); } }
MatrixXd restricted_laguerre_edges(const MatrixXd& X, const VectorXd& w) { RT dt; python_to_delaunay_2(X, w, dt); std::vector<Segment> edges; ::restricted_laguerre_edges(_t,dt,edges); size_t N = edges.size(); MatrixXd Edges(N, 4); for (size_t i = 0; i < N; ++i) { Edges(i,0) = edges[i].source().x(); Edges(i,1) = edges[i].source().y(); Edges(i,2) = edges[i].target().x(); Edges(i,3) = edges[i].target().y(); } return Edges; }
LineSegment Polyhedron::Edge(int edgeIndex) const { assume(edgeIndex >= 0); std::vector<LineSegment> edges = Edges(); assume(edgeIndex < (int)edges.size()); #ifndef MATH_ENABLE_INSECURE_OPTIMIZATIONS if (edgeIndex < 0 || edgeIndex >= (int)edges.size()) return LineSegment(float3::nan, float3::nan); #endif return edges[edgeIndex]; }
void Polyhedron::ToLineList(VertexBuffer &vb) const { std::vector<LineSegment> edges = Edges(); int startIndex = vb.AppendVertices((int)edges.size()*2); for(int i = 0; i < (int)edges.size(); ++i) { vb.Set(startIndex+2*i, VDPosition, float4(edges[i].a, 1.f)); vb.Set(startIndex+2*i+1, VDPosition, float4(edges[i].b, 1.f)); } }
void CMiscToolbar::OnClickedFiles() { typedef HideEdgeControl EDGE; CString wildcard="*.sav"; CFiling::selectedfile=Save_Data.lastsavegame; // CFiling::selectedfile="test.sav"; if (!LoggedChild(FILES)) { LogChild(FILES, RDialog::MakeTopDialog(Place(POSN_CENTRE,POSN_CENTRE), DialList(DialBox(FIL_NULL/*IDB_BBC3*/,new CFiling,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), //rdh HTabBox(FIL_NULL,IdList(IDS_SAVE,IDS_LOAD),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_SAVE,LSD_SAVE, FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile)), DialBox(FIL_MAP_PLAYER_LOG/*IDB_BBC3*/,new CLoad(IDD_LOAD,LSD_LOAD_DESELECT,FIL_SAVEGAMEDIR,wildcard,CFiling::selectedfile)) ) ) ) ); } else CloseLoggedChild(FILES); }
void Swt::initialize(Mat& image,vector< vector<cv::Point2i> >& cc) { image.copyTo(this->GrayImage); this->height = GrayImage.rows; this->width = GrayImage.cols; EdgeImage = cv::Mat::zeros(this->height,this->width,CV_8UC1); StrokeImage = cv::Mat::zeros(this->height,this->width,CV_32FC1); Edges(cc); StrokeImage = cv::Mat::zeros(this->height,this->width,CV_32FC1); // cv::imshow("Edges", this->EdgeImage);cv::waitKey(10); gradient(); td_findPairLine(); inversegradient(); td_findPairLine(); // displayStrokeWidth(cc); }
void CMiscToolbar::OnClickedThumbnail() { typedef HideEdgeControl EDGE; if (!LoggedChild(THUMBNAIL)) { CMIGView::m_thumbnail=new CThumbnail; LogChild(THUMBNAIL, RDialog::MakeTopDialog( //CRect(140,140,0,0), Place(POSN_MIN,POSN_MIN), DialBox(FIL_NULL,CMIGView::m_thumbnail,Edges(EDGE::ALIGN_MIN + EDGE::ACTIONS_SPLITTER,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)) ) ); } else CloseLoggedChild(THUMBNAIL); }
RDialog* RAFReviewTop::Make() { CString tabtitle[6]; tabtitle[0] = RESSTRING(STRENGTH); tabtitle[1] = RESSTRING(AIRCRAFT); tabtitle[2] = RESSTRING(ASSETS); tabtitle[3] = RESSTRING(CLAIMS); tabtitle[4] = RESSTRING(ENEMY); return MakeTopDialog(::Place(POSN_CENTRE,POSN_CENTRE), DialList(DialBox(FIL_NULL,new RAFReviewTop,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), HTabBox(FIL_NULL,IdList(tabtitle[0],tabtitle[1],tabtitle[2],tabtitle[3],tabtitle[4]),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(FIL_D_REVIEWRAFFORCE,new RAFReviewStrength()), DialBox(FIL_D_REVIEWRAFFORCE,new RAFReviewAircraft()), DialBox(FIL_D_REVIEWTARGETDAMAGE,new RAFReviewAsset()), DialBox(FIL_D_REVIEWLWFORCE,new RAFReviewClaims()), DialBox(FIL_D_REVIEWLWFORCE,new LWReviewAircraft()) ) ) ); }
RDialog* RAFDiary::Make(SquadNum squad) { RAFDiary* rafdiary = new RAFDiary(); rafdiary->sqnum = squad; rafdiary->sqnumptr = &rafdiary->sqnum; rafdiary->currentryptr = &rafdiary->currentry; rafdiary->sqdetailsptr = rafdiary->sqdetails; rafdiary->FindGroup(); rafdiary->FillSquadronDetails(rafdiary->sqnum,NULL,rafdiary->sqdetails,rafdiary->currentry); return MakeTopDialog(::Place(POSN_CENTRE,POSN_CENTRE), // DialList(DialBox(FIL_NULL,new RAFDiary()), DialList(DialBox(FIL_D_SQUADRON_LOGBOOK,rafdiary,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), DialBox(FIL_D_SQUADRON_LOGBOOK,new RAFDiaryList(rafdiary->sqnumptr, rafdiary->currentryptr, rafdiary->sqdetailsptr)), DialBox(FIL_D_SQUADRON_LOGBOOK,new RAFDiaryDetails(rafdiary->sqnumptr, rafdiary->currentryptr, rafdiary->sqdetailsptr, false)) ) ); }
void CDirects2::OnClickedDirectivebutton() { if (CComit_e::This->dir_ctrl.directives[linenum].type != SupplyTree::D_RESTING) { if (LoggedChild(0)) { CRTabs* tab=(CRTabs*)LoggedChild(0)->fchild->fchild->GetDlgItem(IDJ_TABCTRL); tab->SelectTab(CComit_e::This->dir_ctrl.directives[linenum].type); //delete tab; }else { typedef HideEdgeControl EDGE; RDialog* d=MakeTopDialog(CRect(500,450,0,0), DialList(DialBox(FIL_NULL,new CCamplist,Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), HTabBox(FIL_NULL,IdList(IDS_AIRSUP,IDS_CHOKE_L, IDS_SUPPLY,IDS_AIRFIELDS,IDS_RAIL, IDS_ROAD,IDS_ARMY),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(FIL_MAP_MIGCAP,new CSelectionResults(SupplyTree::D_AIRSUPERIORITY)), DialBox(FIL_MAP_CHOKEPOINTS,new CSelectionResults(SupplyTree::D_CHOKE)), DialBox(FIL_MAP_SUPPLY,new CSelectionResults(SupplyTree::D_SUPPLY)), DialBox(FIL_MAP_AIRFIELD,new CSelectionResults(SupplyTree::D_AIRFIELDS)), DialBox(FIL_MAP_TRAFFIC,new CSelectionResults( SupplyTree::D_RAIL)), DialBox(FIL_MAP_TRAFFIC,new CSelectionResults(SupplyTree::D_ROAD)), DialBox(FIL_MAP_ARMY,new CSelectionResults(SupplyTree::D_ARMY)) ) ) ); LogChild(0,d); CRTabs* tab=(CRTabs*)d->fchild->GetDlgItem(IDJ_TABCTRL); tab->SelectTab(CComit_e::This->dir_ctrl.directives[linenum].type); //delete tab; } } }
void DeadlockDetector::_processNextNode(const UnprocessedNode& node) { // Locate the request LockManager::LockBucket* bucket = _lockMgr._getBucket(node.resId); SimpleMutex::scoped_lock scopedLock(bucket->mutex); LockManager::LockHeadMap::const_iterator iter = bucket->data.find(node.resId); if (iter == bucket->data.end()) { return; } const LockHead* lock = iter->second; LockRequest* request = lock->findRequest(node.lockerId); // It is possible that a request which was thought to be waiting suddenly became // granted, so check that before proceeding if (!request || (request->status == LockRequest::STATUS_GRANTED)) { return; } std::pair<WaitForGraph::iterator, bool> val = _graph.insert(WaitForGraphPair(node.lockerId, Edges(node.resId))); if (!val.second) { // We already saw this locker id, which means we have a cycle. if (!_foundCycle) { _foundCycle = (node.lockerId == _initialLockerId); } return; } Edges& edges = val.first->second; bool seen = false; for (LockRequest* it = lock->grantedQueueEnd; it != NULL; it = it->prev) { // We can't conflict with ourselves if (it == request) { seen = true; continue; } // If we are a regular conflicting request, both granted and conversion modes need to // be checked for conflict, since conversions will be granted first. if (request->status == LockRequest::STATUS_WAITING) { if (conflicts(request->mode, modeMask(it->mode)) || conflicts(request->mode, modeMask(it->convertMode))) { const LockerId lockerId = it->locker->getId(); const ResourceId waitResId = it->locker->getWaitingResource(); if (waitResId.isValid()) { _queue.push_front(UnprocessedNode(lockerId, waitResId)); edges.owners.push_back(lockerId); } } continue; } // If we are a conversion request, only requests, which are before us need to be // accounted for. invariant(request->status == LockRequest::STATUS_CONVERTING); if (conflicts(request->convertMode, modeMask(it->mode)) || (seen && conflicts(request->convertMode, modeMask(it->convertMode)))) { const LockerId lockerId = it->locker->getId(); const ResourceId waitResId = it->locker->getWaitingResource(); if (waitResId.isValid()) { _queue.push_front(UnprocessedNode(lockerId, waitResId)); edges.owners.push_back(lockerId); } } } // All conflicting waits, which would be granted before us for (LockRequest* it = request->prev; (request->status == LockRequest::STATUS_WAITING) && (it != NULL); it = it->prev) { // We started from the previous element, so we should never see ourselves invariant(it != request); if (conflicts(request->mode, modeMask(it->mode))) { const LockerId lockerId = it->locker->getId(); const ResourceId waitResId = it->locker->getWaitingResource(); if (waitResId.isValid()) { _queue.push_front(UnprocessedNode(lockerId, waitResId)); edges.owners.push_back(lockerId); } } } }
void CMainFrame::Initialise() { CMIGView* view = (CMIGView*)GetActiveView(); m_doIExist=2; // Init toolbars //DeadCode JIM 05Jul98 m_toolbar1.Create(CMainToolbar::IDD,view); //DeadCode JIM 05Jul98 CRect rect; //DeadCode JIM 05Jul98 m_toolbar1.GetWindowRect(rect); //DeadCode JIM 05Jul98 m_toolbar1.Init(this,rect.Width(),rect.Width(),40,AFX_IDW_DOCKBAR_TOP,0); //DeadCode JIM 05Jul98 m_toolbar2.Create(CMainToolbar::IDD,view); //DeadCode JIM 05Jul98 m_toolbar2.Init(this,rect.Width(),rect.Width(),40,AFX_IDW_DOCKBAR_TOP,0); //DeadCode JIM 05Jul98 m_toolbar4.Create(CScaleBar::IDD,view); //DeadCode JIM 05Jul98 m_toolbar4.Init(this,200,400,40,AFX_IDW_DOCKBAR_LEFT,4); CRect rect; #ifndef BOB_DEMO_VER m_titlebar.Create(TitleBar::IDD,view); m_titlebar.GetWindowRect(rect); m_titlebar.Init(this,rect.Width(),rect.Width(),CRToolBar::TOOBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0,CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); // m_toolbar1.Create(CMapFilters::IDD,view); // m_toolbar1.GetWindowRect(rect); // m_toolbar1.Init(this,rect.Width(),rect.Width(),CRToolBar::TOOBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0,CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); m_toolbar2.Create(CMainToolbar::IDD,view); m_toolbar2.GetWindowRect(rect); m_toolbar2.Init(this,rect.Width(),rect.Width(),CRToolBar::TOOBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0,CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); //DEADCODE RDH 08/11/99 m_toolbar5.Create(CDebriefToolbar::IDD,view); //DEADCODE RDH 08/11/99 m_toolbar5.GetWindowRect(rect); //DEADCODE RDH 08/11/99 m_toolbar5.Init(this,rect.Width(),rect.Width(),CRToolBar::TOOBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0); m_reportbar.Create(m_reportbar.IDD,view); m_reportbar.GetWindowRect(rect); m_reportbar.Init(this,rect.Width(),rect.Width(),CRToolBar::TOOBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0,CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); m_toolbar3.Create(CMiscToolbar::IDD,view); m_toolbar3.GetWindowRect(rect); m_toolbar3.Init(this,rect.Width(),rect.Width(),CRToolBar::TOOBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0,CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); // m_commsbar.Create(m_commsbar.IDD,view); // m_commsbar.GetWindowRect(rect); // m_commsbar.Init(this,rect.Width(),rect.Width(),CRToolBar::TOOBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0,CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); // m_statusbar.Create(m_statusbar.IDD,view); //m_commsbar // m_statusbar.GetWindowRect(rect); // m_statusbar.Init(this,rect.Width(),rect.Width(),CRToolBar::TOOBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0,CBRS_ALIGN_TOP | CBRS_ALIGN_BOTTOM); m_spacebar.Create(m_spacebar.IDD,view); m_spacebar.GetWindowRect(rect); m_spacebar.Init(this,1000,1000,CRToolBar::TOPBAR_THICKNESS,AFX_IDW_DOCKBAR_BOTTOM,0,CBRS_ALIGN_BOTTOM); m_toolbar4.Create(m_toolbar4.IDD,view); m_toolbar4.GetWindowRect(rect); m_toolbar4.Init(this,500,500,CRToolBar::SIDEBAR_THICKNESS,AFX_IDW_DOCKBAR_RIGHT,4,CBRS_ALIGN_TOP+CBRS_ALIGN_LEFT+CBRS_ALIGN_RIGHT+CBRS_GRIPPER); view->m_pScaleBar=&m_toolbar4; //{ TB_FILTERS,TB_MAIN,TB_MISC,TB_TITLE,TB_REPORT,TB_COMMS,TB_STATUS,TB_SCALE,TB_SPACE,TB_TOTAL}; toolbars[TB_FILTERS]=NULL;//&m_toolbar1; toolbars[TB_MAIN]=&m_toolbar2; toolbars[TB_MISC]=&m_toolbar3; toolbars[TB_TITLE]=&m_titlebar; toolbars[TB_REPORT]=&m_reportbar; toolbars[TB_COMMS]=NULL;//&m_commsbar; toolbars[TB_STATUS]=NULL;//&m_statusbar; toolbars[TB_SCALE]=&m_toolbar4; toolbars[TB_SPACE]=&m_spacebar; typedef HideEdgeControl EDGE; RDialog::MakeTopDialog(CRect(0,0,CRToolBar::SIDEBAR_THICKNESS,CRToolBar::TOOBAR_THICKNESS), DialBox(FIL_NULL,m_wndSystemBox=new CSystemBox(this),Edges(EDGE::OCCLUDE_EXACT+EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE))); PositionSysBox(); #endif// #ifndef BOB_DEMO_VER // m_wndSystemBox-.Init(CSystemBox::IDD,this); // m_wndSystemBox.ShowWindow(SW_SHOW); HideToolbars(); view->LaunchFullPane(&RFullPanelDial::introsmack,SaveData::UIR_FIRST); //JIM 18/01/99 m_doIExist=1; }
RDialog* Dossier::Make(UniqueID item) { //Remember, if you are RAF and select an airfield we want the airfield dossier... FileNum filenum; int uidband; uidband=Persons2::getbandfromUID(item); switch (uidband) { case NavalBaseBAND: case DocksBAND: case PortBAND: { filenum = FIL_D_DOSSIER_DOCKS; break; } case PowerStationBAND: case OilRefineryBAND: case IndustryBAND: case AircraftFactoryBAND: { filenum = FIL_D_DOSSIER_FACTORIES; break; } case CityBAND: { filenum = FIL_D_DOSSIER_LONDON; break; } case TownBAND: case NavigationBAND: case VillageBAND: { filenum = FIL_D_BLANKNOHEADER; break; } case RAF_FighterAFBAND: case RAF_BomberAFBAND: case RAF_CoastalAFBAND: case LUF_FighterLF2BAND: case LUF_FighterLF3BAND: case LUF_BomberLF2BAND: { filenum = FIL_D_DOSSIER_AIRFIELD; break; } case CLRadarBAND: case CHRadarBAND: { filenum = FIL_D_DOSSIER_RADAR; break; } case BritBoatBAND: case GermBoatBAND: { filenum = FIL_D_DOSSIER_CONVOYS; break; } default: { filenum = FIL_D_BLANKNOHEADER; break; } } UniqueID SGT=item; info_itemS* i=Persons2::ConvertPtrUID(item); if (i->SGT) SGT=i->SGT; TargetNoDetail* trg = Node_Data[SGT]; if ( (RFullPanelDial::gameside == RFullPanelDial::SIDE_LW) && (!Save_Data.gamedifficulty[GD_LWINTELL]) && (trg) && trg->ReconAdvised() ) return MakeTopDialog(::Place(POSN_MAX,POSN_MIN), DialList(DialBox(FIL_D_BLANKNOHEADER,new Dossier(SGT),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), HTabBox(FIL_NULL,IdList(IDS_GENERAL, IDS_DAMAGE),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(filenum,new DossierDetails(SGT)) ) ) ); else return MakeTopDialog(::Place(POSN_MAX,POSN_MIN), DialList(DialBox(FIL_D_BLANKNOHEADER,new Dossier(SGT),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE,EDGE::ALIGN_MAX + EDGE::OCCLUDE_INSIDE)), HTabBox(FIL_NULL,IdList(IDS_GENERAL, IDS_DAMAGE),Edges(EDGE::ALIGN_MIN,EDGE::ALIGN_MIN,EDGE::ALIGN_MAX,EDGE::ALIGN_MAX), DialBox(filenum,new DossierDetails(SGT)), DialBox(FIL_D_DAMAGE,new CDamage(SGT,item)) ) ) ); }
/** Esta funcao e' a funcao principal do plugin */ int ashf03_erlf07_las05(Graph *G, char *mess) { sprintf(mess, "Clique"); Edges(G,BLUE); return 1; }