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

  1. /****************************************************************************
  2.     $Id: cssubprb.cpp 501.0 1995/03/07 12:26:12 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 TLCSSubProblem.
  10.  
  11.     $Log: cssubprb.cpp $
  12.     Revision 501.0  1995/03/07 12:26:12  RON
  13.     Updated for TLX 5.01
  14.     Revision 1.9  1995/02/22 12:22:58  RON
  15.     Update for release 012
  16.     Added partial support for SunPro C++ compiler
  17.     Revision 1.8  1995/01/12  13:39:23  ron
  18.     Adapted to previous Searcher/ProblemRep model
  19.  
  20.     Revision 1.7  1995/01/08  11:45:36  ron
  21.     Renamed TLCSProblem to TLCSSubProblem
  22.  
  23.     Revision 1.6  1995/01/06  15:56:51  ron
  24.     Adapted to new Searcher/Problem model
  25.  
  26.     Revision 1.5  1995/01/05  15:23:18  ron
  27.     Naming changes
  28.  
  29.     Revision 1.4  1994/11/16  15:37:59  ron
  30.     Added module info; rearranged #include directives
  31.  
  32.     Revision 1.3  1994/10/10  16:48:24  ron
  33.     Changed to <tlx\solve\stdcsp.h>
  34.  
  35.     Revision 1.2  1994/10/05  18:36:51  ron
  36.     Added linking to associated variable
  37.  
  38.     Revision 1.1  1994/09/28  14:16:21  ron
  39.     Initial revision
  40.  
  41. ****************************************************************************/
  42.  
  43. #include <tlx\501\_build.h>
  44.  
  45. TLX_MODULE_INFO("$Revision: 501.0 $");
  46.  
  47. #include <tlx\501\solve\stdcsp.h>
  48.  
  49. /*-------------------------------------------------------------------------*/
  50.     TLCSProblemState::TLCSProblemState(
  51.     //TLProblemState *        aParent,
  52.     TLVariable *        aVar
  53.     )
  54.  
  55. /*  Constructor, also doubles as the default constructor. Links to the
  56.     parent and the variable (if any).
  57. ---------------------------------------------------------------------------*/
  58. //: TLProblemState(aParent), mVar(aVar)
  59. : mVar(aVar)
  60. {
  61.     if (mVar) mVar->SetProblem(this);
  62. }
  63.  
  64. /*-------------------------------------------------------------------------*/
  65.     TLCSProblemState::~TLCSProblemState()
  66.  
  67. /*  Destructor. Unlinks from the variable.
  68. ---------------------------------------------------------------------------*/
  69. {
  70.     if (mVar && mVar->GetProblem() == this)
  71.         mVar->SetProblem(0);
  72. }
  73.  
  74.