// virtual BOOL LLGroupNotifyBox::handleRightMouseDown(S32 x, S32 y, MASK mask) { if (getVisible() && getEnabled() && pointInView(x,y)) { moveToBack(); return TRUE; } return LLPanel::handleRightMouseDown(x, y, mask); }
// virtual BOOL LLNotifyBox::handleRightMouseDown(S32 x, S32 y, MASK mask) { if (!mIsTip) { moveToBack(true); return TRUE; } return LLPanel::handleRightMouseDown(x, y, mask); }
void printAllReverse(Node* node) { if (!node) { cout << "Список пуст" << endl; return; } moveToBack(node); cout << "Номер зачетки\tГруппа\tИмя" << endl; do { node->print(); node = node->back; } while (node); }
// virtual BOOL LLGroupNotifyBox::handleRightMouseDown(S32 x, S32 y, MASK mask) { moveToBack(); return TRUE; }
// virtual BOOL LLNotifyBox::handleRightMouseDown(S32 x, S32 y, MASK mask) { bool done = LLPanel::handleRightMouseDown(x, y, mask); if (!done && !mIsTip) moveToBack(true); return done || !mIsTip; }
int main (int argc, const char* argv[]) { /* * argc should be 2 * arvg[1] is the size of the page table/ amount of memory avaiable/ the number of page frames */ if (argc != 2) { fprintf(stderr, "Not enough input arguments\n"); return 1; } int page_frames = atoi(argv[1]); char buffer[BUFFER_SIZE]; int page_faults = 0; //counter of page faults int memory_accesses = 0; //counter of memory accesses (lines in file) //create DEQUE DEQUE* page_table = createDeque(); //loop through the file and grab the numbers in there while (fgets(buffer, BUFFER_SIZE, stdin) != NULL ) { int access; //find the first integer in the line and store in x int n = sscanf(buffer, "%d", &access); //only try and access the page if the value is a number if (n > 0){ memory_accesses++; //if this page is already in the table, do nothing if (findNode(page_table, access) != NULL) { setRef(page_table,access); } //try and add the this page to the queue (oldest in front, newest in back) //if the queue is already at capacity, search for a page that we can remove else if (numItems(page_table) == page_frames) { /*FIND AND REPLACE PAGE*/ while ( getFirstRef(page_table) != 0) { //move the node with the value of first to the back of the deque moveToBack(page_table, getFirst(page_table)); } //remove the first node because it is unreferenced removeFirst(page_table); //add the new node at the end of the queue addLast(page_table, access); page_faults++; printf("PAGE FAULT: %d\n", access); } //if the page is not already in the list and there is room to add it, place it at the end of the list else { addLast(page_table, access); } } } //printf("memory accesses: %d\n",memory_accesses); //printf("page faults: %d\n",page_faults); }
void LLGroupNotifyBox::onClickNext() { moveToBack(); }