static PyObject* profiler_clear(ProfilerObject *pObj, PyObject* noarg) { clearEntries(pObj); Py_INCREF(Py_None); return Py_None; }
void MamdaOrderBookPriceLevel::MamdaOrderBookPriceLevelImpl::copy ( const MamdaOrderBookPriceLevelImpl& copy) { if (mEntries) { clearEntries (*mEntries); } if (copy.mEntries) { if (!mEntries) mEntries = new EntryList; mNumEntries = 0; mNumEntriesTotal = 0; EntryList::iterator end = copy.mEntries->end(); EntryList::iterator i = copy.mEntries->begin(); while (i != end) { addEntry (new MamdaOrderBookEntry(**i)); ++i; } } mPrice = copy.mPrice; mSize = copy.mSize; mSizeChange = copy.mSizeChange; mNumEntries = copy.mNumEntries; mNumEntriesTotal = copy.mNumEntriesTotal; mSide = copy.mSide; mAction = copy.mAction; mOrderType = copy.mOrderType; mTime = copy.mTime; mBook = NULL; mClosure = NULL; }
MamdaOrderBookPriceLevel::MamdaOrderBookPriceLevelImpl::~MamdaOrderBookPriceLevelImpl () { if (mEntries) clearEntries (*mEntries); delete mEntries; }
static PyObject* profiler_clear(ProfilerObject *pObj, PyObject* noarg) { flush_unmatched_allstacks(pObj); clearEntries(pObj); Py_INCREF(Py_None); return Py_None; }
inline void BlockInterpreter::interpretStringBlock( BlockClass::BaseStringBlock const& stringsToInterpret ) { clearEntries(); currentStringBlock = &stringsToInterpret; interpretCurrentStringBlock(); }
void handleConnection( int connfd ) { int len, max, loop; char buffer[MAX_BUFFER+1]; char filename[80+1]; /* Read in the HTTP request message */ max = 0; loop = 1; while (loop) { len = read(connfd, &buffer[max], 255); buffer[max+len] = 0; if (len <= 0) return; max += len; if ((buffer[max-4] == 0x0d) && (buffer[max-3] == 0x0a) && (buffer[max-2] == 0x0d) && (buffer[max-1] == 0x0a)) loop = 0; } /* Determine the HTTP request */ if (!strncmp(buffer, "GET", 3)) { getFilename(buffer, filename, 4); /* Within this tiny HTTP server, the filename parsed from the * request determines the function to call to emit an HTTP * response. */ if (!strncmp(filename, "/index.html", 11)) emitNews( connfd ); else if (!strncmp(filename, "/config.html", 12)) emitConfig( connfd ); else if (!strncmp(filename, "/art", 3)) emitArticle( connfd, filename ); else write(connfd, notfound, strlen(notfound)); } else if (!strncmp(buffer, "POST", 4)) { getFilename(buffer, filename, 5); /* Ditto for the POST request (as above for GET). The POST filename * determines what to do -- the only case though is the "Mark Read" * button which clears the shown entries. */ if (!strncmp(filename, "/clear", 6)) { clearEntries(); emitHTTPResponseHeader( connfd ); strcpy(buffer, "<P><H1>Click Back and Reload to " "refresh page.</H1><P>\n\n"); write(connfd, buffer, strlen(buffer)); } else { write(connfd, notfound, strlen(notfound)); } } else { /* Did not recognize the request -- return a not-implemented status */ strcpy(buffer, "HTTP/1.1 501 Not Implemented\n\n"); write(connfd, buffer, strlen(buffer)); } return; }
static void profiler_dealloc(ProfilerObject *op) { if (op->flags & POF_ENABLED) PyEval_SetProfile(NULL, NULL); flush_unmatched(op); clearEntries(op); Py_XDECREF(op->externalTimer); Py_TYPE(op)->tp_free(op); }
/*! This private function is used by the simple operation functions, i.e. listChildren(), mkdir(), remove(), rename(), get() and put(), to really start the operation. \a op is a pointer to the network operation that should be started. Returns \a op on success; otherwise returns 0. */ const Q3NetworkOperation *Q3UrlOperator::startOperation( Q3NetworkOperation *op ) { if ( !d->networkProtocol ) getNetworkProtocol(); if ( d->networkProtocol && (d->networkProtocol->supportedOperations()&op->operation()) ) { d->networkProtocol->addOperation( op ); if ( op->operation() == Q3NetworkProtocol::OpListChildren ) clearEntries(); return op; } // error QString msg; if ( !d->networkProtocol ) { msg = tr( "The protocol `%1' is not supported" ).arg( protocol() ); } else { switch ( op->operation() ) { case Q3NetworkProtocol::OpListChildren: msg = tr( "The protocol `%1' does not support listing directories" ).arg( protocol() ); break; case Q3NetworkProtocol::OpMkDir: msg = tr( "The protocol `%1' does not support creating new directories" ).arg( protocol() ); break; case Q3NetworkProtocol::OpRemove: msg = tr( "The protocol `%1' does not support removing files or directories" ).arg( protocol() ); break; case Q3NetworkProtocol::OpRename: msg = tr( "The protocol `%1' does not support renaming files or directories" ).arg( protocol() ); break; case Q3NetworkProtocol::OpGet: msg = tr( "The protocol `%1' does not support getting files" ).arg( protocol() ); break; case Q3NetworkProtocol::OpPut: msg = tr( "The protocol `%1' does not support putting files" ).arg( protocol() ); break; default: // this should never happen break; } } op->setState( Q3NetworkProtocol::StFailed ); op->setProtocolDetail( msg ); op->setErrorCode( (int)Q3NetworkProtocol::ErrUnsupported ); emit finished( op ); deleteOperation( op ); return 0; }
PageItemAttributes::PageItemAttributes( QWidget* parent, const char* name, bool modal, Qt::WFlags fl ) : QDialog(parent, fl) { setupUi(this); setModal(modal); relationships << tr("None", "relationship") << tr("Relates To") << tr("Is Parent Of") << tr("Is Child Of"); relationshipsData << "none" << "relation" << "parent" << "child"; connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject())); connect(okButton, SIGNAL(clicked()), this, SLOT(okClicked())); connect(attributesTable, SIGNAL(cellChanged(int,int)), this, SLOT(tableItemChanged(int,int))); connect(addButton, SIGNAL(clicked()), this, SLOT(addEntry())); connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteEntry())); connect(clearButton, SIGNAL(clicked()), this, SLOT(clearEntries())); connect(copyButton, SIGNAL(clicked()), this, SLOT(copyEntry())); }
DocumentItemAttributes::DocumentItemAttributes( QWidget* parent, Qt::WFlags fl ) : QWidget(parent, fl) { setupUi(this); relationships << tr("None", "relationship") << tr("Relates To") << tr("Is Parent Of") << tr("Is Child Of"); relationshipsData << "none" << "relation" << "parent" << "child"; autoAddTo << tr("None", "auto add") << tr("Text Frames") << tr("Image Frames"); autoAddToData << "none" << "textframes" << "imageframes"; types << tr("None", "types") << tr("Boolean") << tr("Integer") << tr("Real Number") << tr("String"); typesData << "none" << "boolean" << "integer" << "double" << "string"; connect(attributesTable, SIGNAL(cellChanged(int,int)), this, SLOT(tableItemChanged(int,int))); connect(addButton, SIGNAL(clicked()), this, SLOT(addEntry())); connect(deleteButton, SIGNAL(clicked()), this, SLOT(deleteEntry())); connect(clearButton, SIGNAL(clicked()), this, SLOT(clearEntries())); connect(copyButton, SIGNAL(clicked()), this, SLOT(copyEntry())); }
void MamdaOrderBookPriceLevel::MamdaOrderBookPriceLevelImpl::clear () { mPrice.clear(); mSize = 0.0; mSizeChange = 0.0; mNumEntries = 0; mNumEntriesTotal = 0; mSide = MAMDA_BOOK_SIDE_BID; mAction = MAMDA_BOOK_ACTION_ADD; mOrderType = MAMDA_BOOK_LEVEL_LIMIT; mTime.clear(); if (mEntries) { clearEntries (*mEntries); } mBook = NULL; mClosure = NULL; }
Directory::~Directory() { clearEntries(); }
const Directory::DirectoryEntries& Directory::list() { clearEntries(); disk_.list(*this); return entries_; }
XmlPdf::~XmlPdf() { clearEntries(); }