本文整理汇总了C++中UserInterface::showMsg方法的典型用法代码示例。如果您正苦于以下问题:C++ UserInterface::showMsg方法的具体用法?C++ UserInterface::showMsg怎么用?C++ UserInterface::showMsg使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserInterface
的用法示例。
在下文中一共展示了UserInterface::showMsg方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: name
int
InputFront::unknownFieldMsg(emf_ObjectData_X* object_data, bool is_fatal)
{
UserInterface* gui = theControlCenter->getGui();
strstream strm;
if ( is_fatal ) {
strm << "***ERROR: Unknown field name (";
} else {
strm << "***WARNING: Unknown field name (";
}
strm << object_data->field_name
<< ") when reading object: "
<< object_data->object_name;
if ( object_data->object_id != NO_INDEX ) {
strm << " " << object_data->object_id;
}
strm << ends;
gui->showMsg(strm.str());
if (is_fatal)
return notOk;
else
return isOk;
}
示例2: getGui
int
Control::unknownObjectMsg(emf_ObjectData_X* object_data, bool is_fatal)
{
const int isOK = 0;
UserInterface* gui = getGui();
strstream strm;
strm << "WARNING: Unknown object name: "
<< object_data->object_name
<< ends;
gui->showMsg(strm.str());
if (is_fatal)
return !isOK;
else
return isOK;
}
示例3:
int
InputFront::unknownObjectMsg(emf_ObjectData_X* object_data, bool is_fatal)
{
UserInterface* gui = theControlCenter->getGui();
strstream strm;
if ( is_fatal ) {
strm << "***ERROR: Unknown object name:";
} else {
strm << "***WARNING: Unknown object name:";
}
strm << object_data->object_name
<< ends;
gui->showMsg(strm.str());
if (is_fatal)
return notOk;
else
return isOk;
}
示例4: switch
bool
BodyElementGroup::check()
{
UserInterface* gui = (UserInterface*)model->getGui();
strstream strm1, strm2;
BodyElement* be = NULL;
bool is_first_bndr = true;
for (int i = 0; i < nofElements; i++) {
int elem_tag = elementTags[i];
switch (elemType) {
case OT_VERTEX:
be = model->getBodyElementByTag(OT_VERTEX, elem_tag);
break;
case OT_EDGE:
be = model->getBodyElementByTag(OT_EDGE, elem_tag);
break;
case OT_FACE:
be = model->getBodyElementByTag(OT_FACE, elem_tag);
break;
}
if ( be != NULL ) {
elementIds[i] = be->Id();
// For non-virtual groups:
// -set group info into member boundaries
// -set parent body info
// -check that elements are homogenous
if ( !isVirtual() ) {
be->setElementGroupTag(tag);
be->setElementGroupId(id);
// NOTE: Body info from the first element
// (boundaries must be homogenous in this respect!)
//
if ( is_first_bndr ) {
is_first_bndr = false;
parent1Id = be->getParentId(1);
parent2Id = be->getParentId(2);
parent1Layer = be->getParentLayer(1);
parent2Layer = be->getParentLayer(2);
parent1Tag = be->getParentTag(1);
parent2Tag = be->getParentTag(2);
} else if ( parent1Id != be->getParentId(1) ||
parent2Id != be->getParentId(2)
) {
strm1 << "***ERROR in Edge Group " << tag << ends;
strm2 << "---Edge " << be->Tag() << " is not similar to previous edges!" << ends;
gui->showMsg(strm1.str());
gui->showMsg(strm2.str());
return false;
}
}
// Error!
} else {
strm1 << "***ERROR in Edge Group " << tag << ends;
strm2 << "---Cannot find edge " << elem_tag << ends;
gui->showMsg(strm1.str());
gui->showMsg(strm2.str());
return false;
}
}
return true;
}
示例5: if
// Methods read a vertex table
int
InputFront::readVertexTable(emf_ObjectData_X* od)
{
const ModelInfo* mi = model->getModelInfo();
int inputVersionNbr = mi->frontInputVersionNbr;
UserInterface* gui = theControlCenter->getGui();
const char* fn = od->field_name;
static ecif_Vertex_X tx;
static GcPoint point;
int nofVertices = 0;
int* vertexIds = NULL;
MatcValueTable matcTable;
bool isEgf = isEgfInput;
bool isEmf = isEmfInput;
reset_trx_data(tx);
// Point table (typical Egf format)
// ================================
if ( LibFront::in("Points", fn) ) {
if ( !LibFront::ncEqual(od->data_type, "real") ) {
gui->showMsg("Incorrect data format for vertex points (should be Real!)");
return 1;
}
int tag, dim1, dim2;
bool indexed_table;
double coord[3];
BodyElement* vertex;
if ( od->nof_variables == 1 &&
LibFront::ncEqual(od->variable_names[0], "index")
) {
indexed_table = true;
dim1 = od->nof_entries;
dim2 = od->dimension1;
} else {
indexed_table = false;
dim1 = od->dimension1;
dim2 = od->dimension2;
}
vertexIds = new int[dim1];
storeMatcData(matcTable, EMF_POINTS, od);
// Read vertex table
for (int i = 0; i < dim1; i++) {
coord[0] = coord[1] = coord[2] = 0.0;
for (short j = 0; j < dim2; j++) {
LibFront::setNumericData(coord[j], j + i * dim2);
coord[j] *= inputUnit;
}
point.setPosit(coord[0], coord[1], coord[2]);
if ( indexed_table ) {
LibFront::setNumericVariable(tag, i);
vertex = new BodyElement1D(tag, &point);
} else {
vertex = new BodyElement1D(&point);
}
vertexIds[i] = vertex->Id();
model->addBodyElement(vertex);
}
model->setVertexTable(dim1, dim2, vertexIds, matcTable);
}
// Ids and Point table (typical Emf format)
// ========================================
// NOTE: New format
// ----------------
else if ( LibFront::in("Ids And Points", fn) ) {
if ( !LibFront::ncEqual(od->data_type, "real") ) {
gui->showMsg("Incorrect data format for vertex points (should be Real!)");
return 1;
}
int data_size = od->dimension1;
int var_size = 1; // Id field (index)
int nof_coord;
if ( inputVersionNbr < 5 ) {
nof_coord = data_size; // Nothing but index variable (id) before coordinates
} else {
//.........这里部分代码省略.........