侯捷stl源码剖析注释之46 sgi-stl-uninitialized

合集下载

iUAP 操作手册说明书

iUAP 操作手册说明书

目录业务场景 (3)一、step by step做节点开发 (4)1、创建工程 (4)1.1、新建项目 (4)1.2、数据库准备 (8)2、元数据建模 (8)2.1、新建元数据 (8)2.2、新建实体 (9)2.3、元数据设计 (10)2.4、发布元数据 (11)3、向导生成代码 (13)4、界面展现 (16)4.1、界面注册 (16)4.2 启动中间件 (17)界面效果展现 (17)二、代码解析 (18)1、代码结构 (19)2、前台代码解析 (21)2.1、前端页面架构 (21)1/ 53用友UDN技术社区2.2、单页面应用(SPA) (21)2.3、前端路由 (22)2.4、AMD模块化规范 (23)2.5、Currtype.html解析 (24)2.6、meta.js (25)2.7、Currtype.js解析 (25)3、后台代码解析 (27)3.1、实体 (28)3.2、后台代码功能及常见注解 (31)3.3、查询方法 (34)3.4、新增 (36)3.5、保存 (37)3.6、删行 (39)4、项目配置解析 (40)4.1、Maven配置 (40)4.2、Spring集成 (46)4.3、持久化 (47)三、功能开发 (49)1、前台必输项设置 (49)2、后台校验 (50)2/ 53用友UDN技术社区 (52)业务场景iUAP平台是面向企业互联网应用的企业互联网运营平台。

本指南以一个后台管理中的-列表类型页面为例,演示如何开发标准节点的操作步骤。

1、需要安装iUAP-STUDIO开发工具(可以参考iuap后台环境搭建、Iuap前端环境搭建视频)2、元数据建立实体模型,进行实体的设计3、向导生成。

4、功能开发。

3/ 53用友UDN技术社区4/ 53用友UDN技术社区一、step by step做节点开发1、创建工程1.1、新建项目“文件”“新建”-“其他”- •首页注册节点5 / 53用友UDN 技术社区 选择新建iuap 项目,点击“下一步”6/ 53 用友UDN 技术社区 填写项目信息,点击完成7 / 53用友UDN 技术社区 建好的项目如下图所示8 / 53用友UDN 技术社区 1.2、数据库准备此处我们先使用postgreysql 数据库,数据库配置在文件application.properties 文件里2、元数据建模2.1、新建元数据切换到iuap 开发视图下,选中上面的项目,下面的“元数据管理器”就会出现train 项目中的元数据在元数据管理器中,选中train 根节点,点击右键,选择“新建实体组件”9 / 53用友UDN 技术社区 在界面上录入文件名“train_currtype”,点击确定2.2、新建实体属性区10 / 53用友UDN 技术社区 2.3、元数据设计设置属性可以按照如下图所示,录入名称、显示名称、类型。

plc指令1

plc指令1

FXPLC二进制浮点数变换BIN整数INT指令 (4)三菱PLC二进制浮点数开平方指令DESOR (5)二进制浮点数乘法指令DEMUL (6)二进制浮点数除法指令DEDIV (6)二进制浮点减法指令DESUB (6)二进制浮点加法指令DEADD (7)十进制浮点转换二进制浮点指令DEBIN (8)二进制浮点转换十进制浮点指令DEBCD (8)HEX--ASCII转换指令ASCI (10)校验码指令CCD (11)上下字节交换指令SWAP (13)二进制浮点比较指令DECMP (14)二进制浮点区域比较指令DEZCP (14)八进制位传送指令PRUN (15)串行数据传送指令RS(FX系列) (16)三菱PLCBFM写入指令TO(FX系列) (19)BFM读出指令FROM(FX系列) (19)十六键输入指令HKY (20)十字键输入指令TKY (21)数据排序指令SORT (22)斜坡指令RAMP (24)交替输出指令AL T (24)特殊定时器STMR指令 (25)示教定时器TTMR指令 (26)增量方式凸轮控制指令INCD (29)绝对方式凸轮控制指令ABSD (30)数据查找指令SER (32)带加减速脉冲输出指令PLSR (33)脉宽调制指令PWM (34)脉冲输出指令PLSY (34)脉冲密度指令SPD (35)区间比较指令DHSZ(高速计数器用) (36)比较置位指令DHSCS和复位指令DHSCR(高速计数器用) (37)阵输入指令MTR (38)输入滤波调整指令REFF (39)输入输出刷新指令REF (40)BIN开方运算指令SQR (42)信号报警的设置指令ANS,ANR (43)求平均值指令MEAN (44)ON位数判断指令BON (45)ON位数指令SUM (46)编码指令ENCO (46)比较指令DECO (47)全部复位ZRST指令 (49)移位写入SFWR与移位读出SFRD指令 (50)字右移WSFR与字左移WSFL指令 (51)位右移SFTR与位左移SFTL指令 (52)右回转ROR与左回转ROL指令 (53)求补指令NEG (54)逻辑与WAND,逻辑或WOR,逻辑异或WXOR指令 (54)增加指令INC与减少指令DEC (55)乘(除)法运算指令MUL(DIV) (56)加(减)法运算指令ADD(SUB) (56)BIN交换指令 (57)BCD交换指令 (58)三菱CC-LINK介绍 (58)位传送指令SMOV (60)原点回归指令ZRN (61)可变速脉冲输出指令PLSV (62)触点比较指令 (62)相对位置控制指令DRVI (63)绝对位置控制指令 (63)交换指令XCH (67)多点传送指令FMOV (67)成批传送BMOV (68)反相转送CML (69)传送指令M0V (69)比较指令CMP与区域比较指令ZCP (70)子程序调用CALL (71)条件跳转CJ (72)监视定时器WDT (73)中断程序实例 (74)基本顺控指令说明(五)计时器 (75)本顺控指令说明(四)定时器 (76)基本顺控指令说明(三) (77)基本顺控指令说明(二) (78)基本顺控指令说明(一) (79)状态指令STL编程方法 (80)FXPLC二进制浮点数变换BIN整数INT指令INT,INTP:十六位连续执行型与脉冲执行型DINT,DINTP:三十二位连续执行型与脉冲执行型二进制浮点数变换BIN整数INT指令的编程格式:INT D10 D20*D10:源寄存器,只能用寄存器D*D10:目标寄存器,只能用寄存器D三菱PLC二进制浮点数开平方指令DESORDESOR:连续执行型二进制浮点数开平方指令DESORP:脉冲执行型二进制浮点数开平方指令二进制浮点数开平方指令的编程格式:DESOR D10 D20*D10:源寄存器地址,可以使用寄存器D或是数值*D20:目标寄存器地址,只能使用寄存器D注:常数被指定为源数据时,PLC自动转换成二进制浮点数处理二进制浮点数乘法指令DEMULDEMUL:连续执行型二进制浮点数乘法指令DEMULP:脉冲执行型二进制浮点数乘法指令二进制浮点数乘法指令的编程格式:DEMUL D10 D20 D30*D10,D20:源寄存器地址,可以使用寄存器D或是数值*D30:目标寄存器地址,只能使用寄存器D注:常数被指定为源数据时,PLC自动转换成二进制浮点数处理二进制浮点数除法指令DEDIVDEDIV:连续执行型二进制浮点数除法指令DEDIVP:脉冲执行型二进制浮点数除法指令二进制浮点数除法指令的编程格式:DEDIV D10 D20 D30*D10,D20:源寄存器地址,可以使用寄存器D或是数值*D30:目标寄存器地址,只能使用寄存器D注:常数被指定为源数据时,PLC自动转换成二进制浮点数处理二进制浮点减法指令DESUBDESUB:连续执行型二进制浮点减法指令DESUBP:脉冲执行型二进制浮点减法指令二进制浮点减法指令的编程格式:DESUB D10 D20 D30*D10,D20:源寄存器地址,可以使用寄存器D或是数值*D30:目标寄存器地址,只能使用寄存器D注:常数被指定为源数据时,PLC自动转换成二进制浮点数处理二进制浮点加法指令DEADDDEADD:连续执行型二进制浮点数加法指令DEADDP:脉冲执行型二进制浮点数加法指令二进制浮点数加法指令的编程格式:DEADD D10 D20 D30*D10,D20:源寄存器地址,可以使用寄存器D或是数值*D30:目标寄存器地址,只能使用寄存器D注:常数被指定为源数据时,PLC自动转换成二进制浮点数处理十进制浮点转换二进制浮点指令DEBIN二进制浮点转换十进制浮点指令DEBCDASCII--HEX转换指令HEXHEX:连续执行型指令HEXP:脉冲执行型指令ASCII--HEX转换指令的编程方式:HEX D200 D100 n*D200:源寄存器起始地址,可以用T,C,D,数值或是位元件的组合如K4X0*D100:目标寄存器起始地址,可以用T,C,D或是位元件的组合如K4Y0(X除外)*n:指定要转换的字符数,只能用数值。

mt4中文帮助命令中文手册

mt4中文帮助命令中文手册

MQL4 Reference MQL4命令手册(本手册采用Office2007编写)2010年2月目录MQL4 Reference (1)MQL4命令手册 (1)Basics基础 (12)Syntax语法 (12)Comments注释 (12)Identifiers标识符 (12)Reserved words保留字 (13)Data types数据类型 (13)Type casting类型转换 (14)Integer constants整数常量 (14)Literal constants字面常量 (14)Boolean constants布尔常量 (15)Floating-point number constants (double)浮点数常量(双精度) (15)String constants字符串常量 (15)Color constants颜色常数 (16)Datetime constants日期时间常数 (16)Operations & Expressions操作表达式 (17)Expressions表达式 (17)Arithmetical operations算术运算 (17)Assignment operation赋值操作 (17)Operations of relation操作关系 (18)Boolean operations布尔运算 (18)Bitwise operations位运算 (19)Other operations其他运算 (19)Precedence rules优先规则 (20)Operators操作符 (21)Compound operator复合操作符 (21)Expression operator表达式操作符 (21)Break operator终止操作符 (21)Continue operator继续操作符 (22)Return operator返回操作符 (22)Conditional operator if-else条件操作符 (23)Switch operator跳转操作符 (23)Cycle operator while循环操作符while (24)Cycle operator for循环操作符for (24)Functions函数 (25)Function call函数调用 (26)Special functions特殊函数 (27)Variables变量 (27)Local variables局部变量 (28)Formal parameters形式变量 (28)Static variables静态变量 (29)Global variables全局变量 (29)Defining extern variables外部定义变量 (30)Initialization of variables初始化变量 (30)External functions definition外部函数的定义 (30)Preprocessor预处理 (31)Constant declaration常量声明 (31)Controlling compilation编译控制 (32)Including of files包含文件 (32)Importing of functions导入功能 (33)Standard constants标准常数 (35)Series arrays系列数组 (35)Timeframes图表周期时间 (35)Trade operations交易操作 (36)Price constants价格常数 (36)MarketInfo市场信息识别符 (36)Drawing styles画线风格 (37)Arrow codes预定义箭头 (38)Wingdings宋体 (39)Web colors颜色常数 (39)Indicator lines指标线 (40)Ichimoku Kinko Hyo (41)Moving Average methods移动平均方法 (41)MessageBox信息箱 (41)Object types对象类型 (43)Object properties对象属性 (44)Object visibility (45)Uninitialize reason codes撤销初始化原因代码 (45)Special constants特别常数 (46)Error codes错误代码 (46)Predefined variables预定义变量 (50)Ask最新卖价 (50)Bars柱数 (50)Bid最新买价 (50)Close[]收盘价 (51)Digits汇率小数位 (51)High[]最高价 (51)Low[]最低价 (52)Open[]开盘价 (53)Point点值 (53)Time[]开盘时间 (53)Volume[]成交量 (54)Program Run程序运行 (56)Program Run程序运行 (56)Imported functions call输入函数调用 (57)Runtime errors运行错误 (57)Account information账户信息 (68)AccountBalance( )账户余额 (68)AccountCredit( )账户信用点数 (68)AccountCompany( )账户公司名 (68)AccountCurrency( )基本货币 (68)AccountEquity( )账户资产净值 (68)AccountFreeMargin( )账户免费保证金 (69)AccountFreeMarginCheck()账户当前价格自由保证金 (69)AccountFreeMarginMode( )账户免费保证金模式 (69)AccountLeverage( )账户杠杆 (69)AccountMargin( )账户保证金 (69)AccountName( )账户名称 (70)AccountNumber( )账户数字 (70)AccountProfit( )账户利润 (70)AccountServer( )账户连接服务器 (70)AccountStopoutLevel( )账户停止水平值 (70)AccountStopoutMode( )账户停止返回模式 (71)Array functions数组函数 (72)ArrayBsearch()数组搜索 (72)ArrayCopy()数组复制 (72)ArrayCopyRates()数组复制走势 (73)ArrayCopySeries()数组复制系列走势 (74)ArrayDimension()返回数组维数 (75)ArrayGetAsSeries()返回数组序列 (75)ArrayInitialize()数组初始化 (75)ArrayIsSeries()判断数组连续 (75)ArrayMaximum()数组最大值定位 (76)ArrayMinimum()数组最小值定位 (76)ArrayRange()返回数组指定维数数量 (76)ArrayResize()改变数组维数 (77)ArraySetAsSeries()设定系列数组 (77)ArraySize()返回数组项目数 (78)ArraySort()数组排序 (78)Checkup检查 (79)GetLastError( )返回最后错误 (79)IsConnected( )返回联机状态 (79)IsDemo( )返回模拟账户 (79)IsDllsAllowed( )返回dll允许调用 (80)IsExpertEnabled( )返回智能交易开启状态 (80)IsLibrariesAllowed( )返回数据库函数调用 (80)IsOptimization( )返回策略测试中优化模式 (81)IsStopped( )返回终止业务 (81)IsTesting( )返回测试模式状态 (81)IsTradeAllowed( )返回允许智能交易 (81)IsTradeContextBusy( )返回其他智能交易忙 (82)IsVisualMode( )返回智能交易“图片模式” (82)UninitializeReason( )返回智能交易初始化原因 (82)Client terminal客户端信息 (83)TerminalCompany( )返回客户端所属公司 (83)TerminalName( )返回客户端名称 (83)TerminalPath( )返回客户端文件路径 (83)Common functions常规命令函数 (84)Alert弹出警告窗口 (84)Comment显示信息在走势图左上角 (84)GetTickCount获取时间标记 (84)MarketInfo在市场观察窗口返回不同数据保证金列表 (85)MessageBox创建信息窗口 (85)PlaySound播放声音 (86)Print窗口中显示文本 (86)SendFTP设置FTP (86)SendMail设置Email (87)Sleep指定的时间间隔内暂停交易业务 (87)Conversion functions格式转换函数 (88)CharToStr字符转换成字符串 (88)DoubleToStr双精度浮点转换成字符串 (88)NormalizeDouble给出环绕浮点值的精确度 (88)StrToDouble字符串型转换成双精度浮点型 (89)StrToInteger字符串型转换成整型 (89)StrToTime字符串型转换成时间型 (89)TimeToStr时间类型转换为"yyyy.mm.dd hh:mi"格式 (89)Custom indicators自定义指标 (91)IndicatorBuffers (91)IndicatorCounted (92)IndicatorDigits (92)IndicatorShortName (93)SetIndexArrow (94)SetIndexBuffer (94)SetIndexDrawBegin (95)SetIndexEmptyValue (95)SetIndexLabel (96)SetIndexShift (97)SetIndexStyle (98)SetLevelStyle (98)SetLevelValue (99)Date & Time functions日期时间函数 (100)Day (100)DayOfWeek (100)Hour (100)Minute (101)Month (101)Seconds (101)TimeCurrent (101)TimeDay (102)TimeDayOfWeek (102)TimeDayOfYear (102)TimeHour (102)TimeLocal (102)TimeMinute (103)TimeMonth (103)TimeSeconds (103)TimeYear (103)Year (104)File functions文件函数 (105)FileClose关闭文件 (105)FileDelete删除文件 (105)FileFlush将缓存中的数据刷新到磁盘上去 (106)FileIsEnding文件结尾 (106)FileIsLineEnding (107)FileOpen打开文件 (107)FileOpenHistory历史目录中打开文件 (108)FileReadArray将二进制文件读取到数组中 (108)FileReadDouble从文件中读取浮点型数据 (109)FileReadInteger从当前二进制文件读取整形型数据 (109)FileReadNumber (109)FileReadString从当前文件位置读取字串符 (110)FileSeek文件指针移动 (110)FileSize文件大小 (111)FileTell文件指针的当前位置 (111)FileWrite写入文件 (112)FileWriteArray一个二进制文件写入数组 (112)FileWriteDouble一个二进制文件以浮动小数点写入双重值 (113)FileWriteInteger一个二进制文件写入整数值 (113)FileWriteString当前文件位置函数写入一个二进制文件字串符 (114)Global variables全局变量 (115)GlobalVariableCheck (115)GlobalVariableDel (115)GlobalVariableGet (115)GlobalVariableName (116)GlobalVariableSet (116)GlobalVariableSetOnCondition (116)GlobalVariablesTotal (117)Math & Trig数学和三角函数 (119)MathAbs (119)MathArccos (119)MathArcsin (119)MathArctan (120)MathCeil (120)MathCos (120)MathExp (121)MathFloor (121)MathLog (122)MathMax (122)MathMin (122)MathMod (122)MathPow (123)MathRand (123)MathRound (123)MathSin (124)MathSqrt (124)MathSrand (124)MathTan (125)Object functions目标函数 (126)ObjectCreate建立目标 (126)ObjectDelete删除目标 (127)ObjectDescription目标描述 (127)ObjectFind查找目标 (127)ObjectGet目标属性 (128)ObjectGetFiboDescription斐波纳契描述 (128)ObjectGetShiftByValue (128)ObjectGetValueByShift (129)ObjectMove移动目标 (129)ObjectName目标名 (129)ObjectsDeleteAll删除所有目标 (130)ObjectSet改变目标属性 (130)ObjectSetFiboDescription改变目标斐波纳契指标 (131)ObjectSetText改变目标说明 (131)ObjectsTotal返回目标总量 (131)ObjectType返回目标类型 (132)String functions字符串函数 (133)StringConcatenate字符串连接 (133)StringFind字符串搜索 (133)StringGetChar字符串指定位置代码 (133)StringLen字符串长度 (134)StringSubstr提取子字符串 (134)StringTrimLeft (135)StringTrimRight (135)Technical indicators技术指标 (136)iAC比尔.威廉斯的加速器或减速箱振荡器 (136)iAD离散指标 (136)iAlligator比尔・威廉斯的鳄鱼指标 (136)iADX移动定向索引 (137)iATR平均真实范围 (137)iAO比尔.威廉斯的振荡器 (138)iBearsPower熊功率指标 (138)iBands保力加通道技术指标 (138)iBandsOnArray保力加通道指标 (139)iBullsPower牛市指标 (139)iCCI商品通道索引指标 (139)iCCIOnArray商品通道索引指标 (140)iCustom指定的客户指标 (140)iDeMarker (140)iEnvelopes包络指标 (141)iEnvelopesOnArray包络指标 (141)iForce强力索引指标 (142)iFractals分形索引指标 (142)iGator随机震荡指标 (142)iIchimoku (143)iBWMFI比尔.威廉斯市场斐波纳契指标 (143)iMomentum动量索引指标 (143)iMomentumOnArray (144)iMFI资金流量索引指标 (144)iMA移动平均指标 (144)iMAOnArray (145)iOsMA移动振动平均震荡器指标 (145)iMACD移动平均数汇总/分离指标 (146)iOBV能量潮指标 (146)iSAR抛物线状止损和反转指标 (146)iRSI相对强弱索引指标 (147)iRSIOnArray (147)iRVI相对活力索引指标 (147)iStdDev标准偏差指标 (148)iStdDevOnArray (148)iStochastic随机震荡指标 (148)iWPR威廉指标 (149)Timeseries access时间序列图表数据 (150)iBars柱的数量 (150)iClose (150)iHigh (151)iHighest (151)iLow (152)iLowest (152)iOpen (152)iTime (153)iVolume (153)Trading functions交易函数 (155)Execution errors (155)OrderClose (157)OrderCloseBy (158)OrderClosePrice (158)OrderCloseTime (158)OrderComment (159)OrderCommission (159)OrderDelete (159)OrderExpiration (160)OrderLots (160)OrderMagicNumber (160)OrderModify (160)OrderOpenPrice (161)OrderOpenTime (161)OrderPrint (162)OrderProfit (162)OrderSelect (162)OrderSend (163)OrdersHistoryTotal (164)OrderStopLoss (164)OrdersTotal (164)OrderSwap (165)OrderSymbol (165)OrderTakeProfit (165)OrderTicket (166)OrderType (166)Window functions窗口函数 (167)HideTestIndicators隐藏指标 (167)Period使用周期 (167)RefreshRates刷新预定义变量和系列数组的数据 (167)Symbol当前货币对 (168)WindowBarsPerChart可见柱总数 (168)WindowExpertName智能交易系统名称 (169)WindowFind返回名称 (169)WindowFirstVisibleBar第一个可见柱 (169)WindowHandle (169)WindowIsVisible图表在子窗口中可见 (170)WindowOnDropped (170)WindowPriceMax (170)WindowPriceMin (171)WindowPriceOnDropped (171)WindowRedraw (172)WindowScreenShot (172)WindowTimeOnDropped (173)WindowsTotal指标窗口数 (173)WindowXOnDropped (173)WindowYOnDropped (174)Obsolete functions过时的函数 (175)MetaQuotes Language 4 (MQL4) 是一种新的内置型程序用来编写交易策略。

侯捷老师——STL源码剖析

侯捷老师——STL源码剖析

侯捷老师——STL源码剖析侯捷老师是国内知名的C++专家,他在C++领域有着很高的知名度和影响力。

他的《STL源码剖析》是一本非常经典的C++书籍,深入剖析了C++标准模板库(Standard Template Library,STL)的源代码,并详细解释了其设计思想和实现细节。

下面是对这本书的1200字以上的介绍。

《STL源码剖析》是一本写给C++程序员的经典著作,它由侯捷老师亲自编写,内容非常详尽和深入。

这本书主要介绍了C++标准模板库(STL)的源代码,并解析了其中的设计思想和实现细节。

通过阅读这本书,读者可以更好地理解STL的底层原理,提高自己的C++编程能力。

这本书共分为13个章节,每个章节都涉及了STL的不同组件和特性。

书中的内容既包括理论知识,也包括具体的代码实现。

侯捷老师用通俗易懂的语言和形象生动的例子,对STL的各个组件进行了详细介绍。

他从容器、迭代器、算法和函数对象等方面入手,逐步展开对STL的剖析。

每一章的结尾都有相关的练习题,读者可以通过做题来巩固所学知识。

在《STL源码剖析》中,侯捷老师对STL的源代码进行了深入分析,解释了其中的设计思想和实现原理。

他通过对容器的底层结构和操作进行剖析,揭示了STL的高效性和灵活性。

在对算法和函数对象的讲解中,他详细介绍了STL中的各种常用算法,并解释了它们的内部实现原理。

通过这种深入的分析,读者可以更好地理解STL的运作机制,并能够灵活运用STL进行程序设计。

除了对STL源代码的剖析,侯捷老师还对STL的使用和扩展进行了说明。

他介绍了STL的使用注意事项和常见问题,并给出了一些实用的编程技巧和优化建议。

此外,他还展示了如何扩展STL,给出了一些自定义容器和算法的示例。

这些内容对于想要深入学习和应用STL的读者来说是非常有价值的。

总的来说,侯捷老师的《STL源码剖析》是一本非常权威和深入的C++书籍,对于想要深入学习STL的C++程序员来说是一本必读之作。

辛迪控制系统SIMATIC PCS neo功能库手册说明书

辛迪控制系统SIMATIC PCS neo功能库手册说明书

5
Monitoring blocks
6
Controller blocks
7
Motor and valve blocks
8
Interlock blocks
9
Mathematical block
10
Counter blocks
11
Digital logic blocks
12
Services
13
14 TCP communication blocks
SIMATIC SIMATIC PCS neo SIMATIC Process Function Library (V3.0)
Function Manual
About this document
1
Deployment conditions
2
Basics
3
Library structure
4
Operator control blocks
CAUTION
indicates that minor personal injury can result if proper precautions are not taken.
NOTICE
indicates that property damage can result if proper precautions are not taken. If more than one degree of danger is present, the warning notice representing the highest degree of danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage.

阿里巴巴Java开发手册(详尽版)

阿里巴巴Java开发手册(详尽版)
2. 【强制】代码中的命名严禁使用拼音与英文混合的方式,更不允许直接使用中文的方式。 说明:正确的英文拼写和语法可以让阅读者易于理解,避免歧义。注意,即使纯拼音命名方式 也要避免采用。 正例:alibaba / taobao / youku / hangzhou 等国际通用的名称,可视同英文。 反例:DaZhePromotion [打折] / getPingfenByName() [评分] / int 某变量 = 3
考虑到可以零距离地与众多开发同学进行互动,决定未来在线维护《手册》内容, 此 1.4.0 的 PDF 版本,是最为详尽的版本,新增设计规约大章节,并增加若干条目;我 们已经在 2017 杭州云栖大会上发布了阿里巴巴 Java 开发规约插件(点此下载),阿里 云效(一站式企业协同研发云)也集成了代码规约扫描引擎。最后,《码出高效—— 阿里巴巴 Java 开发手册详解》即将出版,敬请关注。
(注:浏览时请使用 PDF 左侧导航栏)
绿盟市场提供各种软件下载和文档
www.xdowns.com
版本号 1.4.0
阿里巴巴 Java 开发手册
Java 开发手册
制定团队 阿里巴巴集团技术团队
更新日期 2018.5.20
备注 增加设计规约(详尽版)
一、编程规约
(一) 命名风格
1. 【强制】代码中的命名均不能以下划线或美元符号开始,也不能以下划线或美元符号结束。 反例:_name / __name / $name / name_ / name$ / name__
6. 【强制】抽象类命名使用 Abstract 或 Base 开头;异常类命名使用 Exception 结尾;测试类 命名以它要测试的类的名称开始,以 Test 结尾。
7. 【强制】类型与中括号紧挨相连来表示数组。 正例:定义整形数组 int[] arrayDemo; 反例:在 main 参数中,使用 String args[]来定义。

侯捷stl源码剖析注释之11 sgi-std-bastring-cc

侯捷stl源码剖析注释之11 sgi-std-bastring-cc

<std\> 完整列表 The Annotated STL Sources 1G++ 2.91.57,cygnus\cygwin-b20\include\g++\std\ 完整列表// Member templates for the -*- C++ -*- string classes.// Copyright (C) 1994 Free Software Foundation// This file is part of the GNU ANSI C++ Library. This library is free// software; you can redistribute it and/or modify it under the// terms of the GNU General Public License as published by the// Free Software Foundation ; either version 2, or (at your option)// any later version.// This library is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this library; see the file COPYING. If not, write to the Free// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.// As a special exception, if you link this library with files// compiled with a GNU compiler to produce an executable, this does not cause // the resulting executable to be covered by the GNU General Public License. // This exception does not however invalidate any other reasons why// the executable file might be covered by the GNU General Public License.// Written by Jason Merrill based upon the specification by Takanori Adachi // in ANSI X3J16/94-0013R2.extern "C++" {template <class charT, class traits, class Allocator>inline void * basic_string <charT, traits, Allocator>::Rep::operator new (size_t s, size_t extra){return Allocator::allocate(s + extra * sizeof (charT));}template <class charT, class traits, class Allocator>inline void basic_string <charT, traits, Allocator>::Rep::operator delete (void * ptr){Allocator::deallocate(ptr, sizeof(Rep) +reinterpret_cast<Rep *>(ptr)->res *sizeof (charT));}template <class charT, class traits, class Allocator>inline size_t basic_string <charT, traits, Allocator>::Rep::frob_size (size_t s){<std\> 完整列表 The Annotated STL Sources 2 size_t i = 16;while (i < s) i *= 2;return i;}template <class charT, class traits, class Allocator>inline basic_string <charT, traits, Allocator>::Rep *basic_string <charT, traits, Allocator>::Rep::create (size_t extra){extra = frob_size (extra + 1);Rep *p = new (extra) Rep;p->res = extra;p->ref = 1;p->selfish = false;return p;}template <class charT, class traits, class Allocator>charT * basic_string <charT, traits, Allocator>::Rep::clone (){Rep *p = Rep::create (len);p->copy (0, data (), len);p->len = len;return p->data ();}template <class charT, class traits, class Allocator>inline bool basic_string <charT, traits, Allocator>::Rep::excess_slop (size_t s, size_t r){return 2 * (s <= 16 ? 16 : s) < r;}template <class charT, class traits, class Allocator>inline bool basic_string <charT, traits, Allocator>::check_realloc (basic_string::size_type s) const{s += sizeof (charT);rep ()->selfish = false;return (rep ()->ref > 1|| s > capacity ()|| Rep::excess_slop (s, capacity ()));}template <class charT, class traits, class Allocator>void basic_string <charT, traits, Allocator>::alloc (basic_string::size_type size, bool save)<std\> 完整列表 The Annotated STL Sources 3{if (! check_realloc (size))return;Rep *p = Rep::create (size);if (save){p->copy (0, data (), length ());p->len = length ();}elsep->len = 0;repup (p);}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>&basic_string <charT, traits, Allocator>::replace (size_type pos1, size_type n1,const basic_string& str, size_type pos2, size_type n2){const size_t len2 = str.length ();if (pos1 == 0 && n1 >= length () && pos2 == 0 && n2 >= len2)return operator= (str);OUTOFRANGE (pos2 > len2);if (n2 > len2 - pos2)n2 = len2 - pos2;return replace (pos1, n1, str.data () + pos2, n2);}template <class charT, class traits, class Allocator>inline void basic_string <charT, traits, Allocator>::Rep::copy (size_t pos, const charT *s, size_t n){if (n)traits::copy (data () + pos, s, n);}template <class charT, class traits, class Allocator>inline void basic_string <charT, traits, Allocator>::Rep::move (size_t pos, const charT *s, size_t n){if (n)<std\> 完整列表 The Annotated STL Sources 4 traits::move (data () + pos, s, n);}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>&basic_string <charT, traits, Allocator>::replace (size_type pos, size_type n1, const charT* s, size_type n2){const size_type len = length ();OUTOFRANGE (pos > len);if (n1 > len - pos)n1 = len - pos;LENGTHERROR (len - n1 > max_size () - n2);size_t newlen = len - n1 + n2;if (check_realloc (newlen)){Rep *p = Rep::create (newlen);p->copy (0, data (), pos);p->copy (pos + n2, data () + pos + n1, len - (pos + n1));p->copy (pos, s, n2);repup (p);}else{rep ()->move (pos + n2, data () + pos + n1, len - (pos + n1));rep ()->copy (pos, s, n2);}rep ()->len = newlen;return *this;}template <class charT, class traits, class Allocator>inline void basic_string <charT, traits, Allocator>::Rep::set (size_t pos, const charT c, size_t n){traits::set (data () + pos, c, n);}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>& basic_string <charT, traits, Allocator>:: replace (size_type pos, size_type n1, size_type n2, charT c){const size_t len = length ();OUTOFRANGE (pos > len);if (n1 > len - pos)n1 = len - pos;LENGTHERROR (len - n1 > max_size () - n2);<std\> 完整列表 The Annotated STL Sources 5size_t newlen = len - n1 + n2;if (check_realloc (newlen)){Rep *p = Rep::create (newlen);p->copy (0, data (), pos);p->copy (pos + n2, data () + pos + n1, len - (pos + n1));p->set (pos, c, n2);repup (p);}else{rep ()->move (pos + n2, data () + pos + n1, len - (pos + n1));rep ()->set (pos, c, n2);}rep ()->len = newlen;return *this;}template <class charT, class traits, class Allocator>void basic_string <charT, traits, Allocator>::resize (size_type n, charT c){LENGTHERROR (n > max_size ());if (n > length ())append (n - length (), c);elseerase (n);}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::copy (charT* s, size_type n, size_type pos) const{OUTOFRANGE (pos > length ());if (n > length () - pos)n = length () - pos;traits::copy (s, data () + pos, n);return n;}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::<std\> 完整列表 The Annotated STL Sources 6 find (const charT* s, size_type pos, size_type n) const{size_t xpos = pos;for (; xpos + n <= length (); ++xpos)if (traits::eq (data () [xpos], *s)&& traits::compare (data () + xpos, s, n) == 0)return xpos;return npos;}template <class charT, class traits, class Allocator>inline basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::_find (const charT* ptr, charT c, size_type xpos, size_type len){for (; xpos < len; ++xpos)if (traits::eq (ptr [xpos], c))return xpos;return npos;}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::find (charT c, size_type pos) const{return _find (data (), c, pos, length ());}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::rfind (const charT* s, size_type pos, size_type n) const{if (n > length ())return npos;size_t xpos = length () - n;if (xpos > pos)xpos = pos;for (++xpos; xpos-- > 0; )if (traits::eq (data () [xpos], *s)&& traits::compare (data () + xpos, s, n) == 0)return xpos;return npos;}template <class charT, class traits, class Allocator><std\> 完整列表 The Annotated STL Sources 7basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::rfind (charT c, size_type pos) const{if (1 > length ())return npos;size_t xpos = length () - 1;if (xpos > pos)xpos = pos;for (++xpos; xpos-- > 0; )if (traits::eq (data () [xpos], c))return xpos;return npos;}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::find_first_of (const charT* s, size_type pos, size_type n) const{size_t xpos = pos;for (; xpos < length (); ++xpos)if (_find (s, data () [xpos], 0, n) != npos)return xpos;return npos;}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::find_last_of (const charT* s, size_type pos, size_type n) const{if (length() == 0)return npos;size_t xpos = length () - 1;if (xpos > pos)xpos = pos;for (++xpos; xpos-- > 0;)if (_find (s, data () [xpos], 0, n) != npos)return xpos;return npos;}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::find_first_not_of (const charT* s, size_type pos, size_type n) const<std\> 完整列表 The Annotated STL Sources 8 {size_t xpos = pos;for (; xpos < length (); ++xpos)if (_find (s, data () [xpos], 0, n) == npos)return xpos;return npos;}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::find_first_not_of (charT c, size_type pos) const{size_t xpos = pos;for (; xpos < length (); ++xpos)if (traits::ne (data () [xpos], c))return xpos;return npos;}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::find_last_not_of (const charT* s, size_type pos, size_type n) const{if (length() == 0)return npos;size_t xpos = length () - 1;if (xpos > pos)xpos = pos;for (++xpos; xpos-- > 0;)if (_find (s, data () [xpos], 0, n) == npos)return xpos;return npos;}template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::find_last_not_of (charT c, size_type pos) const{if (length() == 0)return npos;size_t xpos = length () - 1;if (xpos > pos)xpos = pos;for (++xpos; xpos-- > 0;)if (traits::ne (data () [xpos], c))return xpos;<std\> 完整列表 The Annotated STL Sources 9return npos;}template <class charT, class traits, class Allocator>int basic_string <charT, traits, Allocator>::compare (const basic_string& str, size_type pos, size_type n) const{OUTOFRANGE (pos > length ());size_t rlen = length () - pos;if (rlen > n)rlen = n;if (rlen > str.length ())rlen = str.length ();int r = traits::compare (data () + pos, str.data (), rlen);if (r != 0)return r;if (rlen == n)return 0;return (length () - pos) - str.length ();}template <class charT, class traits, class Allocator>int basic_string <charT, traits, Allocator>::compare (const charT* s, size_type pos, size_type n) const{OUTOFRANGE (pos > length ());size_t rlen = length () - pos;if (rlen > n)rlen = n;int r = traits::compare (data () + pos, s, rlen);if (r != 0)return r;return (length () - pos) - n;}#include <iostream.h>template <class charT, class traits, class Allocator>istream &operator>> (istream &is, basic_string <charT, traits, Allocator> &s){int w = is.width (0);if (is.ipfx0 ()){register streambuf *sb = is.rdbuf ();s.resize (0);while (1)<std\> 完整列表 The Annotated STL Sources 10 {int ch = sb->sbumpc ();if (ch == EOF){is.setstate (ios::eofbit);break;}else if (traits::is_del (ch)){sb->sungetc ();break;}s += ch;if (--w == 1)break;}}is.isfx ();if (s.length () == 0)is.setstate (ios::failbit);return is;}template <class charT, class traits, class Allocator>ostream &operator<< (ostream &o, const basic_string <charT, traits, Allocator>& s) {return o.write (s.data (), s.length ());}template <class charT, class traits, class Allocator>istream&getline (istream &is, basic_string <charT, traits, Allocator>& s, charT delim) {if (is.ipfx1 ()){_IO_size_t count = 0;streambuf *sb = is.rdbuf ();s.resize (0);while (1){int ch = sb->sbumpc ();if (ch == EOF){is.setstate (count == 0? (ios::failbit|ios::eofbit)<std\> 完整列表 The Annotated STL Sources 11 : ios::eofbit);break;}++count;if (ch == delim)break;s += ch;if (s.length () == s.npos - 1){is.setstate (ios::failbit);break;}}}// We need to be friends with istream to do this.// is._gcount = count;is.isfx ();return is;}// static data member of class basic_string<>template <class charT, class traits, class Allocator>basic_string <charT, traits, Allocator>::Repbasic_string<charT, traits, Allocator>::nilRep = { 0, 0, 1, false };template <class charT, class traits, class Allocator>const basic_string <charT, traits, Allocator>::size_typebasic_string <charT, traits, Allocator>::npos ;} // extern "C++"。

IGES与STL名词解释

IGES与STL名词解释

IGESIGES (初始化图形交换规范)The Initial Graphics Exchange Specification(IGES)是被定义基于Computer-Aided Design (CAD)&Computer-Aided Manufacturing (CAM) systems (电脑辅助设计&电脑辅助制造系统)不同电脑系统之间的通用ANSI 信息交换标准。

3D Studio MAX可以实现这种IGES格式以用于机械、工程、娱乐和研究等不同领域。

用户使用了IGES格式特性后,你可以读取从不同平台来的NURBS数据,例如:Maya、Pro/ENGINEER, SOFTIMAGE, CATIA等等软件。

为了得到完整的数据,建议使用5.3版本的IGES格式。

IGES——实现CAD或CAM系统间数据交换的规范随着CAD/CAM技术的迅猛发展和推广应用,各企业都在积极采用CAD/CAM技术。

因历史原因及不同的开发目的,各CAD/CAM软件的内部数据记录方式和处理方式不尽相同,开发软件的语言也不完全一致,因此,CAD/CAM的数据交换与共享是目前面临的重要课题。

80年代初以来,国外对数据交换标准做了大量的研制、制订工作,也产生了许多标准。

如美国的DXF、IGES、ESP、PDES,法国的SET,德国的VDAIS、VDAFS,ISO的STEP 等。

这些标准都为CAD及CAM技术在各国的推广应用起到了极大的促进作用。

笔者在参与新型红旗轿车及新型北京吉普车零件的制造过程中,曾遇到大量CAD/CAM系统间的数据交换问题。

1 IGES的作用和文件构成CAD/CAM技术在工业界的推广应用,使得越来越多的用户需要把他们的数据在不同CAD/CAM系统之间交换。

IGES正是为了解决数据在不同的CAD/CAM间进行传递的问题,它定义了一套表示CAD/CAM系统中常用的几何和非几何数据格式,以及相应的文件结构,用这些格式表示的产品定义数据可以通过多种物理介质进行交换。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

<stl_uninitialized.h> 完整列表
3
template <class InputIterator, class Size, class ForwardIterator> pair<InputIterator, ForwardIterator> __uninitialized_copy_n(InputIterator first, Size count,
const T& x, __true_type) {
fill(first, last, x); // 呼叫 STL 演算法 fill() }
// 如果是 non-POD 型別,執行流程就會轉進到以下函式。這是藉由 function template // 的引數推導機制而得。 template <class ForwardIterator, class T>
/* NOTE: This is an internal header file, included by other STL headers. * You should not attempt to use it directly. */
#ifndef __SGI_STL_INTERNAL_UNINITIALIZED_H #define __SGI_STL_INTERNAL_UNINITIALIZED_H
The Annotated STL Sources
4
<stl_uninitialized.h> 完整列表
void __uninitialized_fill_aux(ForwardIterator first, ForwardIterator last,
wchar_t* result) { memmove(result, first, sizeof(wchar_t) * (last - first)); return result + (last - first); }
// 以下是 __uninitialized_copy_n 的實作
The Annotated STL Sources
template <class InputIterator, class ForwardIterator, class T> inline ForwardIterator __uninitialized_copy(InputIterator first, InputIterator last,
ForwardIterator result, T*) { typedef typename __type_traits<T>::is_POD_type is_POD; return __uninitialized_copy_aux(first, last, result, is_POD()); // 以上,企圖利用 is_POD() 所獲得的結果,讓編譯器做引數推導。 }
return __uninitialized_copy(first, last, result, value_type(result)); // 以上,利用 value_type() 取出 first 的 value type. }
// 以下是針對 const char* 的特化版本 inline char* uninitialized_copy(const char* first, const char* last,
__STL_BEGIN_NAMESPACE
// 以下是 __uninitialized_copy 的實作
// 如果 copy construction 等同於 assignment, 而且 // destructor 是 trivial,以下就有效。 // 如果是 POD 型別,執行流程就會轉進到以下函式。這是藉由 function template // 的引數推導機制而得。 template <class InputIterator, class ForwardIterator> inline ForwardIterator __uninitialized_copy_aux(InputIterator first, InputIterator last,
template <class RandomAccessIterator, class Size, class ForwardIterator> inline pair<RandomAccessIterator, ForwardIterator> __uninitialized_copy_n(RandomAccessIterator first, Size count,
template <class InputIterator, class Size, class ForwardIterator> inline pair<InputIterator, ForwardIterator> uninitialized_copy_n(InputIterator first, Size count,
template <class InputIterator, class ForwardIterator> inline ForwardIterator
uninitialized_copy(InputIterator first, InputIterator last, ForwardIterator result) {
ForwardIterator result) { return __uninitialized_copy_n(first, count, result,
iterator_category(first)); }
// 以下是 __uninitialized_fill 的實作
// 如果 copy construction 等同於 assignment, 而且 // destructor 是 trivial,以下就有效。 // 如果是 POD 型別,執行流程就會轉進到以下函式。這是藉由 function template // 的引數推導機制而得。 template <class ForwardIterator, class T> inline void __uninitialized_fill_aux(ForwardIterator first, ForwardIterator last,
<stl_uninitialized.h> 完整列表
1
G++ 2.91.57,cygnus\cygwin-b20\include\g++\stl_uninitialized.h 完整列表 /* * * Copyright (c) 1994 * Hewlett-Packard Company * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Hewlett-Packard Company makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. * * * Copyright (c) 1996,1997 * Silicon Graphics Computer Systems, Inc. * * Permission to use, copy, modify, distribute and sell this software * and its documentation for any purpose is hereby granted without fee, * provided that the above copyright notice appear in all copies and * that both that copyright notice and this permission notice appear * in supporting documentation. Silicon Graphics makes no * representations about the suitability of this software for any * purpose. It is provided "as is" without express or implied warranty. */
ForwardIterator result, __true_type) { return copy(first, last, result); // 呼叫 STL 演算法 copy() }
The Annotated STL Sources
2
<stl_uninitialized.h> 完整列表
// 如果是 non-POD 型別,執行流程就會轉進到以下函式。這是藉由 function template // 的引數推導機制而得。 template <class InputIterator, class ForwardIterator> ForwardIterator __uninitialized_copy_aux(InputIterator first, InputIterator last,
相关文档
最新文档