TComponent::operator () - C++ Builder

C++ Builder 参考手册 ➙ TComponent ➙ operator System::_di_IInterface


头文件:#include
命名空间:System::Classes
类:TComponent
访问权限:public:
函数原型:

operator System::_di_IInterface()
{
  System::_di_IInterface intf;
  this->GetInterface(intf);
  return intf;
}

operator _di_IInterfaceComponentReference()
{
  _di_IInterfaceComponentReference intf;
  this->GetInterface(intf);
  return intf;
}

operator () 是 TComponent 的类型转换操作符,转为 System::_di_IInterface 或 _di_IInterfaceComponentReference 接口。

参数:

无;

返回值:

System::_di_IInterface 或 _di_IInterfaceComponentReference 接口。

  • 类型转换操作符,把当前组件转为接口类型时使用;
  • 相当于使用 GetInterface 方法获取接口。

参考:

  • System::TObject::GetInterface
  • System::Classes::TComponent::_Release
  • System::Classes::TComponent::_AddRef
  • System::Classes::TComponent
  • System::Classes::TPersistent
  • System::TObject
  • VCL 类继承关系

C++ Builder 参考手册 ➙ TComponent ➙ operator System::_di_IInterface

你可能感兴趣的:(TComponent::operator () - C++ Builder)