Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
IDL 0.65 KB | None | 0 0
  1. module corba2{
  2.     struct Product{
  3.         long productId;
  4.         string productName;
  5.         long productPrice;
  6.         long productQty;
  7.     };
  8.  
  9.     struct Order {
  10.         Product product;
  11.         long productQty;
  12.     };
  13.  
  14.  
  15.  
  16.     interface Shop {
  17.         typedef sequence<Product> productList;
  18.     typedef sequence<Order> Orders;
  19.  
  20.     exception NotEnoughProducts{};
  21.  
  22.     productList getProductList();
  23.         Order createNewCart();
  24.     Order getCart();
  25.         void addToCart(in Product product, in long amount);
  26.         void checkOutCart() raises(NotEnoughProducts);
  27.  
  28.     };
  29.  
  30.     interface NewCartCreator{
  31.         Cart createNewCart();
  32.     };
  33. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement