53 #include <QMessageBox> 58 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT 62 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 75 TypeInfoWrapper(
const std::type_info & ti,
const char *friendlyName) : ti(&ti), friendlyName(friendlyName) {}
76 TypeInfoWrapper(
const std::type_info & ti) : ti(&ti),friendlyName(
"") {}
78 operator const std::type_info *()
const {
return ti; }
79 operator const std::type_info &()
const {
return *ti; }
80 operator const char *()
const {
return friendlyName; }
82 const std::type_info *operator->()
const {
return ti; }
83 const std::type_info &
get()
const {
return *ti; }
84 const char *getName()
const {
return friendlyName; }
91 return strcmp(ti->name(), other.ti->name()) == 0;
95 return strcmp(ti->name(), other.ti->name()) < 0;
99 const std::type_info *ti;
100 const char *friendlyName;
122 static const char* entity2str(ENTITY_FILTER entity);
125 propName_(propName), typeinfo_(typeinfo), entity(entity) {}
127 QString toString()
const {
128 return QObject::tr(
"%3 %1 : %2").arg(propName_.c_str()).arg(friendlyTypeName()).arg(QString::fromUtf8(entity2str(entity)));
132 return propName_ == rhs.propName_ && typeinfo_ == rhs.typeinfo_ && entity == rhs.entity;
136 if (entity != rhs.entity)
return entity < rhs.entity;
138 int result = propName_.compare(rhs.propName_);
139 if (result)
return result < 0;
141 return typeinfo_ < rhs.typeinfo_;
144 inline bool isCellProp()
const {
return entity == EF_CELL; }
145 inline bool isFaceProp()
const {
return entity == EF_FACE; }
146 inline bool isHalffaceProp()
const {
return entity == EF_HALFFACE; }
147 inline bool isEdgeProp()
const {
return entity == EF_EDGE; }
148 inline bool isHalfedgeProp()
const {
return entity == EF_HALFEDGE; }
149 inline bool isVertexProp()
const {
return entity == EF_VERTEX; }
151 inline const std::string &propName()
const {
return propName_; }
152 inline const char *friendlyTypeName()
const {
return typeinfo_.getName(); }
154 inline ENTITY_FILTER entityType()
const {
return entity; }
157 std::string propName_;
159 ENTITY_FILTER entity;
178 void slotReplace() { replace =
true; }
179 void slotRename() { rename =
true; }
180 void slotCancel() { cancel =
true; }
183 QLabel* problemDescription;
185 QPushButton* buttonRename;
186 QPushButton* buttonReplace;
187 QPushButton* buttonCancel;
198 static inline DataType supportedDataTypes()
202 #ifdef ENABLE_POLYHEDRALMESH_SUPPORT 206 #ifdef ENABLE_HEXAHEDRALMESH_SUPPORT #define DATA_POLYHEDRAL_MESH
#define DATA_TRIANGLE_MESH
Wraps the information of a type.
#define DATA_HEXAHEDRAL_MESH
Asks the user how to proceed after a name clash.
Cellection of information about a property.