diff -cr ../gencp/IDL/Makefile ./IDL/Makefile *** ../gencp/IDL/Makefile Tue Dec 26 16:42:40 1995 --- ./IDL/Makefile Wed Nov 12 03:01:20 1997 *************** *** 1,21 **** #include ../make.cfg ! SOURCE.idl = POS.idl \ ! Store.idl \ ! Central.idl \ ! PNS.idl ! ! LIBRARY = libidl.a ! ! INCLUDE = -I. ! CFLAGS = $(INCLUDE) -c -g ! CCFLAGS = # --------------------------------------------------- ! all debug profile optimize static: $(LIBRARY) ! $(LIBRARY): $(OBJECTS) ! $(CC) -xar -o $(LIBRARY) $(OBJECTS) clean: ! $(RM) *.o ${LIBRARY} core --- 1,44 ---- + SOURCE.idl = POS.idl \ + Store.idl \ + Central.idl \ + PNS.idl + + SOURCE.C = POS.C \ + Store.C \ + Central.C \ + PNS.C + + SOURCE.o = POS.o \ + Store.o \ + Central.o \ + PNS.o #include ../make.cfg ! ! ###LIBRARY = libidl.a ! ! ##INCLUDE = -I. ! ##CFLAGS = $(INCLUDE) -c -g ! ##CCFLAGS = # --------------------------------------------------- ! ###all debug profile optimize static: $(LIBRARY) ! all debug profile optimize static: $(SOURCE.o) ! ! $(SOURCE.o): $(SOURCE.C) ! mico-shc++ -I. -c POS.C -o POS.o ! mico-shc++ -I. -c Store.C -o Store.o ! mico-shc++ -I. -c Central.C -o Central.o ! mico-shc++ -I. -c PNS.C -o PNS.o ! ! $(SOURCE.C): $(SOURCE.idl) ! for i in $(SOURCE.idl); \ ! do idl -I. --c++-suffix C $$i; \ ! done ! ###$(LIBRARY): $(OBJECTS) ! ### $(CC) -xar -o $(LIBRARY) $(OBJECTS) clean: ! ### $(RM) *.o ${LIBRARY} core ! $(RM) -f *.o *.C *.h core diff -cr ../gencp/Makefile ./Makefile *** ../gencp/Makefile Tue Jan 23 21:33:49 1996 --- ./Makefile Tue Nov 4 07:57:44 1997 *************** *** 1,15 **** all: cd IDL; make all cd PNS; make all ! cd utilities; make all cd POS; make all cd store; make all cd central; make all ! clean: cd IDL; make clean cd PNS; make clean ! cd utilities; make clean cd POS; make clean cd store; make clean cd central; make clean --- 1,18 ---- all: cd IDL; make all cd PNS; make all ! #### cd utilties; make all ! cd util; make all cd POS; make all cd store; make all cd central; make all ! cd bin; make all clean: cd IDL; make clean cd PNS; make clean ! ### cd utilities; make clean ! cd util; make clean cd POS; make clean cd store; make clean cd central; make clean + cd bin; make clean diff -cr ../gencp/PNS/Makefile ./PNS/Makefile *** ../gencp/PNS/Makefile Tue Jan 23 21:34:10 1996 --- ./PNS/Makefile Fri Oct 31 08:34:44 1997 *************** *** 2,16 **** PNSData.C \ Srv_Main.C APPL = PNSServer ! INCLUDE = -I. -I../IDL ! LIBRARY = -L../IDL -lidl CFLAGS = -g -c $(INCLUDE) ! OTHEROBJS = include ../make.cfg all $(APPL): $(OBJECTS) ! $(CC) -g -o $(APPL) $(OBJECTS) $(OTHEROBJS) $(LIBRARY) clean: rm -f *.o ${DEPFILE} ${APPL} .make.state .nse_depinfo core --- 2,19 ---- PNSData.C \ Srv_Main.C APPL = PNSServer ! ###LIBRARY = -L../IDL -lidl ! LIBRARY = -L../IDL -lmico@MICOVERSION@ CFLAGS = -g -c $(INCLUDE) ! ###OTHEROBJS = ! OTHEROBJS = ../IDL/PNS.o include ../make.cfg + INCLUDE = -I. -I../IDL all $(APPL): $(OBJECTS) ! ### $(CC) -g -o $(APPL) $(OBJECTS) $(OTHEROBJS) $(LIBRARY) ! mico-ld $(OBJECTS) $(OTHEROBJS) -o $(APPL) $(LIBRARY) clean: rm -f *.o ${DEPFILE} ${APPL} .make.state .nse_depinfo core diff -cr ../gencp/PNS/PNSData.h ./PNS/PNSData.h *** ../gencp/PNS/PNSData.h Fri Jan 26 23:05:04 1996 --- ./PNS/PNSData.h Wed Oct 29 16:51:23 1997 *************** *** 27,32 **** --- 27,33 ---- #define PNDATA_H #include + #include struct PNStruct { CORBA::Object_var obj; diff -cr ../gencp/PNS/PNS_i.C ./PNS/PNS_i.C *** ../gencp/PNS/PNS_i.C Fri Jan 26 23:05:03 1996 --- ./PNS/PNS_i.C Fri Oct 31 08:19:06 1997 *************** *** 24,30 **** */ #include "PNS_i.h" ! #include "### Store interface header file" #include pname_i::pname_i(CORBA::ORB_ptr orb) --- 24,31 ---- */ #include "PNS_i.h" ! /* #include "### Store interface header file" */ ! #include "PNS.h" #include pname_i::pname_i(CORBA::ORB_ptr orb) diff -cr ../gencp/PNS/PNS_i.h ./PNS/PNS_i.h *** ../gencp/PNS/PNS_i.h Fri Jan 26 23:05:02 1996 --- ./PNS/PNS_i.h Wed Oct 29 15:35:39 1997 *************** *** 26,35 **** #ifndef PNAME_I_H #define PNAME_I_H ! #include <### interface header file> #include "PNSData.h" ! class pname_i : public <### ORB specific base class> { PNData m_data; public: pname_i(CORBA::ORB_ptr orb); --- 26,37 ---- #ifndef PNAME_I_H #define PNAME_I_H ! /* #include <### interface header file> */ ! #include "PNS.h" #include "PNSData.h" ! //class pname_i : public <### ORB specific base class> { ! class pname_i : virtual public PseudoNameService_skel { PNData m_data; public: pname_i(CORBA::ORB_ptr orb); diff -cr ../gencp/PNS/Srv_Main.C ./PNS/Srv_Main.C *** ../gencp/PNS/Srv_Main.C Fri Jan 26 23:05:04 1996 --- ./PNS/Srv_Main.C Wed Oct 29 17:54:13 1997 *************** *** 29,41 **** int main(int argc, char* argv[]) { ! CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,""); try { PseudoNameService_ptr PNS1 = new pname_i(orb); ! boa->obj_is_ready(PNS1, nil); } catch (...) { --- 29,47 ---- int main(int argc, char* argv[]) { ! /* CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,""); + */ + + CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv, "mico-local-orb" ); + CORBA::BOA_ptr boa = orb->BOA_init(argc,argv, "mico-local-boa" ); try { PseudoNameService_ptr PNS1 = new pname_i(orb); ! /* boa->obj_is_ready(PNS1, nil); */ ! cout <<"Pseudo Name Server up "<impl_is_ready(CORBA::ImplementationDef::_nil()); orb->run(); } catch (...) { diff -cr ../gencp/POS/Makefile ./POS/Makefile *** ../gencp/POS/Makefile Tue Jan 23 21:35:31 1996 --- ./POS/Makefile Fri Oct 31 14:42:35 1997 *************** *** 8,27 **** APPL2 = POSclt APP1OBJ = POS_Ter.o POS_OM.o POS_IM.o Srv_Main.o APP2OBJ = POS_Ter.o POS_OM.o POS_IM.o POSClt.o ! INCLUDE = -I. -I../IDL -I../central -I../util ! LIBRARY = -L../IDL -lidl CFLAGS = -g -c $(INCLUDE) ! OTHEROBJ = ../util/FindPNS.o include ../make.cfg all : $(APPL1) $(APPL2) $(APPL1): $(OBJECTS) ! $(CC) -g -o $(APPL1) $(APP1OBJ) $(OTHEROBJ) $(LIBRARY) $(APPL2): $(OBJECTS) ! $(CC) -g -o $(APPL2) $(APP2OBJ) $(OTHEROBJ) $(LIBRARY) clean: rm -f *.o $(APPL1) $(APPL2) core .make.state .nse_depinfo --- 8,30 ---- APPL2 = POSclt APP1OBJ = POS_Ter.o POS_OM.o POS_IM.o Srv_Main.o APP2OBJ = POS_Ter.o POS_OM.o POS_IM.o POSClt.o ! CFLAGS = -g -c $(INCLUDE) ! OTHEROBJ = ../util/FindPNS.o ../IDL/POS.o ../IDL/Store.o ../IDL/PNS.o include ../make.cfg + INCLUDE = -I. -I../IDL -I../central -I../util + LIBRARY = -L../IDL -lmico@MICOVERSION@ all : $(APPL1) $(APPL2) $(APPL1): $(OBJECTS) ! ### $(CC) -g -o $(APPL1) $(APP1OBJ) $(OTHEROBJ) $(LIBRARY) ! mico-ld -o $(APPL1) $(APP1OBJ) $(OTHEROBJ) $(LIBRARY) $(APPL2): $(OBJECTS) ! ### $(CC) -g -o $(APPL2) $(APP2OBJ) $(OTHEROBJ) $(LIBRARY) ! mico-ld -o $(APPL2) $(APP2OBJ) $(OTHEROBJ) $(LIBRARY) clean: rm -f *.o $(APPL1) $(APPL2) core .make.state .nse_depinfo diff -cr ../gencp/POS/POSClt.C ./POS/POSClt.C *** ../gencp/POS/POSClt.C Fri Jan 26 23:04:56 1996 --- ./POS/POSClt.C Fri Oct 31 13:59:56 1997 *************** *** 25,32 **** */ #include "POS_IM.h" #include "POS_Ter.h" ! #include #include int main(int argc, char **argv) { --- 25,33 ---- */ #include "POS_IM.h" #include "POS_Ter.h" ! #include "FindPNS.h" #include + #include int main(int argc, char **argv) { *************** *** 34,49 **** cerr << "usage: " << argv[0] << " " << endl; return 1; } ! CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,""); POS::POSTerminal_var Ter; PseudoNameService_var pns; try { pns = FindPNS(orb); Ter = new POSTerminal_i(pns, argv[1], atol(argv[2])); ! boa->obj_is_ready(Ter, nil); } catch(...) { cerr << "ERROR Starting POS Terminal Media" << endl; --- 35,57 ---- cerr << "usage: " << argv[0] << " " << endl; return 1; } ! /* CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,""); + */ + + CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv, "mico-local-orb" ); + CORBA::BOA_ptr boa = orb->BOA_init(argc,argv, "mico-local-boa"); POS::POSTerminal_var Ter; PseudoNameService_var pns; try { pns = FindPNS(orb); + Ter = new POSTerminal_i(pns, argv[1], atol(argv[2])); ! ! /* boa->obj_is_ready(Ter, nil); */ ! /* boa->obj_is_ready(Ter, CORBA::ImplementationDef::_nil()); */ } catch(...) { cerr << "ERROR Starting POS Terminal Media" << endl; *************** *** 56,62 **** try { InPut = new InputMedia_i(Ter); ! boa->obj_is_ready(InPut, nil); } catch(...) { cerr << "Error starting InputMedia" << endl; --- 64,71 ---- try { InPut = new InputMedia_i(Ter); ! /* boa->obj_is_ready(InPut, nil); */ ! /* boa->obj_is_ready(InPut, CORBA::ImplementationDef::_nil()); */ } catch(...) { cerr << "Error starting InputMedia" << endl; *************** *** 83,85 **** --- 92,95 ---- return 0; } + diff -cr ../gencp/POS/POS_IM.C ./POS/POS_IM.C *** ../gencp/POS/POS_IM.C Fri Jan 26 23:04:57 1996 --- ./POS/POS_IM.C Sun Nov 2 05:52:43 1997 *************** *** 26,32 **** #include #include #include ! #include <### Store interface header file> #include "POS_IM.h" InputMedia_i::InputMedia_i(POS::POSTerminal_ptr pTer) --- 26,33 ---- #include #include #include ! /* #include <### Store interface header file> */ ! #include "Store.h" #include "POS_IM.h" InputMedia_i::InputMedia_i(POS::POSTerminal_ptr pTer) *************** *** 35,41 **** m_POSTerminalRef = POS::POSTerminal::_duplicate(pTer); } ! void InputMedia_i:: BarcodeInput (const char * Item) { try { --- 36,43 ---- m_POSTerminalRef = POS::POSTerminal::_duplicate(pTer); } ! /* void InputMedia_i:: BarcodeInput (const char * Item) */ ! void InputMedia_i:: BarcodeInput (const POS::Barcode Item) { try { *************** *** 47,53 **** } } ! void InputMedia_i:: KeypadInput (const char *Cmd) { char * pStr = (char *) Cmd; try --- 49,56 ---- } } ! /* void InputMedia_i:: KeypadInput (const char *Cmd) */ ! void InputMedia_i:: KeypadInput (const POS::InputMedia::OperatorCmd Cmd) { char * pStr = (char *) Cmd; try diff -cr ../gencp/POS/POS_IM.h ./POS/POS_IM.h *** ../gencp/POS/POS_IM.h Fri Jan 26 23:04:57 1996 --- ./POS/POS_IM.h Fri Oct 31 14:23:52 1997 *************** *** 26,41 **** #ifndef POS_IM_H #define POS_IM_H ! #include <### interface header file> ! class InputMedia_i : <### ORB specific base class> { private: POS::POSTerminal_var m_POSTerminalRef; public: InputMedia_i(POS::POSTerminal_ptr pTer); virtual void BarcodeInput (const char * Item); virtual void KeypadInput (const char *Cmd); }; #endif --- 26,47 ---- #ifndef POS_IM_H #define POS_IM_H ! /* #include <### interface header file> */ ! #include "POS.h" ! /* class InputMedia_i : <### ORB specific base class> */ ! class InputMedia_i : virtual public POS::InputMedia_skel { private: POS::POSTerminal_var m_POSTerminalRef; public: InputMedia_i(POS::POSTerminal_ptr pTer); + /* virtual void BarcodeInput (const char * Item); virtual void KeypadInput (const char *Cmd); + */ + virtual void BarcodeInput (const POS::Barcode Item); + virtual void KeypadInput (const POS::InputMedia::OperatorCmd Cmd); }; #endif diff -cr ../gencp/POS/POS_OM.C ./POS/POS_OM.C *** ../gencp/POS/POS_OM.C Fri Jan 26 23:04:57 1996 --- ./POS/POS_OM.C Fri Oct 31 11:54:30 1997 *************** *** 41,49 **** EXPERSOFT CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #include "POS_OM.h" ! #include //---------------------------------------------------------------------------------- // OutputMedia Member Functions --- 41,52 ---- EXPERSOFT CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ + #include + #include + #include "POS_OM.h" ! #include "FindPNS.h" //---------------------------------------------------------------------------------- // OutputMedia Member Functions *************** *** 70,74 **** // Check if the string passed exists and if so, output it if (StringToPrint) cout << StringToPrint << endl; ! return CORBA::TRUE; } --- 73,82 ---- // Check if the string passed exists and if so, output it if (StringToPrint) cout << StringToPrint << endl; ! /* return CORBA::TRUE; */ ! return TRUE; } + + + + diff -cr ../gencp/POS/POS_OM.h ./POS/POS_OM.h *** ../gencp/POS/POS_OM.h Fri Jan 26 23:04:58 1996 --- ./POS/POS_OM.h Thu Oct 30 02:52:38 1997 *************** *** 26,36 **** #ifndef POS_OM_H #define POS_OM_H #include <### POS interface header file> #include <### PNS header file> //------------------ Output Media ------------------------------------------ ! class OutputMedia_i : <### ORB specific base class> { public: OutputMedia_i(PseudoNameService_ptr pns --- 26,42 ---- #ifndef POS_OM_H #define POS_OM_H + /* #include <### POS interface header file> #include <### PNS header file> + */ + + #include "POS.h" + #include "PNS.h" //------------------ Output Media ------------------------------------------ ! /* class OutputMedia_i : <### ORB specific base class> */ ! class OutputMedia_i : virtual public POS::OutputMedia_skel { public: OutputMedia_i(PseudoNameService_ptr pns diff -cr ../gencp/POS/POS_Ter.C ./POS/POS_Ter.C *** ../gencp/POS/POS_Ter.C Fri Jan 26 23:04:58 1996 --- ./POS/POS_Ter.C Tue Nov 4 05:32:20 1997 *************** *** 25,32 **** */ #include #include "POS_Ter.h" ! #include ! #include <### PNS interface header file> POSTerminal_i:: POSTerminal_i(PseudoNameService_ptr pns ,char * storeid --- 25,34 ---- */ #include #include "POS_Ter.h" ! /* #include */ ! #include "FindPNS.h" ! /* #include <### PNS interface header file> */ ! #include "PNS.h" POSTerminal_i:: POSTerminal_i(PseudoNameService_ptr pns ,char * storeid *************** *** 159,165 **** } //----------------------------------------------------------------------------- ! void POSTerminal_i:: SendBarcode (const char *Item) { if (!LoggedIn()) return; --- 161,168 ---- } //----------------------------------------------------------------------------- ! /* void POSTerminal_i:: SendBarcode (const char *Item) */ ! void POSTerminal_i:: SendBarcode (const POS::Barcode Item) { if (!LoggedIn()) return; *************** *** 193,200 **** --- 196,208 ---- char caOpStr[255]; char * szFmtStr; szFmtStr = "%3d %10s %20s %7.2f %7.2f %s"; + /* sprintf(caOpStr,szFmtStr,m_itemQuantity,m_itemBarcode, ItemInf->Name,price,itemExt, + ((taxablePrice > 0.0) ? " *" : "") ); + */ + sprintf(caOpStr,szFmtStr,m_itemQuantity,(char *)m_itemBarcode, + (char *)ItemInf->Name,price,itemExt, ((taxablePrice > 0.0) ? " *" : "") ); try { diff -cr ../gencp/POS/POS_Ter.h ./POS/POS_Ter.h *** ../gencp/POS/POS_Ter.h Fri Jan 26 23:04:59 1996 --- ./POS/POS_Ter.h Fri Oct 31 14:19:26 1997 *************** *** 26,36 **** #ifndef POS_TER_H #define POS_TER_H #include <### PNS interface header file> #include <### Store interface header file> #include <### POS interface header file> ! class POSTerminal_i : <### ORB specific base class> { private: POS::Barcode m_itemBarcode; --- 26,43 ---- #ifndef POS_TER_H #define POS_TER_H + /* #include <### PNS interface header file> #include <### Store interface header file> #include <### POS interface header file> + */ ! #include "PNS.h" ! #include "Store.h" ! #include "POS.h" ! ! /* class POSTerminal_i : <### ORB specific base class> */ ! class POSTerminal_i : virtual public POS::POSTerminal_skel { private: POS::Barcode m_itemBarcode; *************** *** 51,62 **** POSTerminal_i(PseudoNameService_ptr pns ,char * storeid ,POS::POSId id); ! virtual void Login (); ! virtual void PrintPOSSalesSummary (); ! virtual void PrintStoreSalesSummary (); ! virtual void SendBarcode (const char *Item); ! virtual void ItemQuantity (CORBA::Long Quantity); ! virtual void EndOfSale (); }; #endif --- 58,70 ---- POSTerminal_i(PseudoNameService_ptr pns ,char * storeid ,POS::POSId id); ! virtual void Login (); ! virtual void PrintPOSSalesSummary (); ! virtual void PrintStoreSalesSummary (); ! /* virtual void SendBarcode (const char *Item); */ ! virtual void SendBarcode (const POS::Barcode Item); ! virtual void ItemQuantity (CORBA::Long Quantity); ! virtual void EndOfSale (); }; #endif diff -cr ../gencp/POS/Srv_Main.C ./POS/Srv_Main.C *** ../gencp/POS/Srv_Main.C Fri Jan 26 23:04:56 1996 --- ./POS/Srv_Main.C Fri Oct 31 09:35:10 1997 *************** *** 34,41 **** return 1; } ! CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv); ! CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,""); POS::OutputMedia_var OutPut; PseudoNameService_var pns; --- 34,43 ---- return 1; } ! /* CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv); */ ! CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv, "mico-local-orb"); ! /* CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,""); */ ! CORBA::BOA_ptr boa = orb->BOA_init(argc,argv, "mico-local-boa"); POS::OutputMedia_var OutPut; PseudoNameService_var pns; *************** *** 44,50 **** { pns=FindPNS(orb); OutPut = new OutputMedia_i(pns, atol(argv[1])); ! boa->obj_is_ready(OutPut, nil); } catch (...) { --- 46,53 ---- { pns=FindPNS(orb); OutPut = new OutputMedia_i(pns, atol(argv[1])); ! /* boa->obj_is_ready(OutPut, nil); */ ! boa->impl_is_ready (CORBA::ImplementationDef::_nil()); orb->run(); } catch (...) { Only in ./bin: Makefile Only in ./bin: PNS.dat diff -cr ../gencp/central/DepotData.C ./central/DepotData.C *** ../gencp/central/DepotData.C Fri Jan 26 23:05:01 1996 --- ./central/DepotData.C Sat Nov 1 17:31:37 1997 *************** *** 25,31 **** */ #include "DepotData.h" ! unsigned long DepotData::Locate(const POS::Barcode bc,AStore::ItemInfo &i) { TreeNode *t; unsigned long status=LocateNode(bc,t); if (status) --- 25,32 ---- */ #include "DepotData.h" ! /* unsigned long DepotData::Locate(const POS::Barcode bc,AStore::ItemInfo &i) { */ ! unsigned long DepotData::Locate(const char* bc,AStore::ItemInfo &i) { TreeNode *t; unsigned long status=LocateNode(bc,t); if (status) *************** *** 53,59 **** } } ! unsigned long DepotData::LocateNode(const POS::Barcode bc, TreeNode * &ret_node) { int compare; ret_node=m_root; if (ret_node==0) return 0; --- 54,61 ---- } } ! /* unsigned long DepotData::LocateNode(const POS::Barcode bc, TreeNode * &ret_node) { */ ! unsigned long DepotData::LocateNode(const char* bc, TreeNode * &ret_node) { int compare; ret_node=m_root; if (ret_node==0) return 0; diff -cr ../gencp/central/DepotData.h ./central/DepotData.h *** ../gencp/central/DepotData.h Fri Jan 26 23:05:01 1996 --- ./central/DepotData.h Sat Nov 1 17:32:42 1997 *************** *** 26,32 **** #ifndef DEPOTDATA_H #define DEPOTDATA_H ! #include <### Central interface header file> #include // The depot stores all info about the products as a binary tree --- 26,33 ---- #ifndef DEPOTDATA_H #define DEPOTDATA_H ! /* #include <### Central interface header file> */ ! #include #include // The depot stores all info about the products as a binary tree *************** *** 42,51 **** class DepotData { TreeNode *m_root; ! virtual unsigned long LocateNode(const POS::Barcode bc, TreeNode * &ret_node); public: DepotData() : m_root(0) {}; ! virtual unsigned long Locate(const POS::Barcode bc,AStore::ItemInfo &i); virtual void Insert(const AStore::ItemInfo &i); }; --- 43,54 ---- class DepotData { TreeNode *m_root; ! /* virtual unsigned long LocateNode(const POS::Barcode bc, TreeNode * &ret_node); */ ! virtual unsigned long LocateNode(const char* bc, TreeNode * &ret_node); public: DepotData() : m_root(0) {}; ! /* virtual unsigned long Locate(const POS::Barcode bc,AStore::ItemInfo &i); */ ! virtual unsigned long Locate(const char* bc,AStore::ItemInfo &i); virtual void Insert(const AStore::ItemInfo &i); }; diff -cr ../gencp/central/Depot_i.C ./central/Depot_i.C *** ../gencp/central/Depot_i.C Fri Jan 26 23:05:00 1996 --- ./central/Depot_i.C Sat Nov 1 18:03:21 1997 *************** *** 24,30 **** */ #include ! #include <### PNS interface header file> #include "Depot_i.h" #include --- 24,31 ---- */ #include ! /* #include <### PNS interface header file> */ ! #include #include "Depot_i.h" #include *************** *** 76,84 **** } void Depot_i::FindItemInfo (CORBA::Long StoreId, ! const char *Item, CORBA::Long Quantity, ! AStore::ItemInfo_out IInfo) { IInfo = new AStore::ItemInfo; if (!m_items.Locate(Item,*IInfo)) --- 77,87 ---- } void Depot_i::FindItemInfo (CORBA::Long StoreId, ! /* const char *Item, */ ! const POS::Barcode Item, CORBA::Long Quantity, ! /* AStore::ItemInfo_out IInfo) */ ! AStore::ItemInfo*& IInfo) { IInfo = new AStore::ItemInfo; if (!m_items.Locate(Item,*IInfo)) diff -cr ../gencp/central/Depot_i.h ./central/Depot_i.h *** ../gencp/central/Depot_i.h Fri Jan 26 23:05:00 1996 --- ./central/Depot_i.h Sat Nov 1 18:00:54 1997 *************** *** 26,42 **** #ifndef DEPOT_I_H #define DEPOT_I_H ! #include <### Central interface header file> #include "DepotData.h" ! class Depot_i : <### ORB specific base class> { DepotData m_items; public: Depot_i(PseudoNameService_ptr pns); virtual void FindItemInfo (CORBA::Long StoreId, ! const char *Item, CORBA::Long Quantity, ! AStore::ItemInfo_out OutItemInfo); }; #endif --- 26,46 ---- #ifndef DEPOT_I_H #define DEPOT_I_H ! /* #include <### Central interface header file> */ ! #include #include "DepotData.h" ! /* class Depot_i : <### ORB specific base class> { */ ! class Depot_i : virtual public CentralOffice::Depot_skel { DepotData m_items; public: Depot_i(PseudoNameService_ptr pns); virtual void FindItemInfo (CORBA::Long StoreId, ! /* const char *Item, */ ! const POS::Barcode Item, CORBA::Long Quantity, ! /* AStore::ItemInfo_out OutItemInfo); */ ! AStore::ItemInfo*& OutItemInfo); }; #endif diff -cr ../gencp/central/Makefile ./central/Makefile *** ../gencp/central/Makefile Tue Jan 23 21:36:25 1996 --- ./central/Makefile Sat Nov 1 18:08:16 1997 *************** *** 3,17 **** Srv_Main.C APPL = CentralServer - INCLUDE = -I. -I../IDL -I../POS -I../store -I../util - LIBRARY = -L../IDL -lidl CFLAGS = -g -c $(INCLUDE) ! OTHEROBJS = ../util/FindPNS.o include ../make.cfg all $(APPL): $(OBJECTS) ! $(CC) -g -o $(APPL) $(OBJECTS) $(OTHEROBJS) $(LIBRARY) clean: rm -f *.o core $(APPL) .nse_depinfo .make.state --- 3,17 ---- Srv_Main.C APPL = CentralServer CFLAGS = -g -c $(INCLUDE) ! OTHEROBJS = ../util/FindPNS.o ../IDL/Central.o ../IDL/Store.o ../IDL/POS.o ../IDL/PNS.o include ../make.cfg + INCLUDE = -I. -I../IDL -I../POS -I../store -I../util + LIBRARY = -L../IDL -lmico@MICOVERSION@ all $(APPL): $(OBJECTS) ! mico-ld -o $(APPL) $(OBJECTS) $(OTHEROBJS) $(LIBRARY) clean: rm -f *.o core $(APPL) .nse_depinfo .make.state diff -cr ../gencp/central/Srv_Main.C ./central/Srv_Main.C *** ../gencp/central/Srv_Main.C Fri Jan 26 23:05:02 1996 --- ./central/Srv_Main.C Sat Nov 1 17:39:51 1997 *************** *** 29,36 **** --- 29,41 ---- int main(int argc, char** argv) { + /* CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv); CORBA::BOA_ptr boa = orb->BOA_init(argc, argv,""); + */ + + CORBA::ORB_ptr orb = CORBA::ORB_init(argc, argv, "mico-local-orb"); + CORBA::BOA_ptr boa = orb->BOA_init(argc, argv, "mico-local-boa"); CentralOffice::Depot_var dep1; PseudoNameService_var pns; *************** *** 39,45 **** { pns=FindPNS(orb); dep1 = new Depot_i(pns); ! boa->obj_is_ready(dep1,nil); } catch(...) { cerr << "ERROR Starting Depot Server" << endl; --- 44,51 ---- { pns=FindPNS(orb); dep1 = new Depot_i(pns); ! /* boa->obj_is_ready(dep1,nil); */ ! boa->impl_is_ready(CORBA::ImplementationDef::_nil()); orb->run(); } catch(...) { cerr << "ERROR Starting Depot Server" << endl; diff -cr ../gencp/make.cfg ./make.cfg *** ../gencp/make.cfg Tue Dec 26 16:42:14 1995 --- ./make.cfg Tue Nov 11 02:53:48 1997 *************** *** 4,17 **** OBJECTS = $(SOURCE.C:.C=.o) \ $(SOURCE.idl:.idl=.o) # clear out the suffixes .SUFFIXES: # Suffix Rules ! .SUFFIXES: .idl .cxx .cxx~ .C .C~ .c .c~ .h .h~ .hp .hp~ .o .idl.o: ! echo "put command to compile IDL and generated source code here" .C.o: ! echo "put command to compile " $< " here" ! --- 4,21 ---- OBJECTS = $(SOURCE.C:.C=.o) \ $(SOURCE.idl:.idl=.o) + CXX = mico-shc++ + CXXFLAGS = + INCLUDE = -I. -I../IDL + # clear out the suffixes .SUFFIXES: # Suffix Rules ! .SUFFIXES: .idl .cxx .C .c .h .hp .o .idl.o: ! idl -I. -I/usr/local/include/mico --c++-suffix C $< ; \ ! $(CXX) $(CXXFLAGS) -c -I. -I/usr/local/include/mico $*.C .C.o: ! $(CXX) $(CXXFLAGS) $(INCLUDE) -c $< diff -cr ../gencp/store/Makefile ./store/Makefile *** ../gencp/store/Makefile Tue Jan 23 21:36:01 1996 --- ./store/Makefile Sat Nov 1 16:37:31 1997 *************** *** 2,16 **** Srv_Main.C APPL = StoreServer - INCLUDE = -I. -I../IDL -I../POS -I../util - LIBRARY = -L../IDL -lidl CFLAGS = -g -c $(INCLUDE) ! OTHEROBJS = ../util/FindPNS.o include ../make.cfg all $(APPL): $(OBJECTS) ! $(CC) -g -o $(APPL) $(OBJECTS) $(OTHEROBJS) $(LIBRARY) clean: rm -f *.o $(APPL) core .nse_depinfo .make.state --- 2,17 ---- Srv_Main.C APPL = StoreServer CFLAGS = -g -c $(INCLUDE) ! OTHEROBJS = ../util/FindPNS.o ../IDL/Store.o ../IDL/PNS.o ../IDL/POS.o ../IDL/Central.o include ../make.cfg + INCLUDE = -I. -I../IDL -I../POS -I../util + LIBRARY = -L../IDL -lmico@MICOVERSION@ all $(APPL): $(OBJECTS) ! ### $(CC) -g -o $(APPL) $(OBJECTS) $(OTHEROBJS) $(LIBRARY) ! mico-ld -o $(APPL) $(OBJECTS) $(OTHEROBJS) $(LIBRARY) clean: rm -f *.o $(APPL) core .nse_depinfo .make.state diff -cr ../gencp/store/Srv_Main.C ./store/Srv_Main.C *** ../gencp/store/Srv_Main.C Fri Jan 26 23:05:00 1996 --- ./store/Srv_Main.C Tue Nov 4 05:35:58 1997 *************** *** 33,41 **** cerr << "usage: " << argv[0] << " " << endl; return 1; } ! CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,""); AStore::Tax_var tax1; AStore::Store_var store1; --- 33,45 ---- cerr << "usage: " << argv[0] << " " << endl; return 1; } ! /* CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,""); + */ + + CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv, "mico-local-orb"); + CORBA::BOA_ptr boa = orb->BOA_init(argc,argv, "mico-local-boa"); AStore::Tax_var tax1; AStore::Store_var store1; *************** *** 44,54 **** try { pns=FindPNS(orb); ! store1 = new Store_i(pns,atof(argv[1]),atol(argv[2])); ! boa->obj_is_ready(store1,nil); ! tax1 = new Tax_i(pns,atof(argv[1])); ! boa->obj_is_ready(tax1,nil); } catch(...) { cerr << "ERROR Starting Store Server" << endl; --- 48,61 ---- try { pns=FindPNS(orb); ! /* store1 = new Store_i(pns,atof(argv[1]),atol(argv[2])); */ ! store1 = new Store_i(pns,atol(argv[1]),atof(argv[2])); ! /* boa->obj_is_ready(store1,nil); */ ! /* tax1 = new Tax_i(pns,atof(argv[1])); */ ! tax1 = new Tax_i(pns,atol(argv[1])); ! /* boa->obj_is_ready(tax1,nil); */ ! boa->impl_is_ready(CORBA::ImplementationDef::_nil()); orb->run(); } catch(...) { cerr << "ERROR Starting Store Server" << endl; diff -cr ../gencp/store/store_i.C ./store/store_i.C *** ../gencp/store/store_i.C Fri Jan 26 23:04:59 1996 --- ./store/store_i.C Sat Nov 1 16:11:01 1997 *************** *** 24,30 **** */ #include "store_i.h" ! #include #include #include --- 24,31 ---- */ #include "store_i.h" ! /* #include */ ! #include "FindPNS.h" #include #include *************** *** 131,137 **** return AStore::StoreAccess::_duplicate(m_POSTerminals[loc].StoreAccessReference); } ! void Store_i::GetPOSTotals(AStore::POSList_out POSData) { POSData = new AStore::POSList(m_POSTerminals); } --- 132,139 ---- return AStore::StoreAccess::_duplicate(m_POSTerminals[loc].StoreAccessReference); } ! /* void Store_i::GetPOSTotals(AStore::POSList_out POSData) */ ! void Store_i::GetPOSTotals(AStore::POSList*& POSData) { POSData = new AStore::POSList(m_POSTerminals); } *************** *** 190,196 **** } StoreAccess_i::StoreAccess_i(PseudoNameService_ptr pns ! ,AStore::Store_var store ,CORBA::Float markup) { m_storeMarkup = markup; --- 192,199 ---- } StoreAccess_i::StoreAccess_i(PseudoNameService_ptr pns ! /* ,AStore::Store_var store */ ! ,AStore::Store_ptr store ,CORBA::Float markup) { m_storeMarkup = markup; *************** *** 210,220 **** } void StoreAccess_i::FindPrice( ! const char *Item ,CORBA::Long Quantity ,CORBA::Float& ItemPrice ,CORBA::Float& ItemTaxPrice ! ,AStore::ItemInfo_out IInfo) { AStore::ItemInfo *i2; --- 213,225 ---- } void StoreAccess_i::FindPrice( ! /* const char *Item */ ! const POS::Barcode Item ,CORBA::Long Quantity ,CORBA::Float& ItemPrice ,CORBA::Float& ItemTaxPrice ! /* ,AStore::ItemInfo_out IInfo) */ ! ,AStore::ItemInfo*& IInfo) { AStore::ItemInfo *i2; *************** *** 229,231 **** --- 234,242 ---- ItemPrice ,((AStore::ItemInfo *) IInfo)->Itemtype); } + + + + + + diff -cr ../gencp/store/store_i.h ./store/store_i.h *** ../gencp/store/store_i.h Fri Jan 26 23:04:59 1996 --- ./store/store_i.h Wed Nov 12 03:04:30 1997 *************** *** 25,36 **** */ #ifndef STORE_I_H #define STORE_I_H ! #include <### PNS interface header file> #include <### Store interface header file> #include <### Central interface header file> ! class Tax_i : <### ORB specific base class> { private: CORBA::Float m_regionRate; --- 25,42 ---- */ #ifndef STORE_I_H #define STORE_I_H ! /* #include <### PNS interface header file> #include <### Store interface header file> #include <### Central interface header file> + */ + + #include "PNS.h" + #include "Store.h" + #include "Central.h" ! /* class Tax_i : <### ORB specific base class> */ ! class Tax_i : virtual public AStore::Tax_skel { private: CORBA::Float m_regionRate; *************** *** 44,50 **** }; ! class Store_i : ORB specific base class { private: CORBA::ULong LocatePOSEntry(CORBA::Long); --- 50,57 ---- }; ! /* class Store_i : ORB specific base class */ ! class Store_i : virtual public AStore::Store_skel { private: CORBA::ULong LocatePOSEntry(CORBA::Long); *************** *** 53,59 **** CORBA::Float m_storeTaxTotal; CORBA::Float m_storeMarkup; AStore::POSList m_POSTerminals; ! PseudoNameService_var m_pns; public: Store_i(PseudoNameService_ptr pns, AStore::AStoreId storeID, --- 60,67 ---- CORBA::Float m_storeTaxTotal; CORBA::Float m_storeMarkup; AStore::POSList m_POSTerminals; ! /* PseudoNameService_var m_pns; */ ! PseudoNameService_ptr m_pns; public: Store_i(PseudoNameService_ptr pns, AStore::AStoreId storeID, *************** *** 67,82 **** CORBA::Long Id); virtual void GetPOSTotals( ! AStore::POSList_out POSData); virtual void UpdateStoreTotals( CORBA::Long Id, CORBA::Float Price, CORBA::Float Taxes); - }; ! class StoreAccess_i : ORB specific base class { private: CORBA::Float m_storeMarkup; --- 75,91 ---- CORBA::Long Id); virtual void GetPOSTotals( ! /* AStore::POSList_out POSData); */ ! AStore::POSList*& POSData); virtual void UpdateStoreTotals( CORBA::Long Id, CORBA::Float Price, CORBA::Float Taxes); }; ! /* class StoreAccess_i : ORB specific base class */ ! class StoreAccess_i : virtual public AStore::StoreAccess_skel { private: CORBA::Float m_storeMarkup; *************** *** 85,99 **** AStore::Store_var m_store; public: StoreAccess_i(PseudoNameService_ptr pns, ! AStore::Store_var pStore, CORBA::Float markup); virtual void FindPrice( ! const char *Item, CORBA::Long Quantity, CORBA::Float& ItemPrice, CORBA::Float& ItemTaxPrice, ! AStore::ItemInfo_out IInfo); }; --- 94,111 ---- AStore::Store_var m_store; public: StoreAccess_i(PseudoNameService_ptr pns, ! /* AStore::Store_var pStore, */ ! AStore::Store_ptr pStore, CORBA::Float markup); virtual void FindPrice( ! /* const char *Item, */ ! const POS::Barcode Item, CORBA::Long Quantity, CORBA::Float& ItemPrice, CORBA::Float& ItemTaxPrice, ! /* AStore::ItemInfo_out IInfo); */ ! AStore::ItemInfo*& IInfo); }; diff -cr ../gencp/util/FindPNS.h ./util/FindPNS.h *** ../gencp/util/FindPNS.h Fri Jan 26 23:05:04 1996 --- ./util/FindPNS.h Wed Oct 29 18:00:39 1997 *************** *** 26,32 **** #ifndef PNSFIND_H #define PNSFIND_H ! #include <### PNS interface header file> PseudoNameService_ptr FindPNS(CORBA::ORB_ptr orb); --- 26,33 ---- #ifndef PNSFIND_H #define PNSFIND_H ! /* #include <### PNS interface header file> */ ! #include "PNS.h" PseudoNameService_ptr FindPNS(CORBA::ORB_ptr orb); diff -cr ../gencp/util/Makefile ./util/Makefile *** ../gencp/util/Makefile Tue Dec 26 17:08:08 1995 --- ./util/Makefile Fri Oct 31 08:40:57 1997 *************** *** 1,11 **** SOURCE.C = FindPNS.C - INCLUDE = -I. -I../interfaces -I../POS - LIBRARY = -L../interfaces -lidl CFLAGS = -g -c $(INCLUDE) OTHEROBJS = include ../make.cfg all: $(OBJECTS) --- 1,11 ---- SOURCE.C = FindPNS.C CFLAGS = -g -c $(INCLUDE) OTHEROBJS = include ../make.cfg + INCLUDE = -I. -I../IDL -I../interfaces -I../POS + LIBRARY = -L../interfaces -lmico@MICOVERSION@ all: $(OBJECTS)