LuabindManualCN
- 格式:pdf
- 大小:2.58 MB
- 文档页数:56
machinebuilder使用手册摘要:1.介绍Lua 正则表达式2.详述Lua 正则表达式结尾多个规则的匹配方法3.提供实际案例演示正文:Lua 是一种轻量级的脚本语言,广泛应用于游戏开发、Web 开发等领域。
在Lua 中,正则表达式是一种强大的文本处理工具。
本篇文章将详细介绍如何在Lua 中使用正则表达式匹配结尾多个规则。
首先简要回顾一下Lua 正则表达式的基本语法。
在Lua 中,正则表达式使用`pattern`库,可以通过`RegExp`模块进行操作。
基本的正则表达式匹配方法如下:```lualocal re = RegExp(pattern)local result = re:match(string)```其中`pattern`为正则表达式,`string`为需要匹配的文本。
`RegExp`模块提供了一系列正则表达式相关的函数,如`match`、`gmatch`、`sub`等。
在Lua 中,要匹配结尾多个规则,可以使用以下方法:1.使用量词:在正则表达式中,可以使用量词`*`、`+`、`?`等来匹配多个字符。
例如,要匹配以“abc”结尾的多个字符串,可以使用如下正则表达式:```lualocal re = RegExp(".*abc$")```这里`.*`表示匹配任意数量的任意字符,`abc$`表示匹配以“abc”结尾的字符串。
2.使用分组:在正则表达式中,可以使用圆括号`()`进行分组。
分组可以提高正则表达式的可读性,也可以用于提取匹配结果。
例如,要匹配以“abc”结尾的多个字符串,并提取前面的部分,可以使用如下正则表达式:```lualocal re = RegExp("([^abc]+)abc$")```这里`[^abc]+`表示匹配除“abc”以外的任意字符,`()`表示将这部分内容作为一个整体进行匹配。
下面通过一个实际案例演示Lua 正则表达式结尾多个规则的匹配方法:假设有一个文本列表,包含以下内容:```applebananaapple-orangebanana-grape```我们想要筛选出以“apple”和“banana”结尾的文本。
lua脚本教程Lua脚本是一种轻量级的脚本语言,被广泛应用于游戏开发、嵌入式系统和服务器端应用程序等领域。
本篇教程将简洁地介绍Lua脚本的基本语法和常用特性。
首先,Lua脚本使用"."作为拼接字符,可以方便地拼接字符串。
同时,Lua支持"--"开头的单行注释和"--[[ ... ]]"包裹的多行注释,方便阅读和注释代码。
Lua脚本没有明确的入口函数,程序会从脚本的第一行开始顺序执行。
而且Lua是动态类型语言,不需要显式声明变量类型,可以直接给变量赋值。
Lua脚本的控制结构包括if语句、while循环和for循环等。
if语句用于条件判断,while循环用于重复执行一段代码块,for循环用于遍历一个迭代器对象。
此外,Lua还提供了break和continue语句用于控制循环的流程。
Lua脚本支持函数定义和调用。
函数可以有多个参数和返回值,并且支持多重赋值和可变参数。
函数还可以作为变量进行传递和存储。
Lua脚本提供了多种数据类型,包括nil、boolean、number、string、table和function等。
其中,table是Lua中的一种类似于数组和字典的数据结构,可以用于存储和操作复杂的数据。
Lua脚本提供了许多标准库,例如math库用于数学运算、io库用于文件操作、string库用于字符串处理等。
这些标准库为Lua脚本提供了丰富的功能和便利的操作。
最后,Lua脚本还支持面向对象编程。
通过使用metatable和__index元方法,可以实现对象的封装和继承。
总结一下,Lua脚本是一种简洁高效、易学易用的脚本语言,具有丰富的特性和强大的功能。
本教程简要介绍了Lua脚本的基本语法和常用特性,希望能对初学者提供一些帮助。
Lua参考手册Wikipedia,自由的百科全书Lua 5.0 参考手册作者:Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes Copyright © 2003 Tecgraf, PUC-Rio. All rights reserved.主要译者、维护人员:曹力丁舜佳[NirvanaStudio ()] 目录[隐藏]1 1 - 绪论2 2 - 语言2.1 2.1 - 词法约定2.2 2.2 - 值和类型2.2.1 2.2.1 - 类型转换2.3 2.3 - 变量2.4 2.4 - 语句2.4.1 2.4.1 - 语句段2.4.2 2.4.2 - 语句块2.4.3 2.4.3 - 赋值2.4.4 2.4.4 - 控制结构2.4.5 2.4.5 - For 语句2.4.6 2.4.6 - 语句式函数调用页脚内容12.4.7 2.4.7 - 局部变量声明2.5 2.5 - 表达式2.5.1 2.5.1 - 算术运算符2.5.2 2.5.2 - 关系运算符2.5.3 2.5.3 - 逻辑运算符2.5.4 2.5.4 - 串联接2.5.5 2.5.5 - 优先级2.5.6 2.5.6 - 表构造器2.5.7 2.5.7 - 函数调用2.5.8 2.5.8 - 函数定义2.6 2.6 - 可见性规则2.7 2.7 - 错误处理2.8 2.8 - 元表2.9 2.9 - 垃圾收集2.9.1 2.9.1 - 垃圾收集元方法2.9.2 2.9.2 - 弱表2.10 2.10 - 同步程序3 3 - 应用程序接口3.1 3.2 - 堆栈和索引3.2 3.3 - 堆栈操作页脚内容23.3 3.4 - 堆栈查询3.4 3.5 - 堆栈取值3.5 3.6 - 将值压入堆栈3.6 3.7 - 控制垃圾收集3.7 3.8 - 用户数据类型3.8 3.9 - 元表3.9 3.10 - 加载Lua语句段3.10 3.11 - 表操作3.11 3.13 - 将表作为数组使用3.12 3.14 - 调用函数3.13 3.15 - 受保护调用3.14 3.16 - 定义C 函数3.15 3.17 - 定义C 函数闭包3.16 3.18 - 注册表3.17 3.19 - C 中的错误处理3.18 3.20 - 线程4 4 - 调试接口4.1 4.1 - 堆栈及函数信息4.2 4.2 - 操作局部变量和上值4.3 4.3 - 钩子页脚内容35 5 - 标准库5.1 5.1 - 基本函数5.2 5.2 - Coroutine Mani***tion5.3 5.3 - String Mani***tion5.3.1 string.byte (s [, i])5.3.2 string.char (i1, i2, ...)5.3.3 string.dump (function)5.3.4 string.find (s, pattern [, init [, plain]])5.3.5 string.len (s)5.3.6 string.lower (s)5.3.7 string.rep (s, n)5.3.8 string.sub (s, i [, j])5.3.9 string.upper (s)5.4 5.4 - Table Mani***tion5.5 5.5 - Mathematical Functions5.6 5.6 - Input and Output Facilities5.7 5.7 - Operating System Facilities5.8 5.8 - The Reflexive Debug Interface6 6 - Lua 独立程序7 致谢页脚内容48 与以前版本的不兼容性8.1 语言上的变动8.2 库的变更8.3 API 上的改动9 Lua 完整语法参考1 - 绪论Lua是一种为支持有数据描述机制的一般过程式编程语言而设计的扩展编程语言。
lInstructions for Use: Flexible Inspection Scope Kit-USB Brand Name of ProductFlexible Inspection Scope Kit - USB Generic Name of ProductFlexible Inspection Scope Kit - USB Product Code Number(s)FIS-007U, FIS-007USK, FIS-007UB, CT-101, CT-102Intended UseFor visually inspecting items.Range of Applications for ProductEnhance visual inspection by providing lighted magnification, image capture and the option for documentation in hard-to-see crevices, channels, and lumens in areas of instruments that are not visible to the unaided eye.Key Specifications of Product Flexible Inspection Scope- FIS-007U∙CT-101 1.90 mm OD and 110 cm length∙CT-102 1.06 mm OD and 110 cm length∙Opticalo Resolution format:o CT-102 1.06 mm: 40,000 pixels (or 200- x 200 pixels)o CT-101 1.90 mm: 160,000 pixels (or 400- x 400 pixels)o Field of View: 120° in airo Angle of view: 0°USB Control Module: Control Module housing Camera processor and LEDillumination:∙Dimensions: 5.25- x 3.90- x 1.85 inches∙Weight: 1.20 pounds ∙Digital Inspection Scope Connection∙Illumination Control- LED in the Control Module∙Power Cycle∙USB Camera Cable∙Easily change from small and large diameter scopes.Light Settings:There are four light settings operated by one button.Blinking Light (Indicates transmitting video data):∙Splash proof (IPX5 Rating)∙No external power needed.Flexible Inspection Scope Software Requirements:∙Compatible with Windows 10 Operating systems.∙USB flash drive includes software.Unpacking Flexible Inspection Scope:Carefully inspect for shipping damage. If there is any damage contact the shipping carrier and Heatlhmarkcustomer service 800-521-6224 immediately.USB Control Module: (Fig. 1).1.Digital Inspection Scope Connection 2.Illumination Control 3.Power Cycle B (Type C) on the right side of the boxFigure 1Flexible Inspection Scope™: (Fig. 2).∙CT-101 1.90 mm O.D. and 110 cm length ∙CT-102 1.06 mm O.D. and 110 cm lengthLarge1.90 mmSmall 1.06 mmFigure 2Flexible Inspection Scope™ Features3214Light/Illumination Settings: (Fig. 3).∙Five (5) light settingso Light on control indicats setting levelo Fifth setting is OFF∙Press light button to advance to next setting.∙Fifth setting turns the light OFF.Figure 3Power Cycle ButtonPress button to RESET camera (Fig. 4).Figure 41.Flexible Inspection Scope™ Plug (Fig. 5).Contains camera video connection as well as LED Light for illumination.1Figure 52.Flexible Working Length (Fig. 6).The portion of the Flexible Inspection Scope™ that is inserted into an item during visual inspection.The measuring scale markings on the Flexible Working Length are in centimeters (accuracy = ± 0.5 cm)2Figure 63.Distal Camera (Fig. 7).Distal portion of Flexible Inspection Scope™ that contains the camera lens3Figure 7SOFTWARE INSTALLATION:Note: This section is done only once when connecting the scope to the computer for the first time.∙System Requirements: MS Windows 10∙Install the Flexible Inspection Scope™ Software from the USB flash drive on a computer.Note: If you have any IT policies that may block this installation, please contact your IT team to give access to Healthmark scope viewer to install.1. Insert the USB Flash drive into your computer, and double click on the Healthmark Scope Viewer installer package to begin installation.2. The “Welcome to the Healthmark Scope Viewer Setup Wizard” screen pops up. Click on Next.3. Select the first tab Typical or setup type of your choice, click Next.4. Click Install and wait for installation to complete.5. Click Finish.STARTING SOFTWARE & CONNECTING SCOPE TO PC:(Fig 8).1.Open the Windows PC viewer software.2.Connect the Control Module to PC using USB Cable.3.Plug the Flexible Inspection Scope into the Control Module.4.In the viewer software, click Settings and Select USB Video Device, click on the desiredresolution, select the preferred Video Output Format, and then Click OK.5.Press the Power Cycle Button.Figure 86.Now you can start using the scope.Verifing OperationFollowing the steps listed below will ensure the proper use and performance of the Flexible Inspection Scope™. The Flexile Inspection Scope™ can be checked for normal operation by connecting it as described in the Startup section of this IFU.Normal operation includes:∙An image appearing on your computer monitor or HDMI Monitor.∙ A blinking light on Control Module near the Power Cycle button that indicates the image feed is transmitting.∙White light emitting from the distal end of the Digital Inspection Scope.∙An LED light on the control module top panel that indicates the light intensity of the device. Using SoftwareHealthmark Scope Viewer Software (Fig. 9).1.Capture button: Captures a Reference Image and saves it to the Reference Image folder.2.Main Image Window: Displays the image from the camera.3.Reference Image Window: Displays a reference image.4.Clear Button: Removes the image from the Reference image window.5.Open Reference Image button: Allows selection of a reference image from the Reference Imagefolder.6.Settings Button: Click to select the video camera and resolution settings.7.File Location Button: Click to change location where captured images are being saved.8.File Location Window: Shows the file path where captured images are being saved currently.9.Capture Image Button: Captures images and adds them to the File Location selected by the user(as shown in the File Location Window).10.Capture Video button: Click to record video. Click again to stop recording video.11.File Prefix: Type in text that you would like included in the file name of Captured Images.Figure 9Selecting Video Device or CameraFollow the directions below to select the video device or camera used to capture images using the Flexible Inspection Scope™ Viewer Software. (Fig. 10).1.Click Settings button in the lower left of the Scope Viewer software to display a list of videodevices or cameras being detected by your computer2.Select a device for capturing images using the Scope Viewera.The example below shows a webcam and USB Video Device in the Settings box. Select theUSB Video Device for the Flexible Inspection Scope™.b.You can also select your preferred Video Output Format from the dropdown box3.Click OK to view the selected Video Device.231Figure 10Capturing Still PicturesFollow the instructions for capturing still pictures from the Main Image Window.Select the Capture Image button. (Fig. 11).Figure 11Note: When an image is captured, “Image Captured” in red text will flash on the lower portion of the screen and a new file will appear in the Files Location.Capturing Video ImagesFollow the instructions below for capturing video from the Main Image Window.1.Select the Capture Video Button (Fig. 12).Figure 122.When the video is recording “Recording…” in red text will appear toward the bottom of thesoftware window.3.To stop recording, click Stop Capture. (Fig. 13).Figure 13Setting File PrefixFollowing the steps below allows you to create a file prefix that will appear after the underscore of image file names save to the File Location specified by the user.1.Click in the field next to File Prefix.2.Enter the characters that you would like to be included in the file name. (Fig 14).Figure 14Setting Location for Saved FilesFollowing the steps below allows you to set the file location of saved images using the Scope Viewer software.1.Click the File Location button.2.Select the file location you want to save captured images. (Fig 15).Figure 15Displaying Reference ImageThere are two ways to display a still image in the Reference Image Window on the Scope Viewer software.1.To display an image currently being displayed in the Main Image Window, click the Capture button. Note: The images will be saved in a file folder titled Reference Images in the designated File Location that the user specified in the File Location field. (Fig. 16).Figure 162.To display a saved image in the Reference Image Window from your File Location:a.Click the Open Reference Image button (Fig. 16 above).b.Select the file you want to display (Fig. 17 below).c.Click the OK Button, to display the image in the Reference Image Window. (Fig. 17).Figure 17Switching to a Different Flexible Inspection Scope™ on the Control Module:1.Press the Power button on the Control Module once.2.Disconnect the current Flexible Inspection Scope from the Control Module.3.Repeat the steps in the “STARTING SOFTWARE & CONNECTING SCOPE TO PC” procedure.Inserting Scope in ItemFigure 1Rotating Device to Avoid ObstacleFigure 2 Performing InspectionWipe down the Flexible Inspection Scope™ with a compatible wipe. Follow the manufacturer’s (Mfr.’s)Instructions for Use (IFU) for appropriate wipe usage. Click here to see the Chemical Compatibility Chart(PDF) for approved cleaning.The Flexible Inspection Scope™ is made of the same material as other common endoscopes. Any wipe,solution, or low temperature (≤ 60 °C [140 °F]) method intended for the reprocessing of endoscopes is likelycompatible with the Generation II Flexible Inspection Scope™ Catheters if used according to the productlabeling.Solutions Containing (Flexible Inspection Scope Only)Alcohol Ethoxylates Neutral or Near-Neutral pH DetergentsEnzymatic Cleaning Solutions Enzymatic DetergentsSodium Borated, Decahydrate Tetrapotassium PyrophosphateFlexible Inspection Scope™ has a fluid ingress protection rating of IPX7 (Waterproof) and can withstandimmersion in fluid up to one (1)-meter in depth for up to 30 minutes.Control Module USB has a fluid ingress protection rating of IPX5 (Water resistant) and can withstand asustained, low pressure water jet spray for up to three minutes.For Thorough Cleaning: CablesFollow the cleaning agent Mfr.’s IFU.1.Unplug and disconnect all components from the Control box prior to cleaning.2.Do not submerge or soak the cable for disinfection (cable is not waterproof).3.Wipe thoroughly with non-linting wipe moistened with facility approved neutral detergent. Use theappropriate brushes with detergent solution to remove any residues from areas that cannot bereached with the wipes.For Thorough Cleaning: Control Module1.Unplug and disconnect all components from the Control box prior to cleaning.2.Do not submerge or soak the cable for disinfection (Control Box is not waterproof).3.Wipe thoroughly with non-linting wipe moistened with facility approved neutral detergent. Use theappropriate brushes with detergent solution to remove any residues from areas that cannot bereached with the wipes.Note: Do NOT soak. Control Module and cables are not waterproof and should not be immersed.N/ACleaning –AutomatedDisinfection Control Module and CablesThese may be cleaned with alcohol based disinfectant wipes.Compatible agents (wipes and solutions) for disinfecting Flexible Inspection Scope™ and ControlModule:∙Hydrogen peroxide∙Isopropyl alcohol (IPA)∙Sodium hypochlorite (Bleach)∙Ortho-phenylphenol∙Quaternary ammonium.High-Level Disinfection (Flexible Inspection Scope™ Only)∙Select only disinfecting solutions listed in the compatible disinfecting methods.∙Follow all recommendations regarding health-hazards, dispensing, measuring, and storage from the Mfr. of cleaning and disinfecting agents.∙Soak the Flexible Inspection Scope™ in selected disinfecting solution per Mfr.’s IFU.∙Rinse the Flexible Inspection Scope™ with critical (sterile) water, again, following the disinfecting solutions Mfr.’s instructions.Reprocessing Chemical Compatibility Chart (PDF): Click here.。
-1-Human Recombinant ADRB2 Adrenoceptors Stable Cell LineTechnical Manual No. TM0504 Version 06042010I Introduction ............................................................................................ 1 II Background ............................................................................................... 1 III Representative Data ................................................................................. 2 IV Thawing and Subculturing ........................................................................ 2 V References . (3)Limited Use License Agreement (4)I.IntroductionCatalog Number: M00308Cell Line Name: CHO-K1/ADRB2/G α15Gene Synonyms: BAR; B2AR; ADRBR; ADRB2R; BETA2AR; ADRB2Expressed Gene: Genbank Accession Number NM_000024; no expressed tags Host Cell: CHO-K1/Gα15Quantity: 2 vials (3×106per vial) frozen cells Stability: 16 passagesApplication: Functional assay for ADRB2 receptorFreeze Medium: 45% culture medium, 45% FBS, 10% DMSO Complete Growth Medium: Ham ’s F12, 10% FBSCulture Medium: Ham’s F12, 10% FBS, 200 μg/ml Zeocin, 100 μg/ml Hygrom ycin B Mycoplasma Status: NegativeStorage: Liquid nitrogen immediately upon delivery.II.Backgroundβ-Adrenergic receptors (β-ARs) are members of the superfamily G-protein-coupled receptors that are stimulated by naturally occurring catecholamines, epinephrine, and norepinephrine. As part of the sympathetic nervous system, β-ARs have been shown to have important roles in cardiovascular, respiratory, metabolic, central nervous system, and reproductive functions. Three distinct β-AR subtypes have been identified (β1-AR, β2-AR, and β3-AR). Allthree of these β-AR subtypes are believed to signal by coupling to the stimulatory G-protein Gs α which leads to the activation of adenylyl cyclase and accumulation of the second messenger cAMP. β1-ARs mediate cardiacstimulation, β2-ARs mediate smooth muscle relaxation in the peripheral vasculature and respiratory system, and β3-AR has been shown to have important roles in adipose tissue and gastrointestinal tract. In studies using subtype-selective agonists and antagonists in the human heart, β2-AR stimulation leads to the activation of adenylyl cyclase and contributes to both inotropic and chronotropic responses.-2-III. Representative DataCHO-K1/ADRB2/G α15CHO-K1/G α15Log[Isoproterenol] M∆R F UFigure Intracellular calcium response from CHO-K1/ Gα15 cells stably expressing human adrenergic receptor ADRB2 and from untransfected control cells. Cells were loaded with Calcium-4 and then stimulated with theindicated concentrations of isoproterenol. Calcium responses were recorded on a FlexStation3 plate reader. Data represent the average +/- standard deviation of triplicate determinations.IV. Thawing and SubculturingThawing: Protocol1. Remove the vial from liquid nitrogen tank and thaw the cells quickly in a 37°C water-bath.2. Just before the cells are completely thawed, decontaminate the outside of the vial with 70% ethanol andtransfer the cells to a 15 ml centrifuge tube containing 9 ml of complete growth medium. 3. Pellet cells by centrifugation at 200 x g for 5 min, and discard the medium. 4. Resuspend the cells in complete growth medium. 5. Add 2 ml of the cell suspension per well in a 6-well plate.6. Add Hygromycin B and Zeocin to concentrations of 100 μg/ml and 200 μg/ml respectively the following daySubculturing: Protocol1. Remove and discard culture medium.2. Wash cells with PBS (pH=7.4) to remove all traces of serum that contains trypsin inhibitor.3. Add 2.0 ml of 0.05% (w/v) Trypsin- EDTA (GIBCO, Cat No. 25300) solution to a 10 cm dish and observe thecells under an inverted microscope until cell layer is dispersed (usually within 3 to 5 minutes).Note: To avoid clumping, do not agitate the cells by hitting or shaking the dish while waiting for the cells to detach. Cells that are difficult to detach may be placed at 37°C to facilitate dispersal. 4. Add 6.0 to 8.0 ml of complete growth medium and aspirate cells by gently pipetting, centrifuge the cells 200 x g for 5min, and discard the medium. 5. Resuspend the cells in culture medium, add appropriate aliquots of the cell suspension to new culture vessels. 6. Incubate cultures at 37°C.Subcultivation Ratio: 1:3 to 1:8 weekly. Medium Renewal: Every 2 to 3 days-3-V. References1. Emorine LJ, Marullo S, Briend-Sutren MM, et al . (1989) Molecular characterization of the human β3-adrenergic receptor. Science , 245 : 1118-11212. Frielle, T., Collins, S., Daniel, K. W., et al . (1987)Cloning of the cDNA for the human beta 1-adrenergicreceptor. Proc. Natl. Acad. Sci. U. S. A., 84: 7920–7924 3. Lands, A. M., Arnold, A., McAuliff, J. P., et al . (1967) Differentiation of receptor systems activated bysympathomimetic amines. Nature , 214: 597–598 4. Lands, A. M., Luduena, F. P., and Buzzo, H. J. (1967) Differentiation of receptors responsive to isoproterenol.Life Sci., 6: 2241–2249 5. Brodde, O. E. beta_1-and beta2-adrenoceptors in the human heart: properties, function, and alterations inchronic heart failure. (1991) Pharmacol. Rev , 43: 203–242GenScript USA Inc.120 Centennial Ave., Piscataway, NJ 08854Tel: 732-885-9188, 732-885-9688 Fax: 732-210-0262, 732-885-5878Email: ****************** Web : Research Use Only-4-Limited Use License AgreementThis is a legal agreement between you (Licensee) and GenScript USA Inc. governing use of GenScript's stable cell line products and protocols provided to licensee. By purchasing and using the stable cell line, the buyer agrees to comply with the following terms and conditions of this label license and recognizes and agrees to such restrictions:1) The products are not transferable and will be used at the site where they were purchased. Transfer to anothersite owned by buyer will be permitted only upon written request by buyer followed by subsequent written approval by GenScript.2) The purchaser cannot sell or otherwise transfer (a) this product (b) its components or (c) materials made usingthis product or its components to a third party.3) The products sold by GenScript are for laboratory and animal research purposes only. The products are not tobe used on humans, for consumption, or for any unlawful uses.GenScript USA Inc. will not assert against the buyer a claim of infringement of patents owned or controlled by GenScript USA Inc. and claiming this product based upon the manufacture, use or sale of a clinical diagnostic, therapeutic and vaccine, or prophylactic product developed in research by the buyer in which this product or its components has been employed, provided that neither this product nor any of its components was used in the manufacture of such product. For information on the use of this product for other purposes, contact Marketing Department, GenScript USA Inc., 120 Centennial Avenue, Piscataway, New Jersey 08840, U.S.A. Phone: 1-732-885-9188. Fax: 1-732-210-0262. Email: ***********************.。
/documentation Novell eDirectory TM Schema ReferenceDeveloper KitApril 2012Legal NoticesNovell, Inc. makes no representations or warranties with respect to the contents or use of this documentation, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the right to revise this publication and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes.Further, Novell, Inc. makes no representations or warranties with respect to any software, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. Further, Novell, Inc. reserves the right to make changes to any and all parts of Novell software, at any time, without any obligation to notify any person or entity of such changes.Any products or technical information provided under this Agreement may be subject to U.S. export controls and the trade laws of other countries. You agree to comply with all export control regulations and to obtain any required licenses or classification to export, re-export, or import deliverables. You agree not to export or re-export to entities on the current U.S. export exclusion lists or to any embargoed or terrorist countries as specified in the U.S. export laws. You agree to not use deliverables for prohibited nuclear, missile, or chemical biological weaponry end uses. Please refer to /info/ exports/ for more information on exporting Novell software. Novell assumes no responsibility for your failure to obtain any necessary export approvals.Copyright © 2006-2012 Novell, Inc. All rights reserved. No part of this publication may be reproduced, photocopied, stored on a retrieval system, or transmitted without the express written consent of the publisher.Novell, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at /company/legal/patents/ and one or more additional patents or pending patent applications in the U.S. and in other countries.Novell, Inc.1800 South Novell PlaceProvo, UT 84606U.S.A.Online Documentation: To access the online documentation for this and other Novell developer products, and to get updates, see /ndk. To access online documentation for Novell products, see /documentation. Novell TrademarksFor Novell trademarks, see the Novell Trademark and Service Mark list (/company/legal/trademarks/ tmlist.html)Third-Party MaterialsAll third-party trademarks are the property of their respective owners.ContentsPreface211Schema Concepts231.1Schema Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231.1.1Structure Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241.1.2Distribution of the NDS Schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251.2Schema Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .251.3Object Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261.3.1Effective and Noneffective Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261.3.2Reading Class Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271.4Naming Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281.4.1Naming Attribute Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291.4.2Multi-Valued Naming Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291.4.3Shareable Naming Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291.4.4Naming Attribute Inheritance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291.5Containment Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301.5.1Containment Class Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301.5.2Containment Classes in the Base Schema. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311.5.3Containment of Leaf Objects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321.5.4Containment Classes and Inheritance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341.6Super Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341.6.1Root Schema Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351.6.2Super Class Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351.6.3Class Hierarchy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351.6.4Class Inheritance Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .361.6.5Graphical View Explanation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381.7Object Class Flags. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381.8Mandatory and Optional Attributes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401.9Default ACL Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401.10Auxiliary Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411.10.1Attribute Additions with Auxiliary Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .421.10.2Auxiliary Classes and Object Class Rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431.10.3Required Rights. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .441.10.4Backwards Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .441.10.5When to Use Auxiliary Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .451.11Attribute Type Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .461.11.1Attribute Syntaxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .471.11.2Attribute Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .471.11.3Attributes and Classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .491.11.4Attribute Type Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .491.11.5Reading NDS Attribute Type Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501.12Attribute Syntax Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .501.12.1Matching Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .511.12.2Reading Syntax Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521.13Schema Extensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .521.13.1Class Definition Creation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531.13.2Registering Attribute Types and Class Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .531.13.3Valid Class and Attribute Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .551.13.4Class Construction Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .55Contents32Base Object Class Definitions57AFP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58Alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61applicationEntity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63applicationProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .65Audit:File Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .67Bindery Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .69Bindery Queue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71certificationAuthority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .74certificationAuthorityVer2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76CommExec. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81contingentWorker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84Country. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86cRLDistributionPoint. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88dcObject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .90Device. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .92Directory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95DirXML-Driver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98DirXML-DriverSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .100DirXML-Publisher . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102DirXML-Rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104DirXML-StyleSheet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106DirXML-Subscriber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .108domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110dmd. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113dSA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116dynamicGroup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .119dynamicGroupAux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122External Entity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125federationBoundary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .128Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130homeInfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133LDAP Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135LDAP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140Locality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142MASV:Security Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .144Message Routing Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146Messaging Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149NCP Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153ndsContainerLoginProperties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157ndsLoginProperties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159ndsPredicateStats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162NDSPKI:Certificate Authority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164NDSPKI:Key Material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166NDSPKI:SD Key Access Partition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .168NDSPKI:SD Key List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170NDSPKI:Trusted Root. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172NDSPKI:Trusted Root Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174NSCP:groupOfCertificates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176NSCP:mailGroup1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178NSCP:mailRecipient. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .181 4ContentsNSCP:NetscapeMailServer5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183 NSCP:NetscapeServer5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186 NSCP:nginfo3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189 NSCP:nsLicenseUser. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193 Organizational Person . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196 Organizational Role . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199 Organizational Unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201 Partition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .204 Person. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207 pkiCA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .211 pkiUser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213 Print Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215 Printer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .218 Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 Queue. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223 Resource. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226 SAS:Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228 SAS:Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233 strongAuthenticationUser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236 StyleSheet. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238 Template. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .240 Top . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243 Tree Root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245 Unknown. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247 User . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249 userSecurityInformation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .255 Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .257 WANMAN:LAN Area. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2603Novell Object Class Extensions263Entrust:CRLDistributionPoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .264 inetOrgPerson. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265 NDPS Broker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270 NDPS Manager. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273 NDPS Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .276 NDSCat:Catalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279 NDSCat:Master Catalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281 NDSCat:Slave Catalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284 NetSvc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287 NLS:License Certificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289 NLS:License Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291 NLS:Product Container. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294 NSCP:mailGroup5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296 NSCP:Nginfo. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .297 NSCP:Nginfo2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298 SLP Scope Unit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299 SLP Directory Agent. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302 SLP Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304 SMS SMDR Class. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306Contents54Graphical View of Object Class Inheritance3094.1Alias and Bindery Object Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3094.2Tree Root, domain, and Unknown. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3104.3Computer, Country, Device, and Printer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3114.4List and Locality. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3124.5Organizational Role and Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3134.6ndsLoginProperties, Organization, and Organizational Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3144.7ndsLoginProperties, Person, Organizational Person, and User. . . . . . . . . . . . . . . . . . . . . . . . . . . .3164.8Directory Map, Profile, Queue, Resource, and Volume. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3184.9Servers (AFP, Messaging, NCP, Print) and CommExec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3194.10External Entity, Group, and Message Routing Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3205Base Attribute Definitions321Aliased Object Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .322accessCardNumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323Account Balance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324ACL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325Allow Unlimited Credit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326assistant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327assistantPhone. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328associatedName. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .329attributeCertificate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .330Audit:A Encryption Key. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .331Audit:B Encryption Key. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332Audit:Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333Audit:Current Encryption Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334Audit:File Link. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335Audit:Link List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .336Audit:Path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .337Audit:Policy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338Audit:Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .339authorityRevocationList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340Authority Revocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341AuxClass Object Class Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .342auxClassCompatibility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .343Auxiliary Class Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344Back Link . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .345Bindery Object Restriction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346Bindery Property. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347Bindery Restriction Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .348Bindery Type. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349businessCategory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350C (Country Name). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351cACertificate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352CA Private Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353CA Public Key. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354Cartridge. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .355certificateRevocationList. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356Certificate Revocation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357Certificate Validity Interval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .358children. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359city. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360 6Contents。
Oracle Financials Accounting HubOracle Financials Accounting Hub (FAH) efficiently creates detailed, auditable, reconcilable accounting for external or legacy source systems. FAH includes an accounting transformation engine with extensive validations plus accounting and rules repositories. The transformation engine consistently enforces accounting policies; the repositories provide centralized control, detailed audit trails, and facilitate simultaneously meeting diverse corporate, management, and reporting requirements.K E Y B U S I N E S S B E N E F I T SOracle Financials Accounting Hub is an accounting transformation solution, which enables you to:•Meet compliance requirements with a single source of accounting truth for all external and legacy systems •Store analytic information with accounting for reconciliation and reporting•Maximize efficiency with an enterprise accounting rules engine •Comply with multi-GAAP accounting requirements•Audit GL balances with journal details •Accountant and business user interface•Control and monitor end-to-end processing of transactions through integration with Oracle BPEL Process Manager Fragmented Accounting Approaches Create Many ProblemsMost organizations deploy multiple legacy systems to manage their day to day operations. For many of the system users this results in several problems:∙Difficulty enforcing corporate wide standards.∙Duplicate accounting treatments for each source system.∙Difficulty reconciling accounting with source systems.∙Accounting rule implementation hidden in disparate and opaque program code. Oracle Financials Accounting Hub resolves these problems by centralizing the definition and maintenance of accounting rules in a business user orientated repository. Accounting journals are created with a rules transformation engine, validated, and stored in an auditable format in a single location. Your organization can enhance legal and management reporting, efficiently account for any subsystem, strengthen internal controls and, simultaneously meet diverse and mutually exclusive accounting requirements through multiple representations.Create a Single Source of Accounting TruthOracle Financials Accounting Hub maintains user orientated configurable accounting rules in its rules repository. The repository is also home to the accounting rules for Oracle E-Business Suite applications.Business events can be accounted one or more times in parallel using different accounting rules, currencies, calendars, and charts of accounts. When multiple accounting representations are created for a single business event they are linked and reconcilable.Configurable contextual transaction information is stored with journals for reconciliation, and integrated program hooks allow the ability to add drilldowns to transactions from legacy source systems.K E Y F E A T U R E S•Integrated accounting rules repository •Create accounting rules for everyGAAP•Accounting rules engine•Multiple accounting representations •Sophisticated error handling •Supporting references•Export and import accounting rulesfrom test to production•Subledger accounting inquiries •Reporting on accounting ruledefinitions•Manual adjustments•Predefined validations •Predefined BI Publisher templates •Raw transaction and pass-throughaccounting. Store Analytic Information with Accounting for Reconciliations and Reporting Transaction and supporting reference information can be stored in the accounting repository and used for reporting or to feed analytic systems. In the example below, the industry type is tracked as a supporting reference for analysis of this key business dimension.Figure 1. Supporting References Balance Inquiry in Oracle Financials Accounting HubYou can register any business attribute associated with the external or legacy system as a “source”. Sources can be used to drive accounting rules, included in journal descriptions or stored as supporting references for subsequent reporting and analysis.Optionally, Oracle Financials Accounting Hub can, calculate and store balances for supporting references. Supporting reference balances are a powerful analytic feature since, in effect, they extend the accounting flexfield for certain types of transactions without cluttering General Ledger with subledger detail. For example, geographies, channel, industry, investment type, fund manager or product category can be tracked as supporting references without including these key business dimensions in the accounting flexfield.Efficiently Create Accounting for Multiple Heterogeneous Source Systems Oracle Financials Accounting Hub provides a flexible rules builder for business users to create accounting rules once and deploy them many times across different external and legacy systems.Legacy systems that do pre-accounting can pass journals through the hub to validate and store the accounting in the accounting repository for a single, reliable, enterprise wide view.The example below shows the Journal Line Definition user interface in Oracle Financials Accounting Hub to illustrate that you can define elaborate journal line descriptions, advanced account derivation rules and supporting references for your accounting journal lines.R E L A T E D P R O D U C T SSome of the products that share the centralized accounting repository with Oracle Financials Accounting Hub are:•Oracle Assets•Oracle Cash Management •Oracle Inventory Management •Oracle Order Management •Oracle Payables•Oracle Purchasing•Oracle Projects•Oracle ReceivablesR E L A T E D S E R V I C E SThe following services support Oracle Main Product:•Product Support Services •Professional Services Figure 2. User Defined Journal Lines Definitions in Oracle Financials Accounting HubExternal and legacy systems that do not produce accounting can use the rules builder to map and transform raw transactions. This data can be used to control the journal lines created, build journal descriptions, summarize lines, and define journal line accounts.The rules engine anticipates and uses transaction lifecycles. You can account using a transaction flow-based approach, recognizing that the same information can be used to account for related transactions. This facilitates reconciliation, simplifies rules, and reduces the burden on source systems.The accounting engine offers flexible scheduling, processing, and event options.∙Create accounting for a specific business event, or all events for an application.∙Account for manual adjustments using a web-based user interface (refer to figure 2 below).∙Use integration with Fusion Middleware via Business Events to extend validation and / or send notifications to the appropriate users.Figure 3. Manual Adjustment User Interface in Oracle Financials Accounting HubQuickly Update Accounting Rules to Meet New RequirementsChanges in accounting regulations or corporate structure are quickly accommodated with effective dating of rules. The dates of inbound events are used to determine which accounting rules to apply to incoming transactions. Users can implement the rules in a test system and import them into production. An automatic comparison feature allows users to preview the differences between old and new versions of the rules before completing the import.User Interface for Accountants and Business AnalystsOracle Financials Accounting Hub provides an intuitive, business oriented user interface. Users can create and update rules without IT intervention. For example, the user interface allows analysts to determine whether a line should be a debit or credit, its description, and how it should be summarized as shown in the Journal Line Types example below.Figure 4. User Defined Journal Line Types in Oracle Financials Accounting Hub Rapidly Integrate New SystemsMany organizations need to efficiently integrate new industry-specific systems or recently acquired companies into their existing environment.Oracle Financials Accounting Hub implementations can be done gradually, reducing the implementation risk. In a single Oracle Financials Accounting Hub environment, both journal pass-through solutions as well raw transaction-based accounting solutions can be implemented. Customers can move from a pass-through solution to raw transaction-based accounting as they require. New systems can be added and new products can be launched whilst the system is in use.Sharing and Reusing Accounting RulesThe rules repository allows users to separately define and reuse setups for each component of a journal entry such as the journal lines, descriptions, and summarization criteria. These setups can be reused to rapidly integrate new source systems into Oracle Financials Accounting Hub. Users can quickly create rules, copy and reuse them to meet similar, yet distinct requirements. For example, if several systems areexpected to book fee income, cash receipts, or disbursements to the same general ledger account, a single rule can be created and used to account for each of these systems.Accelerate the Monthly CloseThe period close process is one of the most closely watched financial processes. From staying on top of new financial reporting regulations to increasing the efficiency of the current close process, there is always a focus on this key financial process.Sophisticated Error and Exception HandlingA rapid daily and monthly close requires prompt resolution of accounting errors. Oracle Financials Accounting Hub stores not only the error messages but also the entire journal when it encounters errors. Users can quickly isolate, research, and resolve exceptions with business oriented exception management and on-line inquiries.Error status journals are automatically reprocessed each time the accounting engine executes until they are successfully accounted. Routing and resolution of exceptions can be accelerated using predefined error limits for accounting engine processing.Integrate Source Systems with Oracle BPEL Process ManagerThe Oracle Financials Accounting Hub is based upon a service-oriented architecture and takes advantage of Oracle’s SOA platform and Fusion Middleware. The integration can be used to control and monitor the end-to-end processing of accounting transactions (e.g., retrieval of transactions, pre-processing, error-handling, post-processing and write-back to feeder systems).Enhance Internal Controls and AuditabilityThe centralized architecture of Oracle Financials Accounting Hub provides a number of enhancements to your internal control structure to ensure successful audit and compliance reviews. Some of the best practices features that are available include the following:∙The name and version of the applied rules is stored with each journal entry in the accounting repository.∙Active rules can be locked to prevent changes.∙Rules cannot be used until validated.∙On-line inquiries allow users to view journals based upon the version and name of the rules used to generate the accounting and the ability to view the associated names of the journal line definitions and the journal line types.∙Reporting on accounting rule definitions to enable easy review of all the accounting rules defined.∙Separate security for viewing accounting by role and user.∙Transaction security policies hooks can limit drilldown to source system information. ∙Manual adjustments can be restricted by role and userAuditors and compliance officers can use the rules and accounting repositories as a basis for their engagements.The Oracle Financials Accounting Hub takes full advantage of Oracle Application Object Library and database security features.Transparent, Extensible Validations for Sarbanes-Oxley ComplianceEnforcing consistent accounting validations is difficult in a heterogeneous systemsenvironment. The common accounting rules engine includes a robust collection ofvalidations and balance and control routines. These validations are fully documentedfor complete transparency, a key requirement for Section 404 Sarbanes-Oxleycompliance.Minimize Manual Corrections with Draft AccountingThe draft accounting feature of Oracle Financials Accounting hub minimizes errorcorrections by allowing users to preview their accounting both on-line and in reportsreducing the need for adjusting journals. The rules and transaction information can becorrected before accounting is finalized.Audit Trail from General Ledger Balances to Business EventsUsers can drill from Oracle General Ledger balances to the specific journal lines in theaccounting repository that comprise that balance. Embedded bi-directional flows allowusers to drill from journal lines either to the supporting business events and theaccounting details.SummaryThe core strengths of Oracle Financials Accounting Hub include its ability to create asingle source of accounting truth for multiple external and legacy systems usingbusiness user-defined accounting rules. This enables you and your organization tocomplete a finance transformation of the back-office operations to make them efficientand compliant.C O N T A CFor more information about Oracle Financials Accounting Hub, visit or call +1.800.ORACLE1to speak to an Oracle representative.C O N N E C T W I T H U S/oracle /oracle /oracle Copyright © 2016, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only, and the contents hereofwarranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or fitness for a particular purpose. We specifically disclaim any liability with respect to this document, and no contractual obligations are formed either directly or indirectly by this document. This documentmeans, electronic or mechanical, for any purpose, without our prior written permission.Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and。
lua基本知识
Lua是一种小巧的脚本语言,由巴西里约热内卢天主教大学的一个研究小组于1993年开发。
它的设计目的是为了灵活嵌入应用程序中,为应用程序提供灵活的扩展和定制功能。
Lua由标准C编写而成,几乎在所有操作系统和平台上都可以编译和运行。
Lua的特点包括:
1.轻量级:一个完整的Lua解释器不过200k,在所有脚本引擎中,Lua的速
度是最快的。
2.可嵌入性:Lua脚本可以很容易的被C/C++ 代码调用,也可以反过来调用
C/C++的函数,这使得Lua在应用程序中可以被广泛应用。
3.简洁性:Lua的代码简洁优美,易于理解和维护。
4.平台无关性:Lua可以在几乎所有操作系统和平台上编译和运行。
5.扩展性:Lua并没有提供强大的库,这是由它的定位决定的。
所以Lua不
适合作为开发独立应用程序的语言。
Lua的数据类型包括:
1.nil:表示一个无效值(在条件表达式中相当于false)。
2.boolean:包含两个值:false和true。
3.number:表示双精度类型的实浮点数。
4.string:字符串由一对双引号或单引号来表示。
5.function:由 C 或 Lua 编写的函数。
erdata:表示任意存储在变量中的C数据结构。
7.thread:表示执行的独立线路,用于执行协同程序。
8.table:Lua中的表(table)其实是一个"关联数组"(associative
arrays),数组的索引可以是数字、字符串或表类型。
Luabind ∗missdeer†2009 11 7∗/products/luabind/docs.html †/ missdeer@1 12 13 24 Luabind25 35.1Hello world (3)6 47 Lua67.1 (6)7.2 (7)7.3 Lua (8)7.4 Lua (8)8 Lua98.1 (10)8.2 (11)8.3 (12)8.4 (13)8.5 scope (14)8.6 (15)8.7 (15)8.8 (18)9 189.1 (22)9.2 (23)10Lua 2410.1Lua (25)10.1.1 (27)10.2 (27)10.3 (29)10.4 (29)11 3012 3212.1adopt (33)12.1.1 (33)12.1.2 (33)12.1.3 (33)12.1.4 (33)12.1.5 (33)12.2dependency (33)12.2.1 (33)12.2.2 (33)12.2.3 (34)12.2.4 (34)12.2.5 (34)12.3out value (34)12.3.1 (34)12.3.2 (34)12.3.3 (34)12.3.4 (35)12.3.5 (35)12.4pure out value (35)12.4.1 (35)12.4.2 (35)12.4.3 (35)12.4.4 (36)12.4.5 (36)12.5return reference to (36)12.5.1 (36)12.5.2 (37)12.5.3 (37)12.5.4 (37)12.5.5 (37)12.6copy (38)12.6.1 (38)12.6.2 (38)12.6.3 (38)12.6.4 (38)12.6.5 (38)12.7discard result (38)12.7.1 (38)12.7.2 (39)12.7.3 (39)12.7.4 (39)12.8return stl iterator (39)12.8.1 (39)12.8.2 (39)12.8.3 (39)12.8.4 (39)12.9raw (40)12.9.1 (40)12.9.2 (40)12.9.3 (40)12.9.4 (40)12.9.5 (41)12.10yield (41)12.10.1 (41)12.10.2 (41)12.10.3 (41)12.10.4 (41)13 4214 4314.1pcall errorfunc (43)14.2 (43)14.3lua panic (44)14.4 (MSVC) (44)14.5 (45)15 4516 47 17F AQ48 18 4919Acknowledgments501 Lua C++ (17)2 C++ Lua (17)3adopt (33)4dependency (34)5out value (35)6pure out value (36)7return reference to (37)8copy (38)9raw (40)Daniel Wallin,Arvid NorbergDaniel Wallin,Arvid Norberg2003.2006-01-111.26.2.5missdeer 2009-11-7v0.1Luabind—missdeer1 11Luabind C++ Lua C++ Lua Lua Lua C++ Lua C++ Lua5.0 Lua4.cpp Luabind MIT license1 .Luabind Lua luabind mailing list2 IRC #luabind 2Luabind••Lua C++•••••C++ Lua•C++ Lua•Lua• Lua C++• C++•••1/licenses/mit-license.php2https:///lists/listinfo/luabind-user3 23Luabind :•Visual Studio7.1•Visual Studio7.0•Visual Studio6.0(sp5)•Intel C++6.0(Windows)•GCC2.95.3(cygwin)•GCC3.0.4(Debian/Linux)•GCC3.1(SunOS5.8)•GCC3.2(cygwin)•GCC3.3.1(cygwin)•GCC3.3(Apple,MacOS X)•GCC4.0(Apple,MacOS X):•GCC2.95.2(SunOS5.8)Metrowerks8.3(Windows) const const non-const4 LuabindLuabind Luabind include Boost31.32.0 1.33.0 ( boost ) LuaLuabind Boost.Build V24 Boost.Build Luabind 2 :3/4/doc/tools/build/doc/html/index.html5 31.BOOST ROOTBoost2.LUA PATHLua $(LUA PATH)/include/ $(LUA PATH)/lib/makefile UNIX cygwin Luabind Visual Studio src Luabind Luabind 15 Visual Studio5Luabind lua.h luabind :extern”C”{#i n c l u d e”lua.h”}#include<luabind/luabind.hpp>luabind/function.hpp luabind/class.hpp#include<luabind/f u n c t i o n.hpp>#include<luabind/class.hpp>luabind::open(lua State*) Lua luabind state Lua stateLuabind lua.h <luabind/lua include.hpp> Lua5.1Hello world6 4#include<iostream>#include<luabind/luabind.hpp>void g r e e t(){std::cout<<”h e l l o world!\n”;}extern”C”int i n i t(l u a S t a t e∗L){using namespace luabind;open(L);module(L)[d e f(”g r e e t”,&g r e e t)];return0;}Lua5.0Copyright(C)1994-2003Tecgraf,PUC-Rio>loadlib(’hello_world.dll’,’init’)()>greet()Hello world!>6Lua Lua module module luabind::modulemodule(L)[//];6 5Lua module module(L,”m y l i b r a r y”)[//];my libraryluabind::namespace luabind:: module lua State* module(L,”m y l i b r a r y”)[//namespace(”d e t a i l”)[//]];2 :module(L)[namespace(”m y l i b r a r y”)[//]];module(L,”m y l i b r a r y”)[//];:module(L)[7 Lua6d e f(”f”,&f),d e f(”g”,&g),c l a s s<A>(”A”).d e f(c o n s t r u c t o r<int,int>),d e f(”h”,&h)];7 Lua 8 Lua .7 Lualuabind::def() Luatemplate<class F,class p o l i c i e s>void d e f(const char∗name,F f,const P o l i c i e s&);•name Lua•F•Policies12float std::sin(float)module(L)[d e f(”s i n”,&std::s i n)];7.1Lua C++ int f(const char*) void f(int)module(L)[d e f(”f”,(int(∗)(const char∗))&f),d e f(”f”,(void(∗)(int))&f)];7.2 77.2Luabind Luaint float Luaconst conststruct A {void f ();void f ()const ;};const A ∗c r e a t e a ();struct B:A {};struct C:B {};void g (A ∗);void g (B ∗);create a() adopt 12Lua a1=create_a()a1:f()--const a2=A()a2:f()-- const a =A()b =B()c =C()g(a)-- g(A*)7.3 Lua 8g(b)-- g(B*)g(c)-- g(B*)7.3 LuaLua call function() objecttemplate<class Ret>Ret c a l l f u n c t i o n(l u a S t a t e∗L,const char∗name,...)template<class Ret>Ret c a l l f u n c t i o n(o b j e c t const&obj,...)call function objectLuaLua ... Lualuabind::errorRet[] int r e t=c a l l f u n c t i o n<int>(L,”a l u a f u n c t i o n”,new c o m p l e x c l a s s())[adopt(1)];Boost.Refint r e t=c a l l f u n c t i o n(L,”fun”,boost::r e f(v a l));14.1pcall errorfunc set pcall callback 7.4 LuaLua lua resume() call function()template<class Ret>Ret r e s u m e f u n c t i o n(l u a S t a t e∗L,const char∗name,...)template<class Ret>Ret r e s u m e f u n c t i o n(o b j e c t const&obj,...)template<class Ret>Ret resume(l u a S t a t e∗L,...)8 Lua9resume function Lua yield lua yield() lua State resume() resume() Lua yield()yield C++ Lua C++ yieldobject resume function object lua State*l u a S t a t e∗thread=lua newthread(L);o b j e c t fun=g e t g l o b a l(thread)[”my thread fun”];r e s u m e f u n c t i o n(fun);8 Luaclass C++ def() this C++class t e s t c l a s s{public:t e s t c l a s s(const std::s t r i n g&s):m s t r i n g(s){}void p r i n t s t r i n g(){std::cout<<m s t r i n g<<”\n”;}private:std::s t r i n g m s t r i n g;};Lua luabind module(L)[c l a s s<t e s t c l a s s>(”t e s t c l a s s”).d e f(c o n s t r u c t o r<const std::s t r i n g&>()).d e f(”p r i n t s t r i n g”,&t e s t c l a s s::p r i n t s t r i n g)];testclass string print string8.1 10Lua5.0Copyright(C)1994-2003Tecgraf,PUC-Rio>a=testclass(’a string’)>a:print_string()a stringconst const Lua C++struct A{int a;};int p l u s(A∗o,int v){return o−>a+v;}plus() Ac l a s s<A>(”A”).d e f(”p l u s”,&p l u s)plus() A int const const const8.1def C C++ C++return-value(class-name::*)(arg1-type,arg2-type,...)struct A{void f(int);void f(int,int);};c l a s s<A>().d e f(”f”,(void(A::∗)(int))&A::f)f8.2struct A{int a;};module(L)[c l a s s<A>(”A”).d e f r e a d w r i t e(”a”,&A::a)];A::amodule(L)[c l a s s<A>(”A”).d e f r e a d o n l y(”a”,&A::a)];getter .struct A{int m;};struct B{A a;};B Luab=B()b.a.m=1a s s e r t(b.a.m==1)a A Luabind dependency bgetter setterclass A{public:void s e t a(int x){a=x;}int g e t a()const{return a;}private:int a;};c l a s s<A>(”A”).property(”a”,&A::get a,&A::s e t a)get a() set a() get const8.3Lua Luamodule(L)[c l a s s<A>(”A”).enum(”c o n s t a n t s”)[value(”my enum”,4),value(”my2nd enum”,7),value(”another enum”,6)]];LuaLua5.0Copyright(C)1994-2003Tecgraf,PUC-Rio>print(A.my_enum)48.4 13>print(A.another_enum)68.4<luabind/operator.hpp>luabind::self def()struct vec{vec operator+(int s);};module(L)[c l a s s<vec>(”vec”).d e f(s e l f+int())];+const const const self selfmodule(L)[c l a s s<vec>(”vec”).d e f(c o n s t s e l f+int())];Lua+-*/==<<=(==) ==Lua !=,> >= Luaint() other<> string8.5 scope 14struct vec{vec operator+(std::s t r i n g);};other<>module(L)[c l a s s<vec>(”vec”).d e f(s e l f+other<std::s t r i n g>())];module(L)[c l a s s<vec>(”vec”).d e f(s e l f(int()))];Lua tostring Lua lua tostring()C++ std::ostream operator<<class number{};std::ostream&operator<<(std::ostream&,number&);...module(L)[c l a s s<number>(”number”).d e f(t o s t r i n g(s e l f))];8.5 scopescope8.6 15c l a s s<foo>(”f o o”).d e f(c o n s t r u c t o r<>().scope[c l a s s<inner>(”nested”),d e f(”f”,&f)];f foo nested foo8.6class bases<>struct A{};struct B:A{};module(L)[c l a s s<A>(”A”),c l a s s<B,A>(”B”)];B C module(L)[c l a s s<B,bases<A,C>>(”B”)];bases<>8.1 Luabind8.7luabind boost::shared ptr classmodule(L)[c l a s s<A,boost::s h a r ed p t r<A>>(”A”)];const boost::shared ptr<const A> luabind Lua C++ const -> Lua Lua C++ namespace luabind{template<class T>T∗g e t p o i n t e r(boost::s h a r e d p t r<T>&p){return p.get();}template<class A>boost::s h a r e d p t r<const A>∗g e t c o n s t h o l d e r(boost::s h a r e d p t r<A>∗){return0;}}boost::shared ptr<A> const boost:: shared ptr<const A>B A Lua C++ C++ LuaNULL std::auto ptr luabind okstruct X{};void f(std::auto ptr<X>);module(L)[1: Lua C++holder type<A> A A*holder type<A> A B*holder type<A> A A const*holder type<A> A B const*holder type<A> A holder type<A>holder type<A> A holder type<A const>holder type<A const> A A const*holder type<A const> A B const*holder type<A const> A holder type<A const>2: C++ Luaholder type<A> A holder type<A>holder type<A const> A holder type<A const>holder type<A>const& A holder type<A>holder type<A const>const& A holder type<A>c l a s s<X,std::auto ptr<X>>(”X”).d e f(c o n s t r u c t o r<>()),d e f(”f”,&f)];Lua5.0Copyright(C)1994-2003Tecgraf,PUC-Rio>a=X()>f(a)>print a.__okfalsemodule(L)[c l a s s<base,boost::s h a r ed p t r<base>>(”base”).d e f(c o n s t r u c t o r<>()),c l a s s<derived,base,boost::s h a r ed p t r<base>>(”base”)8.8 18.d e f(c o n s t r u c t o r<>())];Luabind8.8void r e g i s t e r p a r t1(c l a s s<X>&x){x.d e f(/∗...∗/);}void r e g i s t e r p a r t2(c l a s s<X>&x){x.d e f(/∗...∗/);}void r e g i s t e r(l u a S t a t e∗L){c l a s s<X>x(”x”);r e g i s t e r p a r t1(x);r e g i s t e r p a r t2(x);module(L)[x];}X register part1 register part29Lua luabind::object object Lua <luabind/object.hpp>class o b j e c t{public:template<class T>o b j e c t(l u a S t a t e∗,T const&value);o b j e c t(f r o m s t a c k const&);o b j e c t(o b j e c t const&);o b j e c t();˜o b j e c t();l u a S t a t e∗i n t e r p r e t e r()const;void push()const;bool i s v a l i d()const;operator s a f e b o o l t y p e()const;template<class Key>implementation−d e f i n e d operator[](Key const&);template<class T>o b j e c t&operator=(T const&);o b j e c t&operator=(o b j e c t const&);bool operator==(o b j e c t const&)const;bool operator<(o b j e c t const&)const;bool operator<=(o b j e c t const&)const;bool operator>(o b j e c t const&)const;bool operator>=(o b j e c t const&)const;bool operator!=(o b j e c t const&)const;template<class T>implementation−d e f i n e d operator[](T const&key)const void swap(o b j e c t&);implementation−d e f i n e d operator()();template<class A0>implementation−d e f i n e d operator()(A0const&a0);template<class A0,class A1>implementation−d e f i n e d operator()(A0const&a0,A1const& a1);/∗...∗/};Lua object (=) default policy C++ Lua luabind::object [] [] =Lua lua gettable Lua panic() 14.3lua panic9.2from stack lua from stackf r o m s t a c k(l u a S t a t e∗L,int index);index luao b j e c t o(f r o m s t a c k(L,−1));o luainterpreter() Lua state Lua push() Lua== lua equal()is valid()operator safe bool type() is valid()o b j e c t o;//...i f(o){//...}...o b j e c t o;//...i f(o.i s v a l i d()){//...}default policy luabind::error index operator[] [ ]m y f u n c t i o n o b j e c t(2,8,new my complex structure(6))[adopt(3)];luabind Lua luaobject Lua state object lua state Lua objectvoid my function(o b j e c t const&t a b l e){i f(type(t a b l e)==LUA TTABLE){t a b l e[”time”]=std::c l o c k();t a b l e[”name”]=std::rand()<500?”unusual”:”u sual”;std::cout<<o b j e c t c a s t<std::s t r i n g>(t a b l e[5])<<”\n”;}}9.1 22luabind::object Luastd::ostream&operator<<(std::ostream&,o b j e c t const&);stream object boost::lexical cast lua tostring C++ stream9.1metamethod luabind::iterator luabind:: raw iterator metamethod ForwardIterator5class i t e r a t o r{i t e r a t o r();i t e r a t o r(o b j e c t const&);o b j e c t key()const;standard i t e r a t o r members};luabind::object object object objectluabind::objectkey() Lua keyfor(i t e r a t o r i(g l o b a l s(L)[”a”]),end;i!=end;++i){∗i=1;}5/tech/stl/ForwardIterator.html9.2 23end a 19.2objectint type(o b j e c t const&);object Lua LUA TNIL LUA TNUMBERtemplate<class T,class K>void s e t t a b l e(o b j e c t const&o,K const&key,T const&value); template<class K>o b j e c t g e t t a b l e(o b j e c t const&o,K const&key);template<class T,class K>void rawset(o b j e c t const&o,K const&key,T const&value); template<class K>o b j e c t rawget(o b j e c t const&o,K const&key);settable gettable lua settable lua gettablerawset rawget lua rawset lua rawget metamethodtemplate<class T>T o b j e c t c a s t<T>(o b j e c t const&);template<class T,class P o l i c i e s>T o b j e c t c a s t<T>(o b j e c t const&,P o l i c i e s);template<class T>boost::o p t i o n a l<T>o b j e c t c a s t n o t h r o w<T>(o b j e c t const&); template<class T,class P o l i c i e s>boost::o p t i o n a l<T>o b j e c t c a s t n o t h r o w<T>(o b j e c t const&, P o l i c i e s);object cast Lua object C++ Lua C++ cast failed LUABIND NO ERROR CHECKING 15 boost:: optional<T>10Lua 24object objecto b j e c t g l o b a l s(l u a S t a t e∗);o b j e c t r e g i s t r y(l u a S t a t e∗);o b j e c t newtable(l u a S t a t e∗);object10LuaC++ Lua luabind Lua OOclass’lua_testclass’function lua_testclass:__init(name)=nameendfunction lua_testclass:print()print()enda=lua_testclass(’example’)a:print()luaclass’derived’(lua_testclass)function derived:__init()super(’derived name’)endfunction derived:print()print(’Derived:print()->’)lua_testclass.print(self)endsuper superthis self10.1LuaC++ Lua Lua C++ Lua Luaclass base{public:base(const char∗s){std::cout<<s<<”\n”;}virtual void f(int a){std::cout<<”f(”<<a<<”)\n”;}};struct base wrapper:base,luabind::wrap base{base wrapper(const char∗s):base(s){}virtual void f(int a){c a l l<void>(”f”,a);}s t a t i c void d e f a u l t f(base∗ptr,int a){return ptr−>base::f(a);}};...module(L)[c l a s s<base,base wrapper>(”base”).d e f(c o n s t r u c t o r<const char∗>()).d e f(”f”,&base::f,&base wrapper::d e f a u l t f)];10.1 MSVC6.5 call() call member() thisclass luabind10.2 Lua base wrapper* base* this luabindLua C++ C++ Lua Lua luabind Lua C++luabind::wrap base Lua Lua Luatemplate<class Ret>Ret c a l l(char const∗name,...)call function lua State Lua10.1 call member const const const call member10.1.1Lua luabind wrap basestruct A{..};struct A wrap:A,wrap base{..};A∗f(A∗ptr){return ptr;}module(L)[c l a s s<A,A wrap>(”A”),d e f(”f”,&f)];>class’B’(A)>x=B()>assert(x==f(x))-- C++RTTI LUABIND NO RTTI10.2Lua Lua metamethods•add•sub•mul•div•pow•lt•le•eq•call•unm•tostringtostring tostring() metamethod self Luaclass’my_class’function my_class:__init(v)self.val=vendfunction my_class:__sub(v)return my_class(self.val-v.val)endfunction my_class:__tostring()return self.valendmy class selffunction my_class:__sub(v)if(type(self)==’number’)thenreturn my_class(self-v.val)elseif(type(v)==’number’)thenreturn my_class(self.val-v)else-- my_classreturn my_class(self.val-v.val)endendsub luabind self10.3 29Lua C++ Lua C++ Lua10.3finalize lua finalize...function lua_testclass:__finalize()--end10.4lua C++ 10.1Lua Lua C++ lua C++ C++ lua adopt lua+--------------------+|C++ |<- adopt|| C+++--------------------+|lua |<- adopt| lua | C+++--------------------+struct A{};A∗f i l t e r a(A∗a){return a;}void adopt a(A∗a){delete a;}using namespace luabind;module(L)[c l a s s<A>(”A”),d e f(”f i l t e r a”,&f i l t e r a),d e f(”adopt a”,&adopt a,adopt(1))]luaa=A()b=filter_a(a)adopt_a(b)lua b a C++ b adopt lua adopt C++11lua luabind lua error() std::exception Lua const char* std::exception::what() const char* luabind lua lua CLua luabind::error LuaErrorclass e r r o r:public std::e x c e p t i o n{public:e r r o r(l u a S t a t e∗);l u a S t a t e∗s t a t e()const throw();virtual const char∗what()const throw();};State Lua state lua state Lua state LuaLua state statestruct l u a s t a t e{l u a s t a t e(l u a S t a t e∗L):m L(L){}˜l u a s t a t e(){l u a c l o s e(m L);}operator l u a S t a t e∗(){return m L;}l u a S t a t e∗m L;};int main(){try{l u a s t a t e L=lua open();/∗...∗/}catch(luabind::e r r o r&e){l u a S t a t e∗L= e.s t a t e();//L w i l l now p o i n t to t h e d e s t r u c t e d//Lua s t a t e and be i n v a l i d/∗...∗/}}luabind luabind::cast failed call function<> call member<> Lua C++ object cast<>luabind::cast failedclass c a s t f a i l e d:public std::e x c e p t i o n{public:c a s t f a i l e d(l u a S t a t e∗);l u a S t a t e∗s t a t e()const throw();LUABIND TYPE INFO i n f o()const throw();virtual const char∗what()const throw();};12 32state Lua stateinfo LUABIND TYPE INFO const std::type info* LuaLUABIND NO EXCEPTIONSLUABIND NO EXCEPTIONS luabind::s e t e r r o r c a l l b a c k(void(∗)(l u a S t a t e∗))Lua Lualuabind std:: terminate()luabind::s e t c a s t f a i l e d c a l l b a c k(void(∗)(l u a S t a t e∗, LUABIND TYPE INFO))cast failedluabind std::terminate()12luabindresult NN>=1 1 this•adopt•dependency•out value•pure out value•return reference to•copy•discard result•return stl iterator•raw•yield12.1adopt3312.1adopt12.1.112.1.2#include<luabind/a d o p t p o l i c y.hpp>12.1.3adopt(index)12.1.43:adoptindex N result12.1.5X∗c r e a t e(){return new X;}...module(L)[d e f(”c r e a t e”,&c r e a t e,adopt(r e s u l t))];12.2dependency12.2.112.2.2#include<luabind/d e p e n d e n c y p o l i c y.hpp>12.3out value34 12.2.3dependency(nurse index,p a t i e n t i n d e x)12.2.44:dependencynurse index patientpatient index12.2.5struct X{B member;B&get(){return member;}};module(L)[c l a s s<X>(”X”).d e f(”get”,&X::get,dependency(r e s u l t,1))];12.3out value12.3.1const lua lua12.3.2#include<luabind/o u t v a l u e p o l i c y.hpp>12.3.3o u t v a l u e(index,p o l i c i e s=none)12.4pure out value35 12.3.45:out valueindexpolicies / Lua 1 C++,2 C++ .12.3.5void f1(f l o a t&v a l){v a l=v a l+10.f;}void f2(f l o a t∗v a l){∗v a l=∗v a l+10.f;}module(L)[d e f(”f”,&f,o u t v a l u e(1))];Lua5.0Copyright(C)1994-2003Tecgraf,PUC-Rio>print(f1(10))20>print(f2(10))2012.4pure out value12.4.1out value Lua lua12.4.2#include<luabind/o u t v a l u e p o l i c y.hpp>12.4.3p u r e o u t v a l u e(index,p o l i c i e s=none)6:pure out valueindexpolicies Lua 1 12.4.412.4.5f1 f2void f1(f l o a t&v a l){v a l=10.f;}void f2(f l o a t∗v a l){∗v a l=10.f;}module(L)[d e f(”f”,&f,p u r e o u t v a l u e(1))];Lua5.0Copyright(C)1994-2003Tecgraf,PUC-Rio>print(f1())10>print(f2())1012.5return reference to12.5.1C++ thisstruct A{f l o a t v a l;A&s e t(f l o a t v){v a l=v;return∗this;}};Luabind luabind lua12.5.2#include<luabind/r e t u r n r e f e r e n c e t o p o l i c y.hpp>12.5.3r e t u r n r e f e r e n c e t o(index)12.5.47:return reference toindex result12.5.5struct A{f l o a t v a l;A&s e t(f l o a t v){v a l=v;return∗this;}};module(L)[c l a s s<A>(”A”).d e f(c o n s t r u c t o r<>()).d e f(”s e t”,&A::set,r e t u r n r e f e r e n c e t o(1))];12.112.6copy3812.6copy12.6.1C++ Lua12.6.2#include<luabind/c o p y p o l i c y.hpp>12.6.3copy(index)12.6.48:copyindex C++ result Lua N12.6.5X∗get(){s t a t i c X i n s t a n c e;return&i n s t a n c e;}...module(L)[d e f(”c r e a t e”,&c r e a t e,copy(r e s u l t))];12.7discard result12.7.1C++ Lua12.8return stl iterator39 12.7.2#include<luabind/d i s c a r d r e s u l t p o l i c y.hpp>12.7.3d i s c a r d re s u l t12.7.4struct X{X&s e t(T n){...return∗this;}};...module(L)[c l a s s<X>(”X”).d e f(”s e t”,&simple::set,d i s c a r d r e s u l t)];12.8return stl iterator12.8.1STL lua begin() end()12.8.2#include<luabind/i t e r a t o r p o l i c y.hpp>12.8.3r e t u r n s t l i t e r a t o r12.8.412.9raw40struct X{std::vector<std::s t r i n g>names;};...module(L)[c l a s s<A>(”A”).d e f r e a d w r i t e(”names”,&X::names,r e t u r n s t l i t e r a t o r) ];...>a=A()>for name in s do>print(name)>end12.9raw12.9.1lua State* luabind::object12.9.2#include<luabind/r a w p o l i c y.hpp>12.9.3raw(index)12.9.49:rawindex lua State*12.10yield41 12.9.5void g r e e t(l u a S t a t e∗L){l u a p u s h s t r i n g(L,”h e l l o”);}...module(L)[d e f(”g r e e t”,&greet,raw(1))];>print(greet())hello12.10yield12.10.1C++ yield12.10.2#include<luabind/y i e l d p o l i c y.hpp>12.10.3y i e l d12.10.4void d o t h i n g t h a t t a k e s t i m e(){...}...module(L)[d e f(”d o t h i n g t h a t t a k e s t i m e”,&d o t h i n g t h a t t a k e s t i m e,y i e l d)];13a.cppluabind::scope r e g i s t e r a(){returnc l a s s<a>(”a”).d e f(”f”,&a::f);}b.cppluabind::scope r e g i s t e r b(){returnc l a s s<b>(”b”).d e f(”g”,&b::g);}module ab.cppluabind::scope r e g i s t e r a();luabind::scope r e g i s t e r b();void r e g i s t e r m o d u l e(l u a S t a t e∗L){module(”b”,L)[r e g i s t e r a(),r e g i s t e r b()];}1414.1pcall errorfuncLua 6 lua pcall() Luabind lua pcall() luabindtypedef int(∗p c a l l c a l l b a c k f u n)(l u a S t a t e∗);void s e t p c a l l c a l l b a c k(p c a l l c a l l b a c k f u n fn);pcall callback Lua pcall7 errfuncLua Lua 8pcall callback lua luabind objectcatch(e r r o r&e){o b j e c t erro r ms g(f r o m s t a c k(e.s t a t e(),−1));std::cout<<erro r msg<<std::endl;}14.2luabind pcall errorfuncint a d d f i l e a n d l i n e(l u a S t a t e∗L){lua Debug d;l u a g e t s t a c k(L,1,&d);l u a g e t i n f o(L,”Sln”,&d);std::s t r i n g e r r=l u a t o s t r i n g(L,−1);lua pop(L,1);std::s t r i n g s t r e a m msg;msg<< d.s h o r t s r c<<”:”<< d.c u r r e n t l i n e;i f(!=0)6/manual/5.1/manual.html7/manual/5.1/manual.html#3.68/manual/5.1/manual.html#3.814.3lua panic44{msg<<”(”<< what<<””<< <<”)”;}msg<<””<<e r r;l u a p u s h s t r i n g(L,msg.s t r().c s t r());return1;}Lua 9set pcall callback() luabind lua lua call14.3lua paniclua C++ bug panic lua gettable luapanic exit() lua atpanic panic panic lua C++ panic setjmp longjmppanic luaLua 3.61014.4 (MSVC)lua C lua luabind lua lua error() catch(...)Visual Studio catch(...) C++ luabind lua unknown exceptionvoid s t r a i g h t t o d e b u g g e r(unsigned int,EXCEPTION POINTERS∗) {throw;}#i f d e f MSC VER9/manual/5.1/manual.html#3.810/manual/5.1/manual.html#3.6。