home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
tlx501.zip
/
SRC
/
VVLINK.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1996-10-12
|
4KB
|
118 lines
/****************************************************************************
$Id: vvlink.cpp 501.0 1995/03/07 12:26:28 RON Exp $
Copyright (c) 1991-95 Tarma Software Research. All rights reserved.
Project: Tarma Library for C++ V5.0
Author: Ron van der Wal
Implementation of class TLVarValueLink.
$Log: vvlink.cpp $
Revision 501.0 1995/03/07 12:26:28 RON
Updated for TLX 5.01
Revision 1.8 1995/02/28 15:15:58 RON
Update for release 012
Added partial support for SunPro C++ compiler
Revision 1.7 1995/01/06 15:59:01 ron
Corrected Revision keyword
Revision 1.6 1994/11/16 15:46:28 ron
Added module info; rearranged #include directives
Revision 1.5 1994/10/10 16:57:41 ron
Changed to <tlx\solve\ac6.h>
Revision 1.4 1994/09/28 14:48:15 ron
Removed Macintosh-style #include references
Revision 1.3 1994/09/27 20:23:39 ron
Changed path separator from / to \
Revision 1.2 1994/09/26 15:52:27 ron
Changed include file references
Revision 1.1 1994/08/16 18:13:25 ron
Initial revision
****************************************************************************/
#include <tlx\501\_build.h>
TLX_MODULE_INFO("$Revision: 501.0 $");
#include <tlx\501\solve\ac6.h>
/*---------------------------------------------------------------------------
Template source code
---------------------------------------------------------------------------*/
#if defined(THINK_CPLUS)
#include "assoc.cpp"
#pragma template_access public
#pragma template TLAssoc<TLVariableAC6 *, tVarValue>
#elif defined(__BORLANDC__) || defined(_MSC_VER) || defined(__SC__) || defined(__WATCOMC__)
#include <tlx\501\template\assoc.cpp>
#elif defined(__SUNPRO_CC)
#include <tlx\501\template\assoc.cpp>
#elif defined(__IBMCPP__)
//! #if __IBMCPP__ < 300
#pragma implementation("tlx\\template\\assoc.cpp")
//! #else
//! #include <tlx\501\template\assoc.cpp>
//! #endif
#else
#error Unsupported compiler; contact Tarma Software Research
#endif
/*---------------------------------------------------------------------------
Implementation of helper classes
---------------------------------------------------------------------------*/
VV_Assoc::VV_Assoc()
{
}
VV_Assoc::VV_Assoc(TLVariableAC6 *aVar, tVarValue aValue)
: TLAssoc<TLVariableAC6 *, tVarValue>(aVar, aValue)
{
}
ostream & _TLXFUNC operator <<(ostream &os, const VV_Assoc &assoc)
{
TLX_ASSERT_PTR(assoc.Key());
//return os << *assoc.Key() << " = " << assoc.Value();
return os << *assoc.Key();// << " = " << assoc.Value();
}
/*-------------------------------------------------------------------------*/
TLVarValueLink::TLVarValueLink(const VV_Assoc &aAssoc)
/* Conversion constructor. Leaves TLSLink part alone.
---------------------------------------------------------------------------*/
: VV_Assoc(aAssoc)
{
}
/*-------------------------------------------------------------------------*/
TLVarValueLink &TLVarValueLink::operator =(const VV_Assoc &aAssoc)
/* Assignment operator. Leaves TLSLink part alone.
---------------------------------------------------------------------------*/
{
Key() = aAssoc.Key();
Value() = aAssoc.Value();
return *this;
}
/*-------------------------------------------------------------------------*/
int TLVarValueLink::operator ==(const VV_Assoc &aAssoc) const
/* Equality operator. Compares link parts.
---------------------------------------------------------------------------*/
{
return Key() == aAssoc.Key();
}