首页> 外国专利> Method of, system for, and article of manufacture for providing a generic adaptor for converting from a non-future function pointer to a future function object

Method of, system for, and article of manufacture for providing a generic adaptor for converting from a non-future function pointer to a future function object

机译:提供通用适配器以从非未来功能指针转换为未来功能对象的方法,系统和制造品

摘要

A generic adaptor for converting from a non-future function pointer to a future function object is provided by a future template class that provides type definitions and member functions for future-based operations and by a future template function that is an adaptor from a non-future function pointer to an object that is an instance of the future template class instance. The generic adaptor takes a non-future function pointer, builds a future function object by passing the non-future function pointer to a constructor of the future function template class instance, and returns the future function object. The future template class is a subclass of a template class of the non-future function. This future template class is defined for a function such that the class exports a type definition for the future function type it defines; such that a constructor takes a function pointer corresponding to the non-future function and saves the function pointer; and such that a member operator takes a list of arguments to be passed to the saved function pointer, schedules a task to compute the function, and returns a future function object.
机译:未来模板类提供了用于从非未来函数指针转换为未来函数对象的通用适配器,该模板类提供了用于基于未来的操作的类型定义和成员函数,而未来模板函数则是来自非未来函数的适配器。指向作为将来模板类实例的实例的对象的future函数指针。通用适配器采用非未来函数指针,通过将非未来函数指针传递给未来函数模板类实例的构造函数来构建未来函数对象,然后返回未来函数对象。将来的模板类是非未来功能的模板类的子类。该未来模板类是为函数定义的,因此该类可为其定义的未来函数类型导出类型定义。这样,构造函数就可以获取与非未来函数相对应的函数指针,并保存该函数指针;以便成员运算符获取要传递给已保存的函数指针的参数列表,调度要计算该函数的任务,并返回将来的函数对象。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号