cgma
GeometryEvent.cpp
Go to the documentation of this file.
00001 #include "GeometryEvent.hpp"
00002 #include <stddef.h>
00003 
00004 GeometryEvent::GeometryEvent(Type type, RefEntity* entity)
00005   : mType(type), mRefEntity(entity)
00006 {
00007 }
00008 
00009 GeometryEvent::~GeometryEvent()
00010 {
00011 }
00012     
00013 RefEntity* GeometryEvent::get_entity() const
00014 {
00015   return mRefEntity;
00016 }
00017 
00018 GeometryEvent::Type GeometryEvent::get_type() const
00019 {
00020   return mType;
00021 }
00022 
00023 TopologyEvent::TopologyEvent(Type type, TopologyEntity* entity)
00024   : mType(type), mRefEntity(entity)
00025 {
00026 }
00027 
00028 TopologyEvent::~TopologyEvent()
00029 {
00030 }
00031 
00032 TopologyEntity* TopologyEvent::get_entity() const
00033 {
00034   return mRefEntity;
00035 }
00036 
00037 TopologyEvent::Type TopologyEvent::get_type() const
00038 {
00039   return mType;
00040 }
00041   
00042 GeometryIdSetEvent::GeometryIdSetEvent(RefEntity* ent, int old_id, int new_id)
00043   : GeometryEvent(GeometryEvent::ID_SET, ent), oldId(old_id), newId(new_id)
00044 {
00045 }
00046   
00047 GeometryIdSetEvent::~GeometryIdSetEvent()
00048 {
00049 }
00050 
00051 UnMergeEvent::UnMergeEvent( RefEntity *old_ptr, RefEntity *new_ptr )
00052   : GeometryEvent(GeometryEvent::NEW_ENTITY_UNMERGED, old_ptr),
00053     mOldEntity(old_ptr),
00054     mNewEntity(new_ptr)
00055 {}
00056 
00057 UnMergeEvent::~UnMergeEvent()
00058 {
00059 }
00060 
00061 MergeEvent::MergeEvent( RefEntity *lost_entity,
00062                         RefEntity *kept_entity )
00063     : GeometryEvent(GeometryEvent::ENTITIES_MERGED, lost_entity)
00064 {
00065   keptEntity = kept_entity;
00066 }
00067 
00068 MergeEvent::~MergeEvent()
00069 {
00070 }
00071 
00072 RefEntity *MergeEvent::get_lost_entity() const
00073 {
00074   return this->mRefEntity;
00075 }
00076 
00077 RefEntity *MergeEvent::get_kept_entity() const
00078 {
00079   return keptEntity;
00080 }
00081 
00082 CompositeCombineEvent::CompositeCombineEvent(GeometryEvent::Type event_type)
00083   : GeometryEvent(event_type, NULL),
00084     mKeptEntity(NULL),
00085     mDeleteEntity(NULL)
00086 {}
00087 
00088 CompositeCombineEvent::CompositeCombineEvent(GeometryEvent::Type event_type,
00089                       RefEntity *keep_ptr,
00090                       RefEntity *delete_ptr )
00091   : GeometryEvent(event_type, NULL),
00092     mKeptEntity(keep_ptr),
00093     mDeleteEntity(delete_ptr)
00094 {}
00095 
00096 CompositeCombineEvent::~CompositeCombineEvent()
00097 {
00098 }
00099 
00100 TransformEvent::TransformEvent( const CubitTransformMatrix &transform, std::vector<RefEntity*> ents )
00101   : GeometryEvent(GeometryEvent::GEOMETRY_TRANSFORMED, NULL ),
00102   transformation( transform )
00103 {
00104   mRefEntity = NULL;
00105   refEnts = ents;  
00106 }
00107 
00108 const CubitTransformMatrix TransformEvent::get_transformation() const
00109 {
00110   return transformation;
00111 }
00112 
00113 std::vector<RefEntity*> TransformEvent::get_ref_ents() const
00114 {
00115   return refEnts;
00116 }
00117 
00118 TransformEvent::~TransformEvent()
00119 {
00120 }
00121 
00122 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines