没有合适的资源?快使用搜索试试~ 我知道了~
C++_CLI标准.pdf
需积分: 10 19 下载量 11 浏览量
2010-10-29
11:10:57
上传
评论 1
收藏 1.68MB PDF 举报
温馨提示
试读
301页
C++/CLI 5 Language Specification Working Draft 1.14, Aug 2005
资源推荐
资源详情
资源评论
Publication Time: 8/22/2005 3:16 PM
Ecma/TC39-TG5/2005/024 1
2
3
4
C++/CLI 5
Language Specification 6
7
Working Draft 1.14, Aug 2005 8
9
10
11
12
Table of Contents
iii
Table of Contents 1
Introduction...................................................................................................................................................xii 2
1. Scope.............................................................................................................................................................1 3
2. Conformance ...............................................................................................................................................2 4
3. Normative references..................................................................................................................................3 5
4. Definitions....................................................................................................................................................4 6
5. Notational conventions................................................................................................................................7 7
6. Acronyms and abbreviations .....................................................................................................................8 8
7. General description.....................................................................................................................................9 9
8. Language overview....................................................................................................................................10 10
8.1 Getting started ....................................................................................................................................... 10 11
8.2 Types ..................................................................................................................................................... 10 12
8.2.1 Fundamental types and the CLI ...................................................................................................... 12 13
8.2.2 Conversions .................................................................................................................................... 13 14
8.2.3 CLI array types ............................................................................................................................... 13 15
8.2.4 Type system unification.................................................................................................................. 13 16
8.2.5 Pointers, handles, and null .............................................................................................................. 14 17
8.3 Parameters ............................................................................................................................................. 16 18
8.4 Automatic memory management........................................................................................................... 17 19
8.5 Expressions............................................................................................................................................ 18 20
8.6 Statements.............................................................................................................................................. 19 21
8.7 Delegates ............................................................................................................................................... 19 22
8.8 Native and ref classes ............................................................................................................................ 20 23
8.8.1 Literal fields.................................................................................................................................... 20 24
8.8.2 Initonly fields.................................................................................................................................. 21 25
8.8.3 Functions......................................................................................................................................... 21 26
8.8.4 Properties ........................................................................................................................................ 21 27
8.8.5 Events.............................................................................................................................................. 23 28
8.8.6 Static operators ............................................................................................................................... 24 29
8.8.7 Instance constructors....................................................................................................................... 25 30
8.8.8 Destructors and finalizers ............................................................................................................... 25 31
8.8.9 Static constructors........................................................................................................................... 26 32
8.8.10 Inheritance .................................................................................................................................... 27 33
8.9 Value classes ......................................................................................................................................... 28 34
8.10 Interfaces ............................................................................................................................................. 29 35
8.11 Enums.................................................................................................................................................. 30 36
8.12 Namespaces and assemblies ................................................................................................................ 30 37
8.13 Versioning ........................................................................................................................................... 31 38
8.14 Attributes ............................................................................................................................................. 32 39
8.15 Generics............................................................................................................................................... 33 40
8.15.1 Creating and consuming generics ................................................................................................. 33 41
8.15.2 Constraints .................................................................................................................................... 34 42
8.15.3 Generic functions.......................................................................................................................... 36 43
9. Lexical structure........................................................................................................................................37 44
9.1 Tokens ................................................................................................................................................... 37 45
9.1.1 Identifiers ........................................................................................................................................ 37 46
9.1.2 Keywords ........................................................................................................................................ 38 47
C++/CLI Language Specification
iv
9.1.3 Literals ............................................................................................................................................ 39
1
9.1.4 Operators and punctuators .............................................................................................................. 40 2
10. Basic concepts..........................................................................................................................................41 3
10.1 Assemblies........................................................................................................................................... 41 4
10.2 Application entry point........................................................................................................................ 41 5
10.3 Importing types from assemblies......................................................................................................... 41 6
10.4 Reserved names ................................................................................................................................... 42 7
10.5 Members.............................................................................................................................................. 43 8
10.5.1 Value class members..................................................................................................................... 43 9
10.5.2 Delegate members......................................................................................................................... 43 10
10.6 Member access .................................................................................................................................... 43 11
10.6.1 Declared accessibility ................................................................................................................... 43 12
10.7 Name lookup ....................................................................................................................................... 44 13
11. Preprocessor ............................................................................................................................................ 47 14
11.1 Conditional inclusion........................................................................................................................... 47 15
11.2 Predefined macro names...................................................................................................................... 47 16
12. Types ........................................................................................................................................................48 17
12.1 Value types .......................................................................................................................................... 48 18
12.1.1 Fundamental types ........................................................................................................................ 49 19
12.2 Class types ........................................................................................................................................... 50 20
12.2.1 Value classes................................................................................................................................. 50 21
12.2.2 Ref classes..................................................................................................................................... 50 22
12.2.3 Interface classes ............................................................................................................................ 50 23
12.2.4 Delegate types............................................................................................................................... 50 24
12.3 Declarator types................................................................................................................................... 50 25
12.3.1 Raw types...................................................................................................................................... 51 26
12.3.2 Pointer types ................................................................................................................................. 51 27
12.3.3 Handle types ................................................................................................................................. 51 28
12.3.4 Null type ....................................................................................................................................... 52 29
12.3.5 Reference types............................................................................................................................. 52 30
12.3.6 Interior pointers............................................................................................................................. 52 31
12.3.7 Pinning pointers ............................................................................................................................ 54 32
12.3.8 Native arrays ................................................................................................................................. 56 33
12.4 Top-level type visibility ...................................................................................................................... 56 34
13. Variables ..................................................................................................................................................57 35
13.1 gc-lvalues............................................................................................................................................. 57 36
13.1.1 Standard conversions .................................................................................................................... 57 37
13.1.2 Expressions ................................................................................................................................... 58 38
13.1.3 Reference initializers .................................................................................................................... 59 39
13.1.4 Temporary objects ........................................................................................................................ 59 40
13.2 File-scope and namespace-scope variables ......................................................................................... 59 41
13.3 Direct initialization.............................................................................................................................. 59 42
14. Conversions..............................................................................................................................................61 43
14.1 Conversion sequences ......................................................................................................................... 61 44
14.2 Standard conversions........................................................................................................................... 61 45
14.2.1 Handle conversions....................................................................................................................... 61 46
14.2.2 Pointer conversions....................................................................................................................... 62 47
14.2.3 Lvalue conversions ....................................................................................................................... 63 48
14.2.4 Integral promotions....................................................................................................................... 63 49
14.2.5 String literal conversions .............................................................................................................. 64 50
14.2.6 Boxing conversions....................................................................................................................... 65 51
Table of Contents
v
14.3 Implicit conversions ............................................................................................................................ 65
1
14.3.1 Implicit constant expression conversions ..................................................................................... 65 2
14.3.2 User-defined implicit conversions ................................................................................................ 65 3
14.3.3 Boolean Equivalence .................................................................................................................... 65 4
14.4 Explicit conversions ............................................................................................................................ 66 5
14.5 User-defined conversions .................................................................................................................... 66 6
14.5.1 Constructors.................................................................................................................................. 66 7
14.5.2 Explicit conversion functions ....................................................................................................... 66 8
14.5.3 Static conversion functions........................................................................................................... 66 9
14.6 Parameter array conversions................................................................................................................ 67 10
14.7 Naming conventions............................................................................................................................ 67 11
15. Expressions .............................................................................................................................................. 69 12
15.1 Function members ............................................................................................................................... 69 13
15.2 Primary expressions............................................................................................................................. 70 14
15.3 Postfix expressions .............................................................................................................................. 70 15
15.3.1 Subscripting and indexed access................................................................................................... 71 16
15.3.2 Function call ................................................................................................................................. 71 17
15.3.3 Explicit type conversion (functional notation).............................................................................. 71 18
15.3.4 Class member access..................................................................................................................... 72 19
15.3.5 Increment and decrement.............................................................................................................. 72 20
15.3.6 Dynamic cast................................................................................................................................. 72 21
15.3.7 Type identification........................................................................................................................ 73 22
15.3.8 Static cast ...................................................................................................................................... 74 23
15.3.9 Reinterpret cast ............................................................................................................................. 75 24
15.3.10 Const cast.................................................................................................................................... 75 25
15.3.11 Safe cast ...................................................................................................................................... 75 26
15.4 Unary expressions ............................................................................................................................... 76 27
15.4.1 Unary operators............................................................................................................................. 76 28
15.4.2 Increment and decrement.............................................................................................................. 79 29
15.4.3 Sizeof ............................................................................................................................................ 79 30
15.4.4 New............................................................................................................................................... 79 31
15.4.5 Delete............................................................................................................................................ 79 32
15.4.6 The gcnew operator....................................................................................................................... 80 33
15.5 Explicit type conversion (cast notation) .............................................................................................. 80 34
15.6 Additive operators ............................................................................................................................... 81 35
15.6.1 Delegate combination ................................................................................................................... 81 36
15.6.2 Delegate removal .......................................................................................................................... 81 37
15.6.3 String concatenation...................................................................................................................... 81 38
15.7 Shift operators ..................................................................................................................................... 82 39
15.8 Relational operators............................................................................................................................. 82 40
15.8.1 Handle equality operators ............................................................................................................. 82 41
15.8.2 Delegate equality operators........................................................................................................... 83 42
15.8.3 String equality............................................................................................................................... 83 43
15.9 Logical AND operator......................................................................................................................... 83 44
15.10 Logical OR operator .......................................................................................................................... 84 45
15.11 Conditional operator.......................................................................................................................... 84 46
15.12 Assignment operators ........................................................................................................................ 84 47
15.13 Constant expressions ......................................................................................................................... 84 48
15.14 Property and event rewrite rules........................................................................................................ 85 49
16. Statements................................................................................................................................................ 88 50
16.1 Selection statements ............................................................................................................................ 88 51
16.1.1 The switch statement..................................................................................................................... 88 52
16.2 Iteration statements.............................................................................................................................. 88 53
剩余300页未读,继续阅读
资源评论
vc_china
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于UC3842+LTS26Q1565A设计PC机充电器 硬件(原理图+PCB)工程文件.zip
- Hive SQL经典面试题,大数据SQL经典面试题
- Qt实现喷码器代码,实现二维码、条形码、图形的旋转、移动等
- 基于LM324芯片比较器传感器模块AD09设计硬件(原理图+PCB)工程文件.zip
- HTTP请求 - 记一笔-添加记账.jmx
- 2205040245凡永超硬间隔svm.ipynb
- Qt喷码器demo,演示软件,不是代码
- 目标跟踪-基于目标中心点同时进行目标检测+目标跟踪算法实现-项目源码-优质项目实战.zip
- Python《文本特征分析-全唐诗数据挖掘及分析 》+源代码
- Netron-Setup-4.5.0
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功