![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2001 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: netwrkSpecEl.h,v $ $Revision: 1.16 $ $State: Exp $ 00007 *********************************************************************/ 00008 #ifndef netwrkSpecEl_H_ 00009 #define netwrkSpecEl_H_ 00010 00011 // 00012 // \file netwrkSpecEl.h 00013 // \brief Contains the DtNetworkSpecElement class declaration and some related utility functions. 00014 // 00015 00016 #include "gdb/gdbDefines.h" 00017 #include "gdb/netwrkElemnt.h" 00018 #include "gdb/specMgr.h" 00019 #include "gdb/specification.h" 00020 00021 #include <stdio.h> 00022 #include <vlutil/vlPrint.h> 00023 #include <matrix/LibMatrix.h> 00024 #include <vlutil/vlNetTypes.h> 00025 00026 class DtVectorNetwork; 00027 00028 00029 // DtNetworkSpecElement is the ABC for network elements that contain 00030 // specifications (nodes, edges, segments). It adds a specification to the 00031 // DtNetworkElement class. 00032 class DT_DLL_gdb DtNetworkSpecElement : public DtNetworkElement 00033 { 00034 public: 00035 00036 // default constructor 00037 DtNetworkSpecElement(); 00038 00039 // destructor 00040 virtual ~DtNetworkSpecElement(); 00041 00042 // copy constructor 00043 DtNetworkSpecElement(const DtNetworkSpecElement& orig); 00044 00045 // assignment operator 00046 DtNetworkSpecElement& operator=(const DtNetworkSpecElement& orig); 00047 00048 // Sets the specification of the network spec element. Also updates the elements 00049 // specification ID as appropriate. If the allowDuplicates parameters is true, 00050 // then the specification will not be shared among other similar network spec 00051 // elements, even if it is exactly the same. The default is to not allow 00052 // duplicates. 00053 // 00054 // \return A boolean indicating whether or not the specification was set. 00055 // \note At some point in the future, this will change to throw an exception 00056 // rather than return a boolean value. 00057 virtual bool setSpecification(const DtSpecification& newSpecification, 00058 bool allowDuplicates = false); 00059 00060 // get/set specification index 00061 virtual unsigned int specificationID() const; 00062 virtual void setSpecificationID(DtSpecificationID specID); 00063 00064 // get/set specification manager 00065 virtual DtSpecificationManager* specificationManager(); 00066 virtual const DtSpecificationManager* specificationManager() const; 00067 virtual void setSpecificationManager(DtSpecificationManager* specManager); 00068 00069 // get specification 00070 virtual const DtSpecification& specification() const; 00071 00072 virtual DtString type() = 0; 00073 00074 protected: 00075 00076 DtSpecificationID mySpecificationID; 00077 DtSpecificationManager* mySpecificationManager; 00078 }; 00079 00080 #endif