本文整理汇总了C++中DoCleanup函数的典型用法代码示例。如果您正苦于以下问题:C++ DoCleanup函数的具体用法?C++ DoCleanup怎么用?C++ DoCleanup使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了DoCleanup函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DrawPolygon
void DrawPolygon(clipper::Polygons &pgs)
{
glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
GLUtesselator* tess = gluNewTess();
gluTessCallback(tess, GLU_TESS_BEGIN, (void (CALLBACK*)())&BeginCallback);
gluTessCallback(tess, GLU_TESS_VERTEX, (void (CALLBACK*)())&VertexCallback);
gluTessCallback(tess, GLU_TESS_END, (void (CALLBACK*)())&EndCallback);
gluTessCallback(tess, GLU_TESS_COMBINE, (void (CALLBACK*)())&CombineCallback);
gluTessCallback(tess, GLU_TESS_ERROR, (void (CALLBACK*)())&ErrorCallback);
gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO);
gluTessProperty(tess, GLU_TESS_BOUNDARY_ONLY, GL_FALSE);
gluTessBeginPolygon(tess, NULL);
for (clipper::Polygons::size_type i = 0; i < pgs.size(); ++i)
{
gluTessBeginContour(tess);
for (clipper::Polygon::size_type j = 0; j < pgs[i].size(); ++j)
{
GLdouble *vert = new GLdouble[3];
vert[0] = (GLdouble)pgs[i][j].X;
vert[1] = (GLdouble)pgs[i][j].Y;
vert[2] = 0;
AddToCleanup(vert);
gluTessVertex(tess, vert, vert);
}
gluTessEndContour(tess);
}
gluTessEndPolygon(tess);
DoCleanup();
glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
glLineWidth(1.2f);
gluTessProperty(tess, GLU_TESS_BOUNDARY_ONLY, GL_TRUE); //GL_FALSE
gluTessBeginPolygon(tess, NULL);
for (clipper::Polygons::size_type i = 0; i < pgs.size(); ++i)
{
gluTessBeginContour(tess);
for (clipper::Polygon::size_type j = 0; j < pgs[i].size(); ++j)
{
GLdouble *vert = new GLdouble[3];
vert[0] = (GLdouble)pgs[i][j].X;
vert[1] = (GLdouble)pgs[i][j].Y;
vert[2] = 0;
AddToCleanup(vert);
gluTessVertex(tess, vert, vert);
}
gluTessEndContour(tess);
}
gluTessEndPolygon(tess);
//final cleanup ...
gluDeleteTess(tess);
DoCleanup();
}
示例2: DoCleanup
CT_EntryData::~CT_EntryData()
/**
* Destructor.
*/
{
DoCleanup();
}
示例3: send_job
send_job( V2_PROC *proc, char *host )
#endif
{
int reason, retval, sd1, sd2;
dprintf( D_FULLDEBUG, "Shadow: Entering send_job()\n" );
/* starter 0 - Regular starter */
/* starter 1 - PVM starter */
retval = part_send_job(0, host, reason, GlobalCap, schedd, proc, sd1, sd2, NULL);
if (retval == -1) {
DoCleanup();
dprintf( D_ALWAYS, "********** Shadow Exiting(%d) **********\n",
reason);
exit( reason );
}
if( sd1 != RSC_SOCK ) {
ASSERT(dup2(sd1, RSC_SOCK) >= 0);
(void)close(sd1);
}
dprintf( D_ALWAYS, "Shadow: RSC_SOCK connected, fd = %d\n", RSC_SOCK );
if( sd2 != CLIENT_LOG ) {
ASSERT(dup2(sd2, CLIENT_LOG) >= 0);
(void)close(sd2);
}
dprintf( D_ALWAYS, "Shadow: CLIENT_LOG connected, fd = %d\n", CLIENT_LOG );
sock_RSC1 = RSC_ShadowInit( RSC_SOCK, CLIENT_LOG );
}
示例4: CHECK_CONDITION
void ZoomNavigator::DoUpdate()
{
// sanity tests
CHECK_CONDITION(m_enabled);
CHECK_CONDITION(!m_mgr->IsShutdownInProgress());
IEditor* curEditor = m_mgr->GetActiveEditor();
if(!curEditor && !m_text->IsEmpty()) {
DoCleanup();
}
CHECK_CONDITION(curEditor);
wxStyledTextCtrl* stc = curEditor->GetCtrl();
CHECK_CONDITION(stc);
if(curEditor->GetFileName().GetFullPath() != m_curfile) {
SetEditorText(curEditor);
}
int first = stc->GetFirstVisibleLine();
int last = stc->LinesOnScreen() + first;
if(m_markerFirstLine != first || m_markerLastLine != last) {
PatchUpHighlights(first, last);
SetZoomTextScrollPosToMiddle(stc);
}
}
示例5: tesselate
void tesselate(const std::vector<std::vector<Point2f> >& pgs, bool evenodd = true)
{
GLUtesselator* tess = internal_gluNewTess();
internal_gluTessCallback(tess, GLU_TESS_BEGIN_DATA, (void (*)())&BeginCallback_s);
internal_gluTessCallback(tess, GLU_TESS_VERTEX_DATA, (void (*)())&VertexCallback_s);
internal_gluTessCallback(tess, GLU_TESS_END_DATA, (void (*)())&EndCallback_s);
internal_gluTessCallback(tess, GLU_TESS_COMBINE_DATA, (void (*)())&CombineCallback_s);
internal_gluTessCallback(tess, GLU_TESS_ERROR_DATA, (void (*)())&ErrorCallback_s);
internal_gluTessCallback(tess, GLU_TESS_EDGE_FLAG_DATA, (void (*)())&EdgeCallback_s);
if (evenodd)
internal_gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_ODD); else
internal_gluTessProperty(tess, GLU_TESS_WINDING_RULE, GLU_TESS_WINDING_NONZERO);
internal_gluTessProperty(tess, GLU_TESS_BOUNDARY_ONLY, 0); //GL_FALSE
internal_gluTessBeginPolygon(tess, this);
for (std::size_t i = 0; i < pgs.size(); ++i)
{
internal_gluTessBeginContour(tess);
for (std::size_t j = 0; j < pgs[i].size(); ++j)
{
GLdouble *vert = new GLdouble[3];
vert[0] = (GLdouble)pgs[i][j].x;
vert[1] = (GLdouble)pgs[i][j].y;
vert[2] = 0;
AddToCleanup(vert);
internal_gluTessVertex(tess, vert, vert);
}
internal_gluTessEndContour(tess);
}
internal_gluTessEndPolygon(tess);
DoCleanup();
internal_gluDeleteTess(tess);
}
示例6: DestroyUI
void LLDBPlugin::OnLLDBExited(LLDBEvent& event)
{
event.Skip();
m_connector.SetGoingDown(true);
// Stop the debugger ( do not notify about it, since we are in the handler...)
m_connector.Cleanup();
// Save current perspective before destroying the session
if(m_isPerspectiveLoaded) {
m_mgr->SavePerspective("LLDB-debugger");
// Restore the old perspective
m_mgr->LoadPerspective("Default");
m_isPerspectiveLoaded = false;
}
DestroyUI();
// Reset various state variables
DoCleanup();
CL_DEBUG("CODELITE>> LLDB exited");
// Also notify codelite's event
clDebugEvent e2(wxEVT_DEBUG_ENDED);
EventNotifier::Get()->AddPendingEvent(e2);
{
clDebugEvent e(wxEVT_DEBUG_ENDED);
EventNotifier::Get()->AddPendingEvent(e);
}
}
示例7: DoCleanup
void CT_EntryArrayData::DoCmdDelete()
/**
* Deletes TEntryArray class instance
*/
{
DoCleanup();
}
示例8: DoCleanup
void DbgGdb::OnProcessEnd( wxCommandEvent &e )
{
ProcessEventData *ped = ( ProcessEventData * )e.GetClientData();
delete ped;
DoCleanup();
m_observer->UpdateGotControl( DBG_EXITED_NORMALLY );
}
示例9: TerminateTerminal
bool LLDBPlugin::DoInitializeDebugger(clDebugEvent& event, bool redirectOutput, const wxString& terminalTitle)
{
if(event.GetDebuggerName() != LLDB_DEBUGGER_NAME) {
event.Skip();
return false;
}
if(m_connector.IsRunning()) {
// Another debug session is already in progress
::wxMessageBox(_("Another debug session is already in progress. Please stop it first"),
"CodeLite",
wxOK | wxCENTER | wxICON_WARNING);
return false;
}
TerminateTerminal();
// If terminal is required, launch it now
bool isWindows = wxPlatformInfo::Get().GetOperatingSystemId() & wxOS_WINDOWS;
if(redirectOutput && !isWindows) {
wxString realPts;
::LaunchTerminalForDebugger(
terminalTitle.IsEmpty() ? event.GetExecutableName() : terminalTitle, m_terminalTTY, realPts, m_terminalPID);
if(m_terminalPID != wxNOT_FOUND) {
CL_DEBUG("Successfully launched terminal");
} else {
// Failed to launch it...
DoCleanup();
::wxMessageBox(_("Failed to start terminal for debugger"), "CodeLite", wxICON_ERROR | wxOK | wxCENTER);
return false;
}
}
// Launch local server if needed
LLDBSettings settings;
settings.Load();
if(!settings.IsUsingRemoteProxy() && !m_connector.LaunchLocalDebugServer()) {
DoCleanup();
return false;
}
return true;
}
示例10: ConsoleCtrlHandler
// Handle CTRL+BREAK or CTRL+C events
BOOL ConsoleCtrlHandler(DWORD dwEvent)
{
UNREFERENCED_PARAMETER( dwEvent );
DoCleanup();
printf("Server terminated. Bye!\n");
return FALSE;
}
示例11: DoDeleteTempFile
void ClangDriver::OnTUCreateError(wxCommandEvent& e)
{
e.Skip();
ClangThreadReply* reply = reinterpret_cast<ClangThreadReply*>(e.GetClientData());
if(reply) {
DoDeleteTempFile(reply->filename);
wxDELETE(reply);
}
DoCleanup();
}
示例12: __ASSERT_DEBUG
// -----------------------------------------------------------------------------
// CSIPPrflStateBase::HandleError()
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CSIPPrflStateBase::HandleError(
MSIPProfileContext& aContext,
TInt aError,
CSIPPrflStateBase* aNextState)
{
__ASSERT_DEBUG(aContext.Profile()!=0, User::Invariant());
TUint32 contextId(0);
CSIPConcreteProfile& profile = DoCleanup(aContext,contextId);
aContext.SetNextState(*aNextState);
aContext.AgentObserver().SIPProfileErrorEvent(profile,aError);
}
示例13: send_vacate
/*
Connect to the startd on the remote host and gracefully vacate our
claim.
*/
void
send_vacate( char *host, char *capability )
{
if( send_cmd_to_startd( host, capability, DEACTIVATE_CLAIM ) < 0 ) {
dprintf( D_ALWAYS, "Shadow: Can't connect to condor_startd on %s\n",
host );
DoCleanup();
dprintf( D_ALWAYS, "********** Shadow Parent Exiting(%d) **********\n",
JOB_NOT_STARTED );
exit( JOB_NOT_STARTED );
}
}
示例14: ASSERT
/*****************************************************************
*
* method :void CEasyReport::Start(void)
*
* parameters : none
*
* returns :
*
* description: Start the report generation. Create all the fonts, etc
* Try and get the printer device context, If no printer is set up as
* the default printer on the system, create a screen device context.
*
****************************************************************/
void CEasyReport::Start()
{
ASSERT( m_PrinterDC == NULL );
DoCleanup();
// set up a print date ..
CTime aNow = CTime::GetCurrentTime();
m_ReportDate.Format("Date: %2d/%2d/%4d", aNow.GetMonth(), aNow.GetDay(), aNow.GetYear());
// NOTE: The following is most certainly not correct if there is
// no default printer defined ! If you do not have ANY printer, then
// you might install a Fax printer (eg Microsoft Fax or Bitware etc)
CPrintDialog aPD(false);
if(aPD.GetDefaults())
{
m_PrinterDC = aPD.m_pd.hDC;
}
else
{
m_PrinterDC = ::GetDC(NULL); // get the screen device context
}
//::SetMapMode(m_PrinterDC, MM_ANISOTROPIC);
//::SetWindowExtEx( m_PrinterDC, 254,254,NULL);
//::SetViewportExtEx(m_PrinterDC, GetDeviceCaps(m_PrinterDC,LOGPIXELSX),GetDeviceCaps(m_PrinterDC,LOGPIXELSY),NULL);
SetMapMode( m_PrinterDC, MM_LOMETRIC);
SetupTextStyles( m_PrinterDC );
m_DataTop = m_TopMargin;
m_PageCount = 0;
m_CurPage = 0;
CRect aRect;
// Write the report header...
if( m_ReportHdrHt > 0 )
{
aRect.SetRect(m_LeftMargin, m_TopMargin, m_PageWidth - m_RightMargin,m_TopMargin + m_ReportHdrHt );
aRect.bottom = aRect.top + m_ReportHdrHt;
WriteReportHeader(aRect);
m_DataTop += m_ReportHdrHt;
}
if( m_PageHdrHt > 0)
{
aRect.SetRect(m_LeftMargin, m_DataTop, m_PageWidth - m_RightMargin, m_DataTop + m_PageHdrHt);
WritePageHeader(aRect);
m_DataTop += m_PageHdrHt;
}
}
示例15: DoCleanup
void LLDBTooltip::Show(const wxString& displayName, LLDBVariable::Ptr_t variable)
{
DoCleanup();
wxTreeItemId item = m_treeCtrl->AddRoot(
variable->ToString(displayName), wxNOT_FOUND, wxNOT_FOUND, new LLDBVariableClientData(variable));
if(variable->HasChildren()) {
m_treeCtrl->AppendItem(item, "<dummy>");
}
Move(::wxGetMousePosition());
wxPopupWindow::Show();
m_treeCtrl->SetFocus();
}