当前位置: 首页>>代码示例>>C++>>正文


C++ DbgAssert函数代码示例

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


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

示例1: GenCOptions

void GenCOptions(               // PROCESS ALL OPTIONS
    char **argv )               // - command line vector
{
    auto OPT_STORAGE data;
    char* env_var;              // - environment var for compiler

    indirectionLevel = 0;
    InitModInfo();
    CmdLnCtxInit();
    CmdSysInit();
    OPT_INIT( &data );
    if( ! CompFlags.ignore_environment ) {
        CtxSetCurrContext( CTX_CMDLN_ENV );
        env_var = CmdSysEnvVar();
        CmdLnCtxPushEnv( env_var );
        procOptions( &data, CppGetEnv( env_var ) );
        CmdLnCtxPop();
    }
    CtxSetCurrContext( CTX_CMDLN_PGM );
    CmdLnCtxPush( CTX_CLTYPE_PGM );
    while( *argv != NULL ) {
        procOptions( &data, *argv );
        ++argv;
    }
    CmdLnCtxPop();
    CmdLnCtxFini();
    CtxSetCurrContext( CTX_CMDLN_VALID );
    analyseAnyTargetOptions( &data );
    CmdSysAnalyse( &data );
    postOptions();
    OPT_FINI( &data );
    MiscMacroDefs();
    DbgAssert( GblPackAmount == PackAmount );
    DbgAssert( GblPackAmount != 0 );
}
开发者ID:andreiw,项目名称:open-watcom-v2,代码行数:35,代码来源:cmdlnany.c

示例2: DbgAssert

HRESULT CMethodInfo::InitPropertyGet( ITypeInfo* pTypeInfo,	const VARDESC* pVarDesc )
{
	HRESULT hResult;
	CComBSTR bstrName;
	UINT nNames;

	DbgAssert( pTypeInfo != NULL );
	DbgAssert( pVarDesc != NULL );

	m_pIntTypeInfo = pTypeInfo;
	m_dispid = pVarDesc->memid;
	m_invkind = INVOKE_PROPERTYGET;
	m_readOnly = pVarDesc->wVarFlags&VARFLAG_FREADONLY;
	m_isHidden = pVarDesc->wVarFlags&(VARFLAG_FHIDDEN);
	m_tBindable = pVarDesc->wVarFlags&VARFLAG_FBINDABLE;
	m_tRequestEdit = pVarDesc->wVarFlags&FUNCFLAG_FREQUESTEDIT;

	hResult = pTypeInfo->GetNames( m_dispid, &bstrName, 1, &nNames );
	if( FAILED( hResult ) )
	{
		return( hResult );
	}
	DbgAssert( nNames == 1 );

	m_strName = TSTR::FromBSTR(bstrName);
	
	// get the return string
	const TYPEDESC* tdesc = &(pVarDesc->elemdescVar.tdesc);
	while (tdesc->vt == VT_PTR)
		tdesc = tdesc->lptdesc;
	GetTypeString(tdesc, m_strReturn, true, &m_spTypeInfo);

	return( S_OK );
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:34,代码来源:methinfo.cpp

示例3: DbgAssert

void TileCallback::post_render_tile(
    const asr::Frame*       frame,
    const size_t            tile_x,
    const size_t            tile_y)
{
    const asf::Image& image = frame->image();
    const asf::CanvasProperties& props = image.properties();

    DbgAssert(props.m_canvas_width == m_bitmap->Width());
    DbgAssert(props.m_canvas_height == m_bitmap->Height());
    DbgAssert(props.m_channel_count == 4);

    // Blit the tile to the destination bitmap.
    blit_tile(*frame, tile_x, tile_y);

    // Partially refresh the display window.
    const asf::Tile& tile = image.tile(tile_x, tile_y);
    const size_t x = tile_x * props.m_tile_width;
    const size_t y = tile_y * props.m_tile_height;
    RECT rect = make_rect(x, y, tile.get_width(), tile.get_height());
    m_bitmap->RefreshWindow(&rect);

    // Keep track of the number of rendered tiles.
    asf::atomic_inc(m_rendered_tile_count);
}
开发者ID:appleseedhq,项目名称:appleseed-max,代码行数:25,代码来源:tilecallback.cpp

示例4: GetParticleChannelMapWInterface

bool ParticleChannelMap::Append(IObject* channel)
{
	IParticleChannelMapW* iMap = GetParticleChannelMapWInterface(channel);
	DbgAssert(iMap);
	if (iMap == NULL) return false;

	IObject* iUVVert = iMap->GetUVVertChannel();
	IObject* iTVFace = iMap->GetTVFaceChannel();

	bool res1=true, res2=true;

	if (iUVVert != NULL) {
		if (chanUVVert() == NULL)
			_chanUVVert() = new ParticleChannelTabUVVert();
		DbgAssert(chanUVVert());
		if (chanUVVert() == NULL) return false;
		res1 = _chanUVVert()->Append(iUVVert);
	}

	if (iTVFace != NULL) {
		if (chanTVFace() == NULL)
			_chanTVFace() = new ParticleChannelTabTVFace();
		DbgAssert(chanTVFace());
		if (chanTVFace() == NULL) return false;
		res2 = _chanTVFace()->Append(iTVFace);
	}

	return (res1 && res2);
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:29,代码来源:ParticleChannelMap.cpp

示例5: DbgAssert

void SplineData::PasteToSelected(int splineIndex, int crossSectionIndex)
{
	if ((splineIndex < 0) || (splineIndex >= mSplineElementData.Count()))
	{
		DbgAssert(0);
		return;
	}
	int numCross = NumberOfCrossSections(splineIndex);
	if ((crossSectionIndex < 0) || (crossSectionIndex > numCross))
	{
		DbgAssert(0);
		return;
	}

	SplineCrossSection section = mSplineElementData[splineIndex]->GetCrossSection(crossSectionIndex);
	for (int i = 0; i < NumberOfSplines(); i++ )
	{
		if (IsSplineSelected(i))
		{
			for (int j = 0; j < NumberOfCrossSections(i); j++)
			{
				if (CrossSectionIsSelected(i,j))
				{
					SplineCrossSection *crossSection = GetCrossSection(i,j);
					crossSection->mScale = section.mScale;
					crossSection->mQuat = section.mQuat;
				}
			}
		}
	}
	RecomputeCrossSections();
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:32,代码来源:ToolSplineMapping_SplineData.cpp

示例6: SM_ASSERT

void SMBrushSculpt::StartStroke(int mode,BOOL cont, int subobj, const SMHit &hit)
{

  SM_ASSERT(m_stroking==FALSE);
  SM_ASSERT(subobj==SM_SO_VERTEX || subobj==SM_SO_EDGE || subobj==SM_SO_FACE);

  // undo/redo
  // create restore object
  DbgAssert(!m_actrestore);
  m_actrestore = new MeshVertRestore(m_SM->m_polyobj);

  // and make it active
  DbgAssert(!theHold.Holding());
  if (0 && theHold.Holding()) {
    theHold.Cancel();
  }
  theHold.Begin();

  if (theHold.Holding()){
    theHold.Put (m_actrestore);
  }

  // start the stroke
  m_stroking = TRUE;
  m_subobj = subobj;
}
开发者ID:pixeljetstream,项目名称:allesimfluss_maxplugin,代码行数:26,代码来源:brush_sculpt.cpp

示例7: DbgAssert

void SlaveControl::SetReference(int i, RefTargetHandle rtarg) 
   {
	DbgAssert( i >= 0);
	DbgAssert( i < NumRefs());
	if (i==0) 
		sub = (Control*) rtarg;
   else if (i==1) 
      {
      if ((rtarg == NULL) && (master))
         {
//tell the master that I am being removed
         int ct = blockID.Count();
         for (int i = 0; i < ct; i++)
            RemoveControl(0);
         }

      master = (MasterBlockControl*) rtarg;
		if (master == NULL) 
			masterPresent = FALSE;
		else 
			masterPresent = TRUE;
      }
	else
		DebugPrint(_T("set reference error occurred\n"));
   }
开发者ID:artemeliy,项目名称:inf4715,代码行数:25,代码来源:slave.cpp

示例8: DbgAssert

void mrShaderButtonHandler::OnCommand() {

	DbgAssert(m_dialogHWnd != NULL);

	// Add the filter
	IMtlBrowserFilter_Manager* filterManager = Get_IMtlBrowserFilter_Manager();
	if(filterManager != NULL) {
		filterManager->AddFilter(m_shaderFilter);
	}

	// Browse for a texmap
	BOOL newMat;
	BOOL cancel;
	MtlBase* mtlBase = GetCOREInterface()->DoMaterialBrowseDlg(m_dialogHWnd, (BROWSE_MAPSONLY | BROWSE_INCNONE), newMat, cancel);
	if(!cancel) {
		DbgAssert((mtlBase == NULL) || ((mtlBase->SuperClassID() == TEXMAP_CLASS_ID)));

		Texmap* texmap = static_cast<Texmap*>(mtlBase);
		SetShader(texmap);
	
		Update();
	}

	if(filterManager != NULL) {
		filterManager->RemoveFilter(m_shaderFilter);
	}
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:27,代码来源:mrShaderButtonHandler.cpp

示例9: DbgAssert

void mrTwoSidedShader::TranslateParameters(imrTranslation& translationInterface, imrShader* shader, TimeValue t, Interval& valid) {

	// The "map" parameters are translated using the shader connections.
	// The color parameters have already been translated by the automatic system
	if((shader != NULL) && (m_mainPB != NULL)) {

		BOOL frontMapOn;
		BOOL backMapOn;
		Texmap* frontMap;
		Texmap* backMap;
		AColor frontColor;
		AColor backColor;

		// Get the map values
		m_mainPB->GetValue(kMainPID_FrontColor, t, frontColor, valid);
		m_mainPB->GetValue(kMainPID_BackColor, t, backColor, valid);
		m_mainPB->GetValue(kMainPID_FrontMapOn, t, frontMapOn, valid);
		m_mainPB->GetValue(kMainPID_BackMapOn, t, backMapOn, valid);
		m_mainPB->GetValue(kMainPID_FrontMap, t, frontMap, valid);
		m_mainPB->GetValue(kMainPID_BackMap, t, backMap, valid);

		// Get the parameter blocks used to store the parameters
		IParamBlock2* parametersPB = shader->GetParametersParamBlock();
		IParamBlock2* connectionsPB = shader->GetConnectionsParamBlock();

		if((parametersPB != NULL) && (connectionsPB != NULL)) {
			ParamID paramID;

			// Translate the colors
			if(GetParamIDByName(paramID, _T("front"), parametersPB)) {
				parametersPB->SetValue(paramID, 0, frontColor);	// Value must be set at time 0, this is a restriction of the system.
			}
			if(GetParamIDByName(paramID, _T("back"), parametersPB)) {
				parametersPB->SetValue(paramID, 0, backColor);	// Value must be set at time 0, this is a restriction of the system.
			}

			// Set the shader connections. The shaders must be set before the "shader ON" flags
			// since setting a shader automatically turns the "ON" flag ON.
			if(GetParamIDByName(paramID, _T("front.shader"), connectionsPB)) {
				connectionsPB->SetValue(paramID, 0, frontMap);	// Value must be set at time 0, this is a restriction of the system.
			}
			if(GetParamIDByName(paramID, _T("back.shader"), connectionsPB)) {
				connectionsPB->SetValue(paramID, 0, backMap);	// Value must be set at time 0, this is a restriction of the system.
			}
			if(GetParamIDByName(paramID, _T("front.connected"), connectionsPB)) {
				connectionsPB->SetValue(paramID, 0, frontMapOn);	// Value must be set at time 0, this is a restriction of the system.
			}
			if(GetParamIDByName(paramID, _T("back.connected"), connectionsPB)) {
				connectionsPB->SetValue(paramID, 0, backMapOn);	// Value must be set at time 0, this is a restriction of the system.
			}
		}
		else {
			DbgAssert(false);
		}
	}
	else {
		DbgAssert(false);
	}
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:59,代码来源:mrTwoSidedShader.cpp

示例10: DbgAssert

void EditPolyData::ShrinkSelection (IMeshSelect *imod, int level) {
	DbgAssert (mpMesh);
	if( !mpMesh ) return;

	BitArray newSel;
	int mnSelLevel = meshSelLevel[level];
	DbgAssert (mpMesh->GetFlag (MN_MESH_FILLED_IN));
	if (!mpMesh->GetFlag (MN_MESH_FILLED_IN)) return;

	SynchBitArrays();

	switch (mnSelLevel) {
	case MNM_SL_VERTEX: 
		// Find the edges between two selected vertices.
		mpMesh->ClearEFlags (MN_USER);
		mpMesh->PropegateComponentFlags (MNM_SL_EDGE, MN_USER, mnSelLevel, MN_SEL, true);
		newSel = mVertSel;
		// De-select all the vertices touching edges to unselected vertices:
		for (int i=0; i<mpMesh->nume; i++) {
			if (!mpMesh->e[i].GetFlag (MN_USER)) {
				newSel.Clear (mpMesh->e[i].v1);
				newSel.Clear (mpMesh->e[i].v2);
			}
		}
		SetVertSel (newSel, imod, TimeValue(0));
		break;
	case MNM_SL_EDGE:
		// Find all vertices used by only selected edges:
		mpMesh->ClearVFlags (MN_USER);
		mpMesh->PropegateComponentFlags (MNM_SL_VERTEX, MN_USER, mnSelLevel, MN_SEL, true);
		newSel = mEdgeSel;
		for (int i=0; i<mpMesh->nume; i++) {
			// Deselect edges with at least one vertex touching a nonselected edge:
			if (!mpMesh->v[mpMesh->e[i].v1].GetFlag (MN_USER) || !mpMesh->v[mpMesh->e[i].v2].GetFlag (MN_USER))
				newSel.Clear (i);
		}
		SetEdgeSel (newSel, imod, TimeValue(0));
		break;
	case MNM_SL_FACE:
		// Find all vertices used by only selected faces:
		mpMesh->ClearVFlags (MN_USER);
		mpMesh->PropegateComponentFlags (MNM_SL_VERTEX, MN_USER, mnSelLevel, MN_SEL, true);
		newSel = mFaceSel;
		for (int i=0; i<mpMesh->numf; i++) {
			for (int j=0; j<mpMesh->f[i].deg; j++) {
				if (!mpMesh->v[mpMesh->f[i].vtx[j]].GetFlag (MN_USER)) 
            {
               // Deselect faces with at least one vertex touching a nonselected face:
               newSel.Clear (i);
               break;
            }
			}
		}
		SetFaceSel (newSel, imod, TimeValue(0));
		break;
	}
}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:57,代码来源:EditPolyData.cpp

示例11: DbgAssert

RefTargetHandle BlockControl::GetReference(int i) 
   {
	DbgAssert(i >= 0);
	DbgAssert(i < controls.Count());
   if (i < controls.Count()) 
      {
//    DebugPrint(_T("Getting block control ref %d\n"),i);
      return controls[i];
      }
   return NULL;
   }
开发者ID:artemeliy,项目名称:inf4715,代码行数:11,代码来源:blockcontrol.cpp

示例12: AppDataTest_UpdateAppDataLoadProc

void AppDataTest_UpdateAppDataLoadProc(Animatable *anim, const Class_ID& cid, SClass_ID sid, ILoad* iload, Tab<DWORD> &subIDs)
{
	DbgAssert( anim && iload );
	if ( anim == NULL || iload == NULL )
		return;

	DbgAssert (cid == APPDATA_TEST_CLASS_ID);
	DbgAssert (sid == UTILITY_CLASS_ID);

	Interface14 *iface = GetCOREInterface14();
	iface->ConvertAppDataChunksContainingStringToUTF8(anim, cid, sid, subIDs, iload->CodePage());
}
开发者ID:artemeliy,项目名称:inf4715,代码行数:12,代码来源:appdata.cpp

示例13: chanUVVert

int ParticleChannelMap::Count() const
{
	int uvVertCount = chanUVVert() ? chanUVVert()->Count() : 0;
	int tvFaceCount = chanTVFace() ? chanTVFace()->Count() : 0;
	DbgAssert(uvVertCount >= 0);
	DbgAssert(tvFaceCount >= 0);
	if ((uvVertCount < 0) || (tvFaceCount < 0)) return 0;

	if (uvVertCount == 0) return 0;
	if (tvFaceCount == 0) return uvVertCount;
	if (uvVertCount != tvFaceCount) return 0;
	return uvVertCount;
}
开发者ID:DimondTheCat,项目名称:xray,代码行数:13,代码来源:ParticleChannelMap.cpp

示例14: SetDlgItemHex

BOOL
SetDlgItemHex(
    IN HWND hWnd,
    IN int ControlId,
    IN UINT Value
    )

/*++

Routine Description:

Arguments:

    hWnd        - Supplies the window (dialog box) handle that contains the
                  control or the window handle where the font should be set.
    ControlId   - Supplies the control id or xero if the hWnd is a window
                  rather than a dialog handle.

Return Value:

    BOOL        - 

--*/

{
    BOOL    Success;
    DWORD   Count;

    if( IsDlgItemUnicode( hWnd, ControlId )) {
        
        WCHAR   Buffer[ MAX_PATH ];

        Count = wsprintfW( Buffer, L"0x%08.8X", Value );
        DbgAssert(( Count != 0 ) && ( Count < MAX_PATH ));

        Success = SetDlgItemTextW( hWnd, ControlId, Buffer );
        DbgAssert( Success );

    } else {

        CHAR    Buffer[ MAX_PATH ];

        Count = wsprintfA( Buffer, "0x%08.8X", Value );
        DbgAssert(( Count != 0 ) && ( Count < MAX_PATH ));

        Success = SetDlgItemTextA( hWnd, ControlId, Buffer );
        DbgAssert( Success );
    }

    return Success;
}
开发者ID:mingpen,项目名称:OpenNT,代码行数:51,代码来源:controls.c

示例15: DbgAssert

BOOL PickControlNode::Pick(IObjParam *ip,ViewExp *vpt)
   {

	 if ( ! vpt || ! vpt->IsAlive() )
	{
		// why are we here
		DbgAssert(!_T("Invalid viewport!"));
		return FALSE;
	}

   INode *node = vpt->GetClosestHit();
   if (node) {
      // RB 3/1/99: This should use the node tm not the object TM. See ModifyObject() imp.
      Matrix3 ourTM,ntm = node->GetNodeTM(GetCOREInterface()->GetTime()); //node->GetObjectTM(ip->GetTime());  

      ModContextList mcList;
      INodeTab nodes;
      ip->GetModContexts(mcList,nodes);
      if (nodes.Count())
         {
         ourTM = nodes[0]->GetObjectTM(GetCOREInterface()->GetTime());
         ourTM    = Inverse(ourTM);
         Box3 bounds;
         bounds.Init();
         ObjectState os = node->EvalWorldState(GetCOREInterface()->GetTime());
         ViewExp& vp = GetCOREInterface()->GetActiveViewExp();
         if ( ! vp.IsAlive() )
				 {
				 	// why are we here
				 	DbgAssert(!_T("Invalid viewport!"));
				 	return FALSE;
				 }
				 os.obj->GetWorldBoundBox(GetCOREInterface()->GetTime(), node, vp.ToPointer(), bounds );
         
         Point3 min = bounds.pmin * ourTM;
         Point3 max = bounds.pmax * ourTM;
         theHold.Begin();
         mod->pblock2->SetValue(particlemesher_customboundsa,0,min);
         mod->pblock2->SetValue(particlemesher_customboundsb,0,max);
         theHold.Accept(GetString(IDS_BOUNDS));
         mod->NotifyDependents(FOREVER,0,REFMSG_CHANGE);
         mod->UpdateUI();


         }

      nodes.DisposeTemporary();
      }
   return TRUE;
   }
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:50,代码来源:particlemesher.cpp


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