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

C++ Raise函数代码示例

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

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



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

示例1: destroy

		bool Connection::check () {
		
			if (mysql_ping(get())==0) return true;
			
			auto guard=AtExit([&] () {	destroy();	});
			
			auto code=mysql_errno(get());
			if (
				(code==CR_SERVER_GONE_ERROR) ||
				//	The documentation for mysql_ping
				//	explicitly says that it doesn't cause
				//	CR_SERVER_LOST:
				//
				//	http://dev.mysql.com/doc/refman/5.7/en/mysql-ping.html
				//
				//	However, if you manually close all
				//	this data provider's connections on
				//	the server, and then watch as this
				//	function executes in the debugger,
				//	you'll discover that mysql_ping
				//	absolutely does cause CR_SERVER_LOST.
				(code==CR_SERVER_LOST)
			) return false;
			
			Raise();
		
		}
开发者ID:HalfDemon,项目名称:MCPP,代码行数:27,代码来源:connection.cpp


示例2: wxDynamicCast

void XYDialog::OnDrawChange(wxCommandEvent &event) {
	DrawInfo **draw;
	wxButton *button;

	int i = event.GetId() - XY_XAXIS_BUTTON;
	draw = &m_di[i];

	button = wxDynamicCast(FindWindowById(event.GetId()), wxButton);

	if (m_draw_search->ShowModal() == wxID_CANCEL)
		return;
#ifdef __WXMSW__
	//hilarious...
	Raise();
#endif

	long previous = -1;
	DrawInfo *choosen = m_draw_search->GetDrawInfo(&previous);
	if (choosen == NULL)
		return;
	
	*draw = choosen;
	button->SetLabel(choosen->GetName());

}
开发者ID:cyclefusion,项目名称:szarp,代码行数:25,代码来源:xydiag.cpp


示例3: GetFootprintViewerFrame

void CVPCB_MAINFRAME::CreateScreenCmp()
{
    DISPLAY_FOOTPRINTS_FRAME* fpframe = GetFootprintViewerFrame();

    if( !fpframe )
    {
        fpframe = new DISPLAY_FOOTPRINTS_FRAME( &Kiway(), this );
        fpframe->Show( true );
    }
    else
    {
        if( fpframe->IsIconized() )
             fpframe->Iconize( false );

        // The display footprint window might be buried under some other
        // windows, so CreateScreenCmp() on an existing window would not
        // show any difference, leaving the user confused.
        // So we want to put it to front, second after our CVPCB_MAINFRAME.
        // We do this by a little dance of bringing it to front then the main
        // frame back.
        fpframe->Raise();   // Make sure that is visible.
        Raise();            // .. but still we want the focus.
    }

    fpframe->InitDisplay();
}
开发者ID:RocFan,项目名称:kicad-source-mirror,代码行数:26,代码来源:cvpcb_mainframe.cpp


示例4: NyquistEffect

void NyqBench::OnGo(wxCommandEvent & e)
{
   // No need to delete...EffectManager will do it
   mEffect = new NyquistEffect(wxT("Nyquist Effect Workbench"));
   const PluginID & ID = EffectManager::Get().RegisterEffect(mEffect);

   mEffect->SetCommand(mScript->GetValue());
   mEffect->RedirectOutput();

   AudacityProject *p = GetActiveProject();
   wxASSERT(p != NULL);

   if (p) {
      wxWindowDisabler disable(this);
      NyqRedirector redir((NyqTextCtrl *)mOutput);

      mRunning = true;
      UpdateWindowUI();

      p->DoEffect(ID, CommandContext(*p), 0);

      mRunning = false;
      UpdateWindowUI();
   }

   Raise();

   EffectManager::Get().UnregisterEffect(ID);
}
开发者ID:finefin,项目名称:audacity,代码行数:29,代码来源:NyqBench.cpp


示例5: LoadFileInResource

void Data::decompress(int FileID_) {
#ifdef _WIN32
	DWORD size = 0;
#else /*_WIN32*/
	size_t size = 0;
#endif /*_WIN32*/
	const uint8_t* compressedBuf = nullptr;
	int result;
	LoadFileInResource(FileID_, LZMA_STREAM, size, compressedBuf);
	assert(size > 13);
	uint8_t* compressedData = (uint8_t *)malloc(size+1);
	memcpy(compressedData, compressedBuf, size);
	compressedData[size] = 0;
	decompressedSize = *((size_t *)(compressedData+5));
	DecompressedData = (uint8_t *)malloc(decompressedSize);
	result = LzmaUncompress(DecompressedData, &decompressedSize,
		(const uint8_t *)(compressedData+13),
		(SizeT *)&size, (const uint8_t *)compressedData, 5);
	free(compressedData); compressedData = nullptr;
	if (result != SZ_OK) {
		CodeConv::tostringstream o;
		o << _T("LZMAストリームのデコードに失敗しました。ファイルが壊れている虞があります。") <<
			_T("エラーコード: ") << result;
		Raise(EXCEPTION_MJCORE_DECOMPRESSION_FAILURE, o.str().c_str());
	}
	else {
		info(_T("LZMAストリームをデコードしました。"));
	}
	return;
}
开发者ID:wheein,项目名称:MiHaJong,代码行数:30,代码来源:decomp.cpp


示例6: tc3DWindow2

tcGameOutcomePopup::tcGameOutcomePopup(const wxPoint& pos, const wxSize& size)
            : tc3DWindow2(parent, pos, size, "GameOutcome", parent)
{
    SetBaseRenderBin(parent->GetBaseRenderBin() + 10);
    Raise();
    birthCount = tcTime::Get()->Get30HzCount();

    SetBorderDraw(true);

    int w = 70;
    int h = 15;
    int x = (size.GetWidth() - w) / 2;
    int y = size.GetHeight() - 25;
    tcButton* exitButton = new tcButton(this, wxPoint(x - w, y), wxSize(w, h), "XBUTTON");
    exitButton->SetCaption("EXIT GAME");
    exitButton->SetFontSize(fontSize + 2.0f);
    exitButton->SetOffColor(Vec4(0.2f, 0.2f, 0.2f, 0.5f));
    exitButton->SetOverColor(Vec4(0.25f, 0.25f, 0.25f, 0.5f));
    exitButton->SetCommand(86);

    tcButton* continueButton = new tcButton(this, wxPoint(x + w, y), wxSize(w, h), "XBUTTON");
    continueButton->SetCaption("PLAY ON");
    continueButton->SetFontSize(fontSize + 2.0f);
    continueButton->SetOffColor(Vec4(0.2f, 0.2f, 0.2f, 0.5f));
    continueButton->SetOverColor(Vec4(0.25f, 0.25f, 0.25f, 0.5f));
    continueButton->SetCommand(123);

}
开发者ID:WarfareCode,项目名称:gcblue,代码行数:28,代码来源:tcGameOutcomePopup.cpp


示例7: Iconize

void wxZRColaFrame::OnTaskbarIconClick(wxTaskBarIconEvent& event)
{
    Iconize(false);
    Show(true);
    Raise();

    event.Skip();
}
开发者ID:Amebis,项目名称:ZRCola,代码行数:8,代码来源:zrcolafrm.cpp


示例8: Raise

void Console::UnsetHandler () {

    if (!SetConsoleCtrlHandler(
                handler_impl,
                false
            )) Raise();

}
开发者ID:andrewphorn,项目名称:MCPP,代码行数:8,代码来源:console.cpp


示例9: main

int main(void)
{
	int m, n;
	while (scanf("%d%d", &m, &n) == 2) {
		printf("exp: %d\n", Raise(m, n));
	}
	return 0;
}
开发者ID:guoqunabc,项目名称:C-Cplusplus,代码行数:8,代码来源:raise.c


示例10: wxFileDialog

void ABoxDlg::onSelectFile( wxCommandEvent& event ) {
  wxFileDialog* fdlg = new wxFileDialog(this);
  if( fdlg->ShowModal() == wxID_OK ) {
    m_Filename->SetValue(fdlg->GetPath());
  }
  fdlg->Destroy();
  Raise();
}
开发者ID:pmansvelder,项目名称:Rocrail,代码行数:8,代码来源:aboxdlg.cpp


示例11: Raise

bool wxPopupWindow::Show( bool show )
{
    bool ret = wxWindowX11::Show( show );

    Raise();

    return ret;
}
开发者ID:LuaDist,项目名称:wxwidgets,代码行数:8,代码来源:popupwin.cpp


示例12: ConnectionFactoryCreate

Connection* ConnectionFactoryCreate(Connection* factory, Address* address, aio4c_socket_t socket) {
    ErrorCode code = AIO4C_ERROR_CODE_INITIALIZER;
    Connection* connection = NULL;
    void* data = NULL;

    connection = NewConnection(factory->pool, address, true);

    connection->socket = socket;

#ifndef AIO4C_WIN32
    if (fcntl(connection->socket, F_SETFL, O_NONBLOCK) == -1) {
        code.error = errno;
        code.connection = connection;
        Raise(AIO4C_LOG_LEVEL_ERROR, AIO4C_CONNECTION_ERROR_TYPE, AIO4C_FCNTL_ERROR, &code);
        shutdown(connection->socket, SHUT_RDWR);
        close(connection->socket);
#else /* AIO4C_WIN32 */
    unsigned long ioctl = 1;
    if (ioctlsocket(connection->socket, FIONBIO, &ioctl) != 0) {
        code.source = AIO4C_ERRNO_SOURCE_WSA;
        code.connection = connection;
        Raise(AIO4C_LOG_LEVEL_ERROR, AIO4C_CONNECTION_ERROR_TYPE, AIO4C_FCNTL_ERROR, &code);
        shutdown(connection->socket, SD_BOTH);
        closesocket(connection->socket);
#endif /* AIO4C_WIN32 */
        aio4c_free(connection);
        return NULL;
    }

    data = factory->dataFactory(connection, factory->dataFactoryArg);

    CopyEventQueue(connection->userHandlers, factory->userHandlers, data);
    CopyEventQueue(connection->systemHandlers, factory->systemHandlers, NULL);

    connection->closedBy[AIO4C_CONNECTION_OWNER_ACCEPTOR] = false;
    connection->closedBy[AIO4C_CONNECTION_OWNER_CLIENT] = true;

    return connection;
}

static void _ConnectionEventHandle(Connection* connection, Event event) {
    Log(AIO4C_LOG_LEVEL_DEBUG, "handling event %d for connection %s", event, connection->string);
    EventHandle(connection->systemHandlers, event, (EventSource)connection);
    EventHandle(connection->userHandlers, event, (EventSource)connection);
}
开发者ID:blakawk,项目名称:Aio4c,代码行数:45,代码来源:connection.c


示例13: get

		void Connection::set (enum mysql_option option, const T & arg) {
		
			if (mysql_options(
				get(),
				option,
				&arg
			)!=0) Raise();
		
		}
开发者ID:HalfDemon,项目名称:MCPP,代码行数:9,代码来源:connection.cpp


示例14: UpdateInterface

 // Updates the controller block interface with this interface_version information
 void UpdateInterface()
 {
     // Nothing here, no interface updating exists yet
     // I hope this doesn't get needed at all :)
     // Here we should update the controller block interface to a newer version to the current in use
     // Maybe we'll not even need to reallocate some memory because CBM_DATA_SIZE is big enought, check data_size
     
     Raise();    // Raise an error, this should never be called for now
 }
开发者ID:MasterHK,项目名称:plugin-sdk,代码行数:10,代码来源:shared.hpp


示例15: do_output

inline void Console::do_output (ConsoleScreenBuffer & buffer) {

    //	The strings to write
    Vector<String> write;
    //	Whether or not we must
    //	lead with a clear
    bool clear=false;

    lock.Execute([&] () mutable {

        for (auto & str : queue) {

            if (str.IsNull()) {

                //	Clear

                clear=true;

                //	Don't even bother
                //	writing out these
                //	lines, they'll just
                //	get immediately cleared
                //	anyway
                write.Clear();

            } else {

                //	A string to write

                write.EmplaceBack(
                    std::move(*str)
                );

            }

        }

        //	We've dequeued everything,
        //	clear the queue
        queue.Clear();

        //	Wake waiting threads
        wait.WakeAll();

        //	Reset event so we don't
        //	loop infinitely
        if (!ResetEvent(queued)) Raise();

    });

    //	Clear console if necessary
    if (clear) buffer.Clear();

    //	Write strings
    buffer.WriteLines(std::move(write));

}
开发者ID:andrewphorn,项目名称:MCPP,代码行数:57,代码来源:console.cpp


示例16: NewWorker

Worker* NewWorker(char* pipeName, aio4c_size_t bufferSize) {
    Worker* worker = NULL;
    ErrorCode code = AIO4C_ERROR_CODE_INITIALIZER;

    if ((worker = aio4c_malloc(sizeof(Worker))) == NULL) {
#ifndef AIO4C_WIN32
        code.error = errno;
#else /* AIO4C_WIN32 */
        code.source = AIO4C_ERRNO_SOURCE_SYS;
#endif /* AIO4C_WIN32 */
        code.size = sizeof(Worker);
        code.type = "Worker";
        Raise(AIO4C_LOG_LEVEL_ERROR, AIO4C_ALLOC_ERROR_TYPE, AIO4C_ALLOC_ERROR, &code);
        return NULL;
    }

    worker->queue      = NULL;
    worker->pool       = NULL;
    worker->writer     = NULL;
    worker->bufferSize = bufferSize;

    if (pipeName != NULL) {
        worker->pipe       = pipeName;
        worker->name       = aio4c_malloc(strlen(pipeName) + 1 + 7);
        if (worker->name != NULL) {
            snprintf(worker->name, strlen(pipeName) + 1 + 7, "%s-worker", pipeName);
        }
    } else {
        worker->pipe = NULL;
        worker->name = NULL;
    }

    worker->thread = NewThread(
            worker->name,
            _WorkerInit,
            _WorkerRun,
            _WorkerExit,
            (ThreadData)worker);

    if (worker->thread == NULL) {
        if (worker->name != NULL) {
            aio4c_free(worker->name);
        }
        aio4c_free(worker);
        return NULL;
    }

    if (!ThreadStart(worker->thread)) {
        if (worker->name != NULL) {
            aio4c_free(worker->name);
        }
        aio4c_free(worker);
        return NULL;
    }

    return worker;
}
开发者ID:blakawk,项目名称:Aio4c,代码行数:57,代码来源:worker.c


示例17: Raise

		void CompletionPort::Post () {
		
			if (!PostQueuedCompletionStatus(
				iocp,
				0,
				0,
				nullptr
			)) Raise();
		
		}
开发者ID:HalfDemon,项目名称:MCPP,代码行数:10,代码来源:iocp.cpp


示例18: tc3DWindow2

tcAircraftInfoPopup::tcAircraftInfoPopup(long platformId, const wxPoint& pos, const wxSize& size)
            : tc3DWindow2(parent, pos, size, "AircraftInfo", parent),
              id(platformId)
{
    SetBaseRenderBin(parent->GetBaseRenderBin() + 10);
    Raise();
    birthCount = tcTime::Get()->Get30HzCount();

    SetBorderDraw(true);
}
开发者ID:WarfareCode,项目名称:gcblue,代码行数:10,代码来源:tcAircraftInfoPopup.cpp


示例19: get_std_handle

static inline HANDLE get_std_handle (DWORD handle) {

    HANDLE retr=GetStdHandle(handle);

    //	Failure
    if (retr==INVALID_HANDLE_VALUE) Raise();
    //	Handle does not exist/is unavailable
    if (retr==nullptr) throw std::runtime_error(std_unavail);

    return retr;

}
开发者ID:andrewphorn,项目名称:MCPP,代码行数:12,代码来源:console.cpp


示例20: defined

void WXAppBar::OnMove( wxMoveEvent& event )
{
#if defined(__WXMSW__)
	SetSize(m_X, m_Y, m_Width, m_Height, 0);
	Raise ();
#endif
	wxPoint p= event.GetPosition();
	
//	printf ("onMove: %d, %d, orig: %d, %d\n", p.x, p.y, m_X, m_Y);
//	wxDialog::OnMove (event);
	event.Skip();
}
开发者ID:rkvsraman,项目名称:eviacam,代码行数:12,代码来源:wxappbar.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ RaiseError函数代码示例发布时间:2022-05-30
下一篇:
C++ RageColor函数代码示例发布时间: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