cgma
CollectionEntity.hpp
Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Filename      : CollectionEntity.hpp
00003 //
00004 // Purpose       : This class is the base class for all the other solid 
00005 //                 model entities in the Geometry subsystem. 
00006 //
00007 // Special Notes :
00008 //
00009 // Creator       : Xuechen Liu
00010 //
00011 // Creation Date : 08/06/96
00012 //
00013 // Owner         : Raikanta Sahu
00014 //-------------------------------------------------------------------------
00015 
00016 #ifndef COLLECTION_ENTITY_HPP
00017 #define COLLECTION_ENTITY_HPP
00018 
00019 // ********** BEGIN STANDARD INCLUDES      **********
00020 #include <assert.h>
00021 // ********** END STANDARD INCLUDES        **********
00022 
00023 // ********** BEGIN CUBIT INCLUDES         **********
00024 #include "CubitDefines.h"
00025 #include "CubitMessage.hpp"
00026 #include "CubitString.hpp"
00027 #include "CGMGeomConfigure.h"
00028 // ********** END CUBIT INCLUDES           **********
00029 
00030 // ********** BEGIN FORWARD DECLARATIONS   **********
00031 class GeometryQueryEngine;
00032 class RefCollection;
00033 // ********** END FORWARD DECLARATIONS     **********
00034 
00035 class CUBIT_GEOM_EXPORT CollectionEntity
00036 {
00037 public:
00038   
00039   CollectionEntity();
00040     // Default constructor.
00041   
00042   virtual ~CollectionEntity() ; 
00043     // Destructor.
00044   
00045   virtual GeometryQueryEngine* get_geometry_query_engine() const = 0;
00046     //R GeometryQueryEngine*
00047     //R- A pointer to the geometric modeling engine associated with
00048     //R- the object.
00049     //- This function returns a pointer to the geometric modeling engine
00050     //- associated with the object.
00051   
00052   virtual CubitString name() const = 0;
00053   virtual void name(CubitString) = 0;
00054     // Collection Entities aren't RefEntities, but they may have names.
00055     // Note: This is just here to keep the initial Pro/E
00056     //       implementation happy.
00057 
00058   CubitStatus set_owner_attribute(RefCollection* owner)
00059     {
00060       if (myOwner)
00061         return CUBIT_FAILURE;
00062       myOwner = owner;
00063       return CUBIT_SUCCESS;
00064     }
00065   RefCollection* get_owner_attribute() const
00066     { return myOwner; }
00067   
00068 protected:
00069   RefCollection* myOwner;
00070 private:
00071 } ;
00072 
00073 
00074 // ********** BEGIN INLINE FUNCTIONS       **********
00075 // ********** END INLINE FUNCTIONS         **********
00076 
00077 // ********** BEGIN FRIEND FUNCTIONS       **********
00078 // ********** END FRIEND FUNCTIONS         **********
00079 
00080 // ********** BEGIN EXTERN FUNCTIONS       **********
00081 // ********** END EXTERN FUNCTIONS         **********
00082 
00083 #endif
00084 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines