cgma
TDCAGE.hpp
Go to the documentation of this file.
00001 //- Class:          TDCAGE
00002 //- Descpription:   Stores data used in the CAGenesisEntity attribute
00003 //- Owner:          Tim Tautges
00004 //- Checked by:
00005 //- Version: 
00006 
00007 #ifndef TDCAGE_HPP
00008 #define TDCAGE_HPP
00009 
00010 #include "ToolData.hpp"
00011 #include "MemoryManager.hpp"
00012 #include "DLIList.hpp"
00013 #include "CGMGeomConfigure.h"
00014 
00015 class RefGroup;
00016 class RefEntity;
00017 
00018 class CUBIT_GEOM_EXPORT TDCAGE : public ToolData 
00019 {
00020 private:
00021 
00022   static MemoryManager memoryManager;
00023   //- memory management object
00024 
00025   int uniqueId;
00026 
00027   DLIList<RefGroup *> groupList;
00028     //- keeps group pointers for group/sequence # pairs
00029 
00030   DLIList<int> sequenceList;
00031     //- keeps sequence #'s for group/sequence # pairs
00032 
00033 public:
00034 
00035   TDCAGE(int unique_id);
00036 
00037   ~TDCAGE();
00038 
00039   static int is_cage(const ToolData* td);
00040   
00041   int unique_id() {return uniqueId;}
00042   void unique_id(int id) {uniqueId = id;}
00043     //- get/set unique id
00044 
00045   SetDynamicMemoryAllocation(memoryManager)
00046 //- class specific new and delete operators
00047     
00048   static void set_memory_allocation_increment( int increment = 0 )
00049   {memoryManager.set_memory_allocation_increment(increment);}
00050   //- set block memory size increment
00051 
00052   static void destroy_memory()
00053   {memoryManager.destroy_memory();}
00054   //- destroy all memory allocated to this object
00055 
00056   static int group_sequence_number(RefGroup *group, const RefEntity *entity);
00057     //- return the sequence number of the given entity in the given group
00058 
00059   int td_sequence_number(const RefGroup *group);
00060     //- given a group, return the sequence number paired with that group
00061 
00062   void insert_group(RefGroup *group, const int seq_num);
00063     //- add the group/sequence number pair to the lists
00064 
00065   static void insert_entity(RefEntity *entity, const int seq_num,
00066                             RefGroup *into_group);
00067     //- insert the entity into the group following the sequence number
00068     //- given
00069 
00070   void initialize_group_sequence_list(RefEntity *entity);
00071     //- get the groups owning entity and build the sequence lists
00072 };
00073 
00074 inline TDCAGE::TDCAGE(int unique_id) : ToolData()
00075 {
00076   uniqueId = unique_id;
00077 }
00078 
00079 inline TDCAGE::~TDCAGE()
00080 {
00081   //- empty
00082 }
00083 
00084 inline void TDCAGE::insert_group(RefGroup *group, const int seq_num) 
00085 {
00086   groupList.append(group);
00087   sequenceList.append(seq_num);
00088 }
00089 
00090 #endif // TD_CAGE_HPP
00091     
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines