59 #include <QMessageBox> 64 #ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT 68 #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT 81 TypeInfoWrapper(
const std::type_info & ti,
const char *friendlyName) : ti(&ti), friendlyName(friendlyName) {}
82 TypeInfoWrapper(
const std::type_info & ti) : ti(&ti),friendlyName(
"") {}
84 operator const std::type_info *()
const {
return ti; }
85 operator const std::type_info &()
const {
return *ti; }
86 operator const char *()
const {
return friendlyName; }
88 const std::type_info *operator->()
const {
return ti; }
89 const std::type_info &
get()
const {
return *ti; }
90 const char *getName()
const {
return friendlyName; }
97 return strcmp(ti->name(), other.ti->name()) == 0;
101 return strcmp(ti->name(), other.ti->name()) < 0;
105 const std::type_info *ti;
106 const char *friendlyName;
128 static const char* entity2str(ENTITY_FILTER entity);
131 propName_(propName), typeinfo_(typeinfo), entity(entity) {}
133 QString toString()
const {
134 return QObject::tr(
"%3 %1 : %2").arg(propName_.c_str()).arg(friendlyTypeName()).arg(QString::fromUtf8(entity2str(entity)));
138 return propName_ == rhs.propName_ && typeinfo_ == rhs.typeinfo_ && entity == rhs.entity;
142 if (entity != rhs.entity)
return entity < rhs.entity;
144 int result = propName_.compare(rhs.propName_);
145 if (result)
return result < 0;
147 return typeinfo_ < rhs.typeinfo_;
150 inline bool isCellProp()
const {
return entity == EF_CELL; }
151 inline bool isFaceProp()
const {
return entity == EF_FACE; }
152 inline bool isHalffaceProp()
const {
return entity == EF_HALFFACE; }
153 inline bool isEdgeProp()
const {
return entity == EF_EDGE; }
154 inline bool isHalfedgeProp()
const {
return entity == EF_HALFEDGE; }
155 inline bool isVertexProp()
const {
return entity == EF_VERTEX; }
157 inline const std::string &propName()
const {
return propName_; }
158 inline const char *friendlyTypeName()
const {
return typeinfo_.getName(); }
160 inline ENTITY_FILTER entityType()
const {
return entity; }
163 std::string propName_;
165 ENTITY_FILTER entity;
184 void slotReplace() { replace =
true; }
185 void slotRename() { rename =
true; }
186 void slotCancel() { cancel =
true; }
189 QLabel* problemDescription;
191 QPushButton* buttonRename;
192 QPushButton* buttonReplace;
193 QPushButton* buttonCancel;
204 static DataType supportedDataTypes()
208 #ifdef ENABLE_OPENVOLUMEMESH_POLYHEDRAL_SUPPORT 212 #ifdef ENABLE_OPENVOLUMEMESH_HEXAHEDRAL_SUPPORT
Asks the user how to proceed after a name clash.
Cellection of information about a property.
#define DATA_POLYHEDRAL_MESH
#define DATA_HEXAHEDRAL_MESH
Wraps the information of a type.
#define DATA_TRIANGLE_MESH