OSDN Git Service

FIRST REPOSITORY
[eos/hostdependOTHERS.git] / I386LINUX / util / I386LINUX / doc / mico / examples / siegel / store / StoreImpl.h
1 /*\r
2 \r
3 Copyright (C) 1998, 2000 by the Object Management Group, Inc.  All  \r
4 rights reserved.  \r
5 \r
6 Permission to use, copy, modify, and distribute this software for\r
7 any teaching or instructional purpose and without fee is hereby\r
8 granted, provided that the above copyright notice appear in all\r
9 copies and that both that copyright notice and this permission\r
10 notice appear in supporting documentation, and that the names of\r
11 Object Management Group, Inc. (OMG) and John Wiley and Sons, Inc.\r
12 (Wiley) not be used in advertising or publicity pertaining to\r
13 distribution of the software without specific, written prior\r
14 permission.\r
15 \r
16 THIS SOFTWARE IS SOLD AS IS WITHOUT WARRANTY OF ANY KIND, EITHER\r
17 EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED\r
18 WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\r
19 PURPOSE.  Neither OMG, Wiley, nor their dealers or distributors\r
20 assume any liability of any alleged or actual damages arising\r
21 from the use of or the inability to use this software.  (Some\r
22 states do not allow the exclusion of implied warranties, so the\r
23 exclusion may not apply to you).\r
24 \r
25 */\r
26 \r
27 \r
28 #ifndef STOREIMPL_H\r
29 #define STOREIMPL_H\r
30 \r
31 // Include Naming Service\r
32 #if 1\r
33 // MICO\r
34 #include <coss/CosNaming.h>\r
35 #endif\r
36 \r
37 \r
38 // Include Store and Central type information via the skeleton.\r
39 // The file to include depends on the output of\r
40 // your ORBs IDL compiler.\r
41 #if 1\r
42 // MICO\r
43 #include <Central.h>\r
44 #include <Store.h>\r
45 #endif\r
46 \r
47 \r
48 \r
49 // The super class of your implementation class \r
50 // depends on the output of your ORBs IDL compiler.\r
51 #if 0\r
52 class StoreImpl\r
53 #else\r
54 // MICO\r
55 class StoreImpl : public virtual POA_AStore::Store\r
56 #endif\r
57 {\r
58 private:\r
59     CORBA::ULong _locatePOSEntry(CORBA::Long);\r
60     AStore::AStoreId m_storeID;\r
61     CORBA::Float m_storeTotal;\r
62     CORBA::Float m_storeTaxTotal;\r
63     CORBA::Float m_storeMarkup;\r
64     AStore::POSList m_POSTerminals;\r
65     CosNaming::NamingContext_var m_ns;  \r
66 \r
67     static void _abort(const char *msg);\r
68   \r
69 public:\r
70     StoreImpl(\r
71         CosNaming::NamingContext_ptr ns,\r
72         AStore::AStoreId storeID,\r
73         CORBA::Float storeMarkup\r
74     );\r
75 \r
76     AStore::AStoreId store_id(\r
77         \r
78     );\r
79 \r
80     AStore::Store::StoreTotals totals(\r
81         \r
82     );\r
83 \r
84     AStore::StoreAccess_ptr login(\r
85         CORBA::Long id\r
86     \r
87     );\r
88     \r
89     void get_POS_totals(\r
90         AStore::POSList_out POS_data\r
91     \r
92     );\r
93     \r
94     void update_store_totals(\r
95         CORBA::Long  id,\r
96         CORBA::Float price,\r
97         CORBA::Float taxes\r
98     \r
99     );\r
100 \r
101 };\r
102 \r
103 \r
104 #endif\r