ice slice The Slice Language



Here, we present the Slice language. Slice (Specification Language for Ice) is the fundamental abstraction mechanism for separating object interfaces from their implementations. Slice establishes a contract between client and server that describes the types and object interfaces used by an application. This description is independent of the implementation language, so it does not matter whether the client is written in the same language as the server.

在这一章我们将介绍Slice语言  Slice (Specification Language for Ice)是一种用于使对象接口与其实现相分离的基础性抽象机制。Slice在客户与服务器之间建立合约,描述应用所使用的各种类型及对象接口。这种描述与实现语言无关,所以编写客户所用的语言是否与编写服务器所用的语言相同,这没有什么关系。

Slice definitions are compiled for a particular implementation language by a compiler. The compiler translates the language-independent definitions into language-specific type definitions and APIs. These types and APIs are used by the developer to provide application functionality and to interact with Ice. The translation algorithms for various implementation languages are known as language mappings. Currently, Ice defines language mappings for C++, Java, C#, Python, Objective-C, Ruby, and PHP.

Slice定义由编译器编译到特定的实现语言 。编译器把与语言无关的定义翻译成针对特定语言的类型定义和API。开发者使用这些类型和API来提供应用功能,并与Ice交互。用于各种实现语言的翻译算法称为语言映射(language mappings)。Ice目前定义了C++, Java, C#, Python, Objective-C, Ruby, 和PHP的语言映射。

Because Slice describes interfaces and types (but not implementations), it is a purely declarative language; there is no way to write executable statements in Slice.

因为Slice描述的是接口和类型 (不是实现),它是一种纯粹的描述性语言;你无法用Slice编写可执行语句。

Slice definitions focus on object interfaces, the operations supported by those interfaces, and exceptions that may be raised by operations. In addition, Slice offers features forobject persistence. This requires quite a bit of supporting machinery; in particular, much of Slice is concerned with the definition of data types. This is because data can be exchanged between client and server only if their types are defined in Slice. You cannot exchange arbitrary C++ data between client and server because it would destroy the language independence of Ice. However, you can always create a Slice type definition that corresponds to the C++ data you want to send, and then you can transmit the Slice type.

Slice定义关注的焦点是对象接口、这些接口所支持的操作,以及操作可能引发的异常。此外,Slice还提供了一些用于对象持久的特性 (参见第21章)。这需要相当多的支持机制;特别地,Slice的相当一部分关注的是数据类型的定义。这是因为,只有在其类型用Slice进行了定义之后,数据才能在客户与服务器之间交换。你不能在客户与服务器之间交换任意的C++数据,因为 这可能会摧毁Ice的语言无关性。但是,你总能创建一种Slice类型定义,与你想要发送的C++数据相对应,然后你就可以传送这种Slice类型了。

We present the full syntax and semantics of Slice here. Because much of Slice is based on C++ and Java, we focus on those areas where Slice differs from C++ or Java or constrains the equivalent C++ or Java feature in some way. Slice features that are identical to C++ and Java are mentioned mostly by example.

在此我们将介绍Slice的完整语法和语义。因为Slice的许多语法和语义都是以C++和Java为基础的,我们将特别关注Slice与C++或Java不同的部分,或是Slice以某种方式限制了等价的C++或Java特性的部分。与C++和Java特性相同的Slice特性通常会用例子来说明。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
毕业设计,基于SpringBoot+Vue+MySQL开发的体育馆管理系统,源码+数据库+毕业论文+视频演示 现代经济快节奏发展以及不断完善升级的信息化技术,让传统数据信息的管理升级为软件存储,归纳,集中处理数据信息的管理方式。本体育馆管理系统就是在这样的大环境下诞生,其可以帮助管理者在短时间内处理完毕庞大的数据信息,使用这种软件工具可以帮助管理人员提高事务处理效率,达到事半功倍的效果。此体育馆管理系统利用当下成熟完善的SpringBoot框架,使用跨平台的可开发大型商业网站的Java语言,以及最受欢迎的RDBMS应用软件之一的Mysql数据库进行程序开发。实现了用户在线选择试题并完成答题,在线查看考核分数。管理员管理收货地址管理、购物车管理、场地管理、场地订单管理、字典管理、赛事管理、赛事收藏管理、赛事评价管理、赛事订单管理、商品管理、商品收藏管理、商品评价管理、商品订单管理、用户管理、管理员管理等功能。体育馆管理系统的开发根据操作人员需要设计的界面简洁美观,在功能模块布局上跟同类型网站保持一致,程序在实现基本要求功能时,也为数据信息面临的安全问题提供了一些实用的解决方案。可以说该程序在帮助管理者高效率地处理工作事务的同时,也实现了数据信息的整体化,规范化与自动化。 关键词:体育馆管理系统;SpringBoot框架;Mysql;自动化
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值