home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tlx501.zip / SRC / VVLINK.CPP < prev    next >
C/C++ Source or Header  |  1996-10-12  |  4KB  |  118 lines

  1. /****************************************************************************
  2.     $Id: vvlink.cpp 501.0 1995/03/07 12:26:28 RON Exp $
  3.  
  4.     Copyright (c) 1991-95 Tarma Software Research. All rights reserved.
  5.  
  6.     Project:    Tarma Library for C++ V5.0
  7.     Author:    Ron van der Wal
  8.  
  9.     Implementation of class TLVarValueLink.
  10.  
  11.     $Log: vvlink.cpp $
  12.     Revision 501.0  1995/03/07 12:26:28  RON
  13.     Updated for TLX 5.01
  14.     Revision 1.8  1995/02/28 15:15:58  RON
  15.     Update for release 012
  16.     Added partial support for SunPro C++ compiler
  17.     Revision 1.7  1995/01/06  15:59:01  ron
  18.     Corrected Revision keyword
  19.  
  20.     Revision 1.6  1994/11/16  15:46:28  ron
  21.     Added module info; rearranged #include directives
  22.  
  23.     Revision 1.5  1994/10/10  16:57:41  ron
  24.     Changed to <tlx\solve\ac6.h>
  25.  
  26.     Revision 1.4  1994/09/28  14:48:15  ron
  27.     Removed Macintosh-style #include references
  28.  
  29.     Revision 1.3  1994/09/27  20:23:39  ron
  30.     Changed path separator from / to \
  31.  
  32.     Revision 1.2  1994/09/26  15:52:27  ron
  33.     Changed include file references
  34.  
  35.     Revision 1.1  1994/08/16  18:13:25  ron
  36.     Initial revision
  37.  
  38. ****************************************************************************/
  39.  
  40. #include <tlx\501\_build.h>
  41.  
  42. TLX_MODULE_INFO("$Revision: 501.0 $");
  43.  
  44. #include <tlx\501\solve\ac6.h>
  45.  
  46. /*---------------------------------------------------------------------------
  47.     Template source code
  48. ---------------------------------------------------------------------------*/
  49.  
  50. #if defined(THINK_CPLUS)
  51.     #include "assoc.cpp"
  52.     #pragma template_access public
  53.     #pragma template TLAssoc<TLVariableAC6 *, tVarValue>
  54. #elif defined(__BORLANDC__) || defined(_MSC_VER) || defined(__SC__) || defined(__WATCOMC__)
  55.     #include <tlx\501\template\assoc.cpp>
  56. #elif defined(__SUNPRO_CC)
  57.     #include <tlx\501\template\assoc.cpp>
  58. #elif defined(__IBMCPP__)
  59. //!  #if __IBMCPP__ < 300
  60.     #pragma implementation("tlx\\template\\assoc.cpp")
  61. //!  #else
  62. //!    #include <tlx\501\template\assoc.cpp>
  63. //!  #endif
  64. #else
  65.     #error Unsupported compiler; contact Tarma Software Research
  66. #endif
  67.  
  68. /*---------------------------------------------------------------------------
  69.     Implementation of helper classes
  70. ---------------------------------------------------------------------------*/
  71.  
  72. VV_Assoc::VV_Assoc()
  73. {
  74. }
  75.  
  76. VV_Assoc::VV_Assoc(TLVariableAC6 *aVar, tVarValue aValue)
  77. : TLAssoc<TLVariableAC6 *, tVarValue>(aVar, aValue)
  78. {
  79. }
  80.  
  81. ostream & _TLXFUNC operator <<(ostream &os, const VV_Assoc &assoc)
  82. {
  83.     TLX_ASSERT_PTR(assoc.Key());
  84.     //return os << *assoc.Key() << " = " << assoc.Value();
  85.     return os << *assoc.Key();// << " = " << assoc.Value();
  86. }
  87.  
  88. /*-------------------------------------------------------------------------*/
  89.     TLVarValueLink::TLVarValueLink(const VV_Assoc &aAssoc)
  90.  
  91. /*  Conversion constructor. Leaves TLSLink part alone.
  92. ---------------------------------------------------------------------------*/
  93. : VV_Assoc(aAssoc)
  94. {
  95. }
  96.  
  97. /*-------------------------------------------------------------------------*/
  98.     TLVarValueLink &TLVarValueLink::operator =(const VV_Assoc &aAssoc)
  99.  
  100. /*  Assignment operator. Leaves TLSLink part alone.
  101. ---------------------------------------------------------------------------*/
  102. {
  103.     Key()   = aAssoc.Key();
  104.     Value() = aAssoc.Value();
  105.  
  106.     return *this;
  107. }
  108.  
  109. /*-------------------------------------------------------------------------*/
  110.     int TLVarValueLink::operator ==(const VV_Assoc &aAssoc) const
  111.  
  112. /*  Equality operator. Compares link parts.
  113. ---------------------------------------------------------------------------*/
  114. {
  115.     return Key() == aAssoc.Key();
  116. }
  117.  
  118.