if (actif)
glob->dump << nomdoc;
- string name;
+ std::string name;
makeName (nomdoc, name);
Document* doc = new Document (name.c_str(), this);
return NULL;
}
// ======================================================== makeName
-void Hex::makeName (cpchar radical, string& name)
+void Hex::makeName (cpchar radical, std::string& name)
{
char cnum [8];
int numero = 0;
Document* addDocument (cpchar name="default");
Document* loadDocument (cpchar name);
Document* findDocument (cpchar name);
- Document* findDocument (const string& name)
+ Document* findDocument (const std::string& name)
{ return findDocument (name.c_str()) ; }
void what ();
int sizeofMessage ();
#ifndef SWIG
int loadAllDocs (cpchar flow);
int saveAllDocs (cpchar filename);
- void makeName (cpchar radical, string& name);
+ void makeName (cpchar radical, std::string& name);
void lockDump();
void restoreDump();
private:
static Hex* first_instance;
- vector <Document*> liste_documents;
+ std::vector <Document*> liste_documents;
Globale* glob;
#endif // not SWIG
};
int ier = HOK;
Real3 pse, psw, sorig, sbase;
Real3 pbe, pbw, borig, bbase;
- string brep;
+ std::string brep;
int ny0 = 0;
int nyd = NbrCotes/2;
int MiddleSlice1 = 3;
Real3 cross_oribig, cross_dirbig;
Real3 cross_orismall, cross_dirsmall;
- map <int,int> map_vertex, map_edge, map_quad, map_hexa;
- map <int,int> :: iterator it_map;
+ std::map <int,int> map_vertex, map_edge, map_quad, map_hexa;
+ std::map <int,int> :: iterator it_map;
int nbr_hexas1, nbr_quads1, nbr_edges1, nbr_vertex1;
double cross_rayext [V_TWO];
BEGIN_NAMESPACE_HEXA
-void transfo_brep (string& brep, Matrix* matrice, string& trep);
+void transfo_brep (std::string& brep, Matrix* matrice, std::string& trep);
static bool db = false;
// ============================================================= Constructeur
for (int nro=0 ; nro < nbass ; nro++)
{
Shape* shape = tab_asso [nro];
- string brep = shape->getBrep();
- string trep;
+ std::string brep = shape->getBrep();
+ std::string trep;
transfo_brep (brep, matrice, trep);
Shape* tshape = new Shape (trep);
tshape->setBounds (shape->getStart(), shape->getEnd());
for (int nro=0 ; nro < nbass ; nro++)
{
Shape* shape = tab_asso [nro];
- string brep = shape->getBrep();
- string trep;
+ std::string brep = shape->getBrep();
+ std::string trep;
transfo_brep (brep, matrice, trep);
Shape* tshape = new Shape (trep);
copie ->addAssociation (tshape);
return ier;
}
- map <Quad*, Quad*> rep_quad;
- map <Edge*, Edge*> rep_edge;
- map <Vertex*, Vertex*> rep_vertex;
+ std::map <Quad*, Quad*> rep_quad;
+ std::map <Edge*, Edge*> rep_edge;
+ std::map <Vertex*, Vertex*> rep_vertex;
- map <Quad*, Quad*> :: iterator itq;
- map <Edge*, Edge*> :: iterator ited;
- map <Vertex*, Vertex*> :: iterator itv;
+ std::map <Quad*, Quad*> :: iterator itq;
+ std::map <Edge*, Edge*> :: iterator ited;
+ std::map <Vertex*, Vertex*> :: iterator itv;
rep_vertex [vold] = vpar;
int nbparv = vold->getNbrParents ();
{
DumpStart ("findLaw", name);
- string nom = name;
+ std::string nom = name;
Law* loi = NULL;
for (int nro=0 ;loi==NULL && nro<nbr_laws; nro++)
ier = HERR;
else
{
- string name = prefix;
+ std::string name = prefix;
if (hex_parent != NULL)
hex_parent->makeName (prefix, name);
el_name = name;
return nombre <= 0 && countLaw () <= 1;
}
// ======================================================== getNextName
-cpchar Document::getNextName (EnumElt type, string& buff)
+cpchar Document::getNextName (EnumElt type, std::string& buff)
{
char name [8];
EltBase::makeName (type, doc_nbr_elt [type], name);
}
// ======================================================== getNextName
-string Document::getNextName (EnumElt type)
+std::string Document::getNextName (EnumElt type)
{
char name [8];
EltBase::makeName (type, doc_nbr_elt [type], name);
- return string(name);
+ return std::string(name);
}
// ======================================================== lockDump
void reorderQuads ();
// --------------------------------------------------- Evols Hexa5
- cpchar getNextName (EnumElt type, string& name);
- string getNextName (EnumElt type);
+ cpchar getNextName (EnumElt type, std::string& name);
+ std::string getNextName (EnumElt type);
virtual char* makeVarName (char* name);
void lockDump();
BEGIN_NAMESPACE_HEXA
// ======================================================== get_coords
-int get_coords (const string& chaine, double& x, double& y, double& z)
+int get_coords (const std::string& chaine, double& x, double& y, double& z)
{
// int nv = sscanf (chaine.c_str (), "%lg %lg %lg", &x, &y, &z);
cpchar buffer = chaine.c_str ();
return HOK;
}
// ======================================================== get_coords
-int get_coords (const string& chaine, double& x, double& y)
+int get_coords (const std::string& chaine, double& x, double& y)
{
cpchar buffer = chaine.c_str ();
int nv = sscanf (buffer, "%lg %lg", &x, &y);
return HOK;
}
// ======================================================== parse_name
-int parse_name (XmlTree* node, const string& nom, EltBase* elt)
+int parse_name (XmlTree* node, const std::string& nom, EltBase* elt)
{
int lg = nom.size();
int nroid = 0;
elt->setId (nroid);
- const string& name = node->findValue ("name");
+ const std::string& name = node->findValue ("name");
if (name=="")
return HERR;
return HOK;
}
// ======================================================== get_names
-void get_names (const string& chaine, int size, vector<string>& table)
+void get_names (const std::string& chaine, int size, std::vector<std::string>& table)
{
table.clear ();
int lg = chaine.size();
- string mot = "";
+ std::string mot = "";
bool encours = false;
for (int nc=0 ; nc<lg ; nc++)
int Document::loadXml (cpchar ficname)
{
XmlTree xml("");
- string filename = ficname;
+ std::string filename = ficname;
//el_name = Kernel_Utils::GetBaseName ((pchar)ficname);
make_basename (ficname, el_name);
{
// xml.dump ();
- map <std::string, Vertex*> t_vertex;
- map <std::string, Edge*> t_edge;
- map <std::string, Quad*> t_quad;
- map <std::string, Hexa*> t_hexa;
- map <std::string, Vector*> t_vector;
- vector <string> tname;
+ std::map <std::string, Vertex*> t_vertex;
+ std::map <std::string, Edge*> t_edge;
+ std::map <std::string, Quad*> t_quad;
+ std::map <std::string, Hexa*> t_hexa;
+ std::map <std::string, Vector*> t_vector;
+ std::vector <std::string> tname;
- const string& version = xml.findValue ("version");
+ const std::string& version = xml.findValue ("version");
if (version == "")
{
cout << " **** Format du fichier XML perime"
<< endl;
return HERR;
}
- const string& name = xml.findValue ("name");
+ const std::string& name = xml.findValue ("name");
if (name != el_name)
setName (name.c_str());
for (int nro=0 ; nro < nbrelts ; nro++)
{
XmlTree* node = rubrique->getChild (nro);
- const string& type = node->getName();
+ const std::string& type = node->getName();
double px, py, pz;
if (type=="Vertex")
{
- const string& nom = node->findValue ("id");
- const string& coords = node->findValue ("coord");
+ const std::string& nom = node->findValue ("id");
+ const std::string& coords = node->findValue ("coord");
get_coords (coords, px, py, pz);
vertex = addVertex (px, py, pz);
for (int nro=0 ; nro < nbrelts ; nro++)
{
XmlTree* node = rubrique->getChild (nro);
- const string& type = node->getName();
+ const std::string& type = node->getName();
if (type=="Edge")
{
- const string& nom = node->findValue ("id");
- const string& vertices = node->findValue ("vertices");
+ const std::string& nom = node->findValue ("id");
+ const std::string& vertices = node->findValue ("vertices");
get_names (vertices, V_TWO, tname);
edge = new Edge (t_vertex [tname[0]], t_vertex [tname[1]]);
t_edge [nom] = edge;
for (int nro=0 ; nro < nbrelts ; nro++)
{
XmlTree* node = rubrique->getChild (nro);
- const string& type = node->getName();
+ const std::string& type = node->getName();
if (type=="Quad")
{
- const string& nom = node->findValue ("id");
- const string& edges = node->findValue ("edges");
+ const std::string& nom = node->findValue ("id");
+ const std::string& edges = node->findValue ("edges");
get_names (edges, V_TWO, tname);
quad = new Quad (t_edge [tname[0]], t_edge [tname[1]],
for (int nro=0 ; nro < nbrelts ; nro++)
{
XmlTree* node = rubrique->getChild (nro);
- const string& nom = node->findValue ("id");
- const string& quads = node->findValue ("quads");
+ const std::string& nom = node->findValue ("id");
+ const std::string& quads = node->findValue ("quads");
get_names (quads, V_TWO, tname);
Hexa* hexa = new Hexa (t_quad [tname[0]], t_quad [tname[1]],
{
XmlTree* node = rubrique->getChild (nro);
double px, py, pz;
- const string& nom = node->findValue ("id");
- const string& coords = node->findValue ("coord");
+ const std::string& nom = node->findValue ("id");
+ const std::string& coords = node->findValue ("coord");
get_coords (coords, px, py, pz);
Vector* vector = addVector (px, py, pz);
for (int nro=0 ; nro < nbrelts ; nro++)
{
XmlTree* node = rubrique->getChild (nro);
- const string& id = node->findValue ("id");
- const string& kind = node->findValue ("kind");
- const string& nodes = node->findValue ("nodes");
- const string& coeff = node->findValue ("coeff");
+ const std::string& id = node->findValue ("id");
+ const std::string& kind = node->findValue ("kind");
+ const std::string& nodes = node->findValue ("nodes");
+ const std::string& coeff = node->findValue ("coeff");
int nbnodes = atoi (nodes.c_str());
double koeff = atof (coeff.c_str());
for (int nro=0 ; nro < nbrelts ; nro++)
{
XmlTree* node = rubrique->getChild (nro);
- const string& nmedge = node->findValue ("edge");
- const string& nmlaw = node->findValue ("law");
- // const string& nmway = node->findValue ("way");
+ const std::string& nmedge = node->findValue ("edge");
+ const std::string& nmlaw = node->findValue ("law");
+ // const std::string& nmway = node->findValue ("way");
edge = t_edge [nmedge];
Law* law = findLaw (nmlaw.c_str());
{
XmlTree* ndgroup = rubrique->getChild (nro);
XmlTree* node = ndgroup ->getChild (0);
- const string& nom = node->findValue ("name");
- const string& ckind = node->findValue ("kind");
+ const std::string& nom = node->findValue ("name");
+ const std::string& ckind = node->findValue ("kind");
EnumGroup kind = Group::getKind (ckind);
Group* groupe = addGroup (nom.c_str(), kind);
for (int nelt=1 ; nelt < nbrelts ; nelt++)
{
node = ndgroup ->getChild (nelt);
- const string& id = node->findValue ("id");
+ const std::string& id = node->findValue ("id");
switch (type)
{
case EL_HEXA : groupe->addElement (t_hexa [id]);
// ======================================================== parseSubShape
SubShape* Document::parseSubShape (XmlTree* node)
{
- const string& name = node->findValue ("shape");
+ const std::string& name = node->findValue ("shape");
int subid = node->findInteger ("subid");
NewShape* shape = findShape (name);
if (shape==NULL)
if (shape->getDim()!=1)
return;
- const string& inter = node->findValue ("interval");
+ const std::string& inter = node->findValue ("interval");
double pdeb, pfin;
get_coords (inter, pdeb, pfin);
for (int nro=0 ; nro < nbrelts ; nro++)
{
XmlTree* node = rubrique->getChild (nro);
- const string& type = node->getName();
+ const std::string& type = node->getName();
if (type=="Shape")
{
- const string& nom = node->findValue ("id" );
+ const std::string& nom = node->findValue ("id" );
int orig = node->findInteger ("type");
- const string& brep = node->findValue ("brep");
+ const std::string& brep = node->findValue ("brep");
NewShape* shape = new NewShape (this, (EnumShape)orig);
parse_name (node, nom, shape);
{
Real3 point;
XmlTree* sommet = node->getChild (nv);
- const string& coords = sommet->findValue ("coord");
+ const std::string& coords = sommet->findValue ("coord");
get_coords (coords, point[dir_x], point[dir_y], point[dir_z]);
doc_cloud->addPoint (point);
}
static bool db = on_debug (); // == getenv ("HEXA_DB") > 0
-int vertexInLine (Vertex* vfirst, Edges& mline, vector<int> &tsens);
+int vertexInLine (Vertex* vfirst, Edges& mline, std::vector<int> &tsens);
// ====================================================== vertexInLine
-int vertexInLine (Vertex* vfirst, Edges& mline, vector<int> &tsens)
+int vertexInLine (Vertex* vfirst, Edges& mline, std::vector<int> &tsens)
{
int nbseg = mline.size ();
// ======================================================== copyDocument
Document* Document::copyDocument ()
{
- string nom = "CopyOf_";
+ std::string nom = "CopyOf_";
nom += el_name;
Document* clone = new Document (nom.c_str());
// ========================================================= print_replace
void print_replace (Edge* zig, Edge* zag)
{
- cout << zig->getName() << " = (" << zig->getVertex(0)->getName()
+ std::cout << zig->getName() << " = (" << zig->getVertex(0)->getName()
<< ", " << zig->getVertex(1)->getName() << ") est clone en ";
- cout << zag->getName() << " = (" << zag->getVertex(0)->getName()
- << ", " << zag->getVertex(1)->getName() << ")" << endl;
+ std::cout << zag->getName() << " = (" << zag->getVertex(0)->getName()
+ << ", " << zag->getVertex(1)->getName() << ")" << std::endl;
}
// ========================================================= only_in_hexas
bool only_in_hexas (Hexas& thexas, Quad* quad)
Quad* quad = edge->getParent (nq);
if (NOT only_in_hexas (thexas, quad))
{
- cout << " ... inMoreHexas " << edge->makeDefinition() << endl;
+ std::cout << " ... inMoreHexas " << edge->makeDefinition() << std::endl;
return false;
}
}
- cout << " ... only_in_hexas " << edge->makeDefinition() << endl;
+ std::cout << " ... only_in_hexas " << edge->makeDefinition() << std::endl;
return true;
}
// ========================================================= replace_vertex
DumpStart ("disconnectEdges", thexas << tedges);
if (db)
- cout << " +++ Disconnect Edges" << endl;
+ std::cout << " +++ Disconnect Edges" << std::endl;
Elements* grid = new Elements (this);
if (nbhexas != nbedges)
{
- cout << " **** Error in Document::disconnectEdges\n" << endl;
- cout << " **** Number of Edges and number of Hexas are different\n"
- << endl;
+ std::cout << " **** Error in Document::disconnectEdges\n" << std::endl;
+ std::cout << " **** Number of Edges and number of Hexas are different\n"
+ << std::endl;
return NULL;
}
else if (nbhexas==1)
{
if (BadElement (tedges[nro]))
{
- cout << " **** Eddge number " << nro+1 << " is incorrect"
- << endl;
+ std::cout << " **** Eddge number " << nro+1 << " is incorrect"
+ << std::endl;
return NULL;
}
if (BadElement (thexas[nro]))
{
- cout << " **** Hexa number " << nro+1 << " is incorrect"
- << endl;
+ std::cout << " **** Hexa number " << nro+1 << " is incorrect"
+ << std::endl;
return NULL;
}
if (db)
- cout << nro+1 << " hexa = " << thexas[nro]->getName ()
+ std::cout << nro+1 << " hexa = " << thexas[nro]->getName ()
<< ", edge = " << tedges[nro]->getName ()
<< " = (" << tedges[nro]->getVertex(0)->getName ()
<< ", " << tedges[nro]->getVertex(1)->getName ()
- << ")" << endl;
+ << ")" << std::endl;
}
for (int nro=0 ; nro<nbhexas ; nro++)
int ned = thexas[nro]->findEdge (tedges[nro]);
if (ned==NOTHING)
{
- cout << " **** Edge number " << nro+1
- << " doesnt belong to correspondant hexa" << endl;
+ std::cout << " **** Edge number " << nro+1
+ << " doesnt belong to correspondant hexa" << std::endl;
return NULL;
}
}
- vector <Vertex*> tvertex (nbedges+1);
+ std::vector <Vertex*> tvertex (nbedges+1);
for (int nro=1 ; nro<nbedges ; nro++)
{
tvertex[nro] = tedges[nro]->commonVertex (tedges[nro-1]);
if (tvertex[nro]==NULL)
{
- cout << " **** Edge number " << nro
- << " doesnt intesect next edge" << endl;
+ std::cout << " **** Edge number " << nro
+ << " doesnt intesect next edge" << std::endl;
return NULL;
}
}
int ned = thexas[nro]->findEdge (tedges[nro]);
if (ned==NOTHING)
{
- cout << " **** Edge number " << nro+1
- << " doesnt belong to correspondant hexa" << endl;
+ std::cout << " **** Edge number " << nro+1
+ << " doesnt belong to correspondant hexa" << std::endl;
return NULL;
}
}
// Fin des controles, on peut y aller ...
- map <Edge*, int> state_edge;
- map <Quad*, int> state_quad;
+ std::map <Edge*, int> state_edge;
+ std::map <Quad*, int> state_quad;
enum { UNDEFINED, REPLACED, AS_IS };
- map <Vertex*, Vertex*> new_vertex;
- map <Edge*, Edge*> new_edge;
- map <Quad*, Quad*> new_quad;
+ std::map <Vertex*, Vertex*> new_vertex;
+ std::map <Edge*, Edge*> new_edge;
+ std::map <Quad*, Quad*> new_quad;
- map <Vertex*, Vertex*> :: iterator it_vertex;
- map <Edge*, Edge*> :: iterator it_edge;
- map <Quad*, Quad*> :: iterator it_quad;
+ std::map <Vertex*, Vertex*> :: iterator it_vertex;
+ std::map <Edge*, Edge*> :: iterator it_edge;
+ std::map <Quad*, Quad*> :: iterator it_quad;
#define VertexIsNew(v) (it_vertex=new_vertex.find(v))!=new_vertex.end()
new_vertex [tvertex[nro]] = node1;
if (db)
{
- cout << nro << " : " << tvertex[nro]->getName()
- << " est clone en " << node1->getName() << endl;
+ std::cout << nro << " : " << tvertex[nro]->getName()
+ << " est clone en " << node1->getName() << std::endl;
}
if (nro>0)
}
if (db)
- cout << "_____________________________ Autres substitutions" << endl;
+ std::cout << "_____________________________ Autres substitutions" << std::endl;
// Un edge non remplace, qui contient un vertex remplace
// commun a plus de 2 faces (donc appartenant a un autre hexa)
Vertex* v2;
};
-void propagateOrientation (queue <OrientedQuad> &queue_quads, Quad* orig);
+void propagateOrientation (std::queue <OrientedQuad> &queue_quads, Quad* orig);
void makeSkin (Quad* orig);
// ========================================================= reorderFaces
void makeSkin (Quad* orig)
{
OrientedQuad triplet;
- queue <OrientedQuad> queue_quads;
+ std::queue <OrientedQuad> queue_quads;
orig->setOrientation(); // Q_DIRECT=1, Q_INVERSE=2
propagateOrientation (queue_quads, orig);
}
}
// ==================================================== propagateOrientation
-void propagateOrientation (queue <OrientedQuad> &queue_quads, Quad* orig)
+void propagateOrientation (std::queue <OrientedQuad> &queue_quads, Quad* orig)
{
OrientedQuad triplet;
// Q_DIRECT : le sens des vertex est l'exterieur
sprintf (num, "%d", nro);
nro ++;
- string filename = radical;
+ std::string filename = radical;
filename += num;
filename += ".vtk";
int ier = saveVtk (filename.c_str());
if (fic_dump==NULL)
fic_dump = stdout;
- string buff;
+ std::string buff;
cpchar when = get_time (buff);
fprintf (fic_dump, "\n");
if (NOT is_open)
return *this;
- string valeur ("'");
+ std::string valeur ("'");
valeur += val;
valeur += "'";
is_open = false;
}
// =================================================== getBegin
-void DumpStudy::getBegin (string& begin)
+void DumpStudy::getBegin (std::string& begin)
{
begin = right_part;
begin += ")";
cpchar DumpStudy::findName (EltBase* elt)
{
cpchar name = "Unknown";
- map <EltBase*, string> :: iterator iter = map_name.find (elt);
+ std::map <EltBase*, std::string> :: iterator iter = map_name.find (elt);
if (iter != map_name.end())
name = iter->second.c_str();
else
bool lock ();
void restore (bool reactive);
- void getBegin (string& begin);
+ void getBegin (std::string& begin);
private :
cpchar findName (EltBase* elt);
void addArgVector (EnumElt type, TabElts& table);
void addArgument (cpchar arg);
- void addArgument (string& arg) { addArgument (arg.c_str()) ; }
+ void addArgument (std::string& arg) { addArgument (arg.c_str()) ; }
void declareVectors ();
void addVector (cpchar name);
void majVector (cpchar value);
std::vector <std::string> tab_declar;
int tab_count [EL_MAXI];
- string curr_vector;
+ std::string curr_vector;
int nbr_values;
FILE* fic_dump;
- string this_name;
- string right_part;
+ std::string this_name;
+ std::string right_part;
bool is_open;
int nbr_nulls;
int nbr_args;
void Edge::saveXml (XmlWriter* xml)
{
char buffer[12];
- string vertices = e_vertex [V_AMONT]->getName(buffer);
+ std::string vertices = e_vertex [V_AMONT]->getName(buffer);
vertices += " ";
vertices += e_vertex [V_AVAL ]->getName(buffer);
}
}
// ======================================================== makeDefinition
-string Edge::makeDefinition ()
+std::string Edge::makeDefinition ()
{
- string definition = el_name;
+ std::string definition = el_name;
definition += " = (";
definition += e_vertex [V_AMONT]->getName();
virtual void duplicate ();
Edge* getClone () { return e_clone ; }
double* getVector (double vecteur[]);
- string makeDefinition ();
+ std::string makeDefinition ();
int addAssociation (EdgeShape* gline, double deb, double fin);
int checkAssociation ();
// 1) marquage des hexas
el_root->markAll (NO_USED);
// 2) Memo noeuds
- vector <Quad*> q_amont;
- vector <Quad*> q_aval;
- map <Vertex*, Vertex*> vis_a_vis;
+ std::vector <Quad*> q_amont;
+ std::vector <Quad*> q_aval;
+ std::map <Vertex*, Vertex*> vis_a_vis;
int nbnodes = t_edges.size();
- vector <Vertex*> v_amont (nbnodes);
- vector <Vertex*> v_aval (nbnodes);
+ std::vector <Vertex*> v_amont (nbnodes);
+ std::vector <Vertex*> v_aval (nbnodes);
int nbfaces = 0;
for (int nro=0; nro<nbnodes ; nro++)
tab_edge.resize (nbr_edges, NULL);
tab_hexa.resize (nbr_hexas, NULL);
tab_vertex.resize (nbr_vertex, NULL);
- vector <Edge*> tab_pilier (nbpiliers);
+ std::vector <Edge*> tab_pilier (nbpiliers);
int nbinter = nbcuts + 1;
for (int ned=0; ned<nbnodes ; ned++)
{
if (grid_geom==NULL)
{
- string name = "extrud_" + el_name;
+ std::string name = "extrud_" + el_name;
grid_geom = el_root->addShape (name.c_str(), SH_EXTRUD);
grid_geom -> openShape();
}
{
tedge.clear ();
cpchar who = target ? "Target" : "Pattern";
- string nmedge = target ? "Vertices of target (args 5 and 6)"
+ std::string nmedge = target ? "Vertices of target (args 5 and 6)"
: "Vertices of pattern (args 3 and 4)" ;
nmedge += "don't define an edge" ;
return;
}
- map <Edge*, int> edge_count;
- map <Edge*, int> :: iterator iter;
+ std::map <Edge*, int> edge_count;
+ std::map <Edge*, int> :: iterator iter;
int nbre = tquad.size();
for (int nq=0 ; nq<nbre ; ++nq)
{
{
tvertex.clear ();
cpchar who = target ? "Target" : "Pattern";
- string nmedge = target ? "Vertices of target (args 4 and 6)"
+ std::string nmedge = target ? "Vertices of target (args 4 and 6)"
: "Vertices of pattern (args 3 and 5)" ;
nmedge += "don't define an edge" ;
return;
}
- map <Edge*, int> edge_count;
- map <Edge*, int> :: iterator iter;
+ std::map <Edge*, int> edge_count;
+ std::map <Edge*, int> :: iterator iter;
int nbre = tquad.size();
for (int nq=0 ; nq<nbre ; ++nq)
{
int nx0 = 0;
int nbsecteurs = size_hy / 2;
- vector <Edge*> ker_hedge (nbsecteurs*size_vz);
- vector <Quad*> ker_hquad (nbsecteurs*size_vz);
- vector <Quad*> ker_vquad (nbsecteurs*size_vz);
+ std::vector <Edge*> ker_hedge (nbsecteurs*size_vz);
+ std::vector <Quad*> ker_hquad (nbsecteurs*size_vz);
+ std::vector <Quad*> ker_vquad (nbsecteurs*size_vz);
for (int nz=0 ; nz<size_vz ; nz++)
{
NewShape* geom = el_root->addShape (name, SH_CYLINDER);
geom -> openShape();
- string brep;
+ std::string brep;
// Real3 vk = { normal->getDx(), normal->getDy(), normal->getDz() };
// normer_vecteur (vk);
{
Real3 oa, ob, normal;
Real3 pta, ptb, ptc, ptd;
- string brep;
+ std::string brep;
// Les 2 edges dont les petits cotes d'un rectangle de rapport L/l=sqrt(2)
// Soit le cercle circonscrit a ce rectangle.
if (vo1==NULL || vd1==NULL)
return HERR;
- string trep;
+ std::string trep;
Real3 pa, pb, vdir1, vdir2;
calc_vecteur (vo1->getPoint (pa), vd1->getPoint (pb), vdir1);
calc_vecteur (vo2->getPoint (pa), vd2->getPoint (pb), vdir2);
Shape* shape = tab_shapes[nro];
if (shape!=NULL)
{
- string brep = shape->getBrep();
+ std::string brep = shape->getBrep();
translate_brep (brep, vdir1, trep);
// Shape* tshape = new Shape (trep);
// tshape->setBounds (shape->getStart(), shape->getEnd());
Shape* shape = vo1->getAssociation ();
if (shape!=NULL && vd1->getAssociation ()==NULL)
{
- string brep = shape->getBrep();
+ std::string brep = shape->getBrep();
translate_brep (brep, vdir, trep);
// Shape* tshape = new Shape (trep);
// vd1->setAssociation (tshape);
char name [24];
sprintf (name, "0x%lx#%d", (unsigned long) shape, nh);
- map<string,int>::iterator iter = map_shape.find (name);
+ std::map<std::string,int>::iterator iter = map_shape.find (name);
if (iter != map_shape.end())
subid = iter->second;
else
sprintf (num, "%d", nro);
nro ++;
- string filename = radical;
+ std::string filename = radical;
filename += num;
filename += ".vtk";
int ier = saveVtk (filename.c_str());
return el_root != NULL && el_root->getLevel() > niv ;
}
// ========================================================= getNextName
-string EltBase::getNextName ()
+std::string EltBase::getNextName ()
{
if (el_root != NULL)
return el_root->getNextName (el_type);
char name [16];
makeName (el_type, 0, name);
- return string (name);
+ return std::string (name);
}
END_NAMESPACE_HEXA
void dumpRef ();
cpchar getName ();
- void setName (const string& nom) { el_name = nom ; }
+ void setName (const std::string& nom) { el_name = nom ; }
void setName (cpchar nom) { el_name = nom ; }
bool debug (int niv=0);
bool isAssociated () { return is_associated ; }
- string getNextName ();
+ std::string getNextName ();
protected :
EnumElt el_type;
EltBase* el_next;
int el_id;
Document* el_root;
- string el_name;
+ std::string el_name;
int el_status;
int el_mark;
Group::Group (Document* dad, cpchar nom, EnumGroup grp)
: EltBase (dad, EL_GROUP)
{
- string name = std::string(nom);
+ std::string name = std::string(nom);
name.erase (name.find_last_not_of (" \n\r\t" ) + 1);
name.erase (0, name.find_first_not_of (" \n\r\t" ));
EnumElt getTypeElt () { return grp_typelt ; }
static EnumGroup getKind (cpchar kind);
- static EnumGroup getKind (const string& k) { return getKind (k.c_str());}
+ static EnumGroup getKind (const std::string& k) { return getKind (k.c_str());}
private :
int grp_id;
void Hexa::saveXml (XmlWriter* xml)
{
char ident[12];
- string quads;
+ std::string quads;
for (int nro=0 ; nro<HQ_MAXI ; nro++)
{
return d2 < epsilon;
}
// ====================================================== save_brep
-void save_brep (cpchar nom, string brep, int& compteur)
+void save_brep (cpchar nom, std::string brep, int& compteur)
{
char buff[8];
compteur ++;
sprintf (buff ,"%d", compteur);
- string name (nom);
+ std::string name (nom);
name += buff;
name += ".brep";
FILE* fic = fopen (name.c_str(), "w");
fclose (fic);
}
// ====================================================== geom_make_brep
-void geom_make_brep (TopoDS_Shape& shape, string& brep)
+void geom_make_brep (TopoDS_Shape& shape, std::string& brep)
{
- ostringstream stream_shape;
+ std::ostringstream stream_shape;
BRepTools::Write (shape, stream_shape);
brep = stream_shape.str();
}
TopoDS_Shape geom_brep2shape (rcstring brep)
{
TopoDS_Shape topo;
- istringstream streamBrep(brep);
+ std::istringstream streamBrep(brep);
BRep_Builder aBuilder;
BRepTools::Read (topo, streamBrep, aBuilder);
return topo;
// ====================================================== geom_brep2shape
int geom_brep2shape (rcstring brep, TopoDS_Shape& shape)
{
- istringstream streamBrep(brep);
+ std::istringstream streamBrep(brep);
BRep_Builder aBuilder;
BRepTools::Read (shape, streamBrep, aBuilder);
return HOK;
// edge->getVertex(V_AVAL )->clearAssociation();
// }
// ====================================================== clean_brep
-void clean_brep (string& brep)
+void clean_brep (std::string& brep)
{
TopoDS_Shape shape;
BRep_Builder builder;
- istringstream stream_brep (brep);
+ std::istringstream stream_brep (brep);
BRepTools::Read (shape, stream_brep, builder);
BRepTools::Clean (shape);
- ostringstream stream_shape;
+ std::ostringstream stream_shape;
BRepTools::Write (shape, stream_shape);
brep = stream_shape.str();
}
int HexaExport geom_asso_cylcyl (Edge* edge);
bool HexaExport same_coords (gp_Pnt& pa, gp_Pnt& pb, double epsil2=1e-6);
-void HexaExport save_brep (cpchar nom, string brep, int& nro);
-void HexaExport clean_brep (string& brep);
+void HexaExport save_brep (cpchar nom, std::string brep, int& nro);
+void HexaExport clean_brep (std::string& brep);
-void HexaExport geom_make_brep (TopoDS_Shape& shape, string& brep);
+void HexaExport geom_make_brep (TopoDS_Shape& shape, std::string& brep);
int HexaExport geom_brep2point (rcstring brep, double& px, double& py, double& pz);
int HexaExport geom_brep2shape (rcstring brep, TopoDS_Shape& shape);
int subid = tab_vertex.size() + 2;
sprintf (suffix, ":vertex_%02d", subid);
- string name = el_name + suffix;
+ std::string name = el_name + suffix;
VertexShape* sub_shape = new VertexShape (this, subid, point);
sub_shape->setName (name);
// ===================================================== saveBrep
int NewShape::saveBrep ()
{
- string filename = el_name + ".brep";
+ std::string filename = el_name + ".brep";
int ier = updateBrep ();
if (ier != HOK)
void NewShape::addSubShape (const TopoDS_Shape& shape)
{
char chnum [32];
- string name;
+ std::string name;
sh_indice ++;
int subid = map_shape.Add (shape);
TopoDS_Shape geo_shape;
EnumShape sh_origin;
- string geo_brep;
+ std::string geo_brep;
bool brep_defined, shape_defined;
TopTools_IndexedMapOfShape map_shape;
void projeter (Vertex* vertex, double& ux, double& uy);
private :
- vector <QpatVertex> pat_vertex;
- vector <QpatEdge > pat_edge;
- vector <QpatQuad > pat_quad;
+ std::vector <QpatVertex> pat_vertex;
+ std::vector <QpatEdge > pat_edge;
+ std::vector <QpatQuad > pat_quad;
Quads old_top, old_bottom;
Hexas old_hexa;
void Quad::saveXml (XmlWriter* xml)
{
char buffer[12];
- string edges;
+ std::string edges;
for (int nro=0 ; nro<QUAD4 ; nro++)
{
BEGIN_NAMESPACE_HEXA
// ====================================================== Constructeur
-Shape::Shape (string brep)
+Shape::Shape (std::string brep)
{
b_rep = brep;
debut = 0;
fin = 1;
ident = "";
}
-void clean_brep (string& brep);
+void clean_brep (std::string& brep);
// ====================================================== saveXml
void Shape::saveXml (XmlWriter* xml)
{
class HexaExport Shape
{
public :
- Shape (string brep);
- string getBrep () { return b_rep; }
- string getIdent () { return ident; }
- string getIor () { return ior; }
+ Shape (std::string brep);
+ std::string getBrep () { return b_rep; }
+ std::string getIdent () { return ident; }
+ std::string getIor () { return ior; }
double getStart () { return debut; }
double getEnd () { return fin; }
void getBounds (double& pdeb, double& pfin) { pdeb=debut ; pfin = fin; }
- void setBrep (string brep) { b_rep = brep; }
- void setIdent (string name) { ident = name; }
- void setIor (string val) { ior = val; }
+ void setBrep (std::string brep) { b_rep = brep; }
+ void setIdent (std::string name) { ident = name; }
+ void setIor (std::string val) { ior = val; }
void setBounds (double pdeb, double pfin) { debut = pdeb ; fin = pfin; }
void setStart (double val) { debut = val ; }
private :
double debut;
double fin;
- string ident;
- string ior;
+ std::string ident;
+ std::string ior;
std::string b_rep;
};
int getDim () { return sub_dim ; }
virtual EnumKindOfShape kindOf () { return kind_of ; }
- const string& getBrep ();
+ const std::string& getBrep ();
virtual const TopoDS_Shape& getShape ();
void saveXml (XmlWriter* xml);
int sub_dim; // 0 = point, 1 = arete, 2 = face;
TopoDS_Shape geo_shape;
- string geo_brep;
+ std::string geo_brep;
bool maj_brep, maj_shape;
EnumKindOfShape kind_of;
};
Real3 ss_coord; // Pour les vertex
bool maj_coords;
bool free_point;
- vector <Vertex*> tab_assoc;
+ std::vector <Vertex*> tab_assoc;
};
END_NAMESPACE_HEXA
#endif
if (nbre ==0)
return;
- cout << endl
- << " ... In function :" << endl;
- cout << bla_bla [0] << endl << endl;
+ std::cout << std::endl
+ << " ... In function :" << std::endl;
+ std::cout << bla_bla [0] << std::endl << std::endl;
for (int nro=1 ; nro<nbre ; nro++)
- cout << bla_bla [nro] << endl;
- cout << endl;
+ std::cout << bla_bla [nro] << std::endl;
+ std::cout << std::endl;
}
// =================================================== getMessage
TabText& Witness::getMessage ()
enum { HEND_FILE = -2, HEND_LINE = -1, CRLF = 13 };
// ====================================================== Constructeur
-XmlTree::XmlTree (const string& nom, XmlTree* dad)
+XmlTree::XmlTree (const std::string& nom, XmlTree* dad)
{
item_name = nom;
item_vide = "";
{
}
// ====================================================== findChild
-XmlTree* XmlTree::findChild (const string& nom)
+XmlTree* XmlTree::findChild (const std::string& nom)
{
for (int nro = 0 ; nro<nbr_items ; nro++)
{
return NULL;
}
// ====================================================== findAttribute
-int XmlTree::findAttribute (const string& nom)
+int XmlTree::findAttribute (const std::string& nom)
{
for (int nro = 0 ; nro<nbr_attributs ; nro++)
{
return NOTHING;
}
// ====================================================== findValue
-const string& XmlTree::findValue (const string& nom)
+const std::string& XmlTree::findValue (const std::string& nom)
{
for (int nro = 0 ; nro<nbr_attributs ; nro++)
{
return item_vide;
}
// ====================================================== findInteger
-int XmlTree::findInteger (const string& nom)
+int XmlTree::findInteger (const std::string& nom)
{
int val = 0;
- const string chnum = findValue (nom);
+ const std::string chnum = findValue (nom);
if (chnum==item_vide)
return val;
return val;
}
// ====================================================== parseFile
-int XmlTree::parseFile (const string& ficnom)
+int XmlTree::parseFile (const std::string& ficnom)
{
fic_buffer = "";
len_buffer = 0;
xml_file = fopen (ficnom.c_str(), "r");
if (xml_file==NULL)
{
- cout << " **** Fichier XML '" << ficnom << "' inaccessible"
- << endl;
+ std::cout << " **** Fichier XML '" << ficnom << "' inaccessible"
+ << std::endl;
return HERR;
}
XmlTree* node = this;
EnumItem item_lu;
- string nom, valeur, foo;
+ std::string nom, valeur, foo;
while ((item_lu=readItem (nom)) != M_NONE)
{
switch (item_lu)
return HOK;
}
// ====================================================== getItem
-EnumItem XmlTree::getItem (string& value, EnumItem waited)
+EnumItem XmlTree::getItem (std::string& value, EnumItem waited)
{
EnumItem item = readItem (value);
return item;
}
// ====================================================== readItem
-EnumItem XmlTree::readItem (string& value)
+EnumItem XmlTree::readItem (std::string& value)
{
value = "";
}
}
// ====================================================== getIdent
-int XmlTree::getIdent (string& ident)
+int XmlTree::getIdent (std::string& ident)
{
ident = "";
return HERR;
}
// ====================================================== getString
-int XmlTree::getString (string& chaine)
+int XmlTree::getString (std::string& chaine)
{
chaine = "";
int car = ' ';
// exit (102);
}
// ====================================================== addChild
-XmlTree* XmlTree::addChild (const string& nom)
+XmlTree* XmlTree::addChild (const std::string& nom)
{
XmlTree* child = new XmlTree (nom, this);
tab_items.push_back (child);
return child;
}
// ====================================================== addAttribut
-void XmlTree::addAttribut (const string& nom, const string& value)
+void XmlTree::addAttribut (const std::string& nom, const std::string& value)
{
tab_attributs.push_back (nom);
tab_values .push_back (value);
// ====================================================== dump
void XmlTree::dump (int niveau)
{
- string marge = "";
+ std::string marge = "";
for (int niv=0 ; niv<niveau ; niv++)
marge += " | ";
- cout << marge << item_name << endl;
+ std::cout << marge << item_name << std::endl;
for (int nc=0 ; nc<nbr_attributs ; nc++)
{
- cout << marge << " : "
+ std::cout << marge << " : "
<< tab_attributs [nc] << " = '" << tab_values [nc]
- << "'" << endl;
+ << "'" << std::endl;
}
for (int nc=0 ; nc<nbr_items ; nc++)
class HexaExport XmlTree
{
public :
- XmlTree (const string& name, XmlTree* dad=NULL);
+ XmlTree (const std::string& name, XmlTree* dad=NULL);
~XmlTree ();
- int parseFile (const string& name);
+ int parseFile (const std::string& name);
int parseStream (cpchar flux, int& posit);
cpchar getName () { return item_name.c_str() ; }
int getNbrAttributs () { return nbr_attributs ; }
int getNbrChildren () { return nbr_items ; }
- int findAttribute (const string& nom);
- const string& findValue (const string& nom);
- int findInteger (const string& nom);
+ int findAttribute (const std::string& nom);
+ const std::string& findValue (const std::string& nom);
+ int findInteger (const std::string& nom);
cpchar getAttribute (int nro) { return tab_attributs [nro].c_str(); }
cpchar getValue (int nro) { return tab_values [nro].c_str(); }
- XmlTree* findChild (const string& nom);
+ XmlTree* findChild (const std::string& nom);
XmlTree* getChild (int nro) { return tab_items [nro]; }
XmlTree* getParent () { return xml_parent; }
// ------------------------- Modifications
- XmlTree* addChild (const string& nom);
- void addAttribut (const string& nom, const string& valeur);
- void setName (const string& nom) { item_name = nom; }
+ XmlTree* addChild (const std::string& nom);
+ void addAttribut (const std::string& nom, const std::string& valeur);
+ void setName (const std::string& nom) { item_name = nom; }
void dump (int niveau=0);
int goTo (cpchar ouca);
private :
int parseXml ();
int readLine ();
- EnumItem readItem (string& item);
- EnumItem getItem (string& item, EnumItem waited=M_NONE);
- int getString (string& item);
- int getIdent (string& item);
+ EnumItem readItem (std::string& item);
+ EnumItem getItem (std::string& item, EnumItem waited=M_NONE);
+ int getString (std::string& item);
+ int getIdent (std::string& item);
int getChar ();
void putError (cpchar why);
private :
- string item_name;
- string item_vide;
+ std::string item_name;
+ std::string item_vide;
int nbr_attributs;
int nbr_items;
XmlTree* xml_parent;
- vector <string> tab_attributs;
- vector <string> tab_values;
- vector <XmlTree*> tab_items;
+ std::vector <std::string> tab_attributs;
+ std::vector <std::string> tab_values;
+ std::vector <XmlTree*> tab_items;
// Lecture
- string fic_buffer;
+ std::string fic_buffer;
int len_buffer;
int nro_ligne;
int fic_pos;
int pext = strlen (nomfic) - 4;
if (pext > 0)
{
- string sext = &nomfic[pext];
+ std::string sext = &nomfic[pext];
set_minus (sext);
suff = sext != ".xml";
}
- string fname = nomfic;
+ std::string fname = nomfic;
if (suff)
fname += ".xml";
void XmlWriter::openMark (cpchar balise)
{
jumpLine ();
- string mot = "<";
+ std::string mot = "<";
mot += balise;
ecrire (mot);
// ========================================================= closeMark
void XmlWriter::closeMark (bool jump)
{
- string balise = pile_mark.top ();
- string mot = "</";
+ std::string balise = pile_mark.top ();
+ std::string mot = "</";
int etat = pile_etat.top ();
xml_level --;
xml_pos = xml_level * xml_decal;
if (xml_pos > 0)
{
- string space (xml_pos, ' ');
+ std::string space (xml_pos, ' ');
addMot (space.c_str());
}
}
// ========================================================= addAttribute
void XmlWriter::addAttribute (cpchar cle, cpchar valeur)
{
- string phrase = " ";
+ std::string phrase = " ";
phrase += cle;
phrase += " = \"";
phrase += valeur;
void addAttribute (cpchar attrib, cpchar valeur); // attrib="valeur"
void addAttribute (cpchar attrib, int valeur);
void addAttribute (cpchar attrib, double valeur);
- void addAttribute (cpchar attrib, string& valeur);
+ void addAttribute (cpchar attrib, std::string& valeur);
private :
void jumpLine ();
void alaLigne (bool force=false);
void ecrire (cpchar mot);
- void ecrire (string& mot) { ecrire (mot.c_str()) ; }
+ void ecrire (std::string& mot) { ecrire (mot.c_str()) ; }
void addMot (cpchar mot);
private :
addAttribute (attrib, buffer);
}
// ====================================================== addAttribute (stl)
-inline void XmlWriter::addAttribute (cpchar attrib, string& valeur)
+inline void XmlWriter::addAttribute (cpchar attrib, std::string& valeur)
{
addAttribute (attrib, valeur.c_str());
}
typedef const std::string& rcstring;
// Impressions de mise au point
#include <iostream>
-using namespace std;
-#define HexDisplay(x) cout << " ... " #x " = " << x << endl
-#define PutData(x) cout << " ... " #x " = " << x << endl
-#define PutCoord(x) cout << " ... " #x " = (" << x[0] << ", " \
- << x[1] << ", " << x[2] << ")" << endl
-#define Echo(m) cout << " _______________ " << m << endl
+#define HexDisplay(x) std::cout << " ... " #x " = " << x << std::endl
+#define PutData(x) std::cout << " ... " #x " = " << x << std::endl
+#define PutCoord(x) std::cout << " ... " #x " = (" << x[0] << ", " \
+ << x[1] << ", " << x[2] << ")" << std::endl
+#define Echo(m) std::cout << " _______________ " << m << std::endl
// #define Libere(obj) { if (obj!=NULL) free (obj) ; obj=NULL; }
// #define Destroy(obj) { delete obj ; obj=NULL ; }
HexaExport bool in_test (); // == getenv ("HEXA_TEST") > 0
HexaExport int niv_debug(); // Implemente prochainement
-HexaExport void set_minus (string& chaine);
+HexaExport void set_minus (std::string& chaine);
HexaExport bool special_option ();
HexaExport void set_special_option (bool opt);
HexaExport int sizeof_file (cpchar filename);
HexaExport char* read_file (cpchar filename, int& size);
-HexaExport cpchar get_time (string& buffer);
-HexaExport int make_basename (cpchar filename, string& base);
+HexaExport cpchar get_time (std::string& buffer);
+HexaExport int make_basename (cpchar filename, std::string& base);
const double Epsil = 1e-6;
const double UnEpsil = 0.999999;
}
// ======================================================== set_minus
-void set_minus (string& chaine)
+void set_minus (std::string& chaine)
{
int lg = chaine.size();
for (int nc=0 ; nc<lg ; nc++)
return buffer;
}
// ====================================================== get_time
-cpchar get_time (string& buffer)
+cpchar get_time (std::string& buffer)
{
char quand[24];
time_t tps;
&& requals (lun [1], lautre [1]) && requals (lun [2], lautre [2]) ;
}
// ======================================================== make_basename
-int make_basename (cpchar filename, string& base)
+int make_basename (cpchar filename, std::string& base)
{
const char slash = '/';
const char antis = '\\';
}
}
- cout << " nearest : " << vertex->getName()
+ std::cout << " nearest : " << vertex->getName()
<< " -> " << result->getName()
- << " ( " << px << ", " << py << ", " << pz << ") " << endl;
+ << " ( " << px << ", " << py << ", " << pz << ") " << std::endl;
return result;
}
// ======================================================== eplucher
-void eplucher (Hex::Document* doc, Hex::Elements* grid, string& radical)
+void eplucher (Hex::Document* doc, Hex::Elements* grid, std::string& radical)
{
int nbfic = 0;
int nbre = grid->countHexa();
for (int narg=1 ; narg<nbargs ; narg++)
{
- string arg = tabargs [narg];
+ std::string arg = tabargs [narg];
if (arg=="-cyl") pipe = false;
else if (arg=="-pipe") pipe = true;
else if (arg=="-left") t_left = true;
else if (arg=="-right") t_right = true;
else
{
- cout << " Syntax : " << endl;
- cout << " $ " << tabargs[0] << " <args> " << endl;
- cout << " avec args parmi :" << endl;
- cout << " -cyl : croisement de 2 cylindres " << endl;
- cout << " -pipe : croisement de 2 tuyaux " << endl;
- cout << " -left : Forme en T, barre a gauche " << endl;
- cout << " -right : Forme en T, barre a droite " << endl;
+ std::cout << " Syntax : " << std::endl;
+ std::cout << " $ " << tabargs[0] << " <args> " << std::endl;
+ std::cout << " avec args parmi :" << std::endl;
+ std::cout << " -cyl : croisement de 2 cylindres " << std::endl;
+ std::cout << " -pipe : croisement de 2 tuyaux " << std::endl;
+ std::cout << " -left : Forme en T, barre a gauche " << std::endl;
+ std::cout << " -right : Forme en T, barre a droite " << std::endl;
return HOK;
}
}
- string radical = pipe ? "makePipes" : "makeCylinders";
+ std::string radical = pipe ? "makePipes" : "makeCylinders";
double rext1 = 2*sqrt (2.0);
double rext2 = 3*sqrt (2.0);
save_file ();
Hex::Hexa* trou = plaque->getHexaIJK (1, 1, 0);
- vector <Hex::Vertex*> tabv0, tabv1;
+ std::vector <Hex::Vertex*> tabv0, tabv1;
for (int nv=0 ; nv<8 ; nv++)
tabv1.push_back (trou->getVertex(nv));
for (int nv=0 ; nv<8 ; nv++)
{
int ier = doc->mergeVertices (tabv0[nv], tabv1[nv]);
- cout << " nro = " << nv << ", ier = " << ier << endl;
+ std::cout << " nro = " << nv << ", ier = " << ier << std::endl;
Hex::what ();
save_file ();
}
QModelIndex DocumentModel::makeCartesian(const QModelIndex& icenter,
const QModelIndex& ibase, const QModelIndex& ivec, const QModelIndex& iaxis,
- vector<double>& radius, vector<double>& angles, vector<double>& heights)
+ std::vector<double>& radius, std::vector<double>& angles, std::vector<double>& heights)
{
QModelIndex result;
QModelIndex DocumentModel::makeSphere (QModelIndex& icenter,
QModelIndex& ivec_x, QModelIndex& ivec_z,
- vector<double>& tray, vector<double>& tang, vector<double>& thaut)
+ std::vector<double>& tray, std::vector<double>& tang, std::vector<double>& thaut)
{
QModelIndex result;
QModelIndex DocumentModel::makeSpherical (QModelIndex& icenter,
QModelIndex& ivec_x, QModelIndex& ivec_z,
- vector<double>& rayon,
+ std::vector<double>& rayon,
int crit)
{
QModelIndex result;
QModelIndex DocumentModel::makeRind (QModelIndex& icenter,
QModelIndex& ivec_x, QModelIndex& ivec_z,
- vector<double>& tray, vector<double>& tang, vector<double>& thaut)
+ std::vector<double>& tray, std::vector<double>& tang, std::vector<double>& thaut)
{
QModelIndex result;
}
QModelIndex DocumentModel::makeCylinder(QModelIndex& iorig, QModelIndex& ivecx, QModelIndex& ivecz,
- vector<double>& tray, vector<double>& tang, vector<double>& thaut)
+ std::vector<double>& tray, std::vector<double>& tang, std::vector<double>& thaut)
{
QModelIndex result;
}
QModelIndex DocumentModel::makePipe(QModelIndex& iorig, QModelIndex& ivecx, QModelIndex& ivecz,
- vector<double>& tray, vector<double>& tang, vector<double>& thaut)
+ std::vector<double>& tray, std::vector<double>& tang, std::vector<double>& thaut)
{
QModelIndex result;
}
QModelIndex DocumentModel::joinQuad(QModelIndex& istart, QModelIndex& idest, QModelIndex& iva1, QModelIndex& ivb1,
- QModelIndex& iva2, QModelIndex& ivb2, vector<double>& tlen)
+ QModelIndex& iva2, QModelIndex& ivb2, std::vector<double>& tlen)
{
QModelIndex result;
}
QModelIndex DocumentModel::joinQuads(QModelIndexList& istarts, QModelIndex& idest, QModelIndex& iva1, QModelIndex& ivb1,
- QModelIndex& iva2, QModelIndex& ivb2, vector<double>& tlen)
+ QModelIndex& iva2, QModelIndex& ivb2, std::vector<double>& tlen)
{
QModelIndex result;
}
QModelIndex DocumentModel::revolutionQuad(QModelIndex& istart, QModelIndex& icenter, QModelIndex& iaxis,
- vector<double>& angles)
+ std::vector<double>& angles)
{
QModelIndex result;
}
QModelIndex DocumentModel::revolutionQuads(QModelIndexList& istarts, QModelIndex& icenter, QModelIndex& iaxis,
- vector<double>& angles)
+ std::vector<double>& angles)
{
QModelIndex result;
return result;
}
-QModelIndex DocumentModel::extrudeQuad(QModelIndex& istart, QModelIndex& dv, vector<double>& tlen)
+QModelIndex DocumentModel::extrudeQuad(QModelIndex& istart, QModelIndex& dv, std::vector<double>& tlen)
{
QModelIndex result;
return result;
}
-QModelIndex DocumentModel::extrudeQuads(QModelIndexList& istarts, QModelIndex& iaxis, vector<double>& tlen)
+QModelIndex DocumentModel::extrudeQuads(QModelIndexList& istarts, QModelIndex& iaxis, std::vector<double>& tlen)
{
QModelIndex result;
return result;
}
-QModelIndex DocumentModel::cut(QModelIndex& iEdge, vector<double>& tlen)
+QModelIndex DocumentModel::cut(QModelIndex& iEdge, std::vector<double>& tlen)
{
QModelIndex result;
QModelIndex makeCartesianUni(const QModelIndex& icenter, const QModelIndex& ibase, const QModelIndex& ivec,
const QModelIndex& iaxis, double lx, double ly, double lz, int nx, int ny, int nz);
QModelIndex makeCartesian(const QModelIndex& icenter, const QModelIndex& ibase, const QModelIndex& ivec,
- const QModelIndex& iaxis, vector<double>& radius, vector<double>& angles, vector<double>& heights);
+ const QModelIndex& iaxis, std::vector<double>& radius, std::vector<double>& angles, std::vector<double>& heights);
// ====== SPHERE
QModelIndex makeSphere (QModelIndex& icenter,
QModelIndex& ivec_x, QModelIndex& ivec_z,
- vector<double>& tray, vector<double>& tang, vector<double>& thaut);
+ std::vector<double>& tray, std::vector<double>& tang, std::vector<double>& thaut);
// ====== SPHERICAL
QModelIndex makeSpherical (QModelIndex& icenter,
QModelIndex& ivec_x, QModelIndex& ivec_z,
- vector<double>& rayon,
+ std::vector<double>& rayon,
int crit);
// =========== RIND
QModelIndex makeRind (QModelIndex& icenter,
QModelIndex& ivec_x, QModelIndex& ivec_z,
- vector<double>& tray, vector<double>& tang, vector<double>& thaut);
+ std::vector<double>& tray, std::vector<double>& tang, std::vector<double>& thaut);
// ======== Cylinder
QModelIndex makeCylinderTop(int nr, int na, int nh);
int nr, int na, int nh);
QModelIndex makeCylinder (QModelIndex& iorig, QModelIndex& ivecx, QModelIndex& ivecz,
- vector<double>& tray, vector<double>& tang, vector<double>& thaut);
+ std::vector<double>& tray, std::vector<double>& tang, std::vector<double>& thaut);
// ======== Cylinders
QModelIndex makeCylinders (QModelIndex& iorig1, QModelIndex& ivecz1, double r1, double h1,
int nr, int na, int nh);
QModelIndex makePipe (QModelIndex& iorig, QModelIndex& ivecx, QModelIndex& ivecz,
- vector<double>& tray, vector<double>& tang, vector<double>& thaut);
+ std::vector<double>& tray, std::vector<double>& tang, std::vector<double>& thaut);
// ======== Pipes
QModelIndex makePipes (QModelIndex& iorig1, QModelIndex& ivecz1, double rint1, double rex1, double h1,
QModelIndex& iv3, QModelIndex& iv4, int nb);
QModelIndex joinQuad (QModelIndex& istart, QModelIndex& idest, QModelIndex& iva1, QModelIndex& ivb1,
- QModelIndex& iva2, QModelIndex& ivb2, vector<double>& tlen);
+ QModelIndex& iva2, QModelIndex& ivb2, std::vector<double>& tlen);
QModelIndex joinQuadsUni (QModelIndexList& istarts, QModelIndex& idest, QModelIndex& iv1, QModelIndex& iv2,
QModelIndex& iv3, QModelIndex& iv4, int nb);
QModelIndex joinQuads (QModelIndexList& istarts, QModelIndex& idest, QModelIndex& iva1, QModelIndex& ivb1,
- QModelIndex& iva2, QModelIndex& ivb2, vector<double>& tlen);
+ QModelIndex& iva2, QModelIndex& ivb2, std::vector<double>& tlen);
// ======== Quad Revolution
QModelIndex revolutionQuadUni(QModelIndex& istart, QModelIndex& icenter, QModelIndex& iaxis,
double angle, int nbre);
QModelIndex revolutionQuad(QModelIndex& istart, QModelIndex& icenter, QModelIndex& iaxis,
- vector<double>& angles);
+ std::vector<double>& angles);
QModelIndex revolutionQuadsUni(QModelIndexList& istarts, QModelIndex& icenter, QModelIndex& iaxis,
double angle, int nbre);
QModelIndex revolutionQuads(QModelIndexList& istarts, QModelIndex& icenter, QModelIndex& iaxis,
- vector<double>& angles);
+ std::vector<double>& angles);
// ==== PrismQuad or ExtrudeQuad
QModelIndex extrudeQuadTop (QModelIndex& istart, int nbre);
QModelIndex extrudeQuadUni (QModelIndex& istart, QModelIndex& dv, double len, int nbre);
- QModelIndex extrudeQuad (QModelIndex& istart, QModelIndex& dv, vector<double>& tlen);
+ QModelIndex extrudeQuad (QModelIndex& istart, QModelIndex& dv, std::vector<double>& tlen);
QModelIndex extrudeQuadsTop (QModelIndexList& istarts, int nbre);
QModelIndex extrudeQuadsUni (QModelIndexList& istarts, QModelIndex& axis, double len, int nbre);
- QModelIndex extrudeQuads (QModelIndexList& istarts, QModelIndex& iaxis, vector<double>& tlen);
+ QModelIndex extrudeQuads (QModelIndexList& istarts, QModelIndex& iaxis, std::vector<double>& tlen);
// ==== Cut Edge
QModelIndex cutUni (QModelIndex& iEdge, int nbre);
- QModelIndex cut (QModelIndex& iEdge, vector<double>& tlen);
+ QModelIndex cut (QModelIndex& iEdge, std::vector<double>& tlen);
// ============================== END NEW ================================
%include "std_vector.i"
namespace std
{
-%template(VectorHexas) vector <Hex::Hexa*>;
-%template(VectorQuads) vector <Hex::Quad*>;
-%template(VectorEdges) vector <Hex::Edge*>;
-%template(VectorVertices) vector <Hex::Vertex*>;
-%template(VectorShapes) vector <Hex::NewShape*>;
-%template(VectorReal) vector <double>;
-%template(VectorInt) vector <int>;
+%template(VectorHexas) std::vector <Hex::Hexa*>;
+%template(VectorQuads) std::vector <Hex::Quad*>;
+%template(VectorEdges) std::vector <Hex::Edge*>;
+%template(VectorVertices) std::vector <Hex::Vertex*>;
+%template(VectorShapes) std::vector <Hex::NewShape*>;
+%template(VectorReal) std::vector <double>;
+%template(VectorInt) std::vector <int>;
}
%include "hexa_base.hxx"
SWIGINTERN PyObject *_wrap_set_minus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
- string *arg1 = 0 ;
+ std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "set_minus" "', argument " "1"" of type '" "string &""'");
}
- arg1 = reinterpret_cast< string * >(argp1);
+ arg1 = reinterpret_cast< std::string * >(argp1);
Hex::set_minus(*arg1);
resultobj = SWIG_Py_Void();
return resultobj;
SWIGINTERN PyObject *_wrap_get_time(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
- string *arg1 = 0 ;
+ std::string *arg1 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
if (!argp1) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "get_time" "', argument " "1"" of type '" "string &""'");
}
- arg1 = reinterpret_cast< string * >(argp1);
+ arg1 = reinterpret_cast< std::string * >(argp1);
result = (cpchar)Hex::get_time(*arg1);
resultobj = SWIG_FromCharPtr((const char *)result);
return resultobj;
SWIGINTERN PyObject *_wrap_make_basename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
cpchar arg1 = (cpchar) 0 ;
- string *arg2 = 0 ;
+ std::string *arg2 = 0 ;
int res1 ;
char *buf1 = 0 ;
int alloc1 = 0 ;
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "make_basename" "', argument " "2"" of type '" "string &""'");
}
- arg2 = reinterpret_cast< string * >(argp2);
+ arg2 = reinterpret_cast< std::string * >(argp2);
result = (int)Hex::make_basename((char const *)arg1,*arg2);
resultobj = SWIG_From_int(static_cast< int >(result));
if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
SWIGINTERN PyObject *_wrap_EltBase_setName__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Hex::EltBase *arg1 = (Hex::EltBase *) 0 ;
- string *arg2 = 0 ;
+ std::string *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "EltBase_setName" "', argument " "2"" of type '" "string const &""'");
}
- arg2 = reinterpret_cast< string * >(argp2);
- (arg1)->setName((string const &)*arg2);
+ arg2 = reinterpret_cast< std::string * >(argp2);
+ (arg1)->setName((std::string const &)*arg2);
resultobj = SWIG_Py_Void();
return resultobj;
fail:
void *argp1 = 0 ;
int res1 = 0 ;
PyObject * obj0 = 0 ;
- string result;
+ std::string result;
if (!PyArg_ParseTuple(args,(char *)"O:EltBase_getNextName",&obj0)) SWIG_fail;
res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_Hex__EltBase, 0 | 0 );
}
arg1 = reinterpret_cast< Hex::EltBase * >(argp1);
result = (arg1)->getNextName();
- resultobj = SWIG_NewPointerObj((new string(static_cast< const string& >(result))), SWIGTYPE_p_string, SWIG_POINTER_OWN | 0 );
+ resultobj = SWIG_NewPointerObj((new std::string(static_cast< const std::string& >(result))), SWIGTYPE_p_string, SWIG_POINTER_OWN | 0 );
return resultobj;
fail:
return NULL;
SWIGINTERN PyObject *_wrap_Hex_findDocument__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
PyObject *resultobj = 0;
Hex::Hex *arg1 = (Hex::Hex *) 0 ;
- string *arg2 = 0 ;
+ std::string *arg2 = 0 ;
void *argp1 = 0 ;
int res1 = 0 ;
void *argp2 = 0 ;
if (!argp2) {
SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Hex_findDocument" "', argument " "2"" of type '" "string const &""'");
}
- arg2 = reinterpret_cast< string * >(argp2);
- result = (Hex::Document *)(arg1)->findDocument((string const &)*arg2);
+ arg2 = reinterpret_cast< std::string * >(argp2);
+ result = (Hex::Document *)(arg1)->findDocument((std::string const &)*arg2);
resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Hex__Document, 0 | 0 );
return resultobj;
fail: