home *** CD-ROM | disk | FTP | other *** search
/ Power GUI Programming with VisualAge C++ / powergui.iso / trialva / ibmcppw / samples / visbuild / vbsample / icompany.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1996-02-16  |  26.1 KB  |  597 lines

  1. /*******************************************************************************
  2. * FILE NAME: icompany.cpp                                                      *
  3. *                                                                              *
  4. * DESCRIPTION:                                                                 *
  5. *   Class implementation of the class(es):                                     *
  6. *    ICompany - IBM sample company part.                                       *
  7. *                                                                              *
  8. * COPYRIGHT:                                                                   *
  9. *   IBM(R) VisualAge(TM) for C++                                               *
  10. *   (C) Copyright International Business Machines Corporation 1991, 1996       *
  11. *   Licensed Material - Program-Property of IBM - All Rights Reserved.         *
  12. *   US Government Users Restricted Rights - Use, duplication, or disclosure    *
  13. *   restricted by GSA ADP Schedule Contract with IBM Corp.                     *
  14. *                                                                              *
  15. *   This program will not run in DOS mode.                                     *
  16. *                                                                              *
  17. * DISCLAIMER OF WARRANTIES:                                                    *
  18. *   The following [enclosed] code is sample code created by IBM                *
  19. *   Corporation.  This sample code is not part of any standard IBM product     *
  20. *   and is provided to you solely for the purpose of assisting you in the      *
  21. *   development of your applications.  The code is provided "AS IS",           *
  22. *   without warranty of any kind.  IBM shall not be liable for any damages     *
  23. *   arising out of your use of the sample code, even if they have been         *
  24. *   advised of the possibility of such damages.                                *
  25. *******************************************************************************/
  26.  
  27. #ifndef _ICOMPANY_
  28.   #include <icompany.hpp>
  29. #endif
  30.  
  31. #ifndef _INOTIFEV_
  32.   #include <inotifev.hpp>
  33. #endif
  34.  
  35. #include <iadd.hpp>
  36. #include <icust.hpp>
  37.  
  38. #pragma export (ICompany::nameId,, 1300)
  39. const INotificationId ICompany::nameId =
  40.                      "ICompany::name";
  41. #pragma export (ICompany::addressId,, 1301)
  42. const INotificationId ICompany::addressId =
  43.                      "ICompany::address";
  44. #pragma export (ICompany::customerListId,, 1302)
  45. const INotificationId ICompany::customerListId =
  46.                      "ICompany::customerList";
  47. #pragma export (ICompany::phoneId,, 1303)
  48. const INotificationId ICompany::phoneId =
  49.                      "ICompany::phone";
  50. #pragma export (ICompany::customerAddedId,, 1304)
  51. const INotificationId ICompany::customerAddedId =
  52.                      "ICompany::customerAdded";
  53.  
  54. /*------------------------------------------------------------------------------
  55. | ICompany::ICompany                                                           |
  56. |                                                                              |
  57. | Standard constructor.                                                        |
  58. ------------------------------------------------------------------------------*/
  59. #pragma export (ICompany::ICompany(),, 1305)
  60. ICompany::ICompany() : IStandardNotifier ()
  61.     ,iName ("XYZ")
  62.     ,iAddress (new IAddress())
  63.     ,iCustomerList (new IVSequence<ICustomer*> ())
  64.     ,iPhone ("555-1212")
  65. {
  66.   iCustomerList->addAsLast (new ICustomer("Al"));
  67.   iCustomerList->addAsLast (new ICustomer("Bob"));
  68.   iCustomerList->addAsLast (new ICustomer("Bruce"));
  69.   iCustomerList->addAsLast (new ICustomer("Dave"));
  70.   iCustomerList->addAsLast (new ICustomer("Delores"));
  71.   iCustomerList->addAsLast (new ICustomer("Diann"));
  72.   iCustomerList->addAsLast (new ICustomer("Don"));
  73.   iCustomerList->addAsLast (new ICustomer("Ed"));
  74.   iCustomerList->addAsLast (new ICustomer("Flora"));
  75.   iCustomerList->addAsLast (new ICustomer("Fred"));
  76.   iCustomerList->addAsLast (new ICustomer("George"));
  77.   iCustomerList->addAsLast (new ICustomer("Jim"));
  78.   iCustomerList->addAsLast (new ICustomer("Kat"));
  79.   iCustomerList->addAsLast (new ICustomer("Kathy"));
  80.   iCustomerList->addAsLast (new ICustomer("Ken"));
  81.   iCustomerList->addAsLast (new ICustomer("Lou"));
  82.   iCustomerList->addAsLast (new ICustomer("Mark"));
  83.   iCustomerList->addAsLast (new ICustomer("Michael"));
  84.   iCustomerList->addAsLast (new ICustomer("Morris"));
  85.   iCustomerList->addAsLast (new ICustomer("Peter"));
  86.   iCustomerList->addAsLast (new ICustomer("Rich"));
  87.   iCustomerList->addAsLast (new ICustomer("Ricky"));
  88.   iCustomerList->addAsLast (new ICustomer("Robert"));
  89.   iCustomerList->addAsLast (new ICustomer("Ron"));
  90.   iCustomerList->addAsLast (new ICustomer("Sherry"));
  91.   iCustomerList->addAsLast (new ICustomer("Steve"));
  92.   iCustomerList->addAsLast (new ICustomer("Susan"));
  93.   iCustomerList->addAsLast (new ICustomer("Terry"));
  94.   enableNotification ();
  95.   iCustomerList->enableNotification ();
  96. }
  97.  
  98. /*------------------------------------------------------------------------------
  99. | ICompany::ICompany                                                           |
  100. |                                                                              |
  101. | Constructor with name parameter.                                             |
  102. ------------------------------------------------------------------------------*/
  103. #pragma export (ICompany::ICompany(const IString& aName),, 1306)
  104. ICompany::ICompany(const IString& aName) :
  105.   IStandardNotifier (),
  106.   iName ("XYZ"),
  107.   iAddress (new IAddress()),
  108.   iCustomerList (new IVSequence<ICustomer*> ()),
  109.   iPhone ("555-1212")
  110. {
  111.   setName(aName);
  112.   enableNotification ();
  113.   iCustomerList->enableNotification ();
  114. }
  115.  
  116. /*------------------------------------------------------------------------------
  117. | ICompany::ICompany                                                           |
  118. |                                                                              |
  119. | Standard copy constructor.                                                   |
  120. ------------------------------------------------------------------------------*/
  121. #pragma export (ICompany::ICompany(const ICompany&),, 1307)
  122. ICompany::ICompany (const ICompany& partCopy)
  123.   : IStandardNotifier (partCopy)
  124.     ,iName (partCopy.name ())
  125.     ,iAddress (partCopy.address ())
  126.     ,iCustomerList (partCopy.customerList ())
  127.     ,iPhone (partCopy.phone ())
  128. {
  129.   enableNotification ();
  130.   iCustomerList->enableNotification ();
  131. }
  132.  
  133. /*------------------------------------------------------------------------------
  134. | ICompany::ICompany                                                           |
  135. |                                                                              |
  136. | Standard operator=                                                           |
  137. ------------------------------------------------------------------------------*/
  138. #pragma export (ICompany::operator= (const ICompany&),, 1308)
  139. ICompany& ICompany::operator= (const ICompany& aICompany)
  140. {
  141.   if (this == &aICompany) {
  142.     return *this;
  143.   } /* endif */
  144.   Inherited::operator=(aICompany);
  145.   setName(aICompany.name());
  146.   setAddress(new IAddress(*aICompany.address()));
  147.   setCustomerList(aICompany.customerList());
  148.   setPhone(aICompany.phone());
  149.   return *this;
  150. }
  151.  
  152. /*------------------------------------------------------------------------------
  153. | ICompany::~ICompany                                                          |
  154. |                                                                              |
  155. | ICompany destructor.                                                         |
  156. ------------------------------------------------------------------------------*/
  157. #pragma export (ICompany::~ICompany(),, 1309)
  158. ICompany::~ICompany()
  159. {
  160.   ISequence<ICustomer *> tempList;
  161.   ICustomer *            customer;
  162.  
  163.   if ( iAddress )
  164.     delete iAddress;
  165.  
  166.   if ( iCustomerList )
  167.   {
  168.     IVSequence <ICustomer*>::Cursor cursor(*iCustomerList);
  169.     forCursor( cursor )
  170.       tempList.addAsFirst( iCustomerList->elementAt( cursor ) );
  171.  
  172.     iCustomerList->removeAll( );
  173.  
  174.     ISequence<ICustomer *>::Cursor tempCursor( tempList );
  175.     forCursor( tempCursor )
  176.     {
  177.       customer = tempList.elementAt ( tempCursor );
  178.       delete customer;
  179.     }
  180.     tempList.removeAll( );
  181.  
  182.     delete iCustomerList;
  183.  
  184.   }
  185. }
  186.  
  187. /*------------------------------------------------------------------------------
  188. | ICompany::asString                                                           |
  189. |                                                                              |
  190. | Perform asString.                                                            |
  191. ------------------------------------------------------------------------------*/
  192. #pragma export (ICompany::asString() const,, 1310)
  193. IString ICompany::asString () const
  194. {
  195.   return name();
  196. }
  197.  
  198. /*------------------------------------------------------------------------------
  199. | ICompany::name                                                               |
  200. |                                                                              |
  201. | Return the name attribute.                                                   |
  202. ------------------------------------------------------------------------------*/
  203. #pragma export (ICompany::name() const,, 1311)
  204. IString ICompany::name () const
  205. {
  206.   return iName;
  207. }
  208.  
  209. /*------------------------------------------------------------------------------
  210. | ICompany::setName                                                            |
  211. |                                                                              |
  212. | Set the name attribute.                                                      |
  213. ------------------------------------------------------------------------------*/
  214. #pragma export (ICompany::setName(const IString&),, 1312)
  215. ICompany& ICompany::setName (const IString& aName)
  216. {
  217.   if (iName != aName) {
  218.     iName = aName;
  219.     IString eventData(iName);
  220.     notifyObservers(INotificationEvent(nameId, *this,
  221.                       true, (void*)&eventData));
  222.   } /* endif */
  223.   return *this;
  224. }
  225.  
  226. /*------------------------------------------------------------------------------
  227. | ICompany::address                                                            |
  228. |                                                                              |
  229. | Return the address attribute.                                                |
  230. ------------------------------------------------------------------------------*/
  231. #pragma export (ICompany::address() const,, 1313)
  232. IAddress* ICompany::address () const
  233. {
  234.   return iAddress;
  235. }
  236.  
  237. /*------------------------------------------------------------------------------
  238. | ICompany::setAddress                                                         |
  239. |                                                                              |
  240. | Set the address attribute.                                                   |
  241. ------------------------------------------------------------------------------*/
  242. #pragma export (ICompany::setAddress(const IAddress*),, 1314)
  243. ICompany& ICompany::setAddress (IAddress* aAddress)
  244. {
  245.   if (iAddress != aAddress) {
  246.     if (iAddress)
  247.       delete iAddress;
  248.     iAddress = aAddress;
  249.     notifyObservers(INotificationEvent(addressId, *this,
  250.                       true, (void*)iAddress));
  251.   } /* endif */
  252.   return *this;
  253. }
  254.  
  255. /*------------------------------------------------------------------------------
  256. | ICompany::setAddress                                                         |
  257. |                                                                              |
  258. | Set the address attribute.                                                   |
  259. ------------------------------------------------------------------------------*/
  260. #pragma export (ICompany::setAddress(const IAddress&),, 1315)
  261. ICompany& ICompany::setAddress (const IAddress& aAddress)
  262. {
  263.   return setAddress(new IAddress(aAddress));
  264. }
  265.  
  266. /*------------------------------------------------------------------------------
  267. | ICompany::customerList                                                       |
  268. |                                                                              |
  269. | Return the customerList attribute.                                           |
  270. ------------------------------------------------------------------------------*/
  271. #pragma export (ICompany::customerList() const,, 1316)
  272. IVSequence <ICustomer*> * ICompany::customerList () const
  273. {
  274.   return iCustomerList;
  275. }
  276.  
  277. /*------------------------------------------------------------------------------
  278. | ICompany::setCustomerList                                                    |
  279. |                                                                              |
  280. | Set the customerList attribute.                                              |
  281. ------------------------------------------------------------------------------*/
  282. #pragma export (ICompany::setCustomerList(const IVSequence <ICustomer*>*),, 1317)
  283. ICompany& ICompany::setCustomerList (IVSequence <ICustomer*>* aCustomerList)
  284. {
  285.   if (iCustomerList != aCustomerList) {
  286.     if (iCustomerList) {
  287. //
  288. //  Need to add additional code to handle deleting the objects.
  289. //
  290. //  Call removeall to make sure listbox or other collection viewer controls
  291. //  are not looking at old objects.
  292. //
  293.       iCustomerList->removeAll();
  294.       delete iCustomerList;
  295.     } /* end */
  296.     iCustomerList = aCustomerList;
  297.     iCustomerList->enableNotification ();
  298.     notifyObservers(INotificationEvent(customerListId, *this,
  299.                       true, (void*)iCustomerList));
  300.   } /* endif */
  301.   return *this;
  302. }
  303.  
  304. /*------------------------------------------------------------------------------
  305. | ICompany::setCustomerList                                                    |
  306. |                                                                              |
  307. | Set the customerList attribute.                                              |
  308. ------------------------------------------------------------------------------*/
  309. #pragma export (ICompany::setCustomerList(const IVSequence <ICustomer*>&),, 1318)
  310. ICompany& ICompany::setCustomerList (const IVSequence <ICustomer*>& aCustomerList)
  311. {
  312.   return setCustomerList(new IVSequence <ICustomer*>(aCustomerList));
  313. }
  314.  
  315. /*------------------------------------------------------------------------------
  316. | ICompany::addCustomer                                                        |
  317. |                                                                              |
  318. | Perform the addCustomer action.                                              |
  319. ------------------------------------------------------------------------------*/
  320. #pragma export (ICompany::addCustomer (ICustomer* customer),, 1319)
  321. ICompany& ICompany::
  322.   addCustomer (ICustomer* customer)
  323. {
  324.   if (customerList ()) {
  325.     if (customer) {
  326.       customerList()->add (customer);
  327.       customer->enableNotification ();
  328.       notifyObservers(INotificationEvent(customerAddedId, *this,
  329.                       true, (void*)customer));
  330.     } ; /* endif */
  331.   } ; /* endif */
  332.   return *this;
  333. }
  334.  
  335. /*------------------------------------------------------------------------------
  336. | ICompany::addCustomer                                                        |
  337. |                                                                              |
  338. | Perform the addCustomer action.                                              |
  339. ------------------------------------------------------------------------------*/
  340. #pragma export (ICompany::addCustomer (const IString& aName),, 1320)
  341. ICompany& ICompany::
  342.   addCustomer (const IString& aName)
  343. {
  344.   addCustomer (new ICustomer (aName));
  345.   return *this;
  346. }
  347.  
  348. /*------------------------------------------------------------------------------
  349. | ICompany::phone                                                              |
  350. |                                                                              |
  351. | Return the phone attribute.                                                  |
  352. ------------------------------------------------------------------------------*/
  353. #pragma export (ICompany::phone() const,, 1321)
  354. IString ICompany::phone () const
  355. {
  356.   return iPhone;
  357. }
  358.  
  359. /*------------------------------------------------------------------------------
  360. | ICompany::setPhone                                                           |
  361. |                                                                              |
  362. | Set the phone attribute.                                                     |
  363. ------------------------------------------------------------------------------*/
  364. #pragma export (ICompany::setPhone(const IString&),, 1322)
  365. ICompany& ICompany::setPhone (const IString& aPhone)
  366. {
  367.   if (iPhone != aPhone) {
  368.     iPhone = aPhone;
  369.     IString eventData(iPhone);
  370.     notifyObservers(INotificationEvent(phoneId, *this,
  371.                       true, (void*)&eventData));
  372.   } /* endif */
  373.   return *this;
  374. }
  375.  
  376. /*------------------------------------------------------------------------------
  377. | ICompany::setNameToDefault                                                   |
  378. |                                                                              |
  379. | Perform the setNameToDefault action.                                         |
  380. ------------------------------------------------------------------------------*/
  381. #pragma export (ICompany::setNameToDefault(),, 1323)
  382. ICompany& ICompany::setNameToDefault ()
  383. {
  384.   return setName("IBM");
  385. }
  386.  
  387. /*------------------------------------------------------------------------------
  388. | ICompany::setAddressToDefault                                                |
  389. |                                                                              |
  390. | Perform the setAddressToDefault action.                                      |
  391. ------------------------------------------------------------------------------*/
  392. #pragma export (ICompany::setAddressToDefault(),, 1324)
  393. ICompany& ICompany::setAddressToDefault ()
  394. {
  395.   if (address())
  396.     address()->setToDefault();
  397.   return *this;
  398. }
  399.  
  400. /*------------------------------------------------------------------------------
  401. | ICompany::setPhoneToDefault                                                  |
  402. |                                                                              |
  403. | Perform the setPhoneToDefault action.                                        |
  404. ------------------------------------------------------------------------------*/
  405. #pragma export (ICompany::setPhoneToDefault(),, 1325)
  406. ICompany& ICompany::setPhoneToDefault ()
  407. {
  408.   return setPhone("555-1212");
  409. }
  410.  
  411. /*------------------------------------------------------------------------------
  412. | ICompany::setCustomerListToDefault                                           |
  413. |                                                                              |
  414. | Perform the setCustomerListToDefault action.                                 |
  415. ------------------------------------------------------------------------------*/
  416. #pragma export (ICompany::setCustomerListToDefault(),, 1326)
  417. ICompany& ICompany::setCustomerListToDefault ()
  418. {
  419.   iCustomerList->removeAll ();
  420.   iCustomerList->addAsLast (new ICustomer("Al"));
  421.   iCustomerList->addAsLast (new ICustomer("Bob"));
  422.   iCustomerList->addAsLast (new ICustomer("Bruce"));
  423.   iCustomerList->addAsLast (new ICustomer("Dave"));
  424.   iCustomerList->addAsLast (new ICustomer("Delores"));
  425.   iCustomerList->addAsLast (new ICustomer("Diann"));
  426.   iCustomerList->addAsLast (new ICustomer("Don"));
  427.   iCustomerList->addAsLast (new ICustomer("Ed"));
  428.   iCustomerList->addAsLast (new ICustomer("Flora"));
  429.   iCustomerList->addAsLast (new ICustomer("Fred"));
  430.   iCustomerList->addAsLast (new ICustomer("George"));
  431.   iCustomerList->addAsLast (new ICustomer("Jim"));
  432.   iCustomerList->addAsLast (new ICustomer("Kat"));
  433.   iCustomerList->addAsLast (new ICustomer("Kathy"));
  434.   iCustomerList->addAsLast (new ICustomer("Ken"));
  435.   iCustomerList->addAsLast (new ICustomer("Lou"));
  436.   iCustomerList->addAsLast (new ICustomer("Mark"));
  437.   iCustomerList->addAsLast (new ICustomer("Michael"));
  438.   iCustomerList->addAsLast (new ICustomer("Morris"));
  439.   iCustomerList->addAsLast (new ICustomer("Peter"));
  440.   iCustomerList->addAsLast (new ICustomer("Rich"));
  441.   iCustomerList->addAsLast (new ICustomer("Ricky"));
  442.   iCustomerList->addAsLast (new ICustomer("Robert"));
  443.   iCustomerList->addAsLast (new ICustomer("Ron"));
  444.   iCustomerList->addAsLast (new ICustomer("Sherry"));
  445.   iCustomerList->addAsLast (new ICustomer("Steve"));
  446.   iCustomerList->addAsLast (new ICustomer("Susan"));
  447.   iCustomerList->addAsLast (new ICustomer("Terry"));
  448.   return *this;
  449. }
  450.  
  451. /*------------------------------------------------------------------------------
  452. | ICompany::operator == (const ICompany & aValue)                              |
  453. |                                                                              |
  454. ------------------------------------------------------------------------------*/
  455. #pragma export (ICompany::operator == (const ICompany&) const,, 1327)
  456. Boolean ICompany::
  457.   operator == (const ICompany& aValue) const
  458. {
  459.   if (name() != aValue.name()) {
  460.     return false;
  461.   } /* endif */
  462.   if (address() != aValue.address()) {
  463.     return false;
  464.   } /* endif */
  465.   if (customerList() != aValue.customerList()) {
  466.     return false;
  467.   } /* endif */
  468.   if (phone() != aValue.phone()) {
  469.     return false;
  470.   } /* endif */
  471.   return true;
  472. }
  473.  
  474. /*------------------------------------------------------------------------------
  475. | ICompany::operator != (const ICompany & aValue)                              |
  476. |                                                                              |
  477. ------------------------------------------------------------------------------*/
  478. #pragma export (ICompany::operator != (const ICompany&) const,, 1328)
  479. Boolean ICompany::
  480.   operator != (const ICompany& aValue) const
  481. {
  482.   if (name() != aValue.name()) {
  483.     return true;
  484.   } /* endif */
  485.   if (address() != aValue.address()) {
  486.     return true;
  487.   } /* endif */
  488.   if (customerList() != aValue.customerList()) {
  489.     return true;
  490.   } /* endif */
  491.   if (phone() != aValue.phone()) {
  492.     return true;
  493.   } /* endif */
  494.   return false;
  495. }
  496.  
  497. /*------------------------------------------------------------------------------
  498. | ICompany::operator == (const ICompany * aValue)                              |
  499. |                                                                              |
  500. ------------------------------------------------------------------------------*/
  501. #pragma export (ICompany::operator == (const ICompany*) const,, 1329)
  502. Boolean ICompany::
  503.   operator == (const ICompany* aValue) const
  504. {
  505.   if (name() != aValue->name()) {
  506.     return false;
  507.   } /* endif */
  508.   if (address() != aValue->address()) {
  509.     return false;
  510.   } /* endif */
  511.   if (customerList() != aValue->customerList()) {
  512.     return false;
  513.   } /* endif */
  514.   if (phone() != aValue->phone()) {
  515.     return false;
  516.   } /* endif */
  517.   return true;
  518. }
  519.  
  520. /*------------------------------------------------------------------------------
  521. | ICompany::operator != (const ICompany * aValue)                              |
  522. |                                                                              |
  523. ------------------------------------------------------------------------------*/
  524. #pragma export (ICompany::operator != (const ICompany*) const,, 1330)
  525. Boolean ICompany::
  526.   operator != (const ICompany* aValue) const
  527. {
  528.   if (name() != aValue->name()) {
  529.     return true;
  530.   } /* endif */
  531.   if (address() != aValue->address()) {
  532.     return true;
  533.   } /* endif */
  534.   if (customerList() != aValue->customerList()) {
  535.     return true;
  536.   } /* endif */
  537.   if (phone() != aValue->phone()) {
  538.     return true;
  539.   } /* endif */
  540.   return false;
  541. }
  542.  
  543. /*------------------------------------------------------------------------------
  544. | ICompany::operator < (const ICompany * aValue)                               |
  545. |                                                                              |
  546. ------------------------------------------------------------------------------*/
  547. #pragma export (ICompany::operator < (const ICompany*) const,, 1331)
  548. Boolean ICompany::
  549.   operator < (const ICompany* aValue) const
  550. {
  551.   return (name() < (aValue->name()));
  552. }
  553.  
  554. /*------------------------------------------------------------------------------
  555. | ICompany::operator < (const ICompany & aValue)                               |
  556. |                                                                              |
  557. ------------------------------------------------------------------------------*/
  558. #pragma export (ICompany::operator < (const ICompany&) const,, 1332)
  559. Boolean ICompany::
  560.   operator < (const ICompany& aValue) const
  561. {
  562.   return (name() < (aValue.name()));
  563. }
  564.  
  565. /*------------------------------------------------------------------------------
  566. | ICompany::operator < (ICompany* const & aValue)                              |
  567. |                                                                              |
  568. ------------------------------------------------------------------------------*/
  569. #pragma export (ICompany::operator < (ICompany* const&) const,, 1333)
  570. Boolean ICompany::
  571.   operator < (ICompany* const& aValue) const
  572. {
  573.   return (name() < (aValue->name()));
  574. }
  575.  
  576. /*------------------------------------------------------------------------------
  577. | ICompany::operator < (ICompanyElemPtr const & aValue)                        |
  578. |                                                                              |
  579. ------------------------------------------------------------------------------*/
  580. #pragma export (ICompany::operator < (ICompanyElemPtr const&) const,, 1334)
  581. Boolean ICompany::
  582.   operator < (ICompanyElemPtr const& aValue) const
  583. {
  584.   return (name() < (aValue->name()));
  585. }
  586.  
  587. /*------------------------------------------------------------------------------
  588. | ICompany::operator < (ICompanyMngPtr const & aValue)                         |
  589. |                                                                              |
  590. ------------------------------------------------------------------------------*/
  591. #pragma export (ICompany::operator < (ICompanyMngPtr const&) const,, 1335)
  592. Boolean ICompany::
  593.   operator < (ICompanyMngPtr const& aValue) const
  594. {
  595.   return (name() < (aValue->name()));
  596. }
  597.