• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ doClose函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中doClose函数的典型用法代码示例。如果您正苦于以下问题:C++ doClose函数的具体用法?C++ doClose怎么用?C++ doClose使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了doClose函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: getMainWindowHandle

bool Notepad_plus::fileDelete(BufferID id)
{
	BufferID bufferID = id;
	if (id == BUFFER_INVALID)
		bufferID = _pEditView->getCurrentBufferID();
	
	Buffer * buf = MainFileManager->getBufferByID(bufferID);
	const TCHAR *fileNamePath = buf->getFullPathName();

	if (doDeleteOrNot(fileNamePath) == IDYES)
	{
		if (!MainFileManager->deleteFile(bufferID))
		{
			_nativeLangSpeaker.messageBox("DeleteFileFailed",
				getMainWindowHandle(),
				TEXT("Delete File failed"),
				TEXT("Delete File"),
				MB_OK);
			return false;
		}
		doClose(bufferID, MAIN_VIEW);
		doClose(bufferID, SUB_VIEW);
		return true;
	}
	return false;
}
开发者ID:basvodde,项目名称:notepad-plusplus-refactoring,代码行数:26,代码来源:NppIO.cpp


示例2: l

void CDavisLoggerSerial::readCallback(const char *data, size_t len)
{
	boost::lock_guard<boost::mutex> l(readQueueMutex);
	try
	{
		//_log.Log(LOG_NORM,"Davis: received %ld bytes",len);

		switch (m_state)
		{
		case DSTATE_WAKEUP:
			if (len==2) {
				_log.Log(LOG_NORM,"Davis: System is Awake...");
				m_state=DSTATE_LOOP;
				m_statecounter=DAVIS_READ_INTERVAL-1;
			}
			break;
		case DSTATE_LOOP:
			if (len==2)
				break; //could be a left over from the awake
			if (len!=100) {
				_log.Log(LOG_ERROR,"Davis: Invalid bytes received!...");
				//lets try again
				try {
					clearReadCallback();
					close();
					doClose();
					setErrorStatus(true);
				} catch(...)
				{
					//Don't throw from a Stop command
				}
			}
			else {
				if (!HandleLoopData((const unsigned char*)data,len))
				{
					//error in data, try again...
					try {
						clearReadCallback();
						close();
						doClose();
						setErrorStatus(true);
					} catch(...)
					{
						//Don't throw from a Stop command
					}
				}
			}
			break;
		}
		//onRFXMessage((const unsigned char *)data,len);
	}
	catch (...)
	{

	}
}
开发者ID:G3ronim0,项目名称:domoticz,代码行数:56,代码来源:DavisLoggerSerial.cpp


示例3: doClose

bool BaseFile::close()
{
	m_clearMode = Close;
	if(!clear()) return false;
	doClose();
    return true;
}
开发者ID:spinos,项目名称:aphid,代码行数:7,代码来源:BaseFile.cpp


示例4: doClose

void UninstallForm::onButtonClicked(wxCommandEvent &event)
{
	if (m_butCancel->GetId() == event.GetId())
	{
		doClose();
	}
	else if (m_butUninstall->GetId() == event.GetId())
	{
		m_butCancel->Enable(false);
		m_butUninstall->Enable(false);
		m_butRepair->Enable(false);

		uint32 flags = 0;

		UDFSettingsPanel* settings = dynamic_cast<UDFSettingsPanel*>(m_pContent);

		if (settings)
			flags = settings->getFlags();

		m_pContent = new UDFProgressPanel(this, m_pUser, flags);

		m_bContentSizer->Clear(true);
		m_bContentSizer->Add(m_pContent, 1, wxEXPAND, 5);
		this->Layout();
	}
	else if (m_butRepair->GetId() == event.GetId())
	{
		UTIL::WIN::launchExe("desura.exe", "-forceupdate");
		SetExitCode(-1);
		GetParent()->Close();
	}
}
开发者ID:aromis,项目名称:desura-app,代码行数:32,代码来源:UninstallDesuraForm.cpp


示例5: throw

void
SocketBase::doConnect() throw(NetworkException)
{
    if ( state == CONFIGURED )
    {
        int res = connect(sockfd, addr.getSockaddr(), addr.getSockaddrLen());
        if(res == SOCKET_ERROR)
        {
            lastError = GET_NET_ERROR();
            if ( !IS_CONNECT_INPROGRESS(lastError) )
            {
                doClose();
                std::stringstream msg;
                msg << "Couldn't connect to '" << addr.getIP() << "' port "
                    << addr.getPort() << ": " << NETSTRERROR(lastError);
                throw NetworkException(msg.str());
            }
        }
        state = CONNECTING;
        disconnectTimer.reset();
        SocketManager::addSocket(this);
    }
    else
    {
        LOGGER.warning("Trying to connect to an unconfigured socket [%s]", getStateString());
    }
}
开发者ID:BackupTheBerlios,项目名称:netpanzer-svn,代码行数:27,代码来源:SocketBase.cpp


示例6: Java_java_nio_channels_SocketChannel_natCloseSocket

extern "C" JNIEXPORT void JNICALL
Java_java_nio_channels_SocketChannel_natCloseSocket(JNIEnv *,
						    jclass,
						    jint socket)
{
  doClose(socket);
}
开发者ID:alexeyshurygin,项目名称:avian,代码行数:7,代码来源:java-nio.cpp


示例7: esp8266_callback_connectCB_outbound

/**
 * Callback function registered to the ESP8266 environment that is
 * invoked when a new outbound connection has been formed.
 */
static void esp8266_callback_connectCB_outbound(
		void *arg //!< A pointer to a `struct espconn`.
	) {
	os_printf(">> connectCB_outbound\n");
	struct espconn *pEspconn = (struct espconn *)arg;
	assert(pEspconn != NULL);

	dumpEspConn(pEspconn);

	struct socketData *pSocketData = (struct socketData *)pEspconn->reverse;
	assert(pSocketData != NULL);

	esp8266_dumpSocket(pSocketData->socketId);

	// Flag the socket as connected to a partner.
	pSocketData->isConnected = true;

	assert(pSocketData->state == SOCKET_STATE_CONNECTING);
	if (pSocketData->shouldClose) {
		doClose(pSocketData->socketId);
	} else {
		pSocketData->state = SOCKET_STATE_IDLE;
	}
	os_printf("<< connectCB_outbound\n");
}
开发者ID:impressiver,项目名称:Espruino,代码行数:29,代码来源:network_esp8266.c


示例8: net_ESP8266_BOARD_closeSocket

/**
 * Close a socket.
 */
void net_ESP8266_BOARD_closeSocket(
		JsNetwork *net, //!< The Network we are going to use to create the socket.
		int socketId    //!< The socket to be closed.
	) {
	os_printf("> net_ESP8266_BOARD_closeSocket, socket=%d\n", socketId);

	struct socketData *pSocketData = getSocketData(socketId);

	assert(pSocketData != NULL);
	assert(pSocketData->state != SOCKET_STATE_UNUSED);  // Shouldn't be closing an unused socket.

	dumpEspConn(pSocketData->pEspconn);
	esp8266_dumpSocket(socketId);

	// How we close the socket is a function of what kind of socket it is.
	if (pSocketData->creationType == SOCKET_CREATED_SERVER) {
		int rc = espconn_delete(pSocketData->pEspconn);
		if (rc != 0) {
			os_printf("espconn_delete: rc=%d\n", rc);
		}
	} // End this is a server socket
	else
	{
		if (pSocketData->state == SOCKET_STATE_IDLE || pSocketData->state == SOCKET_STATE_CLOSING) {
			doClose(socketId);
		} else {
			pSocketData->shouldClose = true;
		}
	} // End this is a client socket
}
开发者ID:impressiver,项目名称:Espruino,代码行数:33,代码来源:network_esp8266.c


示例9: l

void AsyncSerial::writeEnd(const boost::system::error_code& error)
{
    if(!error)
    {
        boost::lock_guard<boost::mutex> l(pimpl->writeQueueMutex);
        if(pimpl->writeQueue.empty())
        {
            pimpl->writeBuffer.reset();
            pimpl->writeBufferSize=0;
            sleep_milliseconds(75);
            return;
        }
        pimpl->writeBufferSize=pimpl->writeQueue.size();
        pimpl->writeBuffer.reset(new char[pimpl->writeQueue.size()]);
        copy(pimpl->writeQueue.begin(),pimpl->writeQueue.end(),
                pimpl->writeBuffer.get());
        pimpl->writeQueue.clear();
        async_write(pimpl->port,boost::asio::buffer(pimpl->writeBuffer.get(),
                pimpl->writeBufferSize),
                boost::bind(&AsyncSerial::writeEnd, this, boost::asio::placeholders::error));
    } else {
		try
		{
			setErrorStatus(true);
			doClose();
		}
		catch (...)
		{
			
		}
    }
}
开发者ID:AbsolutK,项目名称:domoticz,代码行数:32,代码来源:ASyncSerial.cpp


示例10: doClose

void
TcpHandler::watchdogTimeout(const boost::system::error_code& error)
{
    if (error != boost::asio::error::operation_aborted) {
	doClose(error);
    }
}
开发者ID:kamawero,项目名称:ems-collector,代码行数:7,代码来源:TcpHandler.cpp


示例11: Java_java_nio_channels_DatagramChannel_close

extern "C" JNIEXPORT void JNICALL
Java_java_nio_channels_DatagramChannel_close(JNIEnv *,
                                             jclass,
                                             jint socket)
{
  doClose(socket);
}
开发者ID:alexeyshurygin,项目名称:avian,代码行数:7,代码来源:java-nio.cpp


示例12: connect

/* 初始化相应的信号与槽 */
void TextEditer::initConnection()
{
	/* menuFile里的信号与槽 */
	connect(actNew, SIGNAL(triggered()), this, SLOT(doNew()));
	connect(actOpen, SIGNAL(triggered()), this, SLOT(doOpen()));
	connect(actClose, SIGNAL(triggered()), this, SLOT(doClose()));
	connect(actSave, SIGNAL(triggered()), this, SLOT(doSave()));
	connect(actASave, SIGNAL(triggered()), this, SLOT(doASave()));
	connect(actExit, SIGNAL(triggered()), this, SLOT(doExit()));

	/* menuEdit里的信号与槽 */
	connect(actUndo, SIGNAL(triggered()), this, SLOT(doUndo()));
	connect(actRedo, SIGNAL(triggered()), this, SLOT(doRedo()));
	connect(actCut, SIGNAL(triggered()), this, SLOT(doCut()));
	connect(actCopy, SIGNAL(triggered()), this, SLOT(doCopy()));
	connect(actPast, SIGNAL(triggered()), this, SLOT(doPast()));
	connect(actAll, SIGNAL(triggered()), this, SLOT(doSelectAll()));

	/* menuTool里的信号与槽 */
	connect(actFont, SIGNAL(triggered()), this, SLOT(setFontForText()));

	/* 当当前文本内容改变后, 自动调用doModified() */
	connect(textEdit->document(), SIGNAL(contentsChanged()),
				this, SLOT(doModified()));

	/* 当文档修改后, 刷新光标所在的位置 */
	connect(textEdit->document(), SIGNAL(contentsChanged()),
			this, SLOT(doCursorChanged()));
}
开发者ID:chenpoyang,项目名称:TextEditor,代码行数:30,代码来源:textediter.cpp


示例13: QFrame

SketchMainHelpPrivate::SketchMainHelpPrivate (
		const QString &viewString,
		const QString &htmlText,
		SketchMainHelp *parent)
	: QFrame()
{
	setObjectName("sketchMainHelp"+viewString);
	m_parent = parent;

	QFrame *main = new QFrame(this);
	QHBoxLayout *mainLayout = new QHBoxLayout(main);

	QLabel *imageLabel = new QLabel(this);
	QLabel *imageLabelAux = new QLabel(imageLabel);
	imageLabelAux->setObjectName(QString("inviewHelpImage%1").arg(viewString));
	QPixmap pixmap(QString(":/resources/images/helpImage%1.png").arg(viewString));
	imageLabelAux->setPixmap(pixmap);
	imageLabel->setFixedWidth(pixmap.width());
	imageLabel->setFixedHeight(pixmap.height());
	imageLabelAux->setFixedWidth(pixmap.width());
	imageLabelAux->setFixedHeight(pixmap.height());

	ExpandingLabel *textLabel = new ExpandingLabel(this);
	textLabel->setLabelText(htmlText);
	textLabel->setFixedWidth(430 - 41 - pixmap.width());
	textLabel->allTextVisible();
	setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
	textLabel->setToolTip("");
	textLabel->setAlignment(Qt::AlignLeft);

	mainLayout->setSpacing(6);
	mainLayout->setMargin(2);
	mainLayout->addWidget(imageLabel);
	mainLayout->addWidget(textLabel);
	setFixedWidth(430);

	QVBoxLayout *layout = new QVBoxLayout(this);
	m_closeButton = new SketchMainHelpCloseButton(viewString,this);
	connect(m_closeButton, SIGNAL(clicked()), this, SLOT(doClose()));

	QFrame *bottomMargin = new QFrame(this);
	bottomMargin->setFixedHeight(m_closeButton->height());

	layout->addWidget(m_closeButton);
	layout->addWidget(main);
	layout->addWidget(bottomMargin);

	layout->setSpacing(0);
	layout->setMargin(2);

	m_shouldGetTransparent = false;
	//m_closeButton->doHide();

	QFile styleSheet(":/resources/styles/inviewhelp.qss");
    if (!styleSheet.open(QIODevice::ReadOnly)) {
		qWarning("Unable to open :/resources/styles/inviewhelp.qss");
	} else {
		setStyleSheet(styleSheet.readAll());
	}
}
开发者ID:h4ck3rm1k3,项目名称:fritzing,代码行数:60,代码来源:sketchmainhelp.cpp


示例14: Q_D

void Q3TitleBar::mouseReleaseEvent(QMouseEvent *e)
{
    Q_D(Q3TitleBar);
    if (e->button() == Qt::LeftButton && d->pressed) {
        e->accept();
        QStyleOptionTitleBar opt = d->getStyleOption();
        QStyle::SubControl ctrl = style()->hitTestComplexControl(QStyle::CC_TitleBar, &opt,
                                                                 e->pos(), this);
        d->pressed = false;
        if (ctrl == d->buttonDown) {
            d->buttonDown = QStyle::SC_None;
            repaint();
            switch(ctrl) {
            case QStyle::SC_TitleBarShadeButton:
            case QStyle::SC_TitleBarUnshadeButton:
                if(d->flags & Qt::WindowShadeButtonHint)
                    emit doShade();
                break;

            case QStyle::SC_TitleBarNormalButton:
                if(d->flags & Qt::WindowMaximizeButtonHint)
                    emit doNormal();
                break;

            case QStyle::SC_TitleBarMinButton:
                if(d->flags & Qt::WindowMinimizeButtonHint) {
                    if (d->window && d->window->isMinimized())
                        emit doNormal();
                    else
                        emit doMinimize();
                }
                break;

            case QStyle::SC_TitleBarMaxButton:
                if(d->flags & Qt::WindowMaximizeButtonHint) {
                    if(d->window && d->window->isMaximized())
                        emit doNormal();
                    else
                        emit doMaximize();
                }
                break;

            case QStyle::SC_TitleBarCloseButton:
                if(d->flags & Qt::WindowSystemMenuHint) {
                    d->buttonDown = QStyle::SC_None;
                    repaint();
                    emit doClose();
                    return;
                }
                break;

            default:
                break;
            }
        }
    } else {
        e->ignore();
    }
}
开发者ID:husninazer,项目名称:qt,代码行数:59,代码来源:q3titlebar.cpp


示例15: doClose

void File::close()
{
  if (isOpen())
  {
    m_opened = false;
    doClose();
  }
}
开发者ID:susu,项目名称:papyrus-war,代码行数:8,代码来源:File.cpp


示例16: doClose

void IModule::Close()
{
  if (m_isinit)
  {
    doClose();
    m_isinit = false;
  }  
}
开发者ID:Jeky-v,项目名称:Snake,代码行数:8,代码来源:IModule.cpp


示例17: doClose

void AbstractFont::close() {
    if(isOpened()) {
        doClose();
        _size = 0.0f;
        _lineHeight = 0.0f;
        CORRADE_INTERNAL_ASSERT(!isOpened());
    }
}
开发者ID:DYSEQTA,项目名称:magnum,代码行数:8,代码来源:AbstractFont.cpp


示例18: selected

void E1Popup::mouseReleaseEvent(QMouseEvent *)
{
    if(-1 != m_selected) {
        emit selected(m_selected);
        update();
        QTimer::singleShot(100, this, SLOT(doClose()));
    }
}
开发者ID:Camelek,项目名称:qtmoko,代码行数:8,代码来源:e1_popup.cpp


示例19: doClose

DecoderIOFactoryUrl::~DecoderIOFactoryUrl(void)
{
    doClose();

    m_accessManager->deleteLater();

    if (m_input)
        delete m_input;
}
开发者ID:DocOnDev,项目名称:mythtv,代码行数:9,代码来源:decoderhandler.cpp


示例20: syncLock

void IndexReader::decRef() {
    SyncLock syncLock(this);
    BOOST_ASSERT(refCount > 0);
    ensureOpen();
    if (refCount == 1) {
        commit();
        doClose();
    }
    --refCount;
}
开发者ID:304471720,项目名称:LucenePlusPlus,代码行数:10,代码来源:IndexReader.cpp



注:本文中的doClose函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ doOpen函数代码示例发布时间:2022-05-30
下一篇:
C++ doCast函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap