cgma
CAGroup.hpp
Go to the documentation of this file.
00001 //- Class:          CAMergePartner
00002 //- Owner:          Tim Tautges
00003 //- Description:    Cubit attribute for RefGroups
00004 //- Checked by:
00005 //- Version:
00006 
00007 #ifndef CA_GROUP_HPP
00008 #define CA_GROUP_HPP
00009 
00010 #include "CubitAttrib.hpp"
00011 #include "DLIList.hpp"
00012 #include "CADefines.hpp"
00013 
00014 class RefEntity;
00015 class RefGroup;
00016 
00017 class CUBIT_GEOM_EXPORT CAGroup: public CubitAttrib
00018 {
00019 
00020 private:
00021 
00022   DLIList<int> groupID;
00023     //- group ids containing attribOwnerEntity
00024   
00025   DLIList<int> uniqueID;
00026     //- unique ids of groups containing attribOwnerEntity
00027 
00028   DLIList<CubitString> groupNames;
00029     //- names of groups containing attribOwnerEntity
00030 
00031   DLIList<int> sequenceNumbers;
00032     //- sequence numbers of this entity in the groups
00033 
00034   DLIList<int> numOwningGroups;
00035     //- for each group in groupID, number of groups owning those groups
00036 
00037   DLIList<int> owningGroupID;
00038     //- group ids containing groups containing attribOwnerEntity
00039   
00040   DLIList<int> owningUniqueID;
00041     //- unique ids of groups containing groups containing attribOwnerEntity
00042 
00043   DLIList<CubitString> owningGroupNames;
00044     //- names of groups containing groups containing attribOwnerEntity
00045 
00046   DLIList<int> owningSequenceNumbers;
00047     //- sequence numbers of groups in owning groups
00048   
00049     //- for each ancestor (a group which owns only other groups, with those
00050     //- those groups owning only other groups), we store the group id, uid,
00051     //- name, and the uid of the owned group to which this is an ancestor
00052   DLIList<int> ancestorGroupID;
00053   DLIList<int> ancestorUniqueID;
00054   DLIList<CubitString> ancestorGroupName;
00055   DLIList<int> ancestorOwnedGroupUid;
00056   DLIList<int> ancestorSequenceNumbers;
00057   
00058   static CubitBoolean initialize_rand;
00059   
00060 public:
00061   CAGroup(RefEntity*, const CubitSimpleAttrib&);
00062     //- make a CAG from a simple attribute
00063 
00064   void initialize();
00065     //- initialize random number generator for this attribute
00066 
00067   virtual ~CAGroup();
00068 
00069   CubitStatus actuate();
00070     //- actuate this attribute
00071   
00072   CubitStatus update();
00073     //- update this attribute
00074 
00075   CubitStatus reset();
00076     //- reset this attribute
00077 
00078   CubitSimpleAttrib cubit_simple_attrib();
00079     //- return a simple attribute with this CA's data
00080   
00081   RefGroup *assign_group(RefEntity *owned_entity,
00082                          const int group_id, const int unique_id,
00083                          const CubitString& group_name,
00084                          const int seq_num);
00085     //- used in actuating this CA
00086   
00087   RefGroup *assign_ancestor_group(const int ancestor_id,
00088                                   const int ancestor_uid,
00089                                   const CubitString& ancestor_name,
00090                                   const int owned_group_uid,
00091                                   const int seq_num);
00092   
00093   void build_ancestor_list(RefGroup *parent_ref_group);
00094   
00095   int int_attrib_type() {return CA_GROUP;}
00096     //- returns the enumerated attribute type
00097 
00098   virtual void has_written(CubitBoolean set_has_written);
00099     //- class-specific version; resets td_cage on attrib owner
00100 
00101   virtual CubitBoolean has_written() const {return hasWritten;};
00102     //- class-specific version; 
00103 
00104 };
00105 
00106 CubitAttrib* CAGroup_creator(RefEntity* entity, const CubitSimpleAttrib &p_csa);
00107 
00108 #endif
00109 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines