⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 store.idl

📁 mico_example_siegel c源代码
💻 IDL
字号:
#ifndef STORE_IDL#define STORE_IDL// include interface definition for Point Of Sale objects#include "POS.idl"module AStore{   enum ItemTypes {food, clothes, other};   typedef long AStoreId;   struct ItemInfo   {      POS::Barcode      Item;      ItemTypes         Itemtype;      float             Itemcost;      string            Name;      long              Quantity;   };   // The barcodeNotFound exception indicates that the   // input barcode does not match to any known item.   exception BarcodeNotFound { POS::Barcode item; };   interface StoreAccess; // /forward reference   struct POSInfo   {        POS::POSId   Id;        StoreAccess  StoreAccessReference;        float        TotalSales;        float        TotalTaxes;   };   typedef sequence <POSInfo> POSList;   interface Tax   {      float CalculateTax(in float           TaxableAmount);      float FindTaxablePrice(in float       ItemPrice,                             in ItemTypes   ItemType);   };   interface Store   {        struct StoreTotals        {           float     StoreTotal;           float     StoreTaxTotal;        };        readonly attribute AStoreId StoreId;        // The struct StoreTotals and this readonly attribute are used        // in place of a pair of float attributes to avoid data inconsistencies        // that would result from the following sequence of operations:        //        //    POS 1 invokes a method to read StoreTotal        //    POS 2 invokes the method UpdateStoreTotals        //    POS 1 invoikes a method to read the StoreTaxTotal        readonly attribute StoreTotals Totals;        StoreAccess Login(in POS::POSId Id);        void      GetPOSTotals(out POSList POSData);        void      UpdateStoreTotals(                      in POS::POSId Id,                      in float      Price,                      in float      Taxes);   };   interface StoreAccess   {      // ItemTaxPrice is 0 or return value of FindTaxablePrice()      void      FindPrice(                      in  POS::Barcode Item,                      in  long         Quantity,                      out float        ItemPrice,                      out float        ItemTaxPrice,                      out ItemInfo     IInfo)         raises (BarcodeNotFound);   };};#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -