Objective-C is still the language of choice if users want to run their simulation efficiently under the Swarm environment since the Swarm environment itself was written in Objective-C. The language is a fast, object-oriented and easy to learn. However, the language is less well known than, less expressive than, and lacks support for many important features of C++ (eg. OpenMP for high performance computing application). In this paper, we present a methodology and software tools that we have developed for auto generating an Objective-C object template (and all the necessary interfacing functions) from a given C++ model, utilising the Classdesc's object description technology, so that the C++ model can both be run and accessed under the Objective-C and C++ environments. We also present a methodology for modifying an existing Swarm application to make part of the model (eg. the heatbug's step method) run under the C++ environment.
翻译:目标C仍然是选择的语言,如果用户想在Swarm环境中有效地进行模拟,那么,自Swarm环境本身以目标C写成以来,目标C仍然是选择的语言。 语言是一个快速、面向对象和容易学习的语言。然而,语言不如目标C++(例如,高性能计算应用的 OpenMP ) 的许多重要特征那么广为人知、不那么清晰,而且缺乏支持。 在本文中,我们提出了一个方法和软件工具,用于从给定的C++模型中自动生成一个目标C对象模板(和所有必要的互换功能),使用分类德茨的物体描述技术,使C++模式既可以在目标C和C++环境中运行,也可以在目标C++环境中使用。我们还提出了一个修改现有的Swarm应用程序的方法,以使模型(例如,Hatebug的步法)在C++环境中运行。