您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ type_check函数代码示例

51自学网 2021-06-03 09:02:18
  C++
这篇教程C++ type_check函数代码示例写得很实用,希望能帮到您。

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

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

示例1: wm3_MoveMorph_cf

/*===========================================================================*/ |	This swaps the position of 2 morphs in the channel list |  /*===========================================================================*/Value*wm3_MoveMorph_cf(Value** arg_list, int count){	check_arg_count(wm3_MoveMorph_cf, 3, count);	type_check(arg_list[0], MAXModifier, _T("WM3_MoveMorph [Morpher Modifier] [Morph Source Index] [Morph Destination Index]"));	type_check(arg_list[1], Integer, _T("WM3_MoveMorph [Morpher Modifier] [Morph Source Index] [Morph Destination Index]"));	type_check(arg_list[2], Integer, _T("WM3_MoveMorph [Morpher Modifier] [Morph Source Index] [Morph Destination Index]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	int morphIndexA = arg_list[2]->to_int(); 	morphIndexA--;	if(morphIndexA>=100) morphIndexA = 99;	if(morphIndexA<0) morphIndexA = 0;	int morphIndexB = arg_list[1]->to_int(); 	morphIndexB--;	if(morphIndexB>=100) morphIndexB = 99;	if(morphIndexB<0) morphIndexB = 0;		MaxMorphModifier maxMorpher(mp);	bool res = maxMorpher.MoveMorphChannel(morphIndexA, morphIndexB);	maxMorpher.RefreshChannelsUI();	return (res ? &true_value : &false_value);}
开发者ID:artemeliy,项目名称:inf4715,代码行数:33,


示例2: wm3_SetProgressiveMorphTension_cf

/*===========================================================================*/ |	Sets the the  progressive morph tension |  /*===========================================================================*/Value*wm3_SetProgressiveMorphTension_cf(Value** arg_list, int count){	check_arg_count(wm3_SetProgressiveMorphTension_cf, 3, count);	type_check(arg_list[0], MAXModifier, _T("WM3_SetProgressiveMorphTension [Morpher Modifier] [Morph Index] [Tension]"));	type_check(arg_list[1], Integer, _T("WM3_SetProgressiveMorphTension [Morpher Modifier] [Morph Index] [Tension]"));	type_check(arg_list[2], Float, _T("WM3_SetProgressiveMorphTension [Morpher Modifier] [Morph Index] [Tension]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	int morphIndex = arg_list[1]->to_int(); 	morphIndex--;	if(morphIndex>=100) morphIndex = 99;	if(morphIndex<0) morphIndex = 0;	float tension = arg_list[2]->to_float(); 	INode *node = NULL;	MaxMorphModifier maxMorpher(mp);	bool res = maxMorpher.GetMorphChannel(morphIndex).SetProgressiveMorphTension(tension);	mp->Update_channelParams();	return (res ? &true_value : &false_value);}
开发者ID:artemeliy,项目名称:inf4715,代码行数:32,


示例3: wm3_mc_settarget_cf

Value*wm3_mc_settarget_cf(Value** arg_list, int count){	check_arg_count(wm3_mc_settarget, 3, count);	type_check(arg_list[0], MAXModifier, _T("WM3_MC_SetTarget [Morpher Modifier] [Channel Index] [Node]"));	type_check(arg_list[1], Integer, _T("WM3_MC_SetTarget [Morpher Modifier] [Channel Index] [Node]"));	type_check(arg_list[2], MAXNode, _T("WM3_MC_SetTarget [Morpher Modifier] [Channel Index] [Node]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	int sel = arg_list[1]->to_int(); sel -= 1;	if(sel>=100) sel = 99;	if(sel<0) sel = 0;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	INode *node = NULL;		node = arg_list[2]->to_node(); 	if (node == NULL) return &false_value;	MaxMorphModifier maxMorpher(mp);	MaxMorphChannel maxMorphChannel = maxMorpher.GetMorphChannel(sel);	if (NULL != maxMorphChannel.GetMorphTarget()) return &false_value;		if (maxMorphChannel.SetMorphTarget(node, MAXScript_time()))	{		return &true_value;	}	return &false_value;}
开发者ID:artemeliy,项目名称:inf4715,代码行数:31,


示例4: wm3_DeleteMarker_cf

Value*wm3_DeleteMarker_cf(Value** arg_list, int count){	check_arg_count(wm3_DeleteMarker_cf, 2, count);	type_check(arg_list[0], MAXModifier, _T("wm3_DeletMarker [Morpher Modifier] [Morph Index]"));	type_check(arg_list[1], Integer, _T("wm3_DeletMarker [Morpher Modifier] [Morph Index]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	int sel = arg_list[1]->to_int(); 	sel -= 1;	if ( (sel >= 0) && (sel < mp->markerName.Count()))	{#pragma warning (push)#pragma warning (disable: 4996)		IMorphClass imp;		imp.HoldMarkers(mp);#pragma warning (pop)		mp->markerName.Delete(sel,1);		mp->markerIndex.Delete(sel,1);		mp->Update_channelMarkers();		return &true_value;	}	return &false_value;}
开发者ID:artemeliy,项目名称:inf4715,代码行数:33,


示例5: wm3_GetProgressiveMorphNode_cf

/*===========================================================================*/ |	Returns the the  progressive morph Node |  /*===========================================================================*/Value*wm3_GetProgressiveMorphNode_cf(Value** arg_list, int count){	check_arg_count(wm3_GetProgressiveMorphNode_cf, 3, count);	type_check(arg_list[0], MAXModifier, _T("WM3_GetProgressiveMorphNode [Morpher Modifier] [Morph Index] [Progressive Morph Index]"));	type_check(arg_list[1], Integer, _T("WM3_GetProgressiveMorphNode [Morpher Modifier] [Morph Index]  [Progressive Morph Index]"));	type_check(arg_list[2], Integer, _T("WM3_GetProgressiveMorphNode [Morpher Modifier] [Morph Index]  [Progressive Morph Index]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	int morphIndex = arg_list[1]->to_int(); 	morphIndex--;	if(morphIndex>=100) morphIndex = 99;	if(morphIndex<0) morphIndex = 0;	int pMorphIndex = arg_list[2]->to_int(); 	pMorphIndex--;	MaxMorphModifier maxMorpher(mp);	INode *node = maxMorpher.GetMorphChannel(morphIndex).GetProgressiveMorphTarget(pMorphIndex);	if (node != NULL)	{		return MAXNode::intern(node);		}	return &undefined;}
开发者ID:artemeliy,项目名称:inf4715,代码行数:34,


示例6: wm3_CreateMarker_cf

Value*wm3_CreateMarker_cf(Value** arg_list, int count){	check_arg_count(wm3_CreateMarker_cf, 3, count);	type_check(arg_list[0], MAXModifier, _T("wm3_CreateMarker [Morpher Modifier] [Morph Index] [Marker Name]"));	type_check(arg_list[1], Integer, _T("wm3_CreateMarker [Morpher Modifier] [Morph Index] [Marker Name]"));	type_check(arg_list[2], String, _T("wm3_CreateMarker [Morpher Modifier] [Morph Index] [Marker Name]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	int sel = arg_list[1]->to_int(); 	sel -= 1;	const TCHAR *name = arg_list[2]->to_string();	if (sel >= 0) 	{#pragma warning (push)#pragma warning (disable: 4996)		IMorphClass imp;		imp.HoldMarkers(mp);#pragma warning (pop)		mp->markerName.AddName(name);		mp->markerIndex.Append(1,&sel,0);		mp->Update_channelMarkers();		return &true_value;	}	return &false_value;}
开发者ID:artemeliy,项目名称:inf4715,代码行数:34,


示例7: subr_get_raw_value

static SExp subr_get_raw_value(int s, int argnum) {	SExp buf = vm_stack_ref(s, 0);	SFixnum ofs = S2FIXNUM(type_check(vm_stack_ref(s, 1), &TFixnum));	SExp type = type_check(vm_stack_ref(s, 2), &TSymbol);	char* ptr;	if (s2ptr((char*)&ptr, buf) == NULL) {		return error("Illegal type");	} else {		if (eq(type, intern("int"))) {			return fixnum2s(*(int*)(ptr + ofs));		} else if (eq(type, intern("int32"))) {			return fixnum2s(*(int*)(ptr + ofs));		} else if (eq(type, intern("int16"))) {			return fixnum2s(*(short*)(ptr + ofs));		} else if (eq(type, intern("int8"))) {			return fixnum2s(*(char*)(ptr + ofs));		} else if (eq(type, intern("uint32"))) {			return fixnum2s(*(unsigned int*)(ptr + ofs));		} else if (eq(type, intern("uint16"))) {			return fixnum2s(*(unsigned short*)(ptr + ofs));		} else if (eq(type, intern("uint8"))) {			return fixnum2s(*(unsigned char*)(ptr + ofs));		} else {			return error("Illegal type");		}	}}
开发者ID:cansou,项目名称:minimallisp,代码行数:27,


示例8: wm3_DeleteProgressiveMorphNode_cf

/*===========================================================================*/ |	Deletes a progressives Morph |  /*===========================================================================*/Value*wm3_DeleteProgressiveMorphNode_cf(Value** arg_list, int count){	check_arg_count(wm3_DeleteProgressiveMorphNode, 3, count);	type_check(arg_list[0], MAXModifier, _T("WM3_DeleteProgressiveMorphNode [Morpher Modifier] [Morph Index] [Progressive Morph Index]"));	type_check(arg_list[1], Integer, _T("WM3_DeleteProgressiveMorphNode [Morpher Modifier] [Morph Index] [Progressive Morph Index]"))		type_check(arg_list[2], Integer, _T("WM3_DeleteProgressiveMorphNode [Morpher Modifier] [Morph Index] [Progressive Morph Index]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	int morphIndex = arg_list[1]->to_int(); 	morphIndex--;	if(morphIndex>=100) morphIndex = 99;	if(morphIndex<0) morphIndex = 0;	int pMorphIndex = arg_list[2]->to_int(); 	pMorphIndex--;	MaxMorphModifier maxMorpher(mp);	bool res = maxMorpher.GetMorphChannel(morphIndex).DeleteProgressiveMorphTarget(pMorphIndex);	return (res ? &true_value : &false_value);}
开发者ID:artemeliy,项目名称:inf4715,代码行数:31,


示例9: subr_make_c_function

static SExp subr_make_c_function(int s, int argnum) {	SExp ret_type = type_check(vm_stack_ref(s, 0), &TSymbol);	SExp sproc = type_check(vm_stack_ref(s, 1), &TCPtr);	SExp arg_types = vm_stack_ref(s, 2);	void* proc = ((CPtr*)S2PTR(sproc))->ptr;	return make_cfunc(proc, ret_type, arg_types);}
开发者ID:cansou,项目名称:minimallisp,代码行数:8,


示例10: wm3_SetProgressiveMorphWeight_cf

/*===========================================================================*/ |	Returns the the  progressive morph weight |  /*===========================================================================*/Value*wm3_SetProgressiveMorphWeight_cf(Value** arg_list, int count){	check_arg_count(WM3_SetProgressiveMorphWeight_cf, 4, count);	type_check(arg_list[0], MAXModifier, _T("WM3_SetProgressiveMorphWeight [Morpher Modifier] [Morph Index] [Progressive Node] [Weight]"));	type_check(arg_list[1], Integer, _T("WM3_SetProgressiveMorphWeight [Morpher Modifier] [Morph Index]  [Progressive Node] [Weight]"));	type_check(arg_list[2], MAXNode, _T("WM3_SetProgressiveMorphWeight [Morpher Modifier] [Morph Index]  [Progressive Node] [Weight]"));	type_check(arg_list[3], Float, _T("WM3_SetProgressiveMorphWeight [Morpher Modifier] [Morph Index]  [Progressive Node] [Weight]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	int morphIndex = arg_list[1]->to_int(); 	morphIndex--;	if(morphIndex>=100) morphIndex = 99;	if(morphIndex<0) morphIndex = 0;	INode *node = NULL;		node = arg_list[2]->to_node(); 	float weight = arg_list[3]->to_float(); 	if (node == NULL) return &false_value;		MaxMorphModifier maxMorpher(mp);	int pMorphCount = maxMorpher.GetMorphChannel(morphIndex).NumProgressiveMorphTargets();		int pMorphIndex = -1;	if (node == (INode*)mp->GetReference(101+morphIndex))	{		pMorphIndex = 0;	}	else	{		for (int i = 1; i < (pMorphCount); i++)		{			int refnum = 200+i+morphIndex*MAX_PROGRESSIVE_TARGETS;			if (node == (INode*)mp->GetReference(refnum))			{				pMorphIndex = i ;				break;			}		}	}	bool res = maxMorpher.GetMorphChannel(morphIndex).SetProgressiveMorphWeight(pMorphIndex, weight);	if (res)		{		mp->Update_channelFULL();		mp->Update_channelParams();	}	return (res ? &true_value : &false_value);}
开发者ID:artemeliy,项目名称:inf4715,代码行数:60,


示例11: subr_get_proc_adr

static SExp subr_get_proc_adr(int s, int argnum) {	SExp h = type_check(vm_stack_ref(s, 0), &TCPtr);	SExp proc_name = type_check(vm_stack_ref(s, 1), &TString);	HDLL_MODULE hDll = (HDLL_MODULE)((CPtr*)S2PTR(h))->ptr;	void* proc_adr = get_proc_adr(hDll, S2CSTR(proc_name));	if (proc_adr == NULL) {		return sFALSE;	} else {		return gen_cptr(proc_adr);	}}
开发者ID:cansou,项目名称:minimallisp,代码行数:11,


示例12: process_subsentence

/*}}}*/static void process_subsentence(TreeNode *ss, TermVector *pre, TermVector *post)/*{{{*/{  struct nonterm *nt, *ntc;  int nc;  TreeNode *sss;  TreeNode *c;  TermVector head_terms, new_pre;  TreeNode *terms, *btail;  sss = ss;  do {    type_check(ss, SUBSENTENCE);    nt = &sss->data.nonterm;    nc = nt->nchildren;    if (nc == 2) {      /* Pick the 'subsentence' following the 'prenex' out of the 2 child version */      sss = child_ref(sss, 1);    } else {      /* Pick 'sentence' out of the 1 child version */      sss = child_ref(sss, 0);    }  } while (nc == 2);  type_check(sss, SENTENCE);  nt = &sss->data.nonterm;  if (nt->nchildren == 1) {    c = nt->children[0];    if (c->type == N_NONTERM) {      ntc = & c->data.nonterm;      if ((ntc->type == NO_CU_SENTENCE) || (ntc->type == OBSERVATIVE_SENTENCE)) {        sss = c;        nt = ntc;      }    }  }  /* Now looking at the '[terms [CU #]] bridi_tail' node. */  terms = find_nth_child(sss, 1, TERMS);  btail = find_nth_child(sss, 1, BRIDI_TAIL);  assert(btail); /* Every sentence has one of these! */  if (terms) {    tv_build(&head_terms, terms);    tv_catenate(pre, &head_terms, &new_pre);    process_bridi_tail(btail, &new_pre, post);  } else {    process_bridi_tail(btail, pre, post);  }}
开发者ID:danr,项目名称:jbofihe,代码行数:53,


示例13: wm3_GetProgressiveMorphWeight_cf

/*===========================================================================*/ |	Returns the the  progressive morph weight |  /*===========================================================================*/Value*wm3_GetProgressiveMorphWeight_cf(Value** arg_list, int count){	check_arg_count(wm3_GetProgressiveMorphWeight_cf, 3, count);	type_check(arg_list[0], MAXModifier, _T("WM3_GetProgressiveMorphWeight [Morpher Modifier] [Morph Index] [Progressive Node]"));	type_check(arg_list[1], Integer, _T("WM3_GetProgressiveMorphWeight [Morpher Modifier] [Morph Index]  [Progressive Node]"));	type_check(arg_list[2], MAXNode, _T("WM3_GetProgressiveMorphWeight [Morpher Modifier] [Morph Index]  [Progressive Node]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	int morphIndex = arg_list[1]->to_int(); 	morphIndex--;	if(morphIndex>=100) morphIndex = 99;	if(morphIndex<0) morphIndex = 0;	INode *node = NULL;		node = arg_list[2]->to_node(); 	float weight = 0.0f;	if (node == NULL) return Float::intern(weight);			MaxMorphModifier maxMorpher(mp);	int pMorphCount = maxMorpher.GetMorphChannel(morphIndex).NumMaxProgressiveTargets();					int pMorphIndex = -1;	if (node == (INode*)mp->GetReference(101+morphIndex))	{		pMorphIndex = 0;	}	else	{		for (int i = 1; i < (pMorphCount); i++)		{			int refnum = 200+i+morphIndex*MAX_PROGRESSIVE_TARGETS;			if (node == (INode*)mp->GetReference(refnum))			{					pMorphIndex = i ;					break;			}		}	}	weight = maxMorpher.GetMorphChannel(morphIndex).GetProgressiveMorphWeight(pMorphIndex);	return Float::intern(weight);	}
开发者ID:artemeliy,项目名称:inf4715,代码行数:53,


示例14: ExportCalSkel_cf

Value* ExportCalSkel_cf(Value** arg_list, int count){		int			i;	INodeTab	tabnode;	std::tstring fullpathfilename;	int			ArraySize		;	bool		bShowUI			;	check_arg_count(ExportCalSkel, 3, count);	type_check(arg_list[0], String, _T("[The first argument of ExportCalSkel should be a string that is a full path name of the file to export]"));	type_check(arg_list[1], Array , _T("[The 2nd argument of ExportCalSkel should be an array of nodes]"));	type_check(arg_list[2], Boolean,_T("[The 3rd argument of ExportCalSkel should be a boolean that tells if you want to use the UI or not to select nodes of skeleton]"));		try	{		fullpathfilename	= arg_list[0]->to_string();		//Get Array		Array* BonesArray	= static_cast<Array*>(arg_list[1]);		ArraySize			= BonesArray->size;			bShowUI				= !!(arg_list[2]->to_bool());		if (fullpathfilename.length() == 0) return new Integer (1);		if (! ArraySize)		return new Integer (2); 		for (i=0;i<ArraySize;i++)		{			if (BonesArray->data[i]->is_kind_of(class_tag(MAXNode)) )			{				INode* _node	= 	BonesArray->data[i]->to_node();				if (! _node)return new Integer (3);				tabnode.Append(1,&_node);			}		}		//Call the exporter from Maxscript		if (CMaxSkeletonExport::ExportSkeletonFromMaxscriptCall(fullpathfilename.c_str(), tabnode, bShowUI) )			return new Integer (0);		return new Integer (-1);	}	catch(...)	{			//MessageBox(NULL,"Exception catched in ExportCalSkel C++ function","Error",MB_OK);		return new Integer (-2);	}}
开发者ID:imvu,项目名称:cal3d,代码行数:49,


示例15: wm3_setscrollpos_cf

Value*wm3_setscrollpos_cf(Value** arg_list, int count){	check_arg_count(wm3_setscrollpos, 2, count);	type_check(arg_list[0], MAXModifier, "WM3_SetChannelPos [Morpher Modifier] [NewPos]");	type_check(arg_list[1], Integer, "WM3_SetChannelPos [Morpher Modifier] [NewPos]");	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	mp->VScroll(SB_THUMBPOSITION,(arg_list[1]->to_int()-1));	return &true_value;}
开发者ID:2asoft,项目名称:xray,代码行数:15,


示例16: set

 /** create from Py functions.  * in most of cases, need not to inc ref.  * please read python doc carefully  */ set(PyObject* p, bool borrowed = false) {     type_check(p);     _p = p;     if(borrowed)         Py_XINCREF(_p); }
开发者ID:LenxWei,项目名称:py11,代码行数:11,


示例17: triangle_cf

Value*triangle_cf(Value** arg_list, int count){	check_arg_count(triangle, 2, count);	for (int i=0; i < count; i++)		type_check(arg_list[i], Array, _T("triangle"));	Array			*pts_val = (Array*)arg_list[0], 	*col_val = (Array*)arg_list[1];	GraphicsWindow	*gw		 = MAXScript_interface->GetActiveViewExp().getGW();			if (MaxSDK::Graphics::IsRetainedModeEnabled() && gw->querySupport(GW_SPT_NUM_LIGHTS) == 0)	{		return &undefined;	}	if (col_val->size != 3)		throw RuntimeError(MaxSDK::GetResourceStringAsMSTR(IDS_RK_RGB_ARRAY_SIZE_NOT_3));	if (pts_val->size != 3)		throw RuntimeError(MaxSDK::GetResourceStringAsMSTR(IDS_RK_VERT_ARRAY_SIZE_NOT_3));	Point3* pts = new Point3[3]; 	Point3*	 col = new Point3[3]; 	for (int i=0; i < 3; i++) {		pts[i] = pts_val->data[i]->to_point3();		col[i] = col_val->data[i]->to_point3()/255.f;	}		//	virtual void	triangle(Point3 *xyz, Point3 *rgb) = 0;	gw->triangle(pts, col);	delete [] pts;	delete [] col;	return &ok;}
开发者ID:artemeliy,项目名称:inf4715,代码行数:35,


示例18: condition

ConditionalNode::ConditionalNode(const std::shared_ptr<AstNode> &condition_,                                 const std::shared_ptr<AstNode> &then_part_,                                 const std::shared_ptr<AstNode> &else_part_)    : condition(condition_), then_part(then_part_), else_part(else_part_) {  type_check(condition, BOOL);  type_check_match(then_part, else_part);}
开发者ID:BoutrosLaboratory,项目名称:bamql,代码行数:7,


示例19: my_file_in_cf

Value*my_file_in_cf(Value** arg_list, int count){	// myFileIn "filename" [quiet:true]	// pick up arguments	check_arg_count_with_keys(myFileIn, 1, count);	two_typed_value_locals(ReadonlyTextFileStream* file, Value* result);	Value* quiet = key_arg_or_default(quiet, &true_value);	type_check(quiet, Boolean, _T("myFileIn quiet:"));	// open a fileStream instance on the file	vl.file = new ReadonlyTextFileStream();	vl.file = vl.file->open(arg_list[0]->to_string());	if (vl.file == (CharStream*)&undefined)		throw RuntimeError (_T("fileIn cannot open file: "), arg_list[0]);	// pass it to the stream-based fileIn utility function	try	{		vl.result = file_in(vl.file, (quiet == &true_value));	}	catch (...)	{		// catch any errors and close the temp filestream		vl.file->close();		throw;	}	// pop value locals & return fileIn result	return_value(vl.result);}
开发者ID:innovatelogic,项目名称:ilogic-vm,代码行数:32,


示例20: process_selbri_3_args

    /* All arguments apply to the selbri_3 */    process_selbri_3_args(s3, pre, post, lc);  }}/*}}}*/static void process_main_selbri(TreeNode *ms, TermVector *pre, TermVector *post)/*{{{*/{  /* Handle each main selbri after it has been located.  */  TermVector *cpre, *cpost;  XTermVectors *xtv;  TreeNode *s;  LinkConv lc;  type_check(ms, MAIN_SELBRI);  cpre = new(TermVector);  cpost = new(TermVector);  *cpre = *pre;  *cpost = *post;  /* Do we really need to store this property???!!! We do all the     processing on these vectors below! */  xtv = prop_term_vectors(ms, YES);  xtv->pre = cpre;  xtv->post = cpost;  lc_init(&lc);  /*    Roll up the sleeves ..., this is where the real grunge starts.   */  s = child_ref(ms, 0); /* selbri */  process_selbri_args(s, pre, post, &lc);}/*}}}*/
开发者ID:danr,项目名称:jbofihe,代码行数:38,


示例21: hash_table_exists

int hash_table_exists(SExp h, SExp key) {	SHash* p;	HashEntry* e;	type_check(h, &TSHash);	p = h.hash;	e = ht_find(&p->ht, key.p);	return e != NULL;}
开发者ID:cansou,项目名称:minimallisp,代码行数:8,


示例22: ExportCalMat_cf

Value* ExportCalMat_cf(Value** arg_list, int count){		int i = 0;	char* fullpathfilename;	check_arg_count(ExportCalMat, 2, count);	type_check(arg_list[0], String, "[The first argument of ExportCalMat should be a string]");	type_check(arg_list[1], MAXMaterial , "[The 2nd argument of ExportCalMat should be a standard material]");		try	{		fullpathfilename		= arg_list[0]->to_string();		StdMat* stdmat;		if (! strcmp(fullpathfilename,"")) return new Integer(1);		//Get material		Value* val;		val = arg_list[1];		if (! val)return new Integer(2);		if (val->is_kind_of(class_tag(MAXMaterial)) )		{			MtlBase* _mtl;			_mtl = 	val->to_mtlbase();			if (! _mtl)return new Integer(3);			stdmat = static_cast<StdMat*>(_mtl);		}		else		{			return new Integer(3);		}		if ( CMaxMaterialExport::ExportMaterialFromMaxscriptCall(fullpathfilename, stdmat) )			return new Integer(0);				return new Integer(-1);	}	catch(...)	{			//MessageBox(NULL,"Exception catched in ExportCalMat C++ function","Error",MB_OK);		return new Integer(-2);	}}
开发者ID:bsmr-opengl,项目名称:cal3d,代码行数:45,


示例23: type_check

 tuple& operator=(const obj& o)noexcept(!PY11_ENFORCE) {     if(o.p()!=_p){         type_check(o);         release();         enter(o.p());     }     return *this; }
开发者ID:LenxWei,项目名称:py11,代码行数:9,


示例24: type_check

 set& operator=(const obj& o) {     if(o.p()!=_p){         type_check(o);         release();         enter(o.p());     }     return *this; }
开发者ID:LenxWei,项目名称:py11,代码行数:9,


示例25: s_free_dll_module

//=============================================================================// subrstatic void s_free_dll_module(SExp s) {	CPtr* p;	HDLL_MODULE hDll;	s = type_check(s, &TString);	p = (CPtr*)S2PTR(s);	hDll = (HDLL_MODULE)p->ptr;	free_dll_module(hDll);	p->ptr = NULL;}
开发者ID:cansou,项目名称:minimallisp,代码行数:11,


示例26: wm3_mc_getname_cf

Value*wm3_mc_getname_cf(Value** arg_list, int count){	check_arg_count(wm3_mc_getname, 2, count);	type_check(arg_list[0], MAXModifier, _T("WM3_MC_GetName [Morpher Modifier] [Channel Index]"));	type_check(arg_list[1], Integer, _T("WM3_MC_GetName [Morpher Modifier] [Channel Index]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	int sel = arg_list[1]->to_int(); sel -= 1;	if(sel>=100) sel = 99;	if(sel<0) sel = 0;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	MaxMorphModifier maxMorpher(mp);	return new String(maxMorpher.GetMorphChannel(sel).GetName());}
开发者ID:artemeliy,项目名称:inf4715,代码行数:18,


示例27: wm3_mc_getlimitmin_cf

Value*wm3_mc_getlimitmin_cf(Value** arg_list, int count){	check_arg_count(wm3_mc_getlimitmin, 2, count);	type_check(arg_list[0], MAXModifier, _T("WM3_MC_GetLimitMIN [Morpher Modifier] [Channel Index]"));	type_check(arg_list[1], Integer, _T("WM3_MC_GetLimitMIN [Morpher Modifier] [Channel Index]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	int sel = arg_list[1]->to_int(); sel -= 1;	if(sel>=100) sel = 99;	if(sel<0) sel = 0;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	return Float::intern(mp->chanBank[sel].mSpinmin);}
开发者ID:artemeliy,项目名称:inf4715,代码行数:18,


示例28: wm3_mc_getnummpts_cf

Value*wm3_mc_getnummpts_cf(Value** arg_list, int count){	check_arg_count(wm3_mc_getnummpts, 2, count);	type_check(arg_list[0], MAXModifier, _T("WM3_MC_NumMPts [Morpher Modifier] [Channel Index]"));	type_check(arg_list[1], Integer, _T("WM3_MC_NumMPts [Morpher Modifier] [Channel Index]"));	ReferenceTarget* obj = arg_list[0]->to_modifier();		if( !check_ValidMorpher(obj,arg_list) ) return &false_value;	int sel = arg_list[1]->to_int(); sel -= 1;	if(sel>=100) sel = 99;	if(sel<0) sel = 0;	MorphR3 *mp = (MorphR3*)arg_list[0]->to_modifier();	return Integer::intern(static_cast<int>(mp->chanBank[sel].mPoints.size()));	// SR DCAST64: Downcast to 2G limit.}
开发者ID:artemeliy,项目名称:inf4715,代码行数:18,



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


C++ type_debug函数代码示例
C++ type_alloc函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。