cgma
TDCompare.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Copyright Notice
00003 //
00004 // Copyright (c) 1996 
00005 // by Malcolm J. Panthaki, DBA, and the University of New Mexico.
00006 //-------------------------------------------------------------------------
00007 
00008 //-------------------------------------------------------------------------
00009 // Filename      : TDCompare.hpp
00010 //
00011 // Purpose       : This class is meant to be the container of temporary
00012 //                 data during compare.
00013 //
00014 // Special Notes :
00015 //
00016 // Creator       : Raikanta Sahu
00017 //
00018 // Creation Date : 11/25/96
00019 //
00020 // Owner         : Raikanta Sahu
00021 //-------------------------------------------------------------------------
00022 
00023 #ifndef TD_COMPARE_HPP
00024 #define TD_COMPARE_HPP
00025 
00026 // ********** BEGIN STANDARD INCLUDES         **********
00027 // ********** END STANDARD INCLUDES           **********
00028 
00029 // ********** BEGIN MOTIF INCLUDES            **********
00030 // ********** END MOTIF INCLUDES              **********
00031 
00032 // ********** BEGIN OPEN INVENTOR INCLUDES    **********
00033 // ********** END OPEN INVENTOR INCLUDES      **********
00034 
00035 // ********** BEGIN CUBIT INCLUDES            **********
00036 #include "ToolData.hpp"
00037 // ********** END CUBIT INCLUDES              **********
00038 
00039 // ********** BEGIN FORWARD DECLARATIONS      **********
00040 class RefEntity ;
00041 // ********** END FORWARD DECLARATIONS        **********
00042 
00043 // ********** BEGIN MACRO DEFINITIONS         **********
00044 // ********** END MACRO DEFINITIONS           **********
00045 
00046 // ********** BEGIN ENUM DEFINITIONS          **********
00047 // ********** END ENUM DEFINITIONS            **********
00048 
00049 class TDCompare : public ToolData
00050 {
00051 
00052 // ********** BEGIN FRIEND CLASS DECLARATIONS **********
00053 // ********** END FRIEND CLASS DECLARATIONS   **********
00054 
00055    public:
00056 
00057       TDCompare() ;
00058       //- Default constructor. 
00059 
00060       virtual ~TDCompare() ;
00061       //- Destructor
00062 
00063       static int is_compare(const ToolData* td) 
00064       {return (dynamic_cast<TDCompare*>(const_cast<ToolData*>(td)) != NULL);}
00065   
00066       void set_compare_partner(RefEntity* partner) ;
00067       RefEntity* get_compare_partner() const ; 
00068 
00069       
00070    protected: 
00071 
00072    private:
00073 
00074       RefEntity* comparePartner_ ;
00075 } ;
00076 
00077 // ********** BEGIN INLINE FUNCTIONS          **********
00078 
00079 //-------------------------------------------------------------------------
00080 // Purpose       : Default constructor
00081 //
00082 // Special Notes :
00083 //
00084 // Creator       : Raikanta Sahu
00085 //
00086 // Creation Date : 11/25/96
00087 //-------------------------------------------------------------------------
00088 inline
00089 TDCompare::TDCompare() : comparePartner_(NULL) 
00090 {
00091 }
00092 
00093 //-------------------------------------------------------------------------
00094 // Purpose       : Destructor
00095 //
00096 // Special Notes :
00097 //
00098 // Creator       : Raikanta Sahu
00099 //
00100 // Creation Date : 11/25/96
00101 //-------------------------------------------------------------------------
00102 inline
00103 TDCompare::~TDCompare()
00104 {
00105 }
00106 
00107 //-------------------------------------------------------------------------
00108 // Purpose       : Set the RefEntity that the one that this TDCompare belongs
00109 //                 to compares with.
00110 //
00111 // Special Notes :
00112 //
00113 // Creator       : Raikanta Sahu
00114 //
00115 // Creation Date : 11/25/96
00116 //-------------------------------------------------------------------------
00117 inline
00118 void TDCompare::set_compare_partner(RefEntity* partner)
00119 {
00120    comparePartner_ = partner ;
00121 }
00122 
00123 //-------------------------------------------------------------------------
00124 // Purpose       : Get the "compared" partner to the RefEntity that owns
00125 //                 this TDCompare object.
00126 //
00127 // Special Notes :
00128 //
00129 // Creator       : Raikanta Sahu
00130 //
00131 // Creation Date : 11/25/96
00132 //-------------------------------------------------------------------------
00133 inline
00134 RefEntity* TDCompare::get_compare_partner() const
00135 {
00136    return comparePartner_ ;
00137 }
00138 
00139 // ********** END INLINE FUNCTIONS            **********
00140 
00141 // ********** BEGIN FRIEND FUNCTIONS          **********
00142 // ********** END FRIEND FUNCTIONS            **********
00143 
00144 // ********** BEGIN EXTERN FUNCTIONS          **********
00145 // ********** END EXTERN FUNCTIONS            **********
00146 
00147 // ********** BEGIN HELPER CLASS DECLARATIONS **********
00148 // ********** END HELPER CLASS DECLARATIONS   **********
00149 
00150 #endif //TD_COMPARE_HPP
00151 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines