"Fossies" - the Fresh Open Source Software Archive

Member "dx-4.4.4/src/uipp/dxuilib/Ark.C" (20 May 2000, 1717 Bytes) of package /linux/misc/old/dx-4.4.4.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "Ark.C" see the Fossies "Dox" file reference documentation.

    1 /***********************************************************************/
    2 /* Open Visualization Data Explorer                                    */
    3 /* (C) Copyright IBM Corp. 1989,1999                                   */
    4 /* ALL RIGHTS RESERVED                                                 */
    5 /* This code licensed under the                                        */
    6 /*    "IBM PUBLIC LICENSE - Open Visualization Data Explorer"          */
    7 /***********************************************************************/
    8 
    9 #include <dxconfig.h>
   10 #include "../base/defines.h"
   11 
   12 
   13 
   14 
   15 
   16 #include "Ark.h"
   17 #include "ArkStandIn.h"
   18 #include "Node.h"
   19 #include "StandIn.h"
   20 
   21 
   22 
   23 Ark::Ark(Node *fromNode, int fp, Node *toNode, int tp)
   24 {
   25         this->arcStandIn = NULL;
   26 
   27         this->from = fromNode;
   28         this->fromParameter = fp;
   29         this->to = toNode;
   30         this->toParameter = tp;
   31         this->from->addOutputArk(this,fp);
   32         this->to->addInputArk(this,tp);
   33 }
   34 
   35 Ark::~Ark()
   36 {
   37      Node*      sourceNode;
   38      Node*      destNode;
   39      StandIn*   srcStandIn;
   40      StandIn*   destStandIn;
   41      int        sourceIndex, destIndex;
   42 
   43      sourceNode = this->getSourceNode(sourceIndex);
   44      destNode   = this->getDestinationNode(destIndex);
   45 
   46      // 
   47      // remove the arc from the approiate lists.
   48      //
   49      this->to->deleteArk(this);
   50 
   51      //
   52      // If a standIn exists update the UI.
   53      //
   54      if (this->arcStandIn != NULL) {
   55          delete this->arcStandIn;
   56          srcStandIn = sourceNode->getStandIn();
   57      if (srcStandIn)
   58              srcStandIn->drawTab(sourceIndex, True);
   59          destStandIn = destNode->getStandIn();
   60      if (destStandIn)
   61              destStandIn->drawTab(destIndex, False);
   62      }
   63 
   64     
   65 }
   66 
   67