cgma
ModelEntity.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      : ModelEntity.hpp
00010 //
00011 // Purpose       : This class serves as the pure abstract class of
00012 //                 all the Model-related classes. Each ModelEntity Object
00013 //         can be considered a Node in the DAG.
00014 //
00015 // Special Notes : This is a pure virtual class to prevent instantiation.
00016 //
00017 // Creator       : Raikanta Sahu
00018 //
00019 // Creation Date : 10/15/96
00020 //
00021 // Owner         : Malcolm J. Panthaki
00022 //-------------------------------------------------------------------------
00023 
00024 #ifndef MODEL_ENTITY_HPP
00025 #define MODEL_ENTITY_HPP
00026 
00027 // ********** BEGIN STANDARD INCLUDES         **********
00028 // ********** END STANDARD INCLUDES           **********
00029 
00030 // ********** BEGIN MOTIF INCLUDES            **********
00031 // ********** END MOTIF INCLUDES              **********
00032 
00033 // ********** BEGIN OPEN INVENTOR INCLUDES    **********
00034 // ********** END OPEN INVENTOR INCLUDES      **********
00035 
00036 // ********** BEGIN CUBIT INCLUDES            **********
00037 
00038 #include "CubitDefines.h"
00039 #include "DagType.hpp"
00040 #include "CGMGeomConfigure.h"
00041 
00042 // ********** END CUBIT INCLUDES              **********
00043 
00044 // ********** BEGIN FORWARD DECLARATIONS      **********
00045 
00046 template <class X> class DLIList;
00047 
00048 // ********** END FORWARD DECLARATIONS        **********
00049 
00050 // ********** BEGIN MACRO DEFINITIONS         **********
00051 // ********** END MACRO DEFINITIONS           **********
00052 
00053 // ********** BEGIN ENUM DEFINITIONS          **********
00054 // ********** END ENUM DEFINITIONS            **********
00055 
00056 class CUBIT_GEOM_EXPORT ModelEntity
00057 {
00058 
00059 // ********** BEGIN FRIEND CLASS DECLARATIONS **********
00060 
00061    friend class ModelQueryEngine ;
00062    friend class GroupingEntity;
00063 // ********** END FRIEND CLASS DECLARATIONS   **********
00064 
00065  public:
00066 
00067    ModelEntity();
00068       //- Default constructor
00069 
00070    virtual ~ModelEntity();
00071 
00072    virtual int get_children( DLIList<ModelEntity*>* list = 0 ) const = 0;
00073    virtual int get_parents ( DLIList<ModelEntity*>* list = 0 ) const = 0;
00074       //- Returns number of parents/children.  
00075       //- If a list is passed, pointers to parents/children will
00076       //- be appended to the passed list.
00077       
00078    virtual DagType dag_type() const = 0;
00079       
00080    void deactivated(CubitBoolean flag) ;
00081    CubitBoolean deactivated() const ;
00082       //- Get and set funtions for the deactivation flag.
00083     
00084    CubitStatus remove_from_DAG(CubitBoolean recursive_flag = CUBIT_FALSE);
00085    void disconnect_from_DAG();
00086    virtual CubitStatus remove_child_link( ModelEntity* child_ptr ) = 0;
00087 
00088    virtual CubitStatus 
00089     disconnect_all_children( DLIList<ModelEntity*>* children = 0 ) = 0;
00090    virtual CubitStatus
00091     disconnect_all_parents( DLIList<ModelEntity*>* parents = 0 ) = 0;
00092 
00093 protected:
00094 
00095    virtual CubitBoolean query_append_parents( DLIList<ModelEntity*>& list ) = 0;
00096    virtual CubitBoolean query_append_children(DLIList<ModelEntity*>& list ) = 0;
00097    
00098    cBit deactivatedStatus_ : 1;
00099      //- The deactivated flag
00100    
00101    cBit encountered_ : 1;
00102     // Indicates if it has already been found in 
00103     // in a DAG query.  
00104 
00105 
00106 
00107 private:
00108 
00109    ModelEntity const& operator=(ModelEntity const& aModEnt) ;
00110    ModelEntity(const ModelEntity& aModEnt);
00111     // These are declared here to prevent the compiler
00112     // from generating default ones.  These have no implementation.
00113 
00114 } ;
00115 
00116 
00117 // ********** BEGIN INLINE FUNCTIONS          **********
00118 
00119 
00120 // ********** END INLINE FUNCTIONS            **********
00121 
00122 // ********** BEGIN FRIEND FUNCTIONS          **********
00123 // ********** END FRIEND FUNCTIONS            **********
00124 
00125 // ********** BEGIN EXTERN FUNCTIONS          **********
00126 // ********** END EXTERN FUNCTIONS            **********
00127 
00128 // ********** BEGIN HELPER CLASS DECLARATIONS **********
00129 // ********** END HELPER CLASS DECLARATIONS   **********
00130 
00131 #endif
00132 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines