本文整理汇总了C++中RefClassWriter::GetEmitHelper方法的典型用法代码示例。如果您正苦于以下问题:C++ RefClassWriter::GetEmitHelper方法的具体用法?C++ RefClassWriter::GetEmitHelper怎么用?C++ RefClassWriter::GetEmitHelper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RefClassWriter
的用法示例。
在下文中一共展示了RefClassWriter::GetEmitHelper方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddInterfaceImpl
// This function will add another interface impl
void QCALLTYPE COMDynamicWrite::AddInterfaceImpl(QCall::ModuleHandle pModule, INT32 tdType, INT32 tkInterface)
{
QCALL_CONTRACT;
BEGIN_QCALL;
RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter();
_ASSERTE(pRCW);
IfFailThrow( pRCW->GetEmitHelper()->AddInterfaceImpl(tdType, tkInterface) );
END_QCALL;
}
示例2: SetParentType
// This function will reset the parent class in metadata
void QCALLTYPE COMDynamicWrite::SetParentType(QCall::ModuleHandle pModule, INT32 tdType, INT32 tkParent)
{
QCALL_CONTRACT;
BEGIN_QCALL;
RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter();
_ASSERTE(pRCW);
IfFailThrow( pRCW->GetEmitHelper()->SetTypeParent(tdType, tkParent) );
END_QCALL;
}
示例3: SetFieldLayoutOffset
/*============================SetFieldLayoutOffset============================
**Action: set fieldlayout of a field
**Returns:
**Arguments:
**Exceptions:
==============================================================================*/
void QCALLTYPE COMDynamicWrite::SetFieldLayoutOffset(QCall::ModuleHandle pModule, INT32 tkField, INT32 iOffset)
{
QCALL_CONTRACT;
BEGIN_QCALL;
RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter();
_ASSERTE(pRCW);
// Set the field layout
IfFailThrow(pRCW->GetEmitHelper()->SetFieldLayoutHelper(
tkField, // field
iOffset)); // layout offset
END_QCALL;
}
示例4: DefineMethodSemantics
/*============================DefineMethodSemantics============================
**Action:
**Returns:
**Arguments:
**Exceptions:
==============================================================================*/
void QCALLTYPE COMDynamicWrite::DefineMethodSemantics(QCall::ModuleHandle pModule, INT32 tkAssociation, INT32 attr, INT32 tkMethod)
{
QCALL_CONTRACT;
BEGIN_QCALL;
RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter();
_ASSERTE(pRCW);
// Define the MethodSemantics
IfFailThrow(pRCW->GetEmitHelper()->DefineMethodSemanticsHelper(
tkAssociation,
attr,
tkMethod));
END_QCALL;
}
示例5: DefineEvent
/*============================DefineEvent============================
**Action:
**Returns:
**Arguments:
**Exceptions:
==============================================================================*/
INT32 QCALLTYPE COMDynamicWrite::DefineEvent(QCall::ModuleHandle pModule, INT32 tkParent, LPCWSTR wszName, INT32 attr, INT32 tkEventType)
{
QCALL_CONTRACT;
mdProperty ev = mdTokenNil;
BEGIN_QCALL;
RefClassWriter * pRCW = pModule->GetReflectionModule()->GetClassWriter();
_ASSERTE(pRCW);
// Define the Event
IfFailThrow(pRCW->GetEmitHelper()->DefineEventHelper(
tkParent, // ParentTypeDef
wszName, // Name of Member
attr, // property Attributes (prDefaultProperty, etc);
tkEventType, // the event type. Can be TypeDef or TypeRef
&ev));
END_QCALL;
return (INT32)ev;
}