首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 31 毫秒
1.
In C++, multi‐dimensional arrays are often used but the language provides limited native support for them. The language, in its Standard Library, supplies sophisticated interfaces for manipulating sequential data, but relies on its bare‐bones C heritage for arrays. The MultiArray library, a part of the Boost library collection, enhances a C++ programmer's tool set with versatile multi‐dimensional array abstractions. It includes a general array class template and native array adaptors that support idiomatic array operations and interoperate with C++ Standard Library containers and algorithms. The arrays share a common interface, expressed as a generic programming concept, in terms of which generic array algorithms can be implemented. We present the library design, introduce a generic interface for array programming, demonstrate how the arrays integrate with the C++ Standard Library, and discuss the essential aspects of their implementation. Copyright © 2004 John Wiley & Sons, Ltd.  相似文献   

2.
Smalltalk-80的指称语义研究   总被引:1,自引:0,他引:1  
李舟军  王兵山 《软件学报》1995,6(7):385-390
Smalltalk—80是原型的面向对象程序设计语言和环境.本文简要地给出了Smalltalk-80的形式模型,并基于该模型描述了Smalltalk—80的静态和动态指称语义.  相似文献   

3.
FC++ is a library for programming functionally in C++. Compared to other C++ functional programming libraries, FC++ is distinguished by its powerful type system which allows the manipulation of parametrically polymorphic functions (e.g., passing them as arguments to other functions and returning them as results). In this paper, we show how FC++ can be used in common object‐oriented programming tasks. We demonstrate FC++ implementations of several common design patterns (Adapter, Builder, Command, and more). Compared to conventional C++ implementations of these patterns, our implementations are either simpler (in that fewer classes/dependencies are needed), more efficient, or more type‐safe (thanks to parametric polymorphism and type inference). Copyright © 2002 John Wiley & Sons, Ltd.  相似文献   

4.
5.
The main goal of the Alltalk project is to provide transparent database support to the Smalltalk programmer. As a first step towards this goal, the current version of Alltalk extends Smalltalk-80 by providing persistence to Smalltalk objects without adding a database sublanguage, new language syntax, classes or methods. This paper describes the implementation of object management in Alltalk, including database layout, database access methods, in-memory object management and high-level interface from the interpreter. It also discusses how the object manager is integrated in a unique way with the operations of the Alltalk garbage collector and interpreter.  相似文献   

6.
Android Java应用程序(APP)运行时需依赖Dalvik虚拟机环境,从而影响APP的性能表现.C/C++程序具有极好的硬件适应能力,但不能直接开发Android APP.针对该问题,利用Dalvik虚拟机支持JNI (Java Native Inter-face)调用的特点,设计了基于Qt的Android APP C/C++开发方法框架体系,给出了框架的详细工作机制和解决方案,系统总结了利用C/C++开发Android APP的主要过程和步骤.最后,以Android版机械CAD导教APP的开发工作为例,验证了方法的有效性和可行性,为直接利用C/C++开发Android APP提供了一种新途径.  相似文献   

7.
Ch:面向交互式教学的跨平台C/C++解释计算环境   总被引:4,自引:1,他引:3  
C语言是计算机程序设计入门教学中最流行也较难学的编程语言之一。本文介绍的Ch是一个面向交互式教学的跨平台C/C++解释计算环境,是一个完整的C语言解释器,支持最新C语言标准C99中大部分的新增特性以及C++的类,由交互式命令外壳(command shell)和教学专用且界面友好的集成开发环境(ChIDE)两大模块构成。Ch支持计算数组(computational array),提供了图形绘制库和高级数值函数库,能够方便快捷地解决许多工程和科学方面的复杂问题。在Windows系统中,Ch计算环境支持常用的Unix和Linux命令,帮助学生在熟悉的Windows环境中学习Unix和Linux。Ch还可以作为引擎脚本无缝地嵌入到编译的程序中,实现柔性编程。本文最后概括性地介绍了笔者在美国加州大学戴维斯分校多年教学实践中开发并使用的一套基于Ch的C程序设计教学平台。教学实践表明,使用这个平台在相当程度上提高了计算机程序设计教学的实用性、授课效果和学生学习的积极性,帮助学生充分理解和掌握计算机程序设计这一工程和科学领域的重要基本技能。  相似文献   

8.
在C、C++语言编程环境中,针对系统没有提供二进制格式数据输入输出(I/O)库函数的情况,用C语言的指针技术实现了这种格式数据的I/O,文件的读、写效率平均提高3倍,空间效率提高2.5倍,单精度读写效率提高近6倍。  相似文献   

9.
The C++ programming language has undergone significant changes since its inception in the 1980s, but has now reached a relatively steady state. Standard C++ now includes a general library of container classes, the Standard Template Library (STL). These developments are rapidly changing the styles used in C++ class programming. The paper has dual purposes: it provides an introduction to STL for C++ programmers, and it develops an efficient matrix class library, built upon STL, which provides functionality useful in areas such as computational economics, finance, mathematical programming and statistics. This library, which is freely available, comprises a full set of vector and matrix operations using both dense and sparse implementations. The paper discusses approaches towards and pitfalls in constructing C++ concrete data types, and has references for further on-line information.  相似文献   

10.
USB通信具有更方便、灵活、高效等特点,逐渐代替传统的RS-232、RS-485等通信方式,可用来解决测井过程数据传输量大的难题;主控芯片为LPC214x处理器的地面面板系统可与电脑以USB通信方式通信,在上位机中用C#、C++等语言进行编程,分别调用动态库EasyUSB214x,实现了计算机与LPC214x处理器USB方式通信,并阐述了编程过程的实现方法及其关键技术;通过测试后发现,利用C++调用动态库进行USB通信的程序运行时较为稳定;测井软件主体功能程序利用C#开发,C++开发USB通信程序,C#与C++组合开发的编程方法解决了测井数据高速传输的需求。  相似文献   

11.
Smalltalk-80 (hereafter referred to as Smalltalk), which is one of the most productive programming languages/environments, is very well suited for prototyping of applications but it is less well suited for delivering applications because applications can neither run in isolation from the Smalltalk environment nor be combined with other programs written in other languages. One way to make Smalltalk suitable for delivering applications is to translate Smalltalk into a compiler language such as C. By translating Smalltalk code into portable and interoperable C code, it is possible to deliver a stand-alone version of Smalltalk applications, and to develop an application partly in Smalltalk and partly in C. However, there are some difficulties in translating Smalltalk code into such a C code. First, the execution model of Smalltalk, which creates activation records as objects, is very different from that of C, and second, Smalltalk and C have very different approaches to storage management. We have implemented SPiCE, a system for translating Smalltalk into C. Our approach to the translation is to create runtime replacement classes implementing the same functionality of Smalltalk classes that are inherently part of the Smalltalk execution model, and to provide semi-conservative real-time compacting garbage collection that works without language support  相似文献   

12.
Smalltalk—80是原型的面向对象程序设计语言和环境,其中所体现的面向对象方法学已广泛应用于计算机科学的各个领域。我们已经完成除进程之外的所有Smalltalk成份的指称语义描述。作为系列文章的首篇,本文简要介绍Smalltalk的基本概念,并给出其完整的抽象文法,从而为准确地理解Smalltalk,正确地描述其形式语义奠定良好的基础。  相似文献   

13.
Many languages for computer systems simulation (like GPSS and CSim) use a stochastic model of systems with the provision of adding procedural code for those aspects of the system that cannot be captured easily by a stochastic model. However, they do not support the hierachical simulation of complex systems well. Complex computer systems may have to be simulated at various levels of abstraction in the interests of tractability: the flexibility of being able to freely move between the different levels of abstraction is very desirable. For example, in the area of computer architecture, one might have analytical models, detailed simulation models and trace-driven models. In addition, these languages do not have user-friendly interfaces for specification of the simulated system. In this paper, we discuss the design and implementation of a simulation package for hierachical simulation of non-real-time computer systems: a Simulator Generator from a Graphical System Specification (SIGGSYS}). A new language for system specification has been designed. In addition, the package has the following components: • A graphical user interface to aid specification of the system to be simulated. • A rear end that generates C++ code that implements a simulator for the specified system. • A complete object library along with the header files that implement a functionally complete set of C++ base classes which can be built upon. C++ has been chosen as the intermediate language so that the modeller can use its support for object oriented programming. © 1997 John Wiley & Sons, Ltd.  相似文献   

14.
Heikki Halme  Juha Heinnen 《Software》1988,18(10):999-1009
GNU Emacs is usually used only as an extensible editor. However, the ability to integrate inferior processes into GNU Emacs makes it an attractive programming environment. Like Interlisp and Smalltalk-80, GNU Emacs can be extended dynamically by its user. Unlike these programming environments, it can be used easily as a programming environment for an arbitrary programming language, and not just for its extension language. This paper discusses the methods of extending GNU Emacs and how we have applied them in creating a programming environment for a high-level specification language called AGENT.  相似文献   

15.
阐述了C++语言与C语言的关系,以及C++编程技术的基础,对C++最为突出的程序设计功能类和对象进行分析,给出了C++语言编程的有关技巧.  相似文献   

16.
Matlab具有很强的数值计算和分析等能力,而C/C++是目前最为流行的高级程序设计语言,两者互补结合的混合编程在科学研究和工程实践中具有非常重要的意义。从Matlab调用C/C++代码及C/C++调用m文件两方面,深入地研究了它们之间混合编程的原理和实现机制,并且给出了具体条件下的混合编程方法和步骤。实验表明,给出的Matlab与C/C++混合编程接口及应用方法是有效、实用的。  相似文献   

17.
高性能服务器底层网络通信模块的设计方法   总被引:7,自引:1,他引:6       下载免费PDF全文
在对I/O完成端口进行底层封装的基础上,提出一种具有高性能的、可扩展性的通用网络通信模块设计方案。该方案采用多种系统性能优化技术,如线程池、对象池和环形缓存区等。该模块在Win32平台上用C++开发完成,经过严格的压力和性能测试后,实验结果表明该模块能够支持海量并发连接,具有较高的数据吞吐量,在实际项目应用中也取得了良好的表现。  相似文献   

18.
The Lambda Library (LL) adds a form of lambda functions to C++, which are common in functional programming languages. The LL is implemented as a template library using standard C++; thus no language extensions or preprocessing is required. The LL consists of a rich set of tools for defining unnamed functions. In particular these unnamed functions work seamlessly with the generic algorithms in the C++ Standard Library. The LL offers significant improvements, in terms of generality and ease of use, compared to the current tools in the C++ Standard Library. Copyright © 2003 John Wiley & Sons, Ltd.  相似文献   

19.
具有并发类库的C++   总被引:1,自引:1,他引:1  
杨延中  王为  田籁声 《软件学报》1998,9(6):401-404
本文探讨如何通过类库将并发性引入顺序面向对象语言.以C++为例,在并发类库中提供并发类及相应工具,使之支持分布并行的面向对象程序设计.本文介绍并发类库及语言底层支撑系统的设计与实现,最后给出初步测试结果.  相似文献   

20.
C++语言是当前十分流行的、面向对象程序设计语言。通过对C++语言的深入研究以及较多的编程实践,总结归纳了C++语言的知识体系和编程中的几个常见问题,比如构造函数、对象指针、const数据和成员的访问属性等,对这些容易搞混淆的问题逐一进行详尽的分析和说明,并解释了其原因所在。通过阅读该文可为编程者带来有益的帮助,以便编程中碰到同类问题时能够解决。  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号