1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

Coding, TKXSBase - Translation to English (#679)

- Updated French comments to English for better accessibility and understanding.
- Enhanced clarity of comments to better describe the functionality and purpose of the code.
- Ensured consistency in terminology and phrasing throughout the codebase.
- Made minor adjustments to comment formatting for improved readability.
This commit is contained in:
Pasukhin Dmitry
2025-08-17 19:42:21 +01:00
committed by GitHub
parent 5ae60b51d3
commit 3eb7ce1ffd
109 changed files with 1097 additions and 1099 deletions

View File

@@ -15,11 +15,11 @@
#include <Interface_Graph.hxx> #include <Interface_Graph.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
// AllConnected prend toutes les Entites connectees a une Entite donnee // AllConnected takes all Entities connected to a given Entity
// c-a-d toutes les "Shared" + toutes les "Sharings" et on recommence // i.e. all "Shared" + all "Sharings" and we restart
// Autrement dit le contenu du "Composant Connexe" du graphe d'ensemble // In other words the content of the "Connected Component" of the overall graph
// qui contient cette entite // which contains this entity
// Le calcul est effectue par GetFromEntity (Evaluate n'a rien a faire) // The calculation is performed by GetFromEntity (Evaluate has nothing to do)
IFGraph_AllConnected::IFGraph_AllConnected(const Interface_Graph& agraph) IFGraph_AllConnected::IFGraph_AllConnected(const Interface_Graph& agraph)
: thegraph(agraph) : thegraph(agraph)
{ {
@@ -54,4 +54,4 @@ void IFGraph_AllConnected::ResetData()
void IFGraph_AllConnected::Evaluate() void IFGraph_AllConnected::Evaluate()
{ {
GetFromGraph(thegraph); GetFromGraph(thegraph);
} // GetFromEntity a tout fait } // GetFromEntity did everything

View File

@@ -34,7 +34,7 @@ IFGraph_AllShared::IFGraph_AllShared(const Interface_Graph& agraph,
void IFGraph_AllShared::GetFromEntity(const Handle(Standard_Transient)& ent) void IFGraph_AllShared::GetFromEntity(const Handle(Standard_Transient)& ent)
{ {
thegraph.GetFromEntity(ent, Standard_True); thegraph.GetFromEntity(ent, Standard_True);
} // le fait pour nous } // does it for us
void IFGraph_AllShared::GetFromIter(const Interface_EntityIterator& iter) void IFGraph_AllShared::GetFromIter(const Interface_EntityIterator& iter)
{ {

View File

@@ -17,8 +17,8 @@
#include <Interface_InterfaceModel.hxx> #include <Interface_InterfaceModel.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
// Points d'Articulation d'un Graphe : ce sont les "passages obliges" du graphe // Articulation Points of a Graph: these are the "required passages" of the graph
// Algorithme tire du Sedgewick, p 392 // Algorithm taken from Sedgewick, p 392
IFGraph_Articulations::IFGraph_Articulations(const Interface_Graph& agraph, IFGraph_Articulations::IFGraph_Articulations(const Interface_Graph& agraph,
const Standard_Boolean whole) const Standard_Boolean whole)
: thegraph(agraph) : thegraph(agraph)
@@ -46,9 +46,9 @@ void IFGraph_Articulations::ResetData()
void IFGraph_Articulations::Evaluate() void IFGraph_Articulations::Evaluate()
{ {
// Algorithme, cf Sedgewick "Algorithms", p 392 // Algorithm, see Sedgewick "Algorithms", p 392
thelist = new TColStd_HSequenceOfInteger(); thelist = new TColStd_HSequenceOfInteger();
// Utilisation de Visit // Use of Visit
Standard_Integer nb = thegraph.Size(); Standard_Integer nb = thegraph.Size();
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
{ {
@@ -56,7 +56,7 @@ void IFGraph_Articulations::Evaluate()
if (thegraph.IsPresent(i)) if (thegraph.IsPresent(i))
Visit(i); Visit(i);
} }
// Resultat dans thelist // Result in thelist
Reset(); Reset();
Standard_Integer nbres = thelist->Length(); Standard_Integer nbres = thelist->Length();
for (Standard_Integer ires = 1; ires <= nbres; ires++) for (Standard_Integer ires = 1; ires <= nbres; ires++)
@@ -82,14 +82,14 @@ Standard_Integer IFGraph_Articulations::Visit(const Standard_Integer num)
thegraph.GetFromEntity(ent, Standard_False); thegraph.GetFromEntity(ent, Standard_False);
nument = thegraph.EntityNumber(ent); nument = thegraph.EntityNumber(ent);
} }
Standard_Integer statent = thegraph.Status(nument); // pas reevalue Standard_Integer statent = thegraph.Status(nument); // not reevaluated
if (statent == 0) if (statent == 0)
{ {
Standard_Integer mm = Visit(nument); Standard_Integer mm = Visit(nument);
if (mm < min) if (mm < min)
min = mm; min = mm;
if (mm > thegraph.Status(num)) if (mm > thegraph.Status(num))
thelist->Append(num); // ON EN A UN : num thelist->Append(num); // WE HAVE ONE: num
} }
else if (statent < min) else if (statent < min)
min = statent; min = statent;

View File

@@ -17,10 +17,10 @@
#include <Interface_Graph.hxx> #include <Interface_Graph.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
// Comparateur de deux sous-ensembles d un Modele // Comparator of two subsets of a Model
// Au premier sous-ensemble, est attribue le Status 1 // To the first subset, Status 1 is assigned
// Au deuxieme sous-ensemble, est attribue le Status 2 // To the second subset, Status 2 is assigned
// La partie commune se voit attribuer le Status 3 // The common part is assigned Status 3
IFGraph_Compare::IFGraph_Compare(const Interface_Graph& agraph) IFGraph_Compare::IFGraph_Compare(const Interface_Graph& agraph)
: thegraph(agraph) : thegraph(agraph)
{ {
@@ -70,7 +70,7 @@ void IFGraph_Compare::ResetData()
void IFGraph_Compare::Evaluate() void IFGraph_Compare::Evaluate()
{ {
Reset(); Reset();
GetFromGraph(thegraph); // Evaluation deja faite par le graphe GetFromGraph(thegraph); // Evaluation already done by the graph
} }
Interface_EntityIterator IFGraph_Compare::Common() const Interface_EntityIterator IFGraph_Compare::Common() const

View File

@@ -16,12 +16,12 @@
#include <Interface_Graph.hxx> #include <Interface_Graph.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
// Pour travailler, ConnectedComponants exploite AllConnected : // To work, ConnectedComponants exploits AllConnected:
// On prend un 1er Vertex, on determine ses AllConnected -> voila un 1er // Take a 1st Vertex, determine its AllConnected -> here is a 1st
// Connected Component // Connected Component
// On recommence jusqu'a ce qu'il n'y ait plus de Vertex libre // Restart until there are no more free Vertices
// Honnetement, si ca ne marche pas, cf classe ConnectedVerticesIterator // Honestly, if it doesn't work, see ConnectedVerticesIterator class
// de GraphTools qui fait en principe la meme chose // from GraphTools which does basically the same thing
IFGraph_ConnectedComponants::IFGraph_ConnectedComponants(const Interface_Graph& agraph, IFGraph_ConnectedComponants::IFGraph_ConnectedComponants(const Interface_Graph& agraph,
const Standard_Boolean whole) const Standard_Boolean whole)
: IFGraph_SubPartsIterator(agraph, whole) : IFGraph_SubPartsIterator(agraph, whole)
@@ -30,9 +30,9 @@ IFGraph_ConnectedComponants::IFGraph_ConnectedComponants(const Interface_Graph&
void IFGraph_ConnectedComponants::Evaluate() void IFGraph_ConnectedComponants::Evaluate()
{ {
// On part des "loaded" // Start from "loaded"
// Pour chacun : s il est note dans le graphe, on passe // For each: if it is noted in the graph, we pass
// Sinon, on ajoute les AllConnected en tant que sub-part // Otherwise, add the AllConnected as sub-part
Interface_EntityIterator loaded = Loaded(); Interface_EntityIterator loaded = Loaded();
Reset(); Reset();
for (loaded.Start(); loaded.More(); loaded.Next()) for (loaded.Start(); loaded.More(); loaded.Next())

View File

@@ -18,13 +18,13 @@
#include <Interface_InterfaceModel.hxx> #include <Interface_InterfaceModel.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
// Calcul de cumul // Cumulation calculation
// Tres simple, on note les entites demandees, et a la fin // Very simple, we note the requested entities, and at the end
// on a le cumul lui-meme, et comme infos derivees, les doubles et les oublis // we have the cumulation itself, and as derived info, the duplicates and omissions
// Chaque recouvrement correspond a une augmentation de UN du status // Each overlap corresponds to an increase of ONE in the status
// Les status demarrent a 2, ainsi a l ajout d une entite, on distingue bien // Status starts at 2, thus when adding an entity, we distinguish well
// entre les entites nouvelles, liees a cet appel (statut temporaire 1) et les // between new entities, linked to this call (temporary status 1) and the
// autres (statut superieur ou egal a 2) // others (status greater than or equal to 2)
IFGraph_Cumulate::IFGraph_Cumulate(const Interface_Graph& agraph) IFGraph_Cumulate::IFGraph_Cumulate(const Interface_Graph& agraph)
: thegraph(agraph) : thegraph(agraph)
{ {
@@ -45,13 +45,13 @@ void IFGraph_Cumulate::ResetData()
void IFGraph_Cumulate::GetFromIter(const Interface_EntityIterator& iter) void IFGraph_Cumulate::GetFromIter(const Interface_EntityIterator& iter)
{ {
thegraph.GetFromIter(iter, 1, 1, Standard_True); thegraph.GetFromIter(iter, 1, 1, Standard_True);
thegraph.ChangeStatus(1, 2); // une fois le calcul fait thegraph.ChangeStatus(1, 2); // once the calculation is done
} }
void IFGraph_Cumulate::Evaluate() void IFGraph_Cumulate::Evaluate()
{ {
Reset(); Reset();
GetFromGraph(thegraph); // evaluation deja faite dans le graphe GetFromGraph(thegraph); // evaluation already done in the graph
} }
Interface_EntityIterator IFGraph_Cumulate::Overlapped() const Interface_EntityIterator IFGraph_Cumulate::Overlapped() const

View File

@@ -16,8 +16,8 @@
#include <Interface_Graph.hxx> #include <Interface_Graph.hxx>
#include <Interface_GraphContent.hxx> #include <Interface_GraphContent.hxx>
// Cycles utilise les services de StrongComponants : // Cycles uses the services of StrongComponants :
// Il retient les Strong Componants qui ne sont pas Single // It retains the Strong Componants which are not Single
IFGraph_Cycles::IFGraph_Cycles(const Interface_Graph& agraph, const Standard_Boolean whole) IFGraph_Cycles::IFGraph_Cycles(const Interface_Graph& agraph, const Standard_Boolean whole)
: IFGraph_SubPartsIterator(agraph, whole) : IFGraph_SubPartsIterator(agraph, whole)
{ {

View File

@@ -16,12 +16,12 @@
#include <Interface_Graph.hxx> #include <Interface_Graph.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
// ExternalSources exploite les resultats stockes dans le Graphe sur Sharings // ExternalSources exploits the results stored in the Graph on Sharings
// Soit les "Sharings" des entites notees par GetFromEntity et GetFromIter // Either the "Sharings" of entities noted by GetFromEntity and GetFromIter
// Celles des "Sharings" qui n etaient pas deja notees sont ExternalSources // Those of the "Sharings" that were not already noted are ExternalSources
// Les status : // The status:
// - Les entites de depart sont au Status 0 // - The starting entities are at Status 0
// - Les entites Sharing NOUVELLES (ExternalSources) sont au Status 1 // - The NEW Sharing entities (ExternalSources) are at Status 1
IFGraph_ExternalSources::IFGraph_ExternalSources(const Interface_Graph& agraph) IFGraph_ExternalSources::IFGraph_ExternalSources(const Interface_Graph& agraph)
: thegraph(agraph) : thegraph(agraph)
{ {

View File

@@ -28,10 +28,10 @@ IFGraph_SCRoots::IFGraph_SCRoots(IFGraph_StrongComponants& subparts)
{ {
} }
// StrongComponants racines d un ensemble donne // Root StrongComponants of a given set
// On ne tient pas compte du reste eventuel (c est un autre probleme) // We don't consider the possible remainder (it's another problem)
// On part du fait que StrongComponants donne les Composants dans l ordre de // We start from the fact that StrongComponants gives Components in the order of
// dependance, le premier ne dependant de rien (les autres, on ne sait pas ...) // dependence, the first depending on nothing (the others, we don't know ...)
void IFGraph_SCRoots::Evaluate() void IFGraph_SCRoots::Evaluate()
{ {
@@ -48,11 +48,11 @@ void IFGraph_SCRoots::Evaluate()
Handle(Standard_Transient) ent = complist.FirstEntity(); Handle(Standard_Transient) ent = complist.FirstEntity();
Standard_Integer num = G.EntityNumber(ent); Standard_Integer num = G.EntityNumber(ent);
#ifdef OCCT_DEBUG #ifdef OCCT_DEBUG
std::cout << " Iteration,num=" << num << (G.IsPresent(num) ? " Pris" : " A prendre") std::cout << " Iteration,num=" << num << (G.IsPresent(num) ? " Taken" : " To take")
<< std::endl; << std::endl;
#endif #endif
if (!G.IsPresent(num)) if (!G.IsPresent(num))
{ // enregistrer pour suivants { // register for following
G.GetFromEntity(ent, Standard_True); G.GetFromEntity(ent, Standard_True);
Interface_EntityIterator list = complist.Entities(); Interface_EntityIterator list = complist.Entities();
AddPart(); AddPart();
@@ -61,7 +61,7 @@ void IFGraph_SCRoots::Evaluate()
} }
} }
/* ce qui suit, c etait autre chose : les SC qui n ont pas d ExternalSource /* what follows, it was something else: the SC that have no ExternalSource
Interface_EntityIterator list = complist.Entities(); Interface_EntityIterator list = complist.Entities();
IFGraph_ExternalSources eval (Model()); IFGraph_ExternalSources eval (Model());
eval.GetFromIter(list); eval.GetFromIter(list);

View File

@@ -21,9 +21,9 @@
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
#include <TColStd_Array1OfInteger.hxx> #include <TColStd_Array1OfInteger.hxx>
// SubPartsIterator permet de regrouper les entites en plusieurs sous-parties // SubPartsIterator allows grouping entities into several sub-parts
// A chaque sous-partie est attache un Status : la 1re a 1, la 2e a 2, etc... // To each sub-part is attached a Status : the 1st has 1, the 2nd has 2, etc...
// (consequence, les sous-parties sont necessairement disjointes) // (consequence, the sub-parts are necessarily disjoint)
IFGraph_SubPartsIterator::IFGraph_SubPartsIterator(const Interface_Graph& agraph, IFGraph_SubPartsIterator::IFGraph_SubPartsIterator(const Interface_Graph& agraph,
const Standard_Boolean whole) const Standard_Boolean whole)
: thegraph(agraph) : thegraph(agraph)
@@ -52,7 +52,7 @@ IFGraph_SubPartsIterator::IFGraph_SubPartsIterator(IFGraph_SubPartsIterator& oth
if (thegraph.Status(i) == thepart) if (thegraph.Status(i) == thepart)
nbent++; nbent++;
} }
theparts->Append(nbent); // compte vide theparts->Append(nbent); // empty count
} }
thepart = 0; thepart = 0;
thecurr = 1; thecurr = 1;
@@ -62,8 +62,8 @@ void IFGraph_SubPartsIterator::GetParts(IFGraph_SubPartsIterator& other)
{ {
if (Model() != other.Model()) if (Model() != other.Model())
throw Interface_InterfaceError("SubPartsIterator : GetParts"); throw Interface_InterfaceError("SubPartsIterator : GetParts");
// On AJOUTE les Parts de other, sans perdre les siennes propres // We ADD the Parts from other, without losing our own
// (meme principe que le constructeur ci-dessus) // (same principle as the constructor above)
Standard_Integer nb = thegraph.Size(); Standard_Integer nb = thegraph.Size();
thepart = theparts->Length(); thepart = theparts->Length();
for (other.Start(); other.More(); other.Next()) for (other.Start(); other.More(); other.Next())
@@ -76,7 +76,7 @@ void IFGraph_SubPartsIterator::GetParts(IFGraph_SubPartsIterator& other)
if (thegraph.Status(i) == thepart) if (thegraph.Status(i) == thepart)
nbent++; nbent++;
} }
theparts->Append(nbent); // compte vide theparts->Append(nbent); // empty count
} }
} }
@@ -85,7 +85,7 @@ const Interface_Graph& IFGraph_SubPartsIterator::Graph() const
return thegraph; return thegraph;
} }
// .... Gestion Interne (remplissage, etc...) .... // // .... Internal Management (filling, etc...) .... //
Handle(Interface_InterfaceModel) IFGraph_SubPartsIterator::Model() const Handle(Interface_InterfaceModel) IFGraph_SubPartsIterator::Model() const
{ {
@@ -139,10 +139,9 @@ void IFGraph_SubPartsIterator::Reset()
thecurr = 0; thecurr = 0;
} }
// .... Resultat (Evaluation, Iterations) .... // // .... Result (Evaluation, Iterations) .... //
void IFGraph_SubPartsIterator::Evaluate() { void IFGraph_SubPartsIterator::Evaluate() {} // by default, does nothing; redefined by subclasses
} // par defaut, ne fait rien; redefinie par les sous-classes
Interface_GraphContent IFGraph_SubPartsIterator::Loaded() const Interface_GraphContent IFGraph_SubPartsIterator::Loaded() const
{ {
@@ -188,7 +187,7 @@ Standard_Integer IFGraph_SubPartsIterator::EntityPartNum(
void IFGraph_SubPartsIterator::Start() void IFGraph_SubPartsIterator::Start()
{ {
Evaluate(); Evaluate();
// On evalue les tailles des contenus des Parts // Evaluate the sizes of the Parts contents
Standard_Integer nb = thegraph.Size(); Standard_Integer nb = thegraph.Size();
Standard_Integer nbp = theparts->Length(); Standard_Integer nbp = theparts->Length();
if (thepart > nbp) if (thepart > nbp)
@@ -197,9 +196,9 @@ void IFGraph_SubPartsIterator::Start()
{ {
thecurr = 1; thecurr = 1;
return; return;
} // L Iteration s arrete de suite } // Iteration stops immediately
// - On fait les comptes (via tableaux pour performances) // - Perform counts (via arrays for performance)
TColStd_Array1OfInteger partcounts(1, nbp); TColStd_Array1OfInteger partcounts(1, nbp);
partcounts.Init(0); partcounts.Init(0);
TColStd_Array1OfInteger partfirsts(1, nbp); TColStd_Array1OfInteger partfirsts(1, nbp);
@@ -216,7 +215,7 @@ void IFGraph_SubPartsIterator::Start()
if (nbent == 0) if (nbent == 0)
partfirsts.SetValue(nump, i); partfirsts.SetValue(nump, i);
} }
// - On les met en forme (c-a-d dans les sequences) // - Format them (i.e. in sequences)
theparts->Clear(); theparts->Clear();
thefirsts->Clear(); thefirsts->Clear();
Standard_Integer lastp = 0; Standard_Integer lastp = 0;
@@ -230,7 +229,7 @@ void IFGraph_SubPartsIterator::Start()
} }
if (lastp < nbp) if (lastp < nbp)
theparts->Remove(lastp + 1, nbp); theparts->Remove(lastp + 1, nbp);
// Enfin, on se prepare a iterer // Finally, prepare to iterate
thecurr = 1; thecurr = 1;
} }
@@ -247,7 +246,7 @@ void IFGraph_SubPartsIterator::Next()
if (thecurr > theparts->Length()) if (thecurr > theparts->Length())
return; return;
if (theparts->Value(thecurr) == 0) if (theparts->Value(thecurr) == 0)
Next(); // sauter parties vides Next(); // skip empty parts
} }
Standard_Boolean IFGraph_SubPartsIterator::IsSingle() const Standard_Boolean IFGraph_SubPartsIterator::IsSingle() const
@@ -277,7 +276,7 @@ Interface_EntityIterator IFGraph_SubPartsIterator::Entities() const
if (nument == 0) if (nument == 0)
return iter; return iter;
if (theparts->Value(thecurr) == 1) if (theparts->Value(thecurr) == 1)
nb = nument; // evident : 1 seule Entite nb = nument; // obvious: 1 single Entity
for (Standard_Integer i = nument; i <= nb; i++) for (Standard_Integer i = nument; i <= nb; i++)
{ {
if (thegraph.Status(i) == thecurr && thegraph.IsPresent(i)) if (thegraph.Status(i) == thecurr && thegraph.IsPresent(i))

View File

@@ -15,8 +15,8 @@
#include <IFSelect_SessionFile.hxx> #include <IFSelect_SessionFile.hxx>
#include <IFSelect_WorkSession.hxx> #include <IFSelect_WorkSession.hxx>
// Methodes de confort, evitant de devoir connaitre SessionFile, qui est un // Convenience methods, avoiding having to know SessionFile, which is a
// Tool non destine a l export (en particulier, pas un Handle) // Tool not intended for export (in particular, not a Handle)
Standard_Boolean IFSelect::SaveSession(const Handle(IFSelect_WorkSession)& WS, Standard_Boolean IFSelect::SaveSession(const Handle(IFSelect_WorkSession)& WS,
const Standard_CString file) const Standard_CString file)
{ {

View File

@@ -45,8 +45,8 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_BasicDumper, IFSelect_SessionDumper)
// #include <IFSelect_SelectTextType.hxx> // #include <IFSelect_SelectTextType.hxx>
#define FIRSTCHAR 1 #define FIRSTCHAR 1
// Param litteral "own" sous la forme :"<val>" -> first = 3 // Literal param "own" in the form :"<val>" -> first = 3
// A present, forme simplifiee : <val> directement -> first = 1 // Now, simplified form : <val> directly -> first = 1
IFSelect_BasicDumper::IFSelect_BasicDumper() {} IFSelect_BasicDumper::IFSelect_BasicDumper() {}

View File

@@ -174,7 +174,7 @@ Standard_Boolean IFSelect_ContextModif::IsTransferred(const Handle(Standard_Tran
Standard_Boolean IFSelect_ContextModif::IsSelected(const Handle(Standard_Transient)& ent) const Standard_Boolean IFSelect_ContextModif::IsSelected(const Handle(Standard_Transient)& ent) const
{ {
// Select a deja verifie "IsTransferred" // Select already verified "IsTransferred"
Standard_Integer num = thegraf.EntityNumber(ent); Standard_Integer num = thegraf.EntityNumber(ent);
if (num == 0) if (num == 0)
return Standard_False; return Standard_False;

View File

@@ -21,7 +21,7 @@
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_DispGlobal, IFSelect_Dispatch) IMPLEMENT_STANDARD_RTTIEXT(IFSelect_DispGlobal, IFSelect_Dispatch)
// Genere un seul paquet avec la sortie finale // Generates a single packet with the final output
IFSelect_DispGlobal::IFSelect_DispGlobal() {} IFSelect_DispGlobal::IFSelect_DispGlobal() {}
TCollection_AsciiString IFSelect_DispGlobal::Label() const TCollection_AsciiString IFSelect_DispGlobal::Label() const
@@ -36,7 +36,7 @@ Standard_Boolean IFSelect_DispGlobal::LimitedMax(const Standard_Integer /* nbent
return Standard_True; return Standard_True;
} }
// 1 packet ( a partir de UniqueResult) // 1 packet (from UniqueResult)
void IFSelect_DispGlobal::Packets(const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const void IFSelect_DispGlobal::Packets(const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const
{ {
packs.AddPart(); packs.AddPart();

View File

@@ -69,9 +69,9 @@ void IFSelect_DispPerCount::Packets(const Interface_Graph& G, IFGraph_SubPartsIt
IFGraph_SCRoots roots(G, Standard_False); IFGraph_SCRoots roots(G, Standard_False);
roots.SetLoad(); roots.SetLoad();
roots.GetFromIter(FinalSelection()->UniqueResult(G)); roots.GetFromIter(FinalSelection()->UniqueResult(G));
// SCRoots a initie la resolution : decoupage en StrongComponants + selection // SCRoots initiated the resolution: splitting into StrongComponents + selection
// des racines. Un paquet correspond des lors a <count> racines // of roots. A packet then corresponds to <count> roots
// Donc, il faut iterer sur les Parts de roots et les prendre par <count> // Therefore, we must iterate on the Parts of roots and take them by <count>
Standard_Integer i = 0; Standard_Integer i = 0;
for (roots.Start(); roots.More(); roots.Next()) for (roots.Start(); roots.More(); roots.Next())

View File

@@ -42,7 +42,7 @@ Standard_Integer IFSelect_DispPerFiles::CountValue() const
if (!thecount.IsNull()) if (!thecount.IsNull())
pcount = thecount->Value(); pcount = thecount->Value();
if (pcount <= 0) if (pcount <= 0)
pcount = 1; // option prise par defaut pcount = 1; // default option taken
return pcount; return pcount;
} }
@@ -63,23 +63,23 @@ Standard_Boolean IFSelect_DispPerFiles::LimitedMax(const Standard_Integer /* nbe
void IFSelect_DispPerFiles::Packets(const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const void IFSelect_DispPerFiles::Packets(const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const
{ {
// Ressemble a DispPerOne, mais fait "count" AddPart racines // Resembles DispPerOne, but does "count" AddPart roots
Standard_Integer pcount = CountValue(); Standard_Integer pcount = CountValue();
IFGraph_SCRoots roots(G, Standard_False); IFGraph_SCRoots roots(G, Standard_False);
roots.SetLoad(); roots.SetLoad();
roots.GetFromIter(FinalSelection()->UniqueResult(G)); roots.GetFromIter(FinalSelection()->UniqueResult(G));
// SCRoots a initie la resolution : decoupage en StrongComponants + selection // SCRoots initiated the resolution: breakdown into StrongComponents + selection
// des racines. Un paquet correspond des lors a <count> racines // of roots. A packet then corresponds to <count> roots
// Donc, il faut iterer sur les Parts de roots et les prendre par <count> // Therefore, we need to iterate over the Parts of roots and take them by <count>
roots.Start(); // Start fait Evaluate specifique roots.Start(); // Start performs specific Evaluate
Standard_Integer nb = roots.NbParts(); Standard_Integer nb = roots.NbParts();
if (pcount > 0) if (pcount > 0)
pcount = (nb - 1) / pcount + 1; // par packet pcount = (nb - 1) / pcount + 1; // per packet
Standard_Integer i = 0; Standard_Integer i = 0;
for (; roots.More(); roots.Next()) for (; roots.More(); roots.Next())
{ // Start deja fait { // Start already done
if (i == 0) if (i == 0)
packs.AddPart(); packs.AddPart();
i++; i++;

View File

@@ -23,7 +23,7 @@
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_DispPerOne, IFSelect_Dispatch) IMPLEMENT_STANDARD_RTTIEXT(IFSelect_DispPerOne, IFSelect_Dispatch)
// Genere un paquet par racine (strong comp.) locale a la liste transmise // Generates one packet per root (strong comp.) local to the transmitted list
IFSelect_DispPerOne::IFSelect_DispPerOne() {} IFSelect_DispPerOne::IFSelect_DispPerOne() {}
TCollection_AsciiString IFSelect_DispPerOne::Label() const TCollection_AsciiString IFSelect_DispPerOne::Label() const
@@ -40,10 +40,10 @@ Standard_Boolean IFSelect_DispPerOne::LimitedMax(const Standard_Integer nbent,
void IFSelect_DispPerOne::Packets(const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const void IFSelect_DispPerOne::Packets(const Interface_Graph& G, IFGraph_SubPartsIterator& packs) const
{ {
IFGraph_SCRoots packsc(G, Standard_False); // OK pour SubPartsIterator IFGraph_SCRoots packsc(G, Standard_False); // OK for SubPartsIterator
packsc.SetLoad(); packsc.SetLoad();
packsc.GetFromIter(FinalSelection()->UniqueResult(G)); packsc.GetFromIter(FinalSelection()->UniqueResult(G));
// SCRoots a initie la resolution : decoupage en StrongComponants + selection // SCRoots initiated the resolution: splitting into StrongComponents + selection
// des Racines. Chaque Racine correspond a un Packet. CQFD // of Roots. Each Root corresponds to a Packet. QED
packs.GetParts(packsc); packs.GetParts(packsc);
} }

View File

@@ -54,7 +54,7 @@ IFSelect_SelectionIterator IFSelect_Dispatch::Selections() const
iter.AddItem(thefinal); iter.AddItem(thefinal);
for (; iter.More(); iter.Next()) for (; iter.More(); iter.Next())
{ {
iter.Value()->FillIterator(iter); // Iterateur qui se court apres iter.Value()->FillIterator(iter); // Iterator that runs itself after
} }
return iter; return iter;
} }
@@ -81,7 +81,7 @@ Interface_EntityIterator IFSelect_Dispatch::Packeted(const Interface_Graph& G) c
Interface_EntityIterator remain = Remainder(G); Interface_EntityIterator remain = Remainder(G);
if (remain.NbEntities() == 0) if (remain.NbEntities() == 0)
return total; return total;
// sinon, faire la difference ! // otherwise, make the difference!
IFGraph_Compare GC(G); IFGraph_Compare GC(G);
GC.GetFromIter(total, Standard_True); GC.GetFromIter(total, Standard_True);
GC.GetFromIter(remain, Standard_False); GC.GetFromIter(remain, Standard_False);
@@ -92,4 +92,4 @@ Interface_EntityIterator IFSelect_Dispatch::Remainder(const Interface_Graph&) co
{ {
Interface_EntityIterator iter; Interface_EntityIterator iter;
return iter; return iter;
} // par defaut vide } // empty by default

View File

@@ -155,7 +155,7 @@ Standard_Integer IFSelect_EditForm::NameNumber(const Standard_CString name) cons
Standard_Integer res = theeditor->NameNumber(name); Standard_Integer res = theeditor->NameNumber(name);
if (thecomplete || res == 0) if (thecomplete || res == 0)
return res; return res;
// Sinon, chercher res dans thenums // Otherwise, search res in thenums
Standard_Integer i, nb = thenums.Length(); Standard_Integer i, nb = thenums.Length();
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
{ {
@@ -170,7 +170,7 @@ Standard_Integer IFSelect_EditForm::NameRank(const Standard_CString name) const
Standard_Integer res = theeditor->NameNumber(name); Standard_Integer res = theeditor->NameNumber(name);
if (thecomplete || res == 0) if (thecomplete || res == 0)
return res; return res;
// Sinon, chercher res dans thenums // Otherwise, search res in thenums
Standard_Integer i, nb = thenums.Length(); Standard_Integer i, nb = thenums.Length();
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
{ {
@@ -520,7 +520,7 @@ void IFSelect_EditForm::PrintValues(Standard_OStream& S,
else else
{ {
// Donnees sur lesquelles on a travaille // Data on which we worked
if (themodel.IsNull()) if (themodel.IsNull())
{ {
if (theent.IsNull()) if (theent.IsNull())
@@ -543,7 +543,7 @@ void IFSelect_EditForm::PrintValues(Standard_OStream& S,
<< "****************************************************" << std::endl << "****************************************************" << std::endl
<< std::endl; << std::endl;
// Affichage des valeurs // Display of values
Standard_Boolean nams = names; Standard_Boolean nams = names;
Standard_Integer maxnam = theeditor->MaxNameLength(names ? 0 : -1); Standard_Integer maxnam = theeditor->MaxNameLength(names ? 0 : -1);
if (maxnam == 0) if (maxnam == 0)
@@ -562,7 +562,7 @@ void IFSelect_EditForm::PrintValues(Standard_OStream& S,
Standard_Integer jv = NumberFromRank(iv); Standard_Integer jv = NumberFromRank(iv);
Standard_CString name = theeditor->Name(jv, !nams); Standard_CString name = theeditor->Name(jv, !nams);
// Original ou Final // Original or Final
if (what != 0) if (what != 0)
{ {
Handle(TCollection_HAsciiString) str; Handle(TCollection_HAsciiString) str;

View File

@@ -238,7 +238,7 @@ Standard_Integer IFSelect_Editor::NameNumber(const Standard_CString name) const
Standard_Integer res; Standard_Integer res;
if (thenames.Find(name, res)) if (thenames.Find(name, res))
return res; return res;
res = atoi(name); // si c est un entier, on tente le coup res = atoi(name); // if it's an integer, we try it
if (res < 1 || res > NbValues()) if (res < 1 || res > NbValues())
res = 0; res = 0;
return res; return res;

View File

@@ -83,7 +83,7 @@ static void SplitFileName(const Standard_CString filename,
nomlon = resfile.Length(); nomlon = resfile.Length();
nomdeb = resfile.SearchFromEnd("/"); nomdeb = resfile.SearchFromEnd("/");
if (nomdeb <= 0) if (nomdeb <= 0)
nomdeb = resfile.SearchFromEnd("\\"); // pour NT nomdeb = resfile.SearchFromEnd("\\"); // for NT
if (nomdeb < 0) if (nomdeb < 0)
nomdeb = 0; nomdeb = 0;
nomfin = resfile.SearchFromEnd("."); nomfin = resfile.SearchFromEnd(".");
@@ -97,11 +97,11 @@ static void SplitFileName(const Standard_CString filename,
suffix = resfile.SubString(nomfin, nomlon); suffix = resfile.SubString(nomfin, nomlon);
} }
// Functions definit un certain nombre de commandes // Functions defines a certain number of commands
// enregistrees dans le Dictionnaire de Activator (par des Act unitaires) // registered in the Activator Dictionary (by unit Acts)
// Les actions elles-memes sont regroupees en fin de fichier // The actions themselves are grouped at the end of file
// Les definitions // The definitions
static IFSelect_ReturnStatus funstatus(const Handle(IFSelect_SessionPilot)&) static IFSelect_ReturnStatus funstatus(const Handle(IFSelect_SessionPilot)&)
{ {
@@ -153,8 +153,8 @@ static IFSelect_ReturnStatus fun3(const Handle(IFSelect_SessionPilot)& pilot)
} }
IFSelect_ReturnStatus status = WS->ReadFile(arg1); IFSelect_ReturnStatus status = WS->ReadFile(arg1);
// status : 0 OK, 1 erreur lecture, 2 Fail(try/catch), // status: 0 OK, 1 read error, 2 Fail(try/catch),
// -1 fichier non trouve, -2 lecture faite mais resultat vide // -1 file not found, -2 reading done but empty result
switch (status) switch (status)
{ {
case IFSelect_RetVoid: case IFSelect_RetVoid:
@@ -381,8 +381,8 @@ static IFSelect_ReturnStatus funcount(const Handle(IFSelect_SessionPilot)& pilot
// return IFSelect_RetError; // return IFSelect_RetError;
// } // }
// Ajout : si Selection, on applique un GraphCounter // Addition: if Selection, we apply a GraphCounter
// Et en ce cas, on peut en avoir plusieurs : la limite est le mot-cle "on" // And in this case, we can have several: the limit is the keyword "on"
Standard_Integer onflag = 0; Standard_Integer onflag = 0;
Standard_Integer i; // svv Jan11 2000 : porting on DEC Standard_Integer i; // svv Jan11 2000 : porting on DEC
for (i = 2; i < argc; i++) for (i = 2; i < argc; i++)
@@ -398,7 +398,7 @@ static IFSelect_ReturnStatus funcount(const Handle(IFSelect_SessionPilot)& pilot
DeclareAndCast(IFSelect_SelectDeduct, seld, sel); DeclareAndCast(IFSelect_SelectDeduct, seld, sel);
if (!seld.IsNull()) if (!seld.IsNull())
{ {
// Si onflag, faire une SelectSuite // If onflag, create a SelectSuite
if (onflag > 2) if (onflag > 2)
{ {
Handle(IFSelect_SelectSuite) suite = new IFSelect_SelectSuite; Handle(IFSelect_SelectSuite) suite = new IFSelect_SelectSuite;
@@ -607,7 +607,7 @@ static IFSelect_ReturnStatus fun11(const Handle(IFSelect_SessionPilot)& pilot)
niv = 10; niv = 10;
break; break;
default: default:
sout << "Unknown Mode . data tout court pour help" << std::endl; sout << "Unknown Mode . data simply for help" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
WS->TraceDumpModel(niv); WS->TraceDumpModel(niv);
@@ -745,7 +745,7 @@ static IFSelect_ReturnStatus fun14(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 1) if (argc < 1)
{ {
sout << "Donner la valeur entiere pour IntParam" << std::endl; sout << "Give integer value for IntParam" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Handle(IFSelect_IntParam) intpar = new IFSelect_IntParam; Handle(IFSelect_IntParam) intpar = new IFSelect_IntParam;
@@ -783,7 +783,7 @@ static IFSelect_ReturnStatus fun16(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 1) if (argc < 1)
{ {
sout << "Donner la valeur texte pour TextParam" << std::endl; sout << "Give text value for TextParam" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Handle(TCollection_HAsciiString) textpar = new TCollection_HAsciiString(); Handle(TCollection_HAsciiString) textpar = new TCollection_HAsciiString();
@@ -845,7 +845,7 @@ static IFSelect_ReturnStatus fun20(const Handle(IFSelect_SessionPilot)& pilot)
return IFSelect_RetError; return IFSelect_RetError;
} }
// MakeList : sur Pointed existante ou a creer // MakeList: on existing Pointed or to be created
Handle(IFSelect_SelectPointed) pnt; Handle(IFSelect_SelectPointed) pnt;
if (mode == 'm') if (mode == 'm')
{ {
@@ -1193,7 +1193,7 @@ static IFSelect_ReturnStatus fun30(const Handle(IFSelect_SessionPilot)& pilot)
if (argc < 2) if (argc < 2)
{ {
if (WS->FilePrefix().IsNull()) if (WS->FilePrefix().IsNull())
sout << "Pas de prefixe defini" << std::endl; sout << "No prefix defined" << std::endl;
else else
sout << "Prefixe : " << WS->FilePrefix()->ToCString() << std::endl; sout << "Prefixe : " << WS->FilePrefix()->ToCString() << std::endl;
sout << "Pour changer : filepref newprefix" << std::endl; sout << "Pour changer : filepref newprefix" << std::endl;
@@ -1233,16 +1233,16 @@ static IFSelect_ReturnStatus fun32(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 2) if (argc < 2)
{ {
sout << "Donner Dispatch et nom de Root" << std::endl; sout << "Give Dispatch and Root name" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_Dispatch, disp, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Dispatch, disp, WS->NamedItem(arg1));
if (argc < 3) if (argc < 3)
{ {
if (WS->FileRoot(disp).IsNull()) if (WS->FileRoot(disp).IsNull())
sout << "Pas de racine definie pour " << arg1 << std::endl; sout << "No root defined for " << arg1 << std::endl;
else else
sout << "Racine pour " << arg1 << " : " << WS->FileRoot(disp)->ToCString() << std::endl; sout << "Root for " << arg1 << " : " << WS->FileRoot(disp)->ToCString() << std::endl;
sout << "Pour changer : fileroot nomdisp newroot" << std::endl; sout << "Pour changer : fileroot nomdisp newroot" << std::endl;
return IFSelect_RetVoid; return IFSelect_RetVoid;
} }
@@ -1261,7 +1261,7 @@ static IFSelect_ReturnStatus fun33(const Handle(IFSelect_SessionPilot)& pilot)
if (argc < 2) if (argc < 2)
{ {
if (WS->DefaultFileRoot().IsNull()) if (WS->DefaultFileRoot().IsNull())
sout << "Pas de racine par defaut definie" << std::endl; sout << "No default root defined" << std::endl;
else else
sout << "Racine par defaut : " << WS->DefaultFileRoot()->ToCString() << std::endl; sout << "Racine par defaut : " << WS->DefaultFileRoot()->ToCString() << std::endl;
sout << "Pour changer : filedef newdef" << std::endl; sout << "Pour changer : filedef newdef" << std::endl;
@@ -1278,7 +1278,7 @@ static IFSelect_ReturnStatus fun34(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (!WS->HasModel()) if (!WS->HasModel())
{ {
sout << "Pas de Modele charge, abandon" << std::endl; sout << "No Model loaded, abort" << std::endl;
return IFSelect_RetFail; return IFSelect_RetFail;
} }
@@ -1316,7 +1316,7 @@ static IFSelect_ReturnStatus fun36(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
IFSelect_ReturnStatus stat = IFSelect_RetVoid; IFSelect_ReturnStatus stat = IFSelect_RetVoid;
if (argc < 2) if (argc < 2)
sout << "Split : derniere liste de dispatches definie" << std::endl; sout << "Split : last dispatch list defined" << std::endl;
else else
{ {
WS->ClearShareOut(Standard_True); WS->ClearShareOut(Standard_True);
@@ -1391,7 +1391,7 @@ static IFSelect_ReturnStatus fun38(const Handle(IFSelect_SessionPilot)& pilot)
DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg1));
if (sel.IsNull()) if (sel.IsNull())
{ {
sout << "Pas de Selection de Nom : " << arg1 << std::endl; sout << "No Selection with Name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
if (arg2[0] == 'k') if (arg2[0] == 'k')
@@ -1441,7 +1441,7 @@ static IFSelect_ReturnStatus fun41(const Handle(IFSelect_SessionPilot)& pilot)
DeclareAndCast(IFSelect_GeneralModifier, modif, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_GeneralModifier, modif, WS->NamedItem(arg1));
if (modif.IsNull()) if (modif.IsNull())
{ {
sout << "Pas de Modifier de Nom : " << arg1 << std::endl; sout << "No Modifier with Name : " << arg1 << std::endl;
return IFSelect_RetVoid; return IFSelect_RetVoid;
} }
Handle(IFSelect_IntParam) low, up; Handle(IFSelect_IntParam) low, up;
@@ -1483,13 +1483,13 @@ static IFSelect_ReturnStatus fun42(const Handle(IFSelect_SessionPilot)& pilot)
if (argc < 2) if (argc < 2)
{ {
sout << "Donner Nom Modifier; + Nom Selection optionnel\n" sout << "Donner Nom Modifier; + Nom Selection optionnel\n"
<< "Selection pour Mettre une Selection, sinon Annule" << std::endl; << "Selection to Set a Selection, otherwise Cancel" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_GeneralModifier, modif, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_GeneralModifier, modif, WS->NamedItem(arg1));
if (modif.IsNull()) if (modif.IsNull())
{ {
sout << "Pas un nom de Modifier : " << arg1 << std::endl; sout << "Not a Modifier name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Handle(IFSelect_Selection) sel; Handle(IFSelect_Selection) sel;
@@ -1498,7 +1498,7 @@ static IFSelect_ReturnStatus fun42(const Handle(IFSelect_SessionPilot)& pilot)
sel = GetCasted(IFSelect_Selection, WS->NamedItem(arg2)); sel = GetCasted(IFSelect_Selection, WS->NamedItem(arg2));
if (sel.IsNull()) if (sel.IsNull())
{ {
sout << "Pas un nom de Selection : " << arg2 << std::endl; sout << "Not a Selection name : " << arg2 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
} }
@@ -1525,7 +1525,7 @@ static IFSelect_ReturnStatus fun43(const Handle(IFSelect_SessionPilot)& pilot)
DeclareAndCast(IFSelect_GeneralModifier, modif, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_GeneralModifier, modif, WS->NamedItem(arg1));
if (modif.IsNull()) if (modif.IsNull())
{ {
sout << "Pas un nom de Modifier : " << arg1 << std::endl; sout << "Not a Modifier name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Handle(Standard_Transient) item; Handle(Standard_Transient) item;
@@ -1560,7 +1560,7 @@ static IFSelect_ReturnStatus fun44(const Handle(IFSelect_SessionPilot)& pilot)
DeclareAndCast(IFSelect_GeneralModifier, modif, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_GeneralModifier, modif, WS->NamedItem(arg1));
if (modif.IsNull()) if (modif.IsNull())
{ {
sout << "Pas un nom de Modifier : " << arg1 << std::endl; sout << "Not a Modifier name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
if (!WS->ResetAppliedModifier(modif)) if (!WS->ResetAppliedModifier(modif))
@@ -1579,7 +1579,7 @@ static IFSelect_ReturnStatus fun45(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 4) if (argc < 4)
{ {
sout << "modifmove MF rang1 rang2, M pour Model F pour File" << std::endl; sout << "modifmove MF rang1 rang2, M for Model F for File" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Standard_Boolean formodel; Standard_Boolean formodel;
@@ -1589,7 +1589,7 @@ static IFSelect_ReturnStatus fun45(const Handle(IFSelect_SessionPilot)& pilot)
formodel = Standard_False; formodel = Standard_False;
else else
{ {
sout << "preciser M pour Model, F pour File" << std::endl; sout << "specify M for Model, F for File" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Standard_Integer before = atoi(arg2); Standard_Integer before = atoi(arg2);
@@ -1620,13 +1620,13 @@ static IFSelect_ReturnStatus fun51(const Handle(IFSelect_SessionPilot)& pilot)
DeclareAndCast(IFSelect_Dispatch, disp, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Dispatch, disp, WS->NamedItem(arg1));
if (disp.IsNull()) if (disp.IsNull())
{ {
sout << "Pas un nom de Dispatch : " << arg1 << std::endl; sout << "Not a Dispatch name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg2)); DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg2));
if (sel.IsNull()) if (sel.IsNull())
{ {
sout << "Pas un nom de Selection : " << arg2 << std::endl; sout << "Not a Selection name : " << arg2 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
if (!WS->SetItemSelection(disp, sel)) if (!WS->SetItemSelection(disp, sel))
@@ -1659,13 +1659,13 @@ static IFSelect_ReturnStatus fun_dispcount(const Handle(IFSelect_SessionPilot)&
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 2) if (argc < 2)
{ {
sout << "Donner Nom IntParam pour Count" << std::endl; sout << "Give IntParam Name for Count" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_IntParam, par, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_IntParam, par, WS->NamedItem(arg1));
if (par.IsNull()) if (par.IsNull())
{ {
sout << "Pas un nom de IntParam : " << arg1 << std::endl; sout << "Not an IntParam name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Handle(IFSelect_DispPerCount) disp = new IFSelect_DispPerCount; Handle(IFSelect_DispPerCount) disp = new IFSelect_DispPerCount;
@@ -1682,13 +1682,13 @@ static IFSelect_ReturnStatus fun_dispfiles(const Handle(IFSelect_SessionPilot)&
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 2) if (argc < 2)
{ {
sout << "Donner Nom IntParam pour NbFiles" << std::endl; sout << "Give IntParam Name for NbFiles" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_IntParam, par, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_IntParam, par, WS->NamedItem(arg1));
if (par.IsNull()) if (par.IsNull())
{ {
sout << "Pas un nom de IntParam : " << arg1 << std::endl; sout << "Not an IntParam name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Handle(IFSelect_DispPerFiles) disp = new IFSelect_DispPerFiles; Handle(IFSelect_DispPerFiles) disp = new IFSelect_DispPerFiles;
@@ -1711,7 +1711,7 @@ static IFSelect_ReturnStatus fun_dispsign(const Handle(IFSelect_SessionPilot)& p
DeclareAndCast(IFSelect_Signature, sig, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Signature, sig, WS->NamedItem(arg1));
if (sig.IsNull()) if (sig.IsNull())
{ {
sout << "Pas un nom de Signature : " << arg1 << std::endl; sout << "Not a Signature name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Handle(IFSelect_DispPerSignature) disp = new IFSelect_DispPerSignature; Handle(IFSelect_DispPerSignature) disp = new IFSelect_DispPerSignature;
@@ -1738,17 +1738,17 @@ static IFSelect_ReturnStatus fun56(const Handle(IFSelect_SessionPilot)& pilot)
return IFSelect_RetError; return IFSelect_RetError;
} }
Standard_Integer num = WS->DispatchRank(disp); Standard_Integer num = WS->DispatchRank(disp);
sout << "Dispatch de Nom : " << arg1 << " , en ShareOut, Numero " << num << " : "; sout << "Dispatch with Name : " << arg1 << " , in ShareOut, Number " << num << " : ";
Handle(IFSelect_Selection) sel = WS->ItemSelection(disp); Handle(IFSelect_Selection) sel = WS->ItemSelection(disp);
Handle(TCollection_HAsciiString) selname = WS->Name(sel); Handle(TCollection_HAsciiString) selname = WS->Name(sel);
if (sel.IsNull()) if (sel.IsNull())
sout << "Pas de Selection Finale" << std::endl; sout << "No Final Selection" << std::endl;
else if (selname.IsNull()) else if (selname.IsNull())
sout << "Selection Finale : #" << WS->ItemIdent(sel) << std::endl; sout << "Selection Finale : #" << WS->ItemIdent(sel) << std::endl;
else else
sout << "Selection Finale : " << selname->ToCString() << std::endl; sout << "Selection Finale : " << selname->ToCString() << std::endl;
if (disp->HasRootName()) if (disp->HasRootName())
sout << "-- Racine nom de fichier : " << disp->RootName()->ToCString() << std::endl; sout << "-- Root file name : " << disp->RootName()->ToCString() << std::endl;
return IFSelect_RetVoid; return IFSelect_RetVoid;
} }
@@ -1990,7 +1990,7 @@ static IFSelect_ReturnStatus fun61(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 2) if (argc < 2)
{ {
sout << "Donner Nom de Transformer" << std::endl; sout << "Give Transformer Name" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_Transformer, tsf, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Transformer, tsf, WS->NamedItem(arg1));
@@ -2004,10 +2004,10 @@ static IFSelect_ReturnStatus fun61(const Handle(IFSelect_SessionPilot)& pilot)
sout << "Erreur, Transformation ignoree" << std::endl; sout << "Erreur, Transformation ignoree" << std::endl;
break; break;
case -2: case -2:
sout << "Erreur sur edition sur place, risque de corruption (verifier)" << std::endl; sout << "Error on in-place editing, risk of corruption (check)" << std::endl;
break; break;
case -1: case -1:
sout << "Erreur sur edition locale, risque de corruption (verifier)" << std::endl; sout << "Error on local editing, risk of corruption (check)" << std::endl;
break; break;
case 0: case 0:
if (tsf.IsNull()) if (tsf.IsNull())
@@ -2058,20 +2058,20 @@ static IFSelect_ReturnStatus fun6465(const Handle(IFSelect_SessionPilot)& pilot)
// **** Run Modifier avec Standard Copy **** // **** Run Modifier avec Standard Copy ****
// **** Run Modifier avec OnTheSpot **** // **** Run Modifier avec OnTheSpot ****
Standard_Boolean runcopy = (pilot->Arg(0)[3] == 'c'); Standard_Boolean runcopy = (pilot->Arg(0)[3] == 'c');
// soit c est un nom, sinon c est une commande // either it's a name, otherwise it's a command
Handle(IFSelect_Modifier) modif; Handle(IFSelect_Modifier) modif;
if (WS->NameIdent(arg1) > 0) if (WS->NameIdent(arg1) > 0)
modif = GetCasted(IFSelect_Modifier, WS->NamedItem(arg1)); modif = GetCasted(IFSelect_Modifier, WS->NamedItem(arg1));
else else
{ {
pilot->RemoveWord(0); // c etait la commande run pilot->RemoveWord(0); // it was the run command
pilot->Perform(); pilot->Perform();
modif = GetCasted(IFSelect_Modifier, pilot->RecordedItem()); modif = GetCasted(IFSelect_Modifier, pilot->RecordedItem());
} }
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (modif.IsNull()) if (modif.IsNull())
{ {
sout << "Pas un nom de Modifier : " << arg1 << std::endl; sout << "Not a Modifier name : " << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
@@ -2096,10 +2096,10 @@ static IFSelect_ReturnStatus fun6465(const Handle(IFSelect_SessionPilot)& pilot)
sout << "Erreur, Transformation ignoree" << std::endl; sout << "Erreur, Transformation ignoree" << std::endl;
break; break;
case -2: case -2:
sout << "Erreur sur edition sur place, risque de corruption (verifier)" << std::endl; sout << "Error on in-place editing, risk of corruption (check)" << std::endl;
break; break;
case -1: case -1:
sout << "Erreur sur edition locale, risque de corruption (verifier)" << std::endl; sout << "Error on local editing, risk of corruption (check)" << std::endl;
break; break;
case 0: case 0:
if (modif.IsNull()) if (modif.IsNull())
@@ -2153,7 +2153,7 @@ static IFSelect_ReturnStatus fun70(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 2) if (argc < 2)
{ {
sout << "Donner Nom de Selection" << std::endl; sout << "Give Selection Name" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg1));
@@ -2217,7 +2217,7 @@ static IFSelect_ReturnStatus fun73(const Handle(IFSelect_SessionPilot)& pilot)
if (argc < 2) if (argc < 2)
{ {
sout << "Donner la description du SelectRange" sout << "Donner la description du SelectRange"
<< " Formes admises :\n <n1> <n2> : Range de <n1> a <n2>\n" << " Accepted forms :\n <n1> <n2> : Range from <n1> to <n2>\n"
<< " <n1> tout seul : Range n0 <n1>\n from <n1> : Range From <n1>\n" << " <n1> tout seul : Range n0 <n1>\n from <n1> : Range From <n1>\n"
<< " until <n2> : Range Until <n2>" << std::endl; << " until <n2> : Range Until <n2>" << std::endl;
return IFSelect_RetVoid; return IFSelect_RetVoid;
@@ -2293,7 +2293,7 @@ static IFSelect_ReturnStatus fun76(const Handle(IFSelect_SessionPilot)& pilot)
return IFSelect_RetFail; return IFSelect_RetFail;
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 3) if (argc < 3)
sout << "Diff sans input : ne pas oublier de les definir (ctlmain, ctlsec)!" << std::endl; sout << "Diff without input : don't forget to define them (ctlmain, ctlsec)!" << std::endl;
DeclareAndCast(IFSelect_Selection, selmain, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Selection, selmain, WS->NamedItem(arg1));
DeclareAndCast(IFSelect_Selection, selsec, WS->NamedItem(arg2)); DeclareAndCast(IFSelect_Selection, selsec, WS->NamedItem(arg2));
if (argc >= 2) if (argc >= 2)
@@ -2315,14 +2315,14 @@ static IFSelect_ReturnStatus fun77(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 3) if (argc < 3)
{ {
sout << "Donner Noms de Control et MainInput" << std::endl; sout << "Give Control and MainInput Names" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg1));
DeclareAndCast(IFSelect_Selection, selmain, WS->NamedItem(arg2)); DeclareAndCast(IFSelect_Selection, selmain, WS->NamedItem(arg2));
if (WS->SetControl(sel, selmain, Standard_True)) if (WS->SetControl(sel, selmain, Standard_True))
return IFSelect_RetDone; return IFSelect_RetDone;
sout << "Nom incorrect ou Selection " << arg1 << " pas de type Control" << std::endl; sout << "Incorrect name or Selection " << arg1 << " not of Control type" << std::endl;
return IFSelect_RetFail; return IFSelect_RetFail;
} }
@@ -2336,14 +2336,14 @@ static IFSelect_ReturnStatus fun78(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 3) if (argc < 3)
{ {
sout << "Donner Noms de Control et SecondInput" << std::endl; sout << "Give Control and SecondInput Names" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_Selection, sel, WS->NamedItem(arg1));
DeclareAndCast(IFSelect_Selection, seldif, WS->NamedItem(arg2)); DeclareAndCast(IFSelect_Selection, seldif, WS->NamedItem(arg2));
if (WS->SetControl(sel, seldif, Standard_False)) if (WS->SetControl(sel, seldif, Standard_False))
return IFSelect_RetDone; return IFSelect_RetDone;
sout << "Nom incorrect ou Selection " << arg1 << " pas de type Control" << std::endl; sout << "Incorrect name or Selection " << arg1 << " not of Control type" << std::endl;
return IFSelect_RetFail; return IFSelect_RetFail;
} }
@@ -2405,7 +2405,7 @@ static IFSelect_ReturnStatus fun82(const Handle(IFSelect_SessionPilot)& pilot)
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
if (argc < 2) if (argc < 2)
{ {
sout << "Donner Nom IntParam pour n0 Entite" << std::endl; sout << "Give IntParam Name for Entity n0" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
DeclareAndCast(IFSelect_IntParam, par, WS->NamedItem(arg1)); DeclareAndCast(IFSelect_IntParam, par, WS->NamedItem(arg1));
@@ -2513,7 +2513,7 @@ static IFSelect_ReturnStatus fun91(const Handle(IFSelect_SessionPilot)& pilot)
sout << "Pas une SelectPointed:" << arg1 << std::endl; sout << "Pas une SelectPointed:" << arg1 << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
const Handle(Interface_InterfaceModel)& model = WS->Model(); // pour Print const Handle(Interface_InterfaceModel)& model = WS->Model(); // for Print
if (argc == 2) if (argc == 2)
{ // listage simple { // listage simple
Standard_Integer nb = sp->NbItems(); Standard_Integer nb = sp->NbItems();
@@ -2581,7 +2581,7 @@ static IFSelect_ReturnStatus fun91(const Handle(IFSelect_SessionPilot)& pilot)
} }
else else
{ {
sout << "Ignore:" << argi << " , donner n0 PRECEDE de + ou - ou /" << std::endl; sout << "Ignore:" << argi << " , give n0 PRECEDED by + or - or /" << std::endl;
} }
} }
return IFSelect_RetDone; return IFSelect_RetDone;
@@ -2770,7 +2770,7 @@ static IFSelect_ReturnStatus fun_editvalue(const Handle(IFSelect_SessionPilot)&
return IFSelect_RetError; return IFSelect_RetError;
Standard_Boolean islist = edf->Editor()->IsList(num); Standard_Boolean islist = edf->Editor()->IsList(num);
Standard_CString name = edf->Editor()->Name(num, Standard_True); // vrai nom Standard_CString name = edf->Editor()->Name(num, Standard_True); // real name
Handle(TColStd_HSequenceOfHAsciiString) listr; Handle(TColStd_HSequenceOfHAsciiString) listr;
Handle(TCollection_HAsciiString) str; Handle(TCollection_HAsciiString) str;
sout << "Value Name : " << name << (edf->IsModified(num) ? "(already edited) : " : " : "); sout << "Value Name : " << name << (edf->IsModified(num) ? "(already edited) : " : " : ");
@@ -3200,7 +3200,7 @@ void IFSelect_Functions::Init()
IFSelect_Act::AddFunc("settext", IFSelect_Act::AddFunc("settext",
"Name:TextParam newValue:string : Change valeur TextParam", "Name:TextParam newValue:string : Change valeur TextParam",
fun17); fun17);
IFSelect_Act::AddFunc("dumpsel", "Dump Selection suivi du Nom de la Selection a dumper", fun19); IFSelect_Act::AddFunc("dumpsel", "Dump Selection followed by Name of Selection to dump", fun19);
IFSelect_Act::AddFunc("evalsel", "name:Selection [num/sel] : Evalue une Selection", fun20); IFSelect_Act::AddFunc("evalsel", "name:Selection [num/sel] : Evalue une Selection", fun20);
IFSelect_Act::AddFunc("givelist", "num/sel [num/sel ...] : Evaluates GiveList", fun20); IFSelect_Act::AddFunc("givelist", "num/sel [num/sel ...] : Evaluates GiveList", fun20);
IFSelect_Act::AddFunc("giveshort", "num/sel [num/sel ...] : GiveList in short form", fun20); IFSelect_Act::AddFunc("giveshort", "num/sel [num/sel ...] : GiveList in short form", fun20);
@@ -3248,14 +3248,14 @@ void IFSelect_Functions::Init()
IFSelect_Act::AddFunc("listmodif", "List Final Modifiers", fun40); IFSelect_Act::AddFunc("listmodif", "List Final Modifiers", fun40);
IFSelect_Act::AddFunc("dumpmodif", "modif:Modifier : Affiche le Statut d'un Modifier", fun41); IFSelect_Act::AddFunc("dumpmodif", "modif:Modifier : Affiche le Statut d'un Modifier", fun41);
IFSelect_Act::AddFunc("modifsel", IFSelect_Act::AddFunc("modifsel",
"modif:Modifier [sel:Selection] : Change/Annule Selection de Modifier", "modif:Modifier [sel:Selection] : Change/Cancel Selection of Modifier",
fun42); fun42);
IFSelect_Act::AddFunc( IFSelect_Act::AddFunc(
"setapplied", "setapplied",
"modif:Modifier [name:un item sinon sortie fichier] : Applique un Modifier", "modif:Modifier [name:un item sinon sortie fichier] : Applique un Modifier",
fun43); fun43);
IFSelect_Act::AddFunc("resetapplied", IFSelect_Act::AddFunc("resetapplied",
"modif:Modifier : Enleve un Modifier de la sortie fichier", "modif:Modifier : Remove a Modifier from file output",
fun44); fun44);
IFSelect_Act::AddFunc( IFSelect_Act::AddFunc(
"modifmove", "modifmove",
@@ -3263,7 +3263,7 @@ void IFSelect_Functions::Init()
fun45); fun45);
IFSelect_Act::AddFunc("dispsel", IFSelect_Act::AddFunc("dispsel",
"disp:Dispatch sel:Selection -> Selection Finale de Dispatch", "disp:Dispatch sel:Selection -> Final Selection of Dispatch",
fun51); fun51);
IFSelect_Act::AddFSet("dispone", "cree DispPerOne", fun_dispone); IFSelect_Act::AddFSet("dispone", "cree DispPerOne", fun_dispone);
IFSelect_Act::AddFSet("dispglob", "cree DispGlobal", fun_dispglob); IFSelect_Act::AddFSet("dispglob", "cree DispGlobal", fun_dispglob);
@@ -3272,7 +3272,7 @@ void IFSelect_Functions::Init()
IFSelect_Act::AddFSet("dispsign", "sign:Signature : cree DispPerSignature", fun_dispsign); IFSelect_Act::AddFSet("dispsign", "sign:Signature : cree DispPerSignature", fun_dispsign);
IFSelect_Act::AddFunc("dumpdisp", "disp:Dispatch : Affiche le Statut d'un Dispatch", fun56); IFSelect_Act::AddFunc("dumpdisp", "disp:Dispatch : Affiche le Statut d'un Dispatch", fun56);
IFSelect_Act::AddFunc("xremove", "nom : Remove a Control Item de la Session", fun57); IFSelect_Act::AddFunc("xremove", "nom : Remove a Control Item from the Session", fun57);
IFSelect_Act::AddFunc("evaldisp", IFSelect_Act::AddFunc("evaldisp",
"mode=[0-3] disp:Dispatch : Evaluates one or more Dispatch(es)", "mode=[0-3] disp:Dispatch : Evaluates one or more Dispatch(es)",
fun58); fun58);
@@ -3284,7 +3284,7 @@ void IFSelect_Functions::Init()
"writedisp", "writedisp",
"filepattern disp:Dispatch [givelist] : Writes Entities by Splitting by a Dispatch", "filepattern disp:Dispatch [givelist] : Writes Entities by Splitting by a Dispatch",
fun_writedisp); fun_writedisp);
IFSelect_Act::AddFunc("evalcomplete", "Evaluation Complete de la Repartition", fun59); IFSelect_Act::AddFunc("evalcomplete", "Complete Evaluation of the Distribution", fun59);
IFSelect_Act::AddFunc("runcheck", "affiche LastRunCheckList (write,modif)", fun60); IFSelect_Act::AddFunc("runcheck", "affiche LastRunCheckList (write,modif)", fun60);
IFSelect_Act::AddFunc("runtranformer", "transf:Transformer : Applique un Transformer", fun61); IFSelect_Act::AddFunc("runtranformer", "transf:Transformer : Applique un Transformer", fun61);
@@ -3305,7 +3305,7 @@ void IFSelect_Functions::Init()
"sel:Selection genre Deduct ou Extract input:Selection : Set Input", "sel:Selection genre Deduct ou Extract input:Selection : Set Input",
fun71); fun71);
IFSelect_Act::AddFSet("modelroots", "cree SelectModelRoots", fun72); IFSelect_Act::AddFSet("modelroots", "cree SelectModelRoots", fun72);
IFSelect_Act::AddFSet("range", "options... : cree SelectRange ...; tout court pour help", fun73); IFSelect_Act::AddFSet("range", "options... : create SelectRange ...; simply for help", fun73);
IFSelect_Act::AddFSet("roots", "cree SelectRoots (local roots)", fun74); IFSelect_Act::AddFSet("roots", "cree SelectRoots (local roots)", fun74);
IFSelect_Act::AddFSet("shared", "cree SelectShared", fun75); IFSelect_Act::AddFSet("shared", "cree SelectShared", fun75);
IFSelect_Act::AddFSet("diff", "[main:Selection diff:Selection] : cree SelectDiff", fun76); IFSelect_Act::AddFSet("diff", "[main:Selection diff:Selection] : cree SelectDiff", fun76);
@@ -3335,10 +3335,10 @@ void IFSelect_Functions::Init()
IFSelect_Act::AddFSet("typecontain", "type:string : cree SelectTextType Contains", fun89); IFSelect_Act::AddFSet("typecontain", "type:string : cree SelectTextType Contains", fun89);
IFSelect_Act::AddFSet("pointed", "cree SelectPointed [num/sel num/sel]", fun90); IFSelect_Act::AddFSet("pointed", "cree SelectPointed [num/sel num/sel]", fun90);
IFSelect_Act::AddFunc("setpointed", IFSelect_Act::AddFunc("setpointed",
"sel:SelectPointed : edition SelectPointed. tout court pour help", "sel:SelectPointed : edit SelectPointed. simply for help",
fun91); fun91);
IFSelect_Act::AddFunc("setlist", IFSelect_Act::AddFunc("setlist",
"sel:SelectPointed : edition SelectPointed. tout court pour help", "sel:SelectPointed : edit SelectPointed. simply for help",
fun91); fun91);
IFSelect_Act::AddFSet("incorrect", "cree SelectIncorrectEntities (computed)", fun92); IFSelect_Act::AddFSet("incorrect", "cree SelectIncorrectEntities (computed)", fun92);

View File

@@ -47,7 +47,7 @@ void IFSelect_ModelCopier::SetShareOut(const Handle(IFSelect_ShareOut)& sho)
} }
// ######################################################################## // ########################################################################
// ######## OPERATIONS DE TRANSFERT GLOBAL (memorise ou non) ######## // ######## GLOBAL TRANSFER OPERATIONS (memorized or not) ########
void IFSelect_ModelCopier::ClearResult() void IFSelect_ModelCopier::ClearResult()
{ {
@@ -121,7 +121,7 @@ Standard_Boolean IFSelect_ModelCopier::ClearAppliedModifiers(const Standard_Inte
return Standard_True; return Standard_True;
} }
// .... Copy : Opere les Transferts, les Memorise (pas d envoi fichier ici) // .... Copy : Performs Transfers, Memorizes them (no file sending here)
Interface_CheckIterator IFSelect_ModelCopier::Copy(IFSelect_ShareOutResult& eval, Interface_CheckIterator IFSelect_ModelCopier::Copy(IFSelect_ShareOutResult& eval,
const Handle(IFSelect_WorkLibrary)& WL, const Handle(IFSelect_WorkLibrary)& WL,
@@ -131,7 +131,7 @@ Interface_CheckIterator IFSelect_ModelCopier::Copy(IFSelect_ShareOutResult&
return Copying(eval, WL, protocol, TC); return Copying(eval, WL, protocol, TC);
} }
// Copy Interne // Internal Copy
Interface_CheckIterator IFSelect_ModelCopier::Copying(IFSelect_ShareOutResult& eval, Interface_CheckIterator IFSelect_ModelCopier::Copying(IFSelect_ShareOutResult& eval,
const Handle(IFSelect_WorkLibrary)& WL, const Handle(IFSelect_WorkLibrary)& WL,
@@ -172,7 +172,7 @@ Interface_CheckIterator IFSelect_ModelCopier::Copying(IFSelect_ShareOutResult&
return checks; return checks;
} }
// Send a deux arguments : Envoi Fichier du Resultat deja memorise // Send with two arguments : File Sending of Result already memorized
Interface_CheckIterator IFSelect_ModelCopier::SendCopied(const Handle(IFSelect_WorkLibrary)& WL, Interface_CheckIterator IFSelect_ModelCopier::SendCopied(const Handle(IFSelect_WorkLibrary)& WL,
const Handle(Interface_Protocol)& protocol) const Handle(Interface_Protocol)& protocol)
@@ -213,7 +213,7 @@ Interface_CheckIterator IFSelect_ModelCopier::SendCopied(const Handle(IFSelect_W
return checks; return checks;
} }
// .... Send a 4 arguments : Calcul du Transfert et Envoi sur Fichier // .... Send with 4 arguments : Transfer Calculation and File Sending
Interface_CheckIterator IFSelect_ModelCopier::Send(IFSelect_ShareOutResult& eval, Interface_CheckIterator IFSelect_ModelCopier::Send(IFSelect_ShareOutResult& eval,
const Handle(IFSelect_WorkLibrary)& WL, const Handle(IFSelect_WorkLibrary)& WL,
@@ -281,7 +281,7 @@ Interface_CheckIterator IFSelect_ModelCopier::Sending(IFSelect_ShareOutResult&
return checks; return checks;
} }
// .... SendAll : Donnees a tranferer dans G, aucun split, envoi sur fichier // .... SendAll : Data to transfer in G, no split, file sending
Interface_CheckIterator IFSelect_ModelCopier::SendAll(const Standard_CString filename, Interface_CheckIterator IFSelect_ModelCopier::SendAll(const Standard_CString filename,
const Interface_Graph& G, const Interface_Graph& G,
@@ -329,8 +329,8 @@ Interface_CheckIterator IFSelect_ModelCopier::SendAll(const Standard_CString
return checks; return checks;
} }
// .... SendSelected : Donnees a tranferer dans G, filtrees par iter, // .... SendSelected : Data to transfer in G, filtered by iter,
// aucun split, envoi sur fichier // no split, file sending
Interface_CheckIterator IFSelect_ModelCopier::SendSelected( Interface_CheckIterator IFSelect_ModelCopier::SendSelected(
const Standard_CString filename, const Standard_CString filename,
@@ -347,9 +347,9 @@ Interface_CheckIterator IFSelect_ModelCopier::SendSelected(
return checks; return checks;
Handle(Interface_InterfaceModel) newmod = original->NewEmptyModel(); Handle(Interface_InterfaceModel) newmod = original->NewEmptyModel();
Interface_CopyTool TC(original, protocol); Interface_CopyTool TC(original, protocol);
TC.FillModel(newmod); // pour Header ... TC.FillModel(newmod); // for Header ...
// Pas de copie : AddWithRefs plus declaration de Bind // No copy : AddWithRefs plus Bind declaration
Interface_GeneralLib lib(protocol); Interface_GeneralLib lib(protocol);
for (list.Start(); list.More(); list.Next()) for (list.Start(); list.More(); list.Next())
{ {
@@ -377,7 +377,7 @@ Interface_CheckIterator IFSelect_ModelCopier::SendSelected(
newmod, newmod,
applied, applied,
checks); checks);
// Alimenter Remaining : les entites copiees sont a noter // Feed Remaining : copied entities are to be noted
Handle(Standard_Transient) ent1, ent2; Handle(Standard_Transient) ent1, ent2;
for (Standard_Integer ic = TC.LastCopiedAfter(0, ent1, ent2); ic > 0; for (Standard_Integer ic = TC.LastCopiedAfter(0, ent1, ent2); ic > 0;
ic = TC.LastCopiedAfter(ic, ent1, ent2)) ic = TC.LastCopiedAfter(ic, ent1, ent2))
@@ -400,7 +400,7 @@ Interface_CheckIterator IFSelect_ModelCopier::SendSelected(
} }
// ########################################################################## // ##########################################################################
// ######## UN TRANSFERT UNITAIRE (avec Modifications) ######## // ######## A UNIT TRANSFER (with Modifications) ########
void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G, void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G,
const Handle(IFSelect_WorkLibrary)& WL, const Handle(IFSelect_WorkLibrary)& WL,
@@ -414,11 +414,11 @@ void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G,
Handle(IFSelect_AppliedModifiers)& applied, Handle(IFSelect_AppliedModifiers)& applied,
Interface_CheckIterator& checks) const Interface_CheckIterator& checks) const
{ {
// ... Premiere partie "standard" : remplissage du modele ... // ... First "standard" part : filling the model ...
// On cree le Modele, on le remplit avec les Entites, et avec le Header depart // We create the Model, we fill it with Entities, and with the starting Header
// ATTENTION : dispnum = 0 signifie prendre modele original, ne rien copier // WARNING : dispnum = 0 means take original model, copy nothing
// et aussi : pas de Dispatch (envoi en bloc) // and also : no Dispatch (bulk sending)
applied.Nullify(); applied.Nullify();
const Handle(Interface_InterfaceModel)& original = G.Model(); const Handle(Interface_InterfaceModel)& original = G.Model();
@@ -429,7 +429,7 @@ void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G,
WL->CopyModel(original, newmod, tocopy, TC); WL->CopyModel(original, newmod, tocopy, TC);
Handle(Standard_Transient) ent1, ent2; Handle(Standard_Transient) ent1, ent2;
// Alimenter Remaining : les entites copiees sont a noter // Feed Remaining : copied entities are to be noted
for (Standard_Integer ic = TC.LastCopiedAfter(0, ent1, ent2); ic > 0; for (Standard_Integer ic = TC.LastCopiedAfter(0, ent1, ent2); ic > 0;
ic = TC.LastCopiedAfter(ic, ent1, ent2)) ic = TC.LastCopiedAfter(ic, ent1, ent2))
{ {
@@ -440,7 +440,7 @@ void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G,
else if (newmod.IsNull()) else if (newmod.IsNull())
newmod = original; newmod = original;
// ... Ensuite : On prend en compte les Model Modifiers ... // ... Then : We take into account the Model Modifiers ...
Standard_Integer nbmod = 0; Standard_Integer nbmod = 0;
if (!theshareout.IsNull()) if (!theshareout.IsNull())
nbmod = theshareout->NbModifiers(Standard_True); nbmod = theshareout->NbModifiers(Standard_True);
@@ -449,12 +449,12 @@ void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G,
{ {
Handle(IFSelect_Modifier) unmod = theshareout->ModelModifier(i); Handle(IFSelect_Modifier) unmod = theshareout->ModelModifier(i);
// D abord, critere Dispatch/Packet // First, Dispatch/Packet criterion
if (dispnum > 0) if (dispnum > 0)
if (!unmod->Applies(theshareout->Dispatch(dispnum))) if (!unmod->Applies(theshareout->Dispatch(dispnum)))
continue; continue;
IFSelect_ContextModif ctx(G, TC, filename.ToCString()); IFSelect_ContextModif ctx(G, TC, filename.ToCString());
// Ensuite, la Selection // Then, the Selection
Handle(IFSelect_Selection) sel = unmod->Selection(); Handle(IFSelect_Selection) sel = unmod->Selection();
if (!sel.IsNull()) if (!sel.IsNull())
{ {
@@ -467,7 +467,7 @@ void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G,
Interface_CheckIterator checklst = ctx.CheckList(); Interface_CheckIterator checklst = ctx.CheckList();
checks.Merge(checklst); checks.Merge(checklst);
// Faut-il enregistrer les erreurs dans newmod ? bonne question // Should we record errors in newmod ? good question
// if (!checks.IsEmpty(Standard_False)) { // if (!checks.IsEmpty(Standard_False)) {
// Message::SendWarning() << // Message::SendWarning() <<
// " Messages on Copied Model n0 "<<numod<<", Dispatch Rank "<<dispnum<<std::endl; // " Messages on Copied Model n0 "<<numod<<", Dispatch Rank "<<dispnum<<std::endl;
@@ -475,7 +475,7 @@ void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G,
// } // }
} }
// ... Puis les File Modifiers : en fait, on les enregistre ... // ... Then the File Modifiers : in fact, we record them ...
nbmod = 0; nbmod = 0;
if (!theshareout.IsNull()) if (!theshareout.IsNull())
nbmod = theshareout->NbModifiers(Standard_False); nbmod = theshareout->NbModifiers(Standard_False);
@@ -486,22 +486,22 @@ void IFSelect_ModelCopier::CopiedModel(const Interface_Graph& G,
{ {
Handle(IFSelect_GeneralModifier) unmod = theshareout->GeneralModifier(Standard_False, i); Handle(IFSelect_GeneralModifier) unmod = theshareout->GeneralModifier(Standard_False, i);
// D abord, critere Dispatch/Packet // First, Dispatch/Packet criterion
if (dispnum > 0) if (dispnum > 0)
if (!unmod->Applies(theshareout->Dispatch(dispnum))) if (!unmod->Applies(theshareout->Dispatch(dispnum)))
continue; continue;
// Ensuite, la Selection // Then, the Selection
Handle(IFSelect_Selection) sel = unmod->Selection(); Handle(IFSelect_Selection) sel = unmod->Selection();
if (sel.IsNull()) if (sel.IsNull())
applied->AddModif(unmod); // vide -> on prend tout applied->AddModif(unmod); // empty -> we take all
else else
{ {
Interface_EntityIterator list = sel->UniqueResult(G); Interface_EntityIterator list = sel->UniqueResult(G);
Handle(Standard_Transient) newent; Handle(Standard_Transient) newent;
// Entites designees par la Selection et Copiees ? // Entities designated by the Selection and Copied ?
// -> s ilyena au moins une, le Modifier s applique, sinon il est rejete // -> if there is at least one, the Modifier applies, otherwise it is rejected
// -> et cette liste est exploitable par le Modifier ... // -> and this list is exploitable by the Modifier ...
for (list.Start(); list.More(); list.Next()) for (list.Start(); list.More(); list.Next())
{ {
if (TC.Search(list.Value(), newent)) if (TC.Search(list.Value(), newent))
@@ -537,7 +537,7 @@ void IFSelect_ModelCopier::CopiedRemaining(const Interface_Graph& G
newmod.Nullify(); newmod.Nullify();
else else
{ {
// CE QUI SUIT NE DOIT PAS ETRE SUPPRIME ! cf theremain // WHAT FOLLOWS MUST NOT BE DELETED ! cf theremain
Handle(Standard_Transient) ent1, ent2; Handle(Standard_Transient) ent1, ent2;
for (Standard_Integer ic = TC.LastCopiedAfter(0, ent1, ent2); ic > 0; for (Standard_Integer ic = TC.LastCopiedAfter(0, ent1, ent2); ic > 0;
ic = TC.LastCopiedAfter(ic, ent1, ent2)) ic = TC.LastCopiedAfter(ic, ent1, ent2))
@@ -545,7 +545,7 @@ void IFSelect_ModelCopier::CopiedRemaining(const Interface_Graph& G
if (ic <= theremain->Upper()) if (ic <= theremain->Upper())
theremain->SetValue(ic, 1); theremain->SetValue(ic, 1);
} }
// qq impressions de mise au point // some debugging prints
#ifdef MISOPOINT #ifdef MISOPOINT
std::cout << " Remaining Model : " << newmod->NbEntities() << " Entities" << std::endl; std::cout << " Remaining Model : " << newmod->NbEntities() << " Entities" << std::endl;
Standard_Integer ne = 0; Standard_Integer ne = 0;
@@ -554,7 +554,7 @@ void IFSelect_ModelCopier::CopiedRemaining(const Interface_Graph& G
if (theremain->Value(i) == 0) if (theremain->Value(i) == 0)
{ {
if (ne == 0) if (ne == 0)
std::cout << " Refractaires : "; std::cout << " Refractory : ";
ne++; ne++;
std::cout << " " << i; std::cout << " " << i;
} }
@@ -584,7 +584,7 @@ Standard_Boolean IFSelect_ModelCopier::SetRemaining(Interface_Graph& CG) const
} }
// ########################################################################## // ##########################################################################
// ######## RESULTAT de la Memorisation des Transferts ######## // ######## RESULT of Transfer Memorization ########
Standard_Integer IFSelect_ModelCopier::NbFiles() const Standard_Integer IFSelect_ModelCopier::NbFiles() const
{ {
@@ -613,12 +613,12 @@ void IFSelect_ModelCopier::BeginSentFiles(const Handle(IFSelect_ShareOut)& sho,
thesentfiles.Nullify(); thesentfiles.Nullify();
if (record) if (record)
thesentfiles = new TColStd_HSequenceOfHAsciiString(); thesentfiles = new TColStd_HSequenceOfHAsciiString();
// et numerotation des fichiers par defaut : detenue par ShareOut // and default file numbering : held by ShareOut
if (sho.IsNull()) if (sho.IsNull())
return; return;
Standard_Integer lastrun = sho->LastRun(); Standard_Integer lastrun = sho->LastRun();
sho->ClearResult(Standard_True); sho->ClearResult(Standard_True);
sho->SetLastRun(lastrun); // on ne s interesse quaux numeros sho->SetLastRun(lastrun); // we are only interested in the numbers
} }
void IFSelect_ModelCopier::AddSentFile(const Standard_CString filename) void IFSelect_ModelCopier::AddSentFile(const Standard_CString filename)

View File

@@ -59,7 +59,7 @@ TCollection_AsciiString IFSelect_ParamEditor::Label() const
Standard_Boolean IFSelect_ParamEditor::Recognize(const Handle(IFSelect_EditForm)& /*form*/) const Standard_Boolean IFSelect_ParamEditor::Recognize(const Handle(IFSelect_EditForm)& /*form*/) const
{ {
return Standard_True; return Standard_True;
} // pas de contrainte } // no constraint
Handle(TCollection_HAsciiString) IFSelect_ParamEditor::StringValue( Handle(TCollection_HAsciiString) IFSelect_ParamEditor::StringValue(
const Handle(IFSelect_EditForm)& /*form*/, const Handle(IFSelect_EditForm)& /*form*/,

View File

@@ -23,7 +23,7 @@
#include <stdio.h> #include <stdio.h>
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectAnyList, IFSelect_SelectDeduct) IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectAnyList, IFSelect_SelectDeduct)
// .... Definition de liste : methodes "deferred" NbItems & FillResult // .... List definition: "deferred" methods NbItems & FillResult
void IFSelect_SelectAnyList::SetRange(const Handle(IFSelect_IntParam)& rankfrom, void IFSelect_SelectAnyList::SetRange(const Handle(IFSelect_IntParam)& rankfrom,
const Handle(IFSelect_IntParam)& rankto) const Handle(IFSelect_IntParam)& rankto)
{ {
@@ -82,7 +82,7 @@ Standard_Integer IFSelect_SelectAnyList::UpperValue() const
return theupper->Value(); return theupper->Value();
} }
// On prend les sous-entites de lower a upper (inclus) // Take the sub-entities from lower to upper (included)
Interface_EntityIterator IFSelect_SelectAnyList::RootResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_SelectAnyList::RootResult(const Interface_Graph& G) const
{ {
Interface_EntityIterator input = InputResult(G); Interface_EntityIterator input = InputResult(G);

View File

@@ -18,4 +18,4 @@
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectBase, IFSelect_Selection) IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectBase, IFSelect_Selection)
void IFSelect_SelectBase::FillIterator(IFSelect_SelectionIterator&) const { void IFSelect_SelectBase::FillIterator(IFSelect_SelectionIterator&) const {
} // rien a faire, une SelectBase ne depend d aucune autre Selection } // nothing to do, a SelectBase doesn't depend on any other Selection

View File

@@ -40,7 +40,7 @@ Interface_EntityIterator IFSelect_SelectEntityNumber::RootResult(const Interface
if (!thenum.IsNull()) if (!thenum.IsNull())
num = thenum->Value(); num = thenum->Value();
if (num < 1) if (num < 1)
return iter; // vide si num < 1 ou num > NbEntities return iter; // empty if num < 1 or num > NbEntities
if (num <= G.Size()) if (num <= G.Size())
iter.GetOneItem(G.Entity(num)); iter.GetOneItem(G.Entity(num));
return iter; return iter;

View File

@@ -25,7 +25,7 @@ Standard_Boolean IFSelect_SelectErrorEntities::Sort(
const Standard_Integer, const Standard_Integer,
const Handle(Standard_Transient)& ent, const Handle(Standard_Transient)& ent,
const Handle(Interface_InterfaceModel)& model) const const Handle(Interface_InterfaceModel)& model) const
//.. ne peut pas marcher, il faut aussi le modele ! ex. via le graphe ... //.. cannot work, the model is also needed ! ex. via the graph ...
{ {
return model->IsErrorEntity(model->Number(ent)); return model->IsErrorEntity(model->Number(ent));
} }

View File

@@ -34,17 +34,17 @@ Standard_Integer IFSelect_SelectExplore::Level() const
Interface_EntityIterator IFSelect_SelectExplore::RootResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_SelectExplore::RootResult(const Interface_Graph& G) const
{ {
// Attention, voila comme on procede // Attention, here's how we proceed
// On a une IndexedMapOfTransient en entree (entites deja traitees/a traiter) // We have an IndexedMapOfTransient as input (entities already processed/to process)
// Elle est initialisee par InputResult // It is initialized by InputResult
// Et une map en sortie (resultats pris) -> le resultat sera unique // And a map as output (results taken) -> the result will be unique
// En entree, un curseur d entite courante // As input, a cursor of current entity
// Pour chaque entite, on appelle Explore. 3 cas possibles : // For each entity, we call Explore. 3 possible cases:
// retour False, on passe // return False, we skip
// retour True et liste vide, on prend cette entite sans aller plus loin // return True and empty list, we take this entity without going further
// retour True et liste non vide, on ne prend pas cette entite mais on // return True and non-empty list, we don't take this entity but we
// considere son resultat. // consider its result.
// Si dernier niveau, on le prend en entier. Sinon, il alimente l entree // If last level, we take it entirely. Otherwise, it feeds the input
Standard_Integer nb = G.Size(); Standard_Integer nb = G.Size();
TColStd_IndexedMapOfTransient entrees(nb); TColStd_IndexedMapOfTransient entrees(nb);
@@ -76,8 +76,8 @@ Interface_EntityIterator IFSelect_SelectExplore::RootResult(const Interface_Grap
if (!Explore(level, ent, G, exp)) if (!Explore(level, ent, G, exp))
continue; continue;
// On prend en compte : entite a prendre directement ? // We take into account : entity to take directly ?
// reprendre liste en entree (niveau pas atteint) ou resultat (niveau atteint) // take back input list (level not reached) or result (level reached)
if (exp.NbEntities() == 0) if (exp.NbEntities() == 0)
{ {
j = result.Add(ent); j = result.Add(ent);
@@ -95,7 +95,7 @@ Interface_EntityIterator IFSelect_SelectExplore::RootResult(const Interface_Grap
} }
} }
// On recolte le resultat // We collect the result
Interface_EntityIterator res; Interface_EntityIterator res;
nb = result.Extent(); nb = result.Extent();
for (j = 1; j <= nb; j++) for (j = 1; j <= nb; j++)

View File

@@ -39,7 +39,7 @@ void IFSelect_SelectExtract::SetDirect(const Standard_Boolean direct)
Interface_EntityIterator IFSelect_SelectExtract::RootResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_SelectExtract::RootResult(const Interface_Graph& G) const
{ {
Interface_EntityIterator iter; Interface_EntityIterator iter;
Interface_EntityIterator inputer = InputResult(G); // tient compte de tout Interface_EntityIterator inputer = InputResult(G); // takes everything into account
Standard_Integer rank = 0; Standard_Integer rank = 0;
for (inputer.Start(); inputer.More(); inputer.Next()) for (inputer.Start(); inputer.More(); inputer.Next())
{ {

View File

@@ -18,8 +18,8 @@
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectInList, IFSelect_SelectAnyList) IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectInList, IFSelect_SelectAnyList)
// .... Specialisation de SelectAnyList dans laquelle on traite une liste // .... Specialization of SelectAnyList in which we process a list
// dont chaque item est une Entite // where each item is an Entity
void IFSelect_SelectInList::FillResult(const Standard_Integer n1, void IFSelect_SelectInList::FillResult(const Standard_Integer n1,
const Standard_Integer n2, const Standard_Integer n2,
const Handle(Standard_Transient)& ent, const Handle(Standard_Transient)& ent,

View File

@@ -103,7 +103,7 @@ Standard_Boolean IFSelect_SelectPointed::Toggle(const Handle(Standard_Transient)
Standard_Boolean IFSelect_SelectPointed::AddList(const Handle(TColStd_HSequenceOfTransient)& list) Standard_Boolean IFSelect_SelectPointed::AddList(const Handle(TColStd_HSequenceOfTransient)& list)
{ {
// Optimise avec une Map // Optimized with a Map
Standard_Boolean res = Standard_False; Standard_Boolean res = Standard_False;
if (list.IsNull()) if (list.IsNull())
return res; return res;

View File

@@ -25,33 +25,33 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectRootComps, IFSelect_SelectExtract)
IFSelect_SelectRootComps::IFSelect_SelectRootComps() {} IFSelect_SelectRootComps::IFSelect_SelectRootComps() {}
// Refait pour travailler en une fois // Redone to work at once
// ATTENTION, il ne faut pas s interesser aux ENTITES mais aux COMPOSANTS // WARNING, we must not be interested in ENTITIES but in COMPONENTS
// c-a-d gerer les CYCLES s il y en a // i.e. manage CYCLES if there are any
Interface_EntityIterator IFSelect_SelectRootComps::RootResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_SelectRootComps::RootResult(const Interface_Graph& G) const
{ {
Interface_EntityIterator IEIinput = InputResult(G); Interface_EntityIterator IEIinput = InputResult(G);
Interface_EntityIterator iter; Interface_EntityIterator iter;
// ICI, extraire les Componants, puis considerer une Entite de chacun // HERE, extract the Components, then consider one Entity from each
IFGraph_StrongComponants comps(G, Standard_False); IFGraph_StrongComponants comps(G, Standard_False);
comps.SetLoad(); comps.SetLoad();
comps.GetFromIter(IEIinput); comps.GetFromIter(IEIinput);
Interface_EntityIterator inp1; // IEIinput reduit a une Entite par Composant Interface_EntityIterator inp1; // IEIinput reduced to one Entity per Component
IFGraph_Cumulate GC(G); IFGraph_Cumulate GC(G);
// On note dans le graphe : le cumul de chaque ensemble (Entite + Shared tous // We note in the graph: the cumulation of each set (Entity + Shared all
// niveaux). Les Roots initiales comptees une seule fois sont bonnes // levels). Initial Roots counted only once are good
// Pour Entite : une par Componant (peu importe) // For Entity: one per Component (doesn't matter)
for (comps.Start(); comps.More(); comps.Next()) for (comps.Start(); comps.More(); comps.Next())
{ {
Handle(Standard_Transient) ent = comps.FirstEntity(); Handle(Standard_Transient) ent = comps.FirstEntity();
GC.GetFromEntity(ent); GC.GetFromEntity(ent);
inp1.GetOneItem(ent); inp1.GetOneItem(ent);
} }
// A present, on retient, parmi les inputs, celles comptees une seule fois // Now, we retain, among the inputs, those counted only once
// (N.B.: on prend inp1, qui donne UNE entite par composant, simple ou cycle) // (N.B.: we take inp1, which gives ONE entity per component, simple or cycle)
for (inp1.Start(); inp1.More(); inp1.Next()) for (inp1.Start(); inp1.More(); inp1.Next())
{ {
const Handle(Standard_Transient)& ent = inp1.Value(); const Handle(Standard_Transient)& ent = inp1.Value();

View File

@@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectRoots, IFSelect_SelectExtract)
IFSelect_SelectRoots::IFSelect_SelectRoots() {} IFSelect_SelectRoots::IFSelect_SelectRoots() {}
// Refait pour travailler en une fois // Redone to work at once
Interface_EntityIterator IFSelect_SelectRoots::RootResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_SelectRoots::RootResult(const Interface_Graph& G) const
{ {
@@ -32,14 +32,14 @@ Interface_EntityIterator IFSelect_SelectRoots::RootResult(const Interface_Graph&
Interface_EntityIterator iter; Interface_EntityIterator iter;
IFGraph_Cumulate GC(G); IFGraph_Cumulate GC(G);
// On note dans le graphe : le cumul de chaque ensemble (Entite + Shared tous // We note in the graph: the cumulation of each set (Entity + Shared all
// niveaux). Les Roots initiales comptees une seule fois sont bonnes // levels). The initial Roots counted only once are good
for (input.Start(); input.More(); input.Next()) for (input.Start(); input.More(); input.Next())
{ {
const Handle(Standard_Transient)& ent = input.Value(); const Handle(Standard_Transient)& ent = input.Value();
GC.GetFromEntity(ent); GC.GetFromEntity(ent);
} }
// A present, on retient, parmi les inputs, celles comptees une seule fois // Now, we retain, among the inputs, those counted only once
for (input.Start(); input.More(); input.Next()) for (input.Start(); input.More(); input.Next())
{ {
const Handle(Standard_Transient)& ent = input.Value(); const Handle(Standard_Transient)& ent = input.Value();

View File

@@ -21,7 +21,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectShared, IFSelect_SelectDeduct)
IFSelect_SelectShared::IFSelect_SelectShared() {} IFSelect_SelectShared::IFSelect_SelectShared() {}
// Entites partagees par d autres (a 1 niveau et au sens Strict) // Entities shared by others (at 1 level and in Strict sense)
Interface_EntityIterator IFSelect_SelectShared::RootResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_SelectShared::RootResult(const Interface_Graph& G) const
{ {

View File

@@ -21,7 +21,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectSharing, IFSelect_SelectDeduct)
IFSelect_SelectSharing::IFSelect_SelectSharing() {} IFSelect_SelectSharing::IFSelect_SelectSharing() {}
// Entites en partageant d autres (a 1 niveau et au sens Strict) // Entities sharing others (at 1 level and in Strict sense)
Interface_EntityIterator IFSelect_SelectSharing::RootResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_SelectSharing::RootResult(const Interface_Graph& G) const
{ {

View File

@@ -22,10 +22,10 @@
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectSignature, IFSelect_SelectExtract) IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SelectSignature, IFSelect_SelectExtract)
// theexact : -1 OUI 0 NON une seule valeur > 0 NON nb de valeurs // theexact : -1 YES 0 NO single value > 0 NO number of values
// signmode : 1 prendre si contenu, 2 refuser si contenu // signmode: 1 take if contained, 2 refuse if contained
// 3 prendre si egal, 4 refuser si egal // 3 take if equal, 4 refuse if equal
// ou test numerique, ajouter : 16 < 24 <= 32 > 40 >= // or numeric test, add : 16 < 24 <= 32 > 40 >=
static Standard_Integer multsign(const TCollection_AsciiString& signtext, static Standard_Integer multsign(const TCollection_AsciiString& signtext,
TColStd_SequenceOfAsciiString& signlist, TColStd_SequenceOfAsciiString& signlist,
TColStd_SequenceOfInteger& signmode) TColStd_SequenceOfInteger& signmode)
@@ -82,7 +82,7 @@ static Standard_Integer multsign(const TCollection_AsciiString& signtext,
{ {
signlist.Append(item); signlist.Append(item);
signmode.Append(imod); signmode.Append(imod);
// mode ++; valait un au depart // mode ++; was one at start
} }
return mode; return mode;
} }
@@ -145,13 +145,13 @@ Standard_Boolean IFSelect_SelectSignature::SortInGraph(const Standard_Integer,
return IFSelect_Signature::MatchValue(txt, thesigntext, (theexact < 0)); return IFSelect_Signature::MatchValue(txt, thesigntext, (theexact < 0));
} }
// sinon : liste // otherwise: list
// Analyse en sequence : si alternance prend/prend-pas, le dernier a raison // Sequence analysis: if take/don't-take alternation, the last one is right
// en consequence, si que des prend ou que des prend-pas, c est commutatif // consequently, if only takes or only don't-takes, it's commutative
// DONC recommendation : mettre les prend-pas en fin // THEREFORE recommendation: put the don't-takes at the end
// AU DEPART : prendre = ne prendre que. prend-pas = prend-tout-sauf ... // AT START: take = take only. don't-take = take-all-except ...
// Donc si le premier est un prend-pas, je commence par tout prendre // So if the first is a don't-take, I start by taking everything
Standard_Integer hmod = thesignmode.Value(1); Standard_Integer hmod = thesignmode.Value(1);
Standard_Integer jmod = hmod / 8; Standard_Integer jmod = hmod / 8;
Standard_Integer imod = hmod - (jmod * 8); Standard_Integer imod = hmod - (jmod * 8);

View File

@@ -55,13 +55,13 @@ Standard_Boolean IFSelect_SelectSignedShared::Explore(const Standard_Integer
if (thematcher->Matches(ent, G.Model(), thesigntext, theexact)) if (thematcher->Matches(ent, G.Model(), thesigntext, theexact))
return Standard_True; return Standard_True;
// sinon, on fait le tri ici // otherwise, we do the sorting here
Interface_EntityIterator list = G.Shareds(ent); Interface_EntityIterator list = G.Shareds(ent);
// Si plus de Shared, alors c est cuit // If no more Shared, then it's finished
if (list.NbEntities() == 0) if (list.NbEntities() == 0)
return Standard_False; return Standard_False;
// Sinon, trier si on est au niveau // Otherwise, sort if we are at the level
if (level < Level()) if (level < Level())
{ {
explored = list; explored = list;

View File

@@ -56,13 +56,13 @@ Standard_Boolean IFSelect_SelectSignedSharing::Explore(const Standard_Integer
if (thematcher->Matches(ent, G.Model(), thesigntext, theexact)) if (thematcher->Matches(ent, G.Model(), thesigntext, theexact))
return Standard_True; return Standard_True;
// sinon, on fait le tri ici // otherwise, we do the sorting here
Interface_EntityIterator list = G.Sharings(ent); Interface_EntityIterator list = G.Sharings(ent);
// Si plus de Sharing, alors c est cuit // If no more Sharing, then it's finished
if (list.NbEntities() == 0) if (list.NbEntities() == 0)
return Standard_False; return Standard_False;
// Sinon, trier si on est au niveau // Otherwise, sort if we are at the level
if (level < Level()) if (level < Level())
{ {
explored = list; explored = list;

View File

@@ -72,8 +72,8 @@ Interface_EntityIterator IFSelect_SelectSuite::RootResult(const Interface_Graph&
Standard_Boolean firstin = (HasInput() || HasAlternate()); Standard_Boolean firstin = (HasInput() || HasAlternate());
if (firstin) if (firstin)
iter = InputResult(G); iter = InputResult(G);
// Demarrage : on prend l Input/Alternate SI un des 2 est mis // Starting : we take the Input/Alternate IF one of the 2 is set
// Sinon, on demarre sur la definition de base de la premiere selection // Otherwise, we start on the basic definition of the first selection
Standard_Integer i, nb = NbItems(); Standard_Integer i, nb = NbItems();
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
@@ -81,7 +81,7 @@ Interface_EntityIterator IFSelect_SelectSuite::RootResult(const Interface_Graph&
Handle(IFSelect_SelectDeduct) anitem = Item(i); Handle(IFSelect_SelectDeduct) anitem = Item(i);
if (firstin) if (firstin)
anitem->Alternate()->SetList(iter.Content()); anitem->Alternate()->SetList(iter.Content());
firstin = Standard_True; // ensuite c est systematique firstin = Standard_True; // then it's systematic
iter = anitem->UniqueResult(G); iter = anitem->UniqueResult(G);
} }
return iter; return iter;

View File

@@ -25,7 +25,7 @@ Standard_Boolean IFSelect_Selection::HasUniqueResult() const
return Standard_False; return Standard_False;
} // eminemment redefinissable } // eminemment redefinissable
// UniqueResult, c est RootResult passe par une Map (-> mis a plat) // UniqueResult, it is RootResult passed through a Map (-> flattened)
Interface_EntityIterator IFSelect_Selection::UniqueResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_Selection::UniqueResult(const Interface_Graph& G) const
{ {
@@ -34,20 +34,20 @@ Interface_EntityIterator IFSelect_Selection::UniqueResult(const Interface_Graph&
return iter; return iter;
Interface_Graph GG(G); Interface_Graph GG(G);
GG.GetFromIter(iter, 0); GG.GetFromIter(iter, 0);
return Interface_GraphContent(GG); // EntityIterator specialise (meme taille) return Interface_GraphContent(GG); // specialized EntityIterator (same size)
} }
// CompleteResult, c est RootResult + propagation du partage (Shareds) // CompleteResult, it is RootResult + propagation of sharing (Shareds)
Interface_EntityIterator IFSelect_Selection::CompleteResult(const Interface_Graph& G) const Interface_EntityIterator IFSelect_Selection::CompleteResult(const Interface_Graph& G) const
{ {
Interface_EntityIterator iter = RootResult(G); Interface_EntityIterator iter = RootResult(G);
// On peut utiliser le Graphe a present // We can use the Graph now
Interface_Graph GG(G); Interface_Graph GG(G);
for (iter.Start(); iter.More(); iter.Next()) for (iter.Start(); iter.More(); iter.Next())
{ {
const Handle(Standard_Transient)& ent = iter.Value(); const Handle(Standard_Transient)& ent = iter.Value();
GG.GetFromEntity(ent, Standard_True); // et voila GG.GetFromEntity(ent, Standard_True); // and there we go
} }
return Interface_GraphContent(GG); // EntityIterator specialise (meme taille) return Interface_GraphContent(GG); // specialized EntityIterator (same size)
} }

View File

@@ -41,7 +41,7 @@ IFSelect_SessionFile::IFSelect_SessionFile(const Handle(IFSelect_WorkSession)& W
ClearLines(); ClearLines();
themode = Standard_False; themode = Standard_False;
if (!deja) if (!deja)
{ // au moins celui-la : { // at least this one :
Handle(IFSelect_BasicDumper) basedumper = new IFSelect_BasicDumper; Handle(IFSelect_BasicDumper) basedumper = new IFSelect_BasicDumper;
deja = 1; deja = 1;
} }
@@ -56,7 +56,7 @@ IFSelect_SessionFile::IFSelect_SessionFile(const Handle(IFSelect_WorkSession)& W
ClearLines(); ClearLines();
themode = Standard_True; themode = Standard_True;
if (!deja) if (!deja)
{ // au moins celui-la : { // at least this one :
Handle(IFSelect_BasicDumper) basedumper = new IFSelect_BasicDumper; Handle(IFSelect_BasicDumper) basedumper = new IFSelect_BasicDumper;
deja = 1; deja = 1;
} }
@@ -65,7 +65,7 @@ IFSelect_SessionFile::IFSelect_SessionFile(const Handle(IFSelect_WorkSession)& W
thelastgen = 0; thelastgen = 0;
thesess = WS; thesess = WS;
thedone = (Write(filename) == 0); thedone = (Write(filename) == 0);
// Close fait par Write (selon les cas) // Close done by Write (depending on cases)
} }
void IFSelect_SessionFile::ClearLines() void IFSelect_SessionFile::ClearLines()
@@ -113,8 +113,8 @@ Standard_Boolean IFSelect_SessionFile::ReadFile(const Standard_CString filename)
if (!lefic) if (!lefic)
return Standard_False; return Standard_False;
ClearLines(); ClearLines();
// read mode : lire les lignes // read mode : read the lines
// On charge le fichier dans "thelist" // Load the file into "thelist"
Standard_Boolean header = Standard_False; Standard_Boolean header = Standard_False;
for (;;) for (;;)
{ {
@@ -125,14 +125,14 @@ Standard_Boolean IFSelect_SessionFile::ReadFile(const Standard_CString filename)
} }
if (ligne[0] == '\0') if (ligne[0] == '\0')
continue; continue;
// D abord ligne initiale ? // First initial line ?
if (!header) if (!header)
{ {
if (!RecognizeFile(ligne)) if (!RecognizeFile(ligne))
break; break;
header = Standard_True; header = Standard_True;
} }
ligne[200] = '\0'; // fin forcee ... ligne[200] = '\0'; // forced end ...
TCollection_AsciiString onemore(ligne); TCollection_AsciiString onemore(ligne);
thelist.Append(onemore); thelist.Append(onemore);
} }
@@ -157,7 +157,7 @@ Standard_Boolean IFSelect_SessionFile::RecognizeFile(const Standard_CString head
sout << "Lineno." << thenl << " : File Header Description Incorrect" << std::endl; sout << "Lineno." << thenl << " : File Header Description Incorrect" << std::endl;
return Standard_False; return Standard_False;
} }
// Value(3) definit la VERSION du format de fichier // Value(3) defines the VERSION of the file format
return Standard_True; return Standard_True;
} }
@@ -186,13 +186,13 @@ Standard_Integer IFSelect_SessionFile::Read(const Standard_CString filename)
} }
// ################################################################## // ##################################################################
// ######## WriteSession : Ecriture du contenu ######## // ######## WriteSession : Writing the content ########
Standard_Integer IFSelect_SessionFile::WriteSession() Standard_Integer IFSelect_SessionFile::WriteSession()
{ {
char laligne[200]; char laligne[200];
thedone = Standard_True; thedone = Standard_True;
// ... Preparation Specifique // ... Specific Preparation
thenames.Clear(); thenames.Clear();
Standard_Integer nbidents = thesess->MaxIdent(); Standard_Integer nbidents = thesess->MaxIdent();
thenums = new TColStd_HArray1OfInteger(0, nbidents); thenums = new TColStd_HArray1OfInteger(0, nbidents);
@@ -205,7 +205,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
thenums->SetValue(i, -1); thenums->SetValue(i, -1);
} }
// ... ECRITURE // ... WRITING
Sprintf(laligne, "!XSTEP SESSION V1 %s", thesess->DynamicType()->Name()); Sprintf(laligne, "!XSTEP SESSION V1 %s", thesess->DynamicType()->Name());
WriteLine(laligne, '\n'); WriteLine(laligne, '\n');
Sprintf(laligne, "!GENERALS"); Sprintf(laligne, "!GENERALS");
@@ -266,8 +266,8 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
i = idents->Value(j); i = idents->Value(j);
Handle(IFSelect_Selection) P = thesess->Selection(i); Handle(IFSelect_Selection) P = thesess->Selection(i);
NewItem(i, P); NewItem(i, P);
// .. Ecritures particulieres // .. Particular writings
// -> Traiter les principaux sous-types : Extract,AnyList,AnyType // -> Handle the main sub-types : Extract,AnyList,AnyType
DeclareAndCast(IFSelect_SelectExtract, sxt, P); DeclareAndCast(IFSelect_SelectExtract, sxt, P);
if (!sxt.IsNull()) if (!sxt.IsNull())
{ {
@@ -283,7 +283,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
SendItem(sli->Upper()); SendItem(sli->Upper());
SetOwn(Standard_True); SetOwn(Standard_True);
} }
// .. Ecritures specifiques selon dumpers // .. Specific writings according to dumpers
WriteOwn(P); WriteOwn(P);
WriteLine("", '\n'); WriteLine("", '\n');
} }
@@ -315,12 +315,12 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
WriteLine("!MODIFIERS", '\n'); WriteLine("!MODIFIERS", '\n');
for (j = 1; j <= nb; j++) for (j = 1; j <= nb; j++)
{ {
// Description de base des Modifiers, donc sans Selection ni Dispatch-Rank // Basic description of Modifiers, so without Selection or Dispatch-Rank
i = idents->Value(j); i = idents->Value(j);
Handle(IFSelect_GeneralModifier) P = thesess->GeneralModifier(i); Handle(IFSelect_GeneralModifier) P = thesess->GeneralModifier(i);
NewItem(i, P); NewItem(i, P);
SetOwn(Standard_True); SetOwn(Standard_True);
// .. Ecritures specifiques selon dumpers // .. Specific writings according to dumpers
WriteOwn(P); WriteOwn(P);
WriteLine("", '\n'); WriteLine("", '\n');
} }
@@ -331,12 +331,12 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
WriteLine("!TRANSFORMERS", '\n'); WriteLine("!TRANSFORMERS", '\n');
for (j = 1; j <= nb; j++) for (j = 1; j <= nb; j++)
{ {
// Description des Transformers // Description of Transformers
i = idents->Value(j); i = idents->Value(j);
Handle(IFSelect_Transformer) P = thesess->Transformer(i); Handle(IFSelect_Transformer) P = thesess->Transformer(i);
NewItem(i, P); NewItem(i, P);
SetOwn(Standard_True); SetOwn(Standard_True);
// .. Ecritures specifiques selon dumpers // .. Specific writings according to dumpers
WriteOwn(P); WriteOwn(P);
WriteLine("", '\n'); WriteLine("", '\n');
} }
@@ -355,7 +355,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
SetOwn(Standard_False); SetOwn(Standard_False);
SendItem(P->FinalSelection()); SendItem(P->FinalSelection());
SetOwn(Standard_True); SetOwn(Standard_True);
// .. Ecritures specifiques selon dumpers // .. Specific writings according to dumpers
WriteOwn(P); WriteOwn(P);
WriteLine("", '\n'); WriteLine("", '\n');
} }
@@ -399,13 +399,13 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
WriteLine("", '\n'); WriteLine("", '\n');
} }
// Pour les Modifiers, ATTENTION car il faut respecter l ORDRE effectif // For Modifiers, CAUTION because we must respect the effective ORDER
// Or il y a deux listes : Model Modifiers; File Modifiers // Now there are two lists : Model Modifiers; File Modifiers
// Les Modifiers eux-memes ont deja ete ecrits // The Modifiers themselves have already been written
// Ici, on ecrit simplement leur utilisation dans l envoi final // Here, we simply write their use in the final sending
for (Standard_Integer formod = 1; formod >= 0; formod--) for (Standard_Integer formod = 1; formod >= 0; formod--)
{ {
idents = thesess->FinalModifierIdents((formod > 0)); // donnes dans l ordre d application idents = thesess->FinalModifierIdents((formod > 0)); // given in application order
nb = idents->Length(); nb = idents->Length();
if (nb == 0) if (nb == 0)
continue; continue;
@@ -419,7 +419,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
Handle(IFSelect_GeneralModifier) P = thesess->GeneralModifier(i); Handle(IFSelect_GeneralModifier) P = thesess->GeneralModifier(i);
SetOwn(Standard_False); SetOwn(Standard_False);
SendItem(P); SendItem(P);
// .. Parametres Generaux (les specifiques ont deja ete envoyes) // .. General Parameters (the specific ones have already been sent)
SendItem(P->Selection()); SendItem(P->Selection());
SendItem(P->Dispatch()); SendItem(P->Dispatch());
WriteLine("", '\n'); WriteLine("", '\n');
@@ -433,7 +433,7 @@ Standard_Integer IFSelect_SessionFile::WriteSession()
Standard_Integer IFSelect_SessionFile::WriteEnd() Standard_Integer IFSelect_SessionFile::WriteEnd()
{ {
WriteLine("!XSTEP END", '\n'); // sinon, cf sous-types de SessionFile ... WriteLine("!XSTEP END", '\n'); // otherwise, see SessionFile sub-types ...
return 0; return 0;
} }
@@ -470,17 +470,17 @@ Standard_Boolean IFSelect_SessionFile::WriteOwn(const Handle(Standard_Transient)
} }
// ################################################################## // ##################################################################
// ######## ReadSession : Lecture du contenu ######## // ######## ReadSession : Content Reading ########
Standard_Integer IFSelect_SessionFile::ReadSession() Standard_Integer IFSelect_SessionFile::ReadSession()
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
thedone = Standard_True; thedone = Standard_True;
// ... Preparation Specifique // ... Specific Preparation
thenums.Nullify(); thenums.Nullify();
thenames.Clear(); thenames.Clear();
// .. Donnees generales, controle // .. General data, control
if (!ReadLine()) if (!ReadLine())
return 1; return 1;
if (theline.Length() != 4) if (theline.Length() != 4)
@@ -495,11 +495,11 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
sout << "Lineno." << thenl << " : File Header Description Incorrect" << std::endl; sout << "Lineno." << thenl << " : File Header Description Incorrect" << std::endl;
return 1; return 1;
} }
// Value(3) definit la VERSION du format de fichier // Value(3) defines the VERSION of the file format
if (!ReadLine()) if (!ReadLine())
return 1; return 1;
// .. Parametres Generaux // .. General Parameters
Standard_Integer rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!GENERALS")); Standard_Integer rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!GENERALS"));
while (rubr) while (rubr)
{ {
@@ -509,7 +509,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
continue; continue;
const TCollection_AsciiString& ungen = theline.Value(1); const TCollection_AsciiString& ungen = theline.Value(1);
if (ungen.Value(1) == '!') if (ungen.Value(1) == '!')
break; // fin des generaux break; // end of generals
if (ungen.IsEqual("ErrorHandle")) if (ungen.IsEqual("ErrorHandle"))
{ {
if (theline.Length() != 2) if (theline.Length() != 2)
@@ -535,7 +535,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
} }
// .. IntParams // .. IntParams
// deja fait if (!ReadLine()) return 1; // already done if (!ReadLine()) return 1;
rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!INTEGERS")); rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!INTEGERS"));
while (rubr) while (rubr)
{ {
@@ -553,7 +553,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
AddItem(par); AddItem(par);
} }
// .. TextParams (ligne de garde deja lue) // .. TextParams (guard line already read)
rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!TEXTS")); rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!TEXTS"));
while (rubr) while (rubr)
{ {
@@ -566,7 +566,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
sout << "Lineno." << thenl << " : A Text Parameter is badly defined" << std::endl; sout << "Lineno." << thenl << " : A Text Parameter is badly defined" << std::endl;
continue; continue;
} }
// Attention, un texte peut contenir des blancs ... repartir de line(thenl) // Caution, a text can contain blanks ... restart from line(thenl)
TCollection_AsciiString oneline = thelist.Value(thenl); TCollection_AsciiString oneline = thelist.Value(thenl);
Standard_Integer iw = 0, inc = 0; Standard_Integer iw = 0, inc = 0;
for (Standard_Integer ic = 1; ic <= oneline.Length(); ic++) for (Standard_Integer ic = 1; ic <= oneline.Length(); ic++)
@@ -582,7 +582,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
AddItem(new TCollection_HAsciiString(oneline.ToCString())); AddItem(new TCollection_HAsciiString(oneline.ToCString()));
} }
// .. Selections (ligne de garde deja lue) // .. Selections (guard line already read)
rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!SELECTIONS")); rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!SELECTIONS"));
while (rubr) while (rubr)
{ {
@@ -595,7 +595,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
sout << "Lineno." << thenl << " : A Selection is badly defined" << std::endl; sout << "Lineno." << thenl << " : A Selection is badly defined" << std::endl;
continue; continue;
} }
// .. Analyse de certains cas generaux // .. Analysis of certain general cases
Handle(IFSelect_IntParam) low, up; Handle(IFSelect_IntParam) low, up;
Standard_Integer firstown = 3; Standard_Integer firstown = 3;
Standard_Integer direct = 0; Standard_Integer direct = 0;
@@ -620,7 +620,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
} }
SetLastGeneral(firstown - 1); SetLastGeneral(firstown - 1);
} }
Handle(Standard_Transient) item; // a fournir ... Handle(Standard_Transient) item; // to be provided ...
ReadOwn(item); ReadOwn(item);
if (item.IsNull()) if (item.IsNull())
continue; continue;
@@ -663,7 +663,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
continue; continue;
} }
Standard_Integer nbs = atoi(theline.Value(2).ToCString()); Standard_Integer nbs = atoi(theline.Value(2).ToCString());
// .. Differents cas reconnus // .. Different recognized cases
DeclareAndCast(IFSelect_SelectExtract, sxt, sel); DeclareAndCast(IFSelect_SelectExtract, sxt, sel);
if (!sxt.IsNull()) if (!sxt.IsNull())
{ {
@@ -698,7 +698,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
} }
} }
// ... Modifiers en tout genre // ... Modifiers of all kinds
rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!MODIFIERS")); rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!MODIFIERS"));
while (rubr) while (rubr)
{ {
@@ -711,7 +711,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
sout << "Lineno." << thenl << " : A Modifier is badly defined" << std::endl; sout << "Lineno." << thenl << " : A Modifier is badly defined" << std::endl;
continue; continue;
} }
Handle(Standard_Transient) item; // a fournir ... Handle(Standard_Transient) item; // to be provided ...
ReadOwn(item); ReadOwn(item);
if (item.IsNull()) if (item.IsNull())
continue; continue;
@@ -721,7 +721,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
sout << "Lineno." << thenl << " : A Modifier has not been Recognized" << std::endl; sout << "Lineno." << thenl << " : A Modifier has not been Recognized" << std::endl;
continue; continue;
} }
AddItem(modif, Standard_False); // active plus tard AddItem(modif, Standard_False); // active later
} }
// ... Transformers // ... Transformers
@@ -737,7 +737,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
sout << "Lineno." << thenl << " : A Transformer is badly defined" << std::endl; sout << "Lineno." << thenl << " : A Transformer is badly defined" << std::endl;
continue; continue;
} }
Handle(Standard_Transient) item; // a fournir ... Handle(Standard_Transient) item; // to be provided ...
ReadOwn(item); ReadOwn(item);
if (item.IsNull()) if (item.IsNull())
continue; continue;
@@ -747,10 +747,10 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
sout << "Lineno." << thenl << " : A Transformer has not been Recognized" << std::endl; sout << "Lineno." << thenl << " : A Transformer has not been Recognized" << std::endl;
continue; continue;
} }
AddItem(trf, Standard_False); // active plus tard AddItem(trf, Standard_False); // active later
} }
// ... Dispatches (ligne de garde deja lue) // ... Dispatches (guard line already read)
rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!DISPATCHES")); rubr = (theline.Length() == 1 && theline.Value(1).IsEqual("!DISPATCHES"));
while (rubr) while (rubr)
{ {
@@ -765,7 +765,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
} }
DeclareAndCast(IFSelect_Selection, input, ItemValue(3)); DeclareAndCast(IFSelect_Selection, input, ItemValue(3));
SetLastGeneral(3); SetLastGeneral(3);
Handle(Standard_Transient) item; // a fournir ... Handle(Standard_Transient) item; // to be provided ...
ReadOwn(item); ReadOwn(item);
if (item.IsNull()) if (item.IsNull())
continue; continue;
@@ -779,8 +779,8 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
thesess->SetItemSelection(disp, input); thesess->SetItemSelection(disp, input);
} }
// ... FileNaming (ligne de garde deja lue) // ... FileNaming (guard line already read)
// .. Modifiers deja lus et charges // .. Modifiers already read and loaded
rubr = (theline.Length() == 4 && theline.Value(1).IsEqual("!FILENAMING")); rubr = (theline.Length() == 4 && theline.Value(1).IsEqual("!FILENAMING"));
if (rubr) if (rubr)
{ {
@@ -806,8 +806,8 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
thesess->SetFileRoot(disp, theline.Value(2).ToCString()); thesess->SetFileRoot(disp, theline.Value(2).ToCString());
} }
// ... Modifiers (ligne de garde deja lue) // ... Modifiers (guard line already read)
// ... Attention, deux listes (MODELMODIFIERS et FILEMODIFIERS) // ... Caution, two lists (MODELMODIFIERS and FILEMODIFIERS)
for (Standard_Integer formod = 1; formod >= 0; formod--) for (Standard_Integer formod = 1; formod >= 0; formod--)
{ {
rubr = (theline.Length() == 1 rubr = (theline.Length() == 1
@@ -846,7 +846,7 @@ Standard_Integer IFSelect_SessionFile::ReadSession()
} }
} }
// ... Conclusion : voir ReadEnd (separe) // ... Conclusion: see ReadEnd (separate)
return 0; return 0;
} }
@@ -868,7 +868,7 @@ Standard_Boolean IFSelect_SessionFile::ReadLine()
return Standard_False; return Standard_False;
thenl++; thenl++;
Standard_CString ligne = thelist.Value(thenl).ToCString(); Standard_CString ligne = thelist.Value(thenl).ToCString();
// Lignes vides ? // Empty lines?
if (ligne[0] == '\0') if (ligne[0] == '\0')
return ReadLine(); return ReadLine();
SplitLine(ligne); SplitLine(ligne);
@@ -916,7 +916,7 @@ Standard_Boolean IFSelect_SessionFile::ReadOwn(Handle(Standard_Transient)& item)
return Standard_False; return Standard_False;
const TCollection_AsciiString& type = theline.Value(2); const TCollection_AsciiString& type = theline.Value(2);
if (thelastgen < 2) if (thelastgen < 2)
thelastgen = 2; // mini : ident+type d abord thelastgen = 2; // mini : ident+type first
// thelastgen = theline.Length(); // thelastgen = theline.Length();
// for (Standard_Integer i = theline.Length(); i > 0; i --) { // for (Standard_Integer i = theline.Length(); i > 0; i --) {
// if (theline.Value(i).Value(1) == ':') thelastgen = i - 1; // if (theline.Value(i).Value(1) == ':') thelastgen = i - 1;
@@ -965,7 +965,7 @@ Handle(IFSelect_WorkSession) IFSelect_SessionFile::WorkSession() const
return thesess; return thesess;
} }
// ######## Actions Unitaires d ECRITURE ######## // ######## Unit WRITING Actions ########
void IFSelect_SessionFile::NewItem(const Standard_Integer ident, void IFSelect_SessionFile::NewItem(const Standard_Integer ident,
const Handle(Standard_Transient)& par) const Handle(Standard_Transient)& par)
@@ -1028,7 +1028,7 @@ void IFSelect_SessionFile::SendText(const Standard_CString text)
WriteLine(laligne); WriteLine(laligne);
} }
// ######## Actions Unitaires de LECTURE ######## // ######## Unit READING Actions ########
void IFSelect_SessionFile::SetLastGeneral(const Standard_Integer lastgen) void IFSelect_SessionFile::SetLastGeneral(const Standard_Integer lastgen)
{ {
@@ -1108,4 +1108,4 @@ Handle(Standard_Transient) IFSelect_SessionFile::ItemValue(const Standard_Intege
return thesess->Item(id); return thesess->Item(id);
} }
void IFSelect_SessionFile::Destroy() {} // agit si File non ferme, sinon ne fait rien void IFSelect_SessionFile::Destroy() {} // acts if File not closed, otherwise does nothing

View File

@@ -36,7 +36,7 @@ static TCollection_AsciiString nulword;
// #define DEBUG_TRACE // #define DEBUG_TRACE
// Nb Maxi de words : cf thewords et method SetCommandLine // Max Nb of words : cf thewords and method SetCommandLine
IFSelect_SessionPilot::IFSelect_SessionPilot(const Standard_CString prompt) IFSelect_SessionPilot::IFSelect_SessionPilot(const Standard_CString prompt)
: theprompt(prompt), : theprompt(prompt),
@@ -100,7 +100,7 @@ void IFSelect_SessionPilot::SetCommandLine(const TCollection_AsciiString& comman
{ {
Standard_Integer lc = command.Length(); Standard_Integer lc = command.Length();
if (lc > 200) if (lc > 200)
std::cout << " Commande TRES LONGUE : " << lc << " caracteres :" << std::endl std::cout << " VERY LONG Command : " << lc << " characters :" << std::endl
<< command.ToCString() << std::endl; << command.ToCString() << std::endl;
thecommand = command; thecommand = command;
if (thecommand.Value(lc) <= ' ') if (thecommand.Value(lc) <= ' ')
@@ -151,12 +151,12 @@ void IFSelect_SessionPilot::SetCommandLine(const TCollection_AsciiString& comman
thewords(thenbwords).AssignCat(unarg); thewords(thenbwords).AssignCat(unarg);
#ifdef DEBUG_TRACE #ifdef DEBUG_TRACE
std::cout << "thewords(" << thenbwords << ")=" << unarg << std::endl std::cout << "thewords(" << thenbwords << ")=" << unarg << std::endl
<< " .. Fin avec thenbwords=" << thenbwords + 1 << std::endl; << " .. End with thenbwords=" << thenbwords + 1 << std::endl;
#endif #endif
thenbwords++; thenbwords++;
} }
/* /*
aligner sur MAXWORDS align on MAXWORDS
char l0[80],l1[80],l2[80],l3[80],l4[80],l5[80],l6[80],l7[80],l8[80],l9[80]; char l0[80],l1[80],l2[80],l3[80],l4[80],l5[80],l6[80],l7[80],l8[80],l9[80];
char m0[80],m1[80],m2[80],m3[80],m4[80],m5[80],m6[80],m7[80],m8[80],m9[80]; char m0[80],m1[80],m2[80],m3[80],m4[80],m5[80],m6[80],m7[80],m8[80],m9[80];
thenbwords = sscanf thenbwords = sscanf
@@ -237,14 +237,14 @@ Standard_Boolean IFSelect_SessionPilot::RemoveWord(const Standard_Integer num)
} }
thewords(thenbwords).Clear(); thewords(thenbwords).Clear();
thenbwords--; thenbwords--;
// Et refaire thecommand. Si num = 0, on supprime le debut (facile) // And redo thecommand. If num = 0, we remove the beginning (easy)
if (num == 0) if (num == 0)
{ {
thecommand.Remove(1, thewordeb(1)); thecommand.Remove(1, thewordeb(1));
} }
else else
{ {
// Sinon, reconstituer, a partir des words // Otherwise, reconstitute, from the words
thecommand.Clear(); thecommand.Clear();
for (i = 0; i < thenbwords; i++) for (i = 0; i < thenbwords; i++)
{ {
@@ -284,7 +284,7 @@ void IFSelect_SessionPilot::Clear()
} }
// ####################################################################### // #######################################################################
// ######## CONTROLE D EXECUTION // ######## EXECUTION CONTROL
IFSelect_ReturnStatus IFSelect_SessionPilot::ReadScript(const Standard_CString file) IFSelect_ReturnStatus IFSelect_SessionPilot::ReadScript(const Standard_CString file)
{ {
@@ -318,10 +318,10 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::ReadScript(const Standard_CString f
} }
if (ligne[0] == '\0') if (ligne[0] == '\0')
continue; continue;
// On interprete cette commande // We interpret this command
TCollection_AsciiString command(ligne); TCollection_AsciiString command(ligne);
if (lefic) if (lefic)
std::cout << file << ":" << command; // le return est dans la ligne ... ! std::cout << file << ":" << command; // the return is in the line ... !
stat = Execute(command); stat = Execute(command);
if (stat == IFSelect_RetStop) if (stat == IFSelect_RetStop)
break; break;
@@ -337,10 +337,10 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::ReadScript(const Standard_CString f
std::cout << "End of Reading Script File " << file << std::endl; std::cout << "End of Reading Script File " << file << std::endl;
if (stat == IFSelect_RetError || stat == IFSelect_RetFail) if (stat == IFSelect_RetError || stat == IFSelect_RetFail)
return stat; return stat;
return IFSelect_RetVoid; // fin fichier : depiler return IFSelect_RetVoid; // end file : unstack
} }
// On boucle sur la lecture jusqu a une commande de fin ou un EOF // We loop on reading until an end command or an EOF
IFSelect_ReturnStatus IFSelect_SessionPilot::Perform() IFSelect_ReturnStatus IFSelect_SessionPilot::Perform()
{ {
@@ -348,22 +348,22 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Perform()
if (thenbwords == 0) if (thenbwords == 0)
return stat; return stat;
if (thewords(0).Value(1) == '#') if (thewords(0).Value(1) == '#')
return stat; // commentaire return stat; // comment
theobjrec.Nullify(); theobjrec.Nullify();
// Est-ce un nom ? // Is it a name ?
// Commande pour un Acteur // Command for an Actor
Handle(IFSelect_Activator) actor; Handle(IFSelect_Activator) actor;
Standard_Integer num; Standard_Integer num;
if (IFSelect_Activator::Select(thewords(0).ToCString(), num, actor)) if (IFSelect_Activator::Select(thewords(0).ToCString(), num, actor))
{ {
stat = actor->Do(num, this); stat = actor->Do(num, this);
// Prise en compte des commandes a resultat // Taking into account commands with result
// Ici, resultat non nomme; Resultat nomme par commande x (plus loin) // Here, unnamed result; Result named by command x (further)
if (!theobjrec.IsNull()) if (!theobjrec.IsNull())
{ {
thesession->RemoveItem(theobjrec); //// depannage ? thesession->RemoveItem(theobjrec); //// troubleshooting ?
Standard_Integer addws = thesession->AddItem(theobjrec); Standard_Integer addws = thesession->AddItem(theobjrec);
if (addws == 0) if (addws == 0)
{ {
@@ -384,7 +384,7 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Perform()
return stat; return stat;
} }
std::cout << " Command : " << thewords(0) << " unknown" << std::endl; std::cout << " Command : " << thewords(0) << " unknown" << std::endl;
return IFSelect_RetError; // pas reconnu donc incorrect return IFSelect_RetError; // not recognized therefore incorrect
} }
IFSelect_ReturnStatus IFSelect_SessionPilot::ExecuteAlias(const TCollection_AsciiString& alias) IFSelect_ReturnStatus IFSelect_SessionPilot::ExecuteAlias(const TCollection_AsciiString& alias)
@@ -412,7 +412,7 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::ExecuteCounter(
counter->AddModel(thesession->Model()); counter->AddModel(thesession->Model());
else else
{ {
// on demande un givelist // we request a givelist
Handle(TColStd_HSequenceOfTransient) list = thesession->GiveList(CommandPart(numword)); Handle(TColStd_HSequenceOfTransient) list = thesession->GiveList(CommandPart(numword));
if (list.IsNull()) if (list.IsNull())
{ {
@@ -443,7 +443,7 @@ Standard_Integer IFSelect_SessionPilot::Number(const Standard_CString val) const
IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer number, IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer number,
const Handle(IFSelect_SessionPilot)& session) const Handle(IFSelect_SessionPilot)& session)
{ {
// Commandes Propres : x, exit, undo, redo, ?, help // Own Commands : x, exit, undo, redo, ?, help
IFSelect_ReturnStatus stat = IFSelect_RetVoid; IFSelect_ReturnStatus stat = IFSelect_RetVoid;
Standard_Integer argc = NbWords(); Standard_Integer argc = NbWords();
const Standard_CString arg1 = Word(1).ToCString(); const Standard_CString arg1 = Word(1).ToCString();
@@ -453,17 +453,17 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
case -1: // **** HELP-XSNEW case -1: // **** HELP-XSNEW
modhelp = 1; modhelp = 1;
std::cout << " -- Commands candidate for xsnew --" << std::endl; std::cout << " -- Commands candidate for xsnew --" << std::endl;
// HELP : soit complet (par defaut) soit limite a xsnew // HELP : either complete (by default) or limited to xsnew
Standard_FALLTHROUGH Standard_FALLTHROUGH
case 0: { // **** HELP case 0: { // **** HELP
Handle(TColStd_HSequenceOfAsciiString) list; Handle(TColStd_HSequenceOfAsciiString) list;
// Help complet : on donne la liste des commandes, sans plus (deja pas mal) // Complete Help : we give the list of commands, nothing more (already not bad)
if (thenbwords <= 1) if (thenbwords <= 1)
{ {
list = IFSelect_Activator::Commands(modhelp); list = IFSelect_Activator::Commands(modhelp);
Standard_Integer nbcom = 0; Standard_Integer nbcom = 0;
Standard_Integer nb = list->Length(); Standard_Integer nb = list->Length();
std::cout << " -- Liste des Commands Disponibles --" << std::endl; std::cout << " -- List of Available Commands --" << std::endl;
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
{ {
const TCollection_AsciiString& uncom = list->Value(i); const TCollection_AsciiString& uncom = list->Value(i);
@@ -482,11 +482,11 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
} }
if (nbcom > 0) if (nbcom > 0)
std::cout << std::endl; std::cout << std::endl;
std::cout << "\nhelp * liste toutes les commandes avec un help sur chacune\n" std::cout << "\nhelp * lists all commands with help on each\n"
<< "help <com> liste la ou les commande debutant par <com>" << "help <com> lists the command(s) starting with <com>"
<< " avec un help sur chacune" << std::endl; << " with help on each" << std::endl;
// Un Help particulier // A particular Help
} }
else else
{ {
@@ -515,17 +515,16 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
return IFSelect_RetVoid; return IFSelect_RetVoid;
} }
case 1: case 1:
return IFSelect_RetStop; // **** Fin de session return IFSelect_RetStop; // **** End of session
case 2: { // **** HELP case 2: { // **** HELP
return Do(0, this); return Do(0, this);
} }
case 3: { // **** COMMAND case 3: { // **** COMMAND
if (argc < 2) if (argc < 2)
{ {
std::cout << "Donner une option :\n" std::cout << "Give an option :\n"
<< "a : analyse une ligne r : toggle record mode\n" << "a : analyze a line r : toggle record mode\n"
<< "l : list recorded c : clear f nom : sauver dans fichier de nom" << "l : list recorded c : clear f name : save in file of name" << std::endl;
<< std::endl;
return IFSelect_RetVoid; return IFSelect_RetVoid;
} }
switch (arg1[0]) switch (arg1[0])
@@ -545,16 +544,16 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
case 'f': { case 'f': {
if (argc < 3) if (argc < 3)
{ {
std::cout << "Donner nom de fichier" << std::endl; std::cout << "Give file name" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
Standard_Integer nb = session->NbCommands(); Standard_Integer nb = session->NbCommands();
if (nb == 0) if (nb == 0)
{ {
std::cout << "Aucune commande enregistree" << std::endl; std::cout << "No command recorded" << std::endl;
break; break;
} }
std::cout << "Nb Commandes enregistrees : " << nb << std::endl; std::cout << "Nb Recorded Commands : " << nb << std::endl;
std::ofstream fout(Word(2).ToCString(), std::ios::out); std::ofstream fout(Word(2).ToCString(), std::ios::out);
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
fout << session->Command(i) << std::endl; fout << session->Command(i) << std::endl;
@@ -562,11 +561,11 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
} }
case 'l': { // **** command list case 'l': { // **** command list
if (session->RecordMode()) if (session->RecordMode())
std::cout << " -- Record Mode Actif" << std::endl; std::cout << " -- Record Mode Active" << std::endl;
else else
std::cout << " -- Record Mode Inactif" << std::endl; std::cout << " -- Record Mode Inactive" << std::endl;
Standard_Integer nb = session->NbCommands(); Standard_Integer nb = session->NbCommands();
std::cout << "Nb Commandes enregistrees : " << nb << " :" << std::endl; std::cout << "Nb Recorded Commands : " << nb << " :" << std::endl;
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
{ {
std::cout << " " << i << " " << session->Command(i) << std::endl; std::cout << " " << i << " " << session->Command(i) << std::endl;
@@ -576,14 +575,14 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
case 'r': { // **** command record case 'r': { // **** command record
Standard_Boolean mode = session->RecordMode(); Standard_Boolean mode = session->RecordMode();
if (mode) if (mode)
std::cout << " -- Record Mode a present Inactif" << std::endl; std::cout << " -- Record Mode now Inactive" << std::endl;
else else
std::cout << " -- Record Mode a present Actif" << std::endl; std::cout << " -- Record Mode now Active" << std::endl;
session->SetRecordMode(!mode); session->SetRecordMode(!mode);
break; break;
} }
default: default:
std::cout << "Option de controle de commande non comprise" << std::endl; std::cout << "Command control option not understood" << std::endl;
} }
return IFSelect_RetVoid; return IFSelect_RetVoid;
} }
@@ -591,18 +590,18 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
case 4: { // **** FILE case 4: { // **** FILE
if (argc < 2) if (argc < 2)
{ {
std::cout << "Donner nom de fichier" << std::endl; std::cout << "Give file name" << std::endl;
return IFSelect_RetError; return IFSelect_RetError;
} }
return session->ReadScript(TCollection_AsciiString(session->Word(1)).ToCString()); return session->ReadScript(TCollection_AsciiString(session->Word(1)).ToCString());
// On recopie la string parce que Word(1) change tout le temps ! // We copy the string because Word(1) changes all the time !
} }
case 5: { // **** XSTEP case 5: { // **** XSTEP
if (argc < 2) if (argc < 2)
{ {
std::cout << "xstep : prefixe neutre pour toute commande xstep-draw" << std::endl std::cout << "xstep : neutral prefix for any xstep-draw command" << std::endl
<< "xstep command args equivaut a command args" << std::endl; << "xstep command args equivalent to command args" << std::endl;
return Do(2, this); return Do(2, this);
} }
else else
@@ -614,8 +613,8 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
case 6: { // **** XSNEW(variable) case 6: { // **** XSNEW(variable)
if (argc < 3) if (argc < 3)
{ {
std::cout << "xsnew nomvar command [args] creates an item" << std::endl std::cout << "xsnew varname command [args] creates an item" << std::endl
<< " nomvar : name of item (must be a new name) in the session" << std::endl; << " varname : name of item (must be a new name) in the session" << std::endl;
return Do(-1, this); return Do(-1, this);
} }
else else
@@ -623,7 +622,7 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
theobjrec.Nullify(); theobjrec.Nullify();
TCollection_AsciiString name = Word(1); TCollection_AsciiString name = Word(1);
// Le nom ne doit pas etre deja pris ! // The name must not be already taken !
if (thesession.IsNull()) if (thesession.IsNull())
{ {
std::cout << "Command with a Name and no Session defined !" << std::endl; std::cout << "Command with a Name and no Session defined !" << std::endl;
@@ -635,17 +634,17 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
RemoveWord(0); RemoveWord(0);
RemoveWord(0); RemoveWord(0);
// Commande pour un Acteur // Command for an Actor
Handle(IFSelect_Activator) actor; Handle(IFSelect_Activator) actor;
Standard_Integer num; Standard_Integer num;
if (IFSelect_Activator::Select(thewords(0).ToCString(), num, actor)) if (IFSelect_Activator::Select(thewords(0).ToCString(), num, actor))
{ {
theobjrec.Nullify(); theobjrec.Nullify();
stat = actor->Do(num, this); stat = actor->Do(num, this);
// Prise en compte des commandes a resultat // Taking into account commands with result
if (!theobjrec.IsNull()) if (!theobjrec.IsNull())
{ {
thesession->RemoveItem(theobjrec); //// depannage ? thesession->RemoveItem(theobjrec); //// troubleshooting ?
Standard_Integer addws = thesession->AddNamedItem(name.ToCString(), theobjrec); Standard_Integer addws = thesession->AddNamedItem(name.ToCString(), theobjrec);
theobjrec.Nullify(); theobjrec.Nullify();
if (addws == 0) if (addws == 0)
@@ -660,7 +659,7 @@ IFSelect_ReturnStatus IFSelect_SessionPilot::Do(const Standard_Integer
return stat; return stat;
} }
std::cout << " Command : " << thewords(0) << " unknown" << std::endl; std::cout << " Command : " << thewords(0) << " unknown" << std::endl;
return IFSelect_RetError; // pas reconnu donc incorrect return IFSelect_RetError; // not recognized therefore incorrect
} }
} }
default: default:
@@ -673,17 +672,17 @@ Standard_CString IFSelect_SessionPilot::Help(const Standard_Integer number) cons
switch (number) switch (number)
{ {
case 1: case 1:
return "exit ou x : Fin de session"; return "exit or x : End of session";
case 2: case 2:
return "Liste les commandes. ? <titre> : commandes debutant par <titre>"; return "Lists the commands. ? <title> : commands starting with <title>";
case 3: case 3:
return "controle de commande. command tout court pour help complet"; return "command control. command alone for complete help";
case 4: case 4:
return "lit les commandes depuis un fichier"; return "reads commands from a file";
case 5: case 5:
return "prefixe neutre pour xstep-draw"; return "neutral prefix for xstep-draw";
case 6: case 6:
return "creation item : donner nom_item puis commande args"; return "item creation : give item_name then command args";
default: default:
return ""; return "";
} }

View File

@@ -74,7 +74,7 @@ void IFSelect_ShareOut::SetLastRun(const Standard_Integer lastrun)
} }
// ####################################################################### // #######################################################################
// #### DISPATCHES (ENVOI DES FICHIERS) #### // #### DISPATCHES (FILE SENDING) ####
Standard_Integer IFSelect_ShareOut::NbDispatches() const Standard_Integer IFSelect_ShareOut::NbDispatches() const
{ {
@@ -218,8 +218,8 @@ Standard_Boolean IFSelect_ShareOut::RemoveModifier(const Standard_Boolean formod
return Standard_True; return Standard_True;
} }
// ChangeModifierRank revient a une permutation circulaire : // ChangeModifierRank amounts to a circular permutation :
// before est mis en after, ceux qui sont entre tournent // before is put in after, those that are between rotate
Standard_Boolean IFSelect_ShareOut::ChangeModifierRank(const Standard_Boolean formodel, Standard_Boolean IFSelect_ShareOut::ChangeModifierRank(const Standard_Boolean formodel,
const Standard_Integer before, const Standard_Integer before,
const Standard_Integer after) const Standard_Integer after)
@@ -257,8 +257,8 @@ Standard_Boolean IFSelect_ShareOut::ChangeModifierRank(const Standard_Boolean fo
} }
// ####################################################################### // #######################################################################
// #### NOMINATION DES FICHIERS #### // #### FILE NAMING ####
// Rq : thenbdefs s applique tant que l on ne change pas les termes principaux // Note : thenbdefs applies as long as we don't change the main terms
Standard_Boolean IFSelect_ShareOut::SetRootName(const Standard_Integer num, Standard_Boolean IFSelect_ShareOut::SetRootName(const Standard_Integer num,
const Handle(TCollection_HAsciiString)& name) const Handle(TCollection_HAsciiString)& name)
@@ -364,7 +364,7 @@ TCollection_AsciiString IFSelect_ShareOut::FileName(const Standard_Integer dnum,
thenbdefs++; thenbdefs++;
num = thenbdefs; num = thenbdefs;
npac = 0; npac = 0;
sufnum = Standard_True; // numeroter sur noms par defaut, des le 1er sans 0 sufnum = Standard_True; // number on default names, from the 1st without 0
} }
TCollection_AsciiString res; TCollection_AsciiString res;
@@ -375,13 +375,13 @@ TCollection_AsciiString IFSelect_ShareOut::FileName(const Standard_Integer dnum,
// Suffixe numerique // Suffixe numerique
if (sufnum) if (sufnum)
{ // sinon, pas de suffixe numerique { // otherwise, no numeric suffix
// Nom du PacketSuffix : _ suivi du numero <num> // PacketSuffix name : _ followed by number <num>
// Si nbpack non nul, alors on a un majorant et on peut preceder de zeros // If nbpack non-zero, then we have an upper bound and we can precede with zeros
// Ex.: nbpack = 50 (donc 2 chiffres), num = 3, cela donnera _03 // Ex.: nbpack = 50 (so 2 digits), num = 3, this will give _03
// idnum pas utilise : cette methode peut etre redefinie et utiliser idnum ... // idnum not used : this method can be redefined and use idnum ...
// Si nbpack = 0 ou 1, num = 1 pas de suffixe, sinon suffixe "_num" tel quel // If nbpack = 0 or 1, num = 1 no suffix, otherwise suffix "_num" as is
// MODIF du 3-NOV-1995 -> pour eviter toute confusion, num = 1 donne aussi _1 // MODIF of 3-NOV-1995 -> to avoid any confusion, num = 1 also gives _1
Standard_Integer nbch = 0; Standard_Integer nbch = 0;
char format[30], suffixe[30]; char format[30], suffixe[30];
format[1] = ' '; format[1] = ' ';

View File

@@ -79,7 +79,7 @@ void IFSelect_ShareOutResult::Reset()
void IFSelect_ShareOutResult::Evaluate() void IFSelect_ShareOutResult::Evaluate()
{ {
if (theeval) if (theeval)
return; // deja fait. si pas OK, faire Reset avant return; // already done. if not OK, do Reset before
Prepare(); Prepare();
theeval = Standard_True; theeval = Standard_True;
} }
@@ -134,14 +134,14 @@ void IFSelect_ShareOutResult::Prepare()
if (iter.NbEntities() == 0) if (iter.NbEntities() == 0)
continue; continue;
thedispres.AddPart(); thedispres.AddPart();
thedispres.GetFromIter(iter); // on enregistre ce paquet thedispres.GetFromIter(iter); // we register this packet
A.ResetData(); A.ResetData();
A.GetFromIter(iter); A.GetFromIter(iter);
thedisplist.Append(i); // n0 du dispatch producteur thedisplist.Append(i); // n0 of producer dispatch
} }
} }
thedispnum = thepacknum = 1; thedispnum = thepacknum = 1;
thepackdisp = 1; // calcul sur 1er Dispatch thepackdisp = 1; // calculation on 1st Dispatch
thenbindisp = 0; thenbindisp = 0;
for (i = thepacknum; i <= thedisplist.Length(); i++) for (i = thepacknum; i <= thedisplist.Length(); i++)
{ {

View File

@@ -24,7 +24,7 @@ static Standard_CString nulsign = "";
IFSelect_SignCategory::IFSelect_SignCategory() IFSelect_SignCategory::IFSelect_SignCategory()
: IFSelect_Signature("Category") : IFSelect_Signature("Category")
{ {
Interface_Category::Init(); // si pas deja fait Interface_Category::Init(); // if not already done
Standard_Integer i, nb = Interface_Category::NbCategories(); Standard_Integer i, nb = Interface_Category::NbCategories();
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
AddCase(Interface_Category::Name(i)); AddCase(Interface_Category::Name(i));

View File

@@ -72,7 +72,7 @@ void IFSelect_SignCounter::AddSign(const Handle(Standard_Transient)& ent,
char nulsign[2]; char nulsign[2];
nulsign[0] = '\0'; nulsign[0] = '\0';
if (ent.IsNull() || thematcher.IsNull()) if (ent.IsNull() || thematcher.IsNull())
Add(ent, nulsign); // pour compter les Nuls Add(ent, nulsign); // to count the Nulls
else else
Add(ent, thematcher->Value(ent, model)); Add(ent, thematcher->Value(ent, model));
} }
@@ -98,7 +98,7 @@ void IFSelect_SignCounter::AddModel(const Handle(Interface_InterfaceModel)& mode
if (model.IsNull()) if (model.IsNull())
return; return;
Standard_Integer nb = model->NbEntities(); Standard_Integer nb = model->NbEntities();
// Si on part de vide, on sait que chque entite est unique dans le modele // If we start from empty, we know that each entity is unique in the model
Standard_Boolean mapstat = themapstat; Standard_Boolean mapstat = themapstat;
if (themap.Extent() == 0) if (themap.Extent() == 0)
themapstat = Standard_False; themapstat = Standard_False;

View File

@@ -19,7 +19,7 @@
IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SignMultiple, IFSelect_Signature) IMPLEMENT_STANDARD_RTTIEXT(IFSelect_SignMultiple, IFSelect_Signature)
static TCollection_AsciiString theval; // temporaire pour construire Value static TCollection_AsciiString theval; // temporary to build Value
IFSelect_SignMultiple::IFSelect_SignMultiple(const Standard_CString name) IFSelect_SignMultiple::IFSelect_SignMultiple(const Standard_CString name)
: IFSelect_Signature(name) : IFSelect_Signature(name)

View File

@@ -119,7 +119,7 @@ Standard_Boolean IFSelect_Signature::MatchValue(const Standard_CString v
{ {
if (val[i] == cardeb) if (val[i] == cardeb)
{ {
// un candidat // a candidate
Standard_Boolean res = Standard_True; Standard_Boolean res = Standard_True;
for (j = 1; j < ln; j++) for (j = 1; j < ln; j++)
{ {

View File

@@ -260,7 +260,7 @@ void IFSelect_SignatureList::PrintSum(Standard_OStream& S) const
if (nbent > maxent) if (nbent > maxent)
maxent = nbent; maxent = nbent;
const TCollection_AsciiString& name = iter.Key(); const TCollection_AsciiString& name = iter.Key();
// if (!name.IsIntegerValue()) continue; pas bien fiable // if (!name.IsIntegerValue()) continue; not very reliable
Standard_Integer ic, nc = name.Length(); Standard_Integer ic, nc = name.Length();
Standard_Boolean iaint = Standard_True; Standard_Boolean iaint = Standard_True;
for (ic = 1; ic <= nc; ic++) for (ic = 1; ic <= nc; ic++)

View File

@@ -174,11 +174,11 @@ Standard_Boolean IFSelect_TransformStandard::ApplyModifiers(
if (unmod->MayChangeGraph()) if (unmod->MayChangeGraph())
chg = Standard_True; chg = Standard_True;
// Appliquer ce Modifier (nb : le Dispatch, on s en moque) // Apply this Modifier (nb : the Dispatch, we don't care about it)
// D abord, la Selection // First, the Selection
IFSelect_ContextModif ctx(G, TC); IFSelect_ContextModif ctx(G, TC);
// Ensuite, la Selection // Then, the Selection
// S il y en a une ici, elle a priorite. Sinon, chaque Modifier a la sienne // If there is one here, it has priority. Otherwise, each Modifier has its own
Handle(IFSelect_Selection) sel = thesel; Handle(IFSelect_Selection) sel = thesel;
if (sel.IsNull()) if (sel.IsNull())
@@ -192,8 +192,8 @@ Standard_Boolean IFSelect_TransformStandard::ApplyModifiers(
continue; continue;
unmod->Perform(ctx, newmod, protocol, TC); unmod->Perform(ctx, newmod, protocol, TC);
// Report des Erreurs // Error Reporting
// Faut-il les enregistrer dans newmod ? bonne question // Should we record them in newmod ? good question
Interface_CheckIterator checklist = ctx.CheckList(); Interface_CheckIterator checklist = ctx.CheckList();
if (!checklist.IsEmpty(Standard_False)) if (!checklist.IsEmpty(Standard_False))
{ {
@@ -210,7 +210,7 @@ Standard_Boolean IFSelect_TransformStandard::ApplyModifiers(
} }
} }
// Modele pas modifie et Graphe pas modifie : le dire // Model not modified and Graph not modified: say it
if (newmod == original && !chg) if (newmod == original && !chg)
newmod.Nullify(); newmod.Nullify();
return res; return res;

View File

@@ -23,5 +23,5 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_Transformer, Standard_Transient)
Standard_Boolean IFSelect_Transformer::ChangeProtocol(Handle(Interface_Protocol)&) const Standard_Boolean IFSelect_Transformer::ChangeProtocol(Handle(Interface_Protocol)&) const
{ {
return Standard_False; // par defaut, protocole inchange return Standard_False; // by default, protocol unchanged
} }

View File

@@ -72,7 +72,7 @@ IMPLEMENT_STANDARD_RTTIEXT(IFSelect_WorkSession, Standard_Transient)
#define Flag_Incorrect 2 #define Flag_Incorrect 2
// (Bit Map n0 2) // (Bit Map n0 2)
static Standard_Boolean errhand; // pb : un seul a la fois, mais ca va si vite static Standard_Boolean errhand; // pb : only one at a time, but it goes so fast
static TCollection_AsciiString bufstr; static TCollection_AsciiString bufstr;
// ################################################################# // #################################################################
@@ -130,7 +130,7 @@ void IFSelect_WorkSession::SetShareOut(const Handle(IFSelect_ShareOut)& shareout
{ {
theshareout = shareout; theshareout = shareout;
thecopier->SetShareOut(theshareout); thecopier->SetShareOut(theshareout);
// ... faudrait ajouter les Params, Dispatches, etc... // ... should add Params, Dispatches, etc...
} }
//================================================================================================= //=================================================================================================
@@ -146,11 +146,11 @@ void IFSelect_WorkSession::SetModel(const Handle(Interface_InterfaceModel)& mode
myModel->SetGTool(thegtool); myModel->SetGTool(thegtool);
thegraph.Nullify(); thegraph.Nullify();
ComputeGraph(); // fait qqchose si Protocol present. Sinon, ne fait rien ComputeGraph(); // does something if Protocol present. Otherwise, does nothing
ClearData(3); // RAZ CheckList, a refaire ClearData(3); // Reset CheckList, to be redone
thecheckrun.Clear(); thecheckrun.Clear();
// MISE A JOUR des SelectPointed C-A-D on efface leur contenu // UPDATE of SelectPointed I.E. clear their content
if (clearpointed) if (clearpointed)
ClearData(4); ClearData(4);
ClearData(0); ClearData(0);
@@ -180,7 +180,7 @@ IFSelect_ReturnStatus IFSelect_WorkSession::ReadFile(const Standard_CString file
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption ReadFile par Exception : ****\n"; sout << " **** ReadFile Interruption by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
status = IFSelect_RetFail; status = IFSelect_RetFail;
@@ -219,7 +219,7 @@ IFSelect_ReturnStatus IFSelect_WorkSession::ReadStream(const Standard_CString th
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption ReadFile par Exception : ****\n"; sout << " **** ReadFile Interruption by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
status = IFSelect_RetFail; status = IFSelect_RetFail;
@@ -244,7 +244,7 @@ Standard_Integer IFSelect_WorkSession::NbStartingEntities() const
Handle(Standard_Transient) IFSelect_WorkSession::StartingEntity(const Standard_Integer num) const Handle(Standard_Transient) IFSelect_WorkSession::StartingEntity(const Standard_Integer num) const
{ {
Handle(Standard_Transient) res; // Null par defaut Handle(Standard_Transient) res; // Null by default
if (myModel.IsNull()) if (myModel.IsNull())
return res; return res;
if (num < 1 || num > myModel->NbEntities()) if (num < 1 || num > myModel->NbEntities())
@@ -266,8 +266,8 @@ Standard_Integer IFSelect_WorkSession::NumberFromLabel(const Standard_CString va
{ {
Standard_Integer i, cnt = 0, num = atoi(val); Standard_Integer i, cnt = 0, num = atoi(val);
if (num > 0 || myModel.IsNull()) if (num > 0 || myModel.IsNull())
return num; // un n0 direct : gagne ! return num; // a direct n0 : won !
// Sinon, on considere que c est un label; a traiter en CaseNonSensitive ... // Otherwise, consider it as a label; to be treated in CaseNonSensitive ...
if (num > myModel->NbEntities()) if (num > myModel->NbEntities())
{ {
num = 0; num = 0;
@@ -367,9 +367,9 @@ void IFSelect_WorkSession::ClearData(const Standard_Integer mode)
break; break;
} }
case 4: { case 4: {
// MISE A JOUR des SelectPointed C-A-D on efface leur contenu // UPDATE of SelectPointed I.E. clear their content
// AINSI que des editeurs (en fait, les EditForm) // AS WELL AS editors (in fact, the EditForm)
// Des compteurs C-A-D on efface leur contenu (a reevaluer) // Counters I.E. we erase their content (to reevaluate)
Handle(TColStd_HSequenceOfInteger) list = ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed)); Handle(TColStd_HSequenceOfInteger) list = ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed));
Standard_Integer nb = list->Length(); Standard_Integer nb = list->Length();
Standard_Integer i; // svv #1 Standard_Integer i; // svv #1
@@ -424,7 +424,7 @@ Standard_Boolean IFSelect_WorkSession::ComputeGraph(const Standard_Boolean enfor
} }
if (myModel->NbEntities() == 0) if (myModel->NbEntities() == 0)
return Standard_False; return Standard_False;
// Il faut calculer le graphe pour de bon // We must calculate the graph for good
thegraph = new Interface_HGraph(myModel, themodelstat); thegraph = new Interface_HGraph(myModel, themodelstat);
Standard_Integer nb = myModel->NbEntities(); Standard_Integer nb = myModel->NbEntities();
if (themodelstat) if (themodelstat)
@@ -440,7 +440,7 @@ Standard_Boolean IFSelect_WorkSession::ComputeGraph(const Standard_Boolean enfor
thecheckdone = Standard_True; thecheckdone = Standard_True;
if (themodelstat) if (themodelstat)
{ {
// Calcul des categories, a present memorisees dans le modele // Calculation of categories, now memorized in the model
Interface_Category categ(thegtool); Interface_Category categ(thegtool);
Interface_ShareTool sht(thegraph); Interface_ShareTool sht(thegraph);
Standard_Integer i = 1; Standard_Integer i = 1;
@@ -529,7 +529,7 @@ Standard_Boolean IFSelect_WorkSession::ComputeCheck(const Standard_Boolean enfor
myModel->FillSemanticChecks(checklist, Standard_False); myModel->FillSemanticChecks(checklist, Standard_False);
if (themodelstat) if (themodelstat)
{ {
// Et on met a jour le Graphe (BitMap) ! Flag Incorrect (STX + SEM) // And we update the Graph (BitMap) ! Flag Incorrect (STX + SEM)
Interface_BitMap& BM = CG.CBitMap(); Interface_BitMap& BM = CG.CBitMap();
BM.Init(Standard_False, Flag_Incorrect); BM.Init(Standard_False, Flag_Incorrect);
Standard_Integer num, nb = CG.Size(); Standard_Integer num, nb = CG.Size();
@@ -594,7 +594,7 @@ Interface_CheckIterator IFSelect_WorkSession::CheckOne(const Handle(Standard_Tra
} }
// ##################################################################### // #####################################################################
// .... LES VARIABLES .... // .... THE VARIABLES ....
//================================================================================================= //=================================================================================================
@@ -637,7 +637,7 @@ Handle(Standard_Transient) IFSelect_WorkSession::NamedItem(const Standard_CStrin
if (name[0] == '\0') if (name[0] == '\0')
return res; return res;
if (name[0] == '#') if (name[0] == '#')
{ // #nnn : pas un nom mais un n0 id. { // #nnn : not a name but an id number
Standard_Integer id = atoi(&name[1]); Standard_Integer id = atoi(&name[1]);
return Item(id); return Item(id);
} }
@@ -665,7 +665,7 @@ Standard_Integer IFSelect_WorkSession::NameIdent(const Standard_CString name) co
if (name[0] == '\0') if (name[0] == '\0')
return 0; return 0;
if (name[0] == '#') if (name[0] == '#')
{ // #nnn : pas un nom mais un n0 id. { // #nnn : not a name but an id number
Standard_Integer id = atoi(&name[1]); Standard_Integer id = atoi(&name[1]);
return id; return id;
} }
@@ -721,7 +721,7 @@ Standard_Integer IFSelect_WorkSession::AddItem(const Handle(Standard_Transient)&
else else
id = theitems.Add(item, item); id = theitems.Add(item, item);
// Cas particuliers : Dispatch,Modifier // Special cases : Dispatch,Modifier
if (active) if (active)
SetActive(item, Standard_True); SetActive(item, Standard_True);
return id; return id;
@@ -737,8 +737,8 @@ Standard_Integer IFSelect_WorkSession::AddNamedItem(const Standard_CString
return 0; return 0;
if (name[0] == '#' || name[0] == '!') if (name[0] == '#' || name[0] == '!')
return 0; return 0;
// #nnn : pas un nom mais un numero. !... : reserve (interdit pour un nom) // #nnn : not a name but a number. !... : reserved (forbidden for a name)
// nom deja pris : on ecrase l ancienne valeur // name already taken : we overwrite the old value
if (name[0] != '\0') if (name[0] != '\0')
thenames.Bind(name, item); thenames.Bind(name, item);
@@ -750,7 +750,7 @@ Standard_Integer IFSelect_WorkSession::AddNamedItem(const Standard_CString
att = item; att = item;
if (name[0] != '\0') if (name[0] != '\0')
{ {
// if (!att->IsKind(STANDARD_TYPE(TCollection_HAsciiString))) ecrasement admis ! // if (!att->IsKind(STANDARD_TYPE(TCollection_HAsciiString))) overwriting allowed !
att = new TCollection_HAsciiString(name); att = new TCollection_HAsciiString(name);
} }
} }
@@ -759,7 +759,7 @@ Standard_Integer IFSelect_WorkSession::AddNamedItem(const Standard_CString
else else
id = theitems.Add(item, item); id = theitems.Add(item, item);
// Cas particuliers : Dispatch,Modifier // Special cases : Dispatch,Modifier
if (active) if (active)
SetActive(item, Standard_True); SetActive(item, Standard_True);
return id; return id;
@@ -788,7 +788,7 @@ Standard_Boolean IFSelect_WorkSession::SetActive(const Handle(Standard_Transient
if (num <= theshareout->LastRun()) if (num <= theshareout->LastRun())
return Standard_False; return Standard_False;
theshareout->RemoveDispatch(num); theshareout->RemoveDispatch(num);
SetFileRoot(disp, ""); // si onlynamed : nettoie aussi ShareOut SetFileRoot(disp, ""); // if onlynamed : also cleans ShareOut
return Standard_True; return Standard_True;
} }
} }
@@ -804,7 +804,7 @@ Standard_Boolean IFSelect_WorkSession::RemoveNamedItem(const Standard_CString na
if (item.IsNull()) if (item.IsNull())
return Standard_False; return Standard_False;
if (!RemoveItem(item)) if (!RemoveItem(item))
return Standard_False; // qui se charge de tout return Standard_False; // which takes care of everything
return Standard_True; return Standard_True;
} }
@@ -815,7 +815,7 @@ Standard_Boolean IFSelect_WorkSession::RemoveName(const Standard_CString name)
Handle(Standard_Transient) item = NamedItem(name); Handle(Standard_Transient) item = NamedItem(name);
if (item.IsNull()) if (item.IsNull())
return Standard_False; return Standard_False;
theitems.Add(item, item); // reste mais sans nom theitems.Add(item, item); // remains but without name
return thenames.UnBind(name); return thenames.UnBind(name);
} }
@@ -830,12 +830,12 @@ Standard_Boolean IFSelect_WorkSession::RemoveItem(const Handle(Standard_Transien
return Standard_False; return Standard_False;
Handle(Standard_Transient)& att = theitems.ChangeFromIndex(id); Handle(Standard_Transient)& att = theitems.ChangeFromIndex(id);
if (att.IsNull()) if (att.IsNull())
return Standard_False; // deja annulle return Standard_False; // already canceled
// Cas particuliers : Dispatch,Modifier // Special cases : Dispatch,Modifier
theshareout->RemoveItem(item); theshareout->RemoveItem(item);
// Marquer "Removed" dans la Map (on ne peut pas la vider) // Mark "Removed" in the Map (we cannot empty it)
if (att->IsKind(STANDARD_TYPE(TCollection_HAsciiString))) if (att->IsKind(STANDARD_TYPE(TCollection_HAsciiString)))
{ {
if (!thenames.UnBind(GetCasted(TCollection_HAsciiString, att)->ToCString())) if (!thenames.UnBind(GetCasted(TCollection_HAsciiString, att)->ToCString()))
@@ -971,7 +971,7 @@ Handle(TColStd_HSequenceOfHAsciiString) IFSelect_WorkSession::ItemNames(
return list; return list;
} }
// .. Recherche par label : recherche en liste(noms) ou iterative // .. Search by label : search in list(names) or iterative
//================================================================================================= //=================================================================================================
@@ -1029,14 +1029,14 @@ Standard_Integer IFSelect_WorkSession::NextIdentForLabel(const Standard_CString
return i; return i;
break; break;
default: default:
break; // break du switch break; // break from switch
} }
} }
return 0; // ici : pas trouve return 0; // here : not found
} }
// ################################################################# // #################################################################
// .... Parametres (Int et Text) .... // .... Parameters (Int and Text) ....
//================================================================================================= //=================================================================================================
@@ -1182,12 +1182,12 @@ Interface_EntityIterator IFSelect_WorkSession::EvalSelection(
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
iter = EvalSelection(sel); // appel normal (donc, code pas duplique) iter = EvalSelection(sel); // normal call (therefore, code not duplicated)
} }
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption EvalSelection par Exception : ****\n"; sout << " **** EvalSelection Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
} }
@@ -1226,7 +1226,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::SelectionResult(
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption SelectionResult par Exception : ****\n"; sout << " **** SelectionResult Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
} }
@@ -1260,7 +1260,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::SelectionResultFromLi
if (deduct.IsNull()) if (deduct.IsNull())
return SelectionResult(sel); return SelectionResult(sel);
// On va chercher la derniere deduction de la chaine des inputs // We will search for the last deduction in the input chain
Handle(IFSelect_Selection) ssel, newinput; Handle(IFSelect_Selection) ssel, newinput;
ssel = sel; ssel = sel;
Standard_Integer i, nb = MaxIdent(); Standard_Integer i, nb = MaxIdent();
@@ -1273,14 +1273,14 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::SelectionResultFromLi
ssel = newinput; ssel = newinput;
} }
// on y est (enfin, on devrait) // we're there (finally, we should be)
// ssel est la derniere selection auscultee, deduct son downcast // ssel is the last selection examined, deduct its downcast
// input son Input (nulle si sel pas une deduction) // input its Input (null if sel is not a deduction)
deduct = GetCasted(IFSelect_SelectDeduct, ssel); deduct = GetCasted(IFSelect_SelectDeduct, ssel);
deduct->Alternate()->SetList(list); deduct->Alternate()->SetList(list);
// On execute puis on nettoie // We execute then we clean
Handle(TColStd_HSequenceOfTransient) res = SelectionResult(sel); Handle(TColStd_HSequenceOfTransient) res = SelectionResult(sel);
//// deduct->SetInput (newinput); //// deduct->SetInput (newinput);
return res; return res;
@@ -1336,7 +1336,7 @@ Handle(IFSelect_Selection) IFSelect_WorkSession::ItemSelection(
return disp->FinalSelection(); return disp->FinalSelection();
if (ItemIdent(modif) > 0) if (ItemIdent(modif) > 0)
return modif->Selection(); return modif->Selection();
return sel; // Nul ou inconnu -> Null return sel; // Null or unknown -> Null
} }
// ###################################################################### // ######################################################################
@@ -1441,7 +1441,7 @@ Handle(TColStd_HSequenceOfInteger) IFSelect_WorkSession::FinalModifierIdents(
const Standard_Boolean formodel) const const Standard_Boolean formodel) const
{ {
// return ItemIdents(STANDARD_TYPE(IFSelect_Modifier)); // return ItemIdents(STANDARD_TYPE(IFSelect_Modifier));
// On donne la liste dans l ordre du ModelCopier, qui fait foi // We give the list in ModelCopier order, which is authoritative
Handle(TColStd_HSequenceOfInteger) list = new TColStd_HSequenceOfInteger(); Handle(TColStd_HSequenceOfInteger) list = new TColStd_HSequenceOfInteger();
Standard_Integer nbm = theshareout->NbModifiers(formodel); Standard_Integer nbm = theshareout->NbModifiers(formodel);
for (Standard_Integer i = 1; i <= nbm; i++) for (Standard_Integer i = 1; i <= nbm; i++)
@@ -1594,7 +1594,7 @@ Standard_Integer IFSelect_WorkSession::RunTransformer(const Handle(IFSelect_Tran
if (newmod.IsNull()) if (newmod.IsNull())
return (res ? 1 : -1); return (res ? 1 : -1);
// MISE A JOUR des SelectPointed // UPDATE of SelectPointed
Handle(TColStd_HSequenceOfInteger) list = ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed)); Handle(TColStd_HSequenceOfInteger) list = ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed));
Standard_Integer nb = list->Length(); Standard_Integer nb = list->Length();
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
@@ -1670,7 +1670,7 @@ Handle(IFSelect_Transformer) IFSelect_WorkSession::NewTransformStandard(const St
return stf; return stf;
} }
// Ceci est une action directe : pourrait etre fait par un Transformer ... // This is a direct action: could be done by a Transformer ...
//================================================================================================= //=================================================================================================
Standard_Boolean IFSelect_WorkSession::SetModelContent(const Handle(IFSelect_Selection)& sel, Standard_Boolean IFSelect_WorkSession::SetModelContent(const Handle(IFSelect_Selection)& sel,
@@ -1711,10 +1711,10 @@ Standard_Boolean IFSelect_WorkSession::SetModelContent(const Handle(IFSelect_Sel
TC.FillModel(newmod); TC.FillModel(newmod);
if (newmod->NbEntities() == 0) if (newmod->NbEntities() == 0)
return Standard_False; return Standard_False;
// Mettre a jour (ne pas oublier SelectPointed) // Update (don't forget SelectPointed)
theoldel = myModel; theoldel = myModel;
SetModel(newmod, Standard_False); SetModel(newmod, Standard_False);
// MISE A JOUR des SelectPointed // UPDATE of SelectPointed
Handle(TColStd_HSequenceOfInteger) pts = ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed)); Handle(TColStd_HSequenceOfInteger) pts = ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed));
nb = pts->Length(); nb = pts->Length();
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
@@ -1821,7 +1821,7 @@ Standard_CString IFSelect_WorkSession::GiveFileRoot(const Standard_CString file)
Standard_CString IFSelect_WorkSession::GiveFileComplete(const Standard_CString file) const Standard_CString IFSelect_WorkSession::GiveFileComplete(const Standard_CString file) const
{ {
// ajouter si besoin : Prefix; Extension // add if needed: Prefix; Extension
bufstr.Clear(); bufstr.Clear();
bufstr.AssignCat(file); bufstr.AssignCat(file);
Standard_Integer i, j = 0, nb = bufstr.Length(); Standard_Integer i, j = 0, nb = bufstr.Length();
@@ -1882,12 +1882,12 @@ void IFSelect_WorkSession::EvaluateFile()
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
EvaluateFile(); // appel normal (donc, code pas duplique) EvaluateFile(); // normal call (therefore, code not duplicated)
} }
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption EvaluateFile par Exception : ****\n"; sout << " **** EvaluateFile Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
checks.CCheck(0)->AddFail("Exception Raised -> Abandon"); checks.CCheck(0)->AddFail("Exception Raised -> Abandon");
@@ -1951,7 +1951,7 @@ Handle(TColStd_HSequenceOfHAsciiString) IFSelect_WorkSession::SentFiles() const
} }
// ######################################################################### // #########################################################################
// .... Action de Transfert proprement dite : la grande affaire ! .... // .... Transfer Action properly speaking: the big deal! ....
//================================================================================================= //=================================================================================================
@@ -1966,12 +1966,12 @@ Standard_Boolean IFSelect_WorkSession::SendSplit()
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
return SendSplit(); // appel normal (donc, code pas duplique) return SendSplit(); // normal call (therefore, code not duplicated)
} }
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption SendSplit par Exception : ****\n"; sout << " **** SendSplit Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
checks.CCheck(0)->AddFail("Exception Raised -> Abandon"); checks.CCheck(0)->AddFail("Exception Raised -> Abandon");
@@ -2024,7 +2024,7 @@ Standard_Boolean IFSelect_WorkSession::SendSplit()
Interface_EntityIterator iter = packs.Entities(); Interface_EntityIterator iter = packs.Entities();
if (iter.NbEntities() == 0) if (iter.NbEntities() == 0)
continue; continue;
// Ecrire une liste d entites // Write a list of entities
Handle(IFSelect_SelectPointed) sp = new IFSelect_SelectPointed; Handle(IFSelect_SelectPointed) sp = new IFSelect_SelectPointed;
sp->SetList(iter.Content()); sp->SetList(iter.Content());
nf++; nf++;
@@ -2135,7 +2135,7 @@ Standard_Boolean IFSelect_WorkSession::SetRemaining(const IFSelect_RemainMode mo
{ {
theoldel = myModel; theoldel = myModel;
SetModel(newmod, Standard_False); SetModel(newmod, Standard_False);
// MISE A JOUR des SelectPointed // UPDATE of SelectPointed
Handle(TColStd_HSequenceOfInteger) list = ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed)); Handle(TColStd_HSequenceOfInteger) list = ItemIdents(STANDARD_TYPE(IFSelect_SelectPointed));
Standard_Integer nb = list->Length(); Standard_Integer nb = list->Length();
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
@@ -2220,7 +2220,7 @@ IFSelect_ReturnStatus IFSelect_WorkSession::SendAll(const Standard_CString filen
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption SendAll par Exception : ****\n"; sout << " **** SendAll Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
errhand = theerrhand; errhand = theerrhand;
@@ -2268,12 +2268,12 @@ IFSelect_ReturnStatus IFSelect_WorkSession::SendSelected(const Standard_CString
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
ComputeGraph(computegraph); ComputeGraph(computegraph);
return SendSelected(filename, sel); // appel normal return SendSelected(filename, sel); // normal call
} }
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption SendSelected par Exception : ****\n"; sout << " **** SendSelected Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
checks.CCheck(0)->AddFail("Exception Raised -> Abandon"); checks.CCheck(0)->AddFail("Exception Raised -> Abandon");
@@ -2321,7 +2321,7 @@ IFSelect_ReturnStatus IFSelect_WorkSession::WriteFile(const Standard_CString
} }
// ################################################################ // ################################################################
// .... Actions particulieres sur les Selections .... // .... Specific Actions on Selections ....
//================================================================================================= //=================================================================================================
@@ -2502,7 +2502,7 @@ Standard_Boolean IFSelect_WorkSession::SetSelectPointed(
} }
// ########################################################################### // ###########################################################################
// .... Analyse d un CheckIterator par rapport a un graphe .... // .... Analysis of a CheckIterator in relation to a graph ....
//================================================================================================= //=================================================================================================
@@ -2518,7 +2518,7 @@ static void IFSelect_QueryProp(Interface_IntList& list,
if (i > 1) if (i > 1)
list.SetNumber(num); // because recursive call + depth first list.SetNumber(num); // because recursive call + depth first
Standard_Integer n = list.Value(i); Standard_Integer n = list.Value(i);
// y a t il lieu de propager ? // is there a need to propagate?
// 1 W/place 2 F/place 3 Wprop 4Wprop+W/place 5Wprop+F/place // 1 W/place 2 F/place 3 Wprop 4Wprop+W/place 5Wprop+F/place
// 6 Fprop 7 Fprop+W/place 8 Fprop+F/place // 6 Fprop 7 Fprop+W/place 8 Fprop+F/place
char val = ana.Value(n); char val = ana.Value(n);
@@ -2579,11 +2579,11 @@ void IFSelect_WorkSession::QueryCheckList(const Interface_CheckIterator& chl)
else if (ach->HasWarnings()) else if (ach->HasWarnings())
thecheckana.SetValue(num, '1'); thecheckana.SetValue(num, '1');
} }
// analyse selon le graphe ... codes : blc = rien // analysis according to the graph ... codes : blc = nothing
// 1 W/place 2 F/place 3 Wprop 4Wprop+W/place 5Wprop+F/place // 1 W/place 2 F/place 3 Wprop 4Wprop+W/place 5Wprop+F/place
// 6 Fprop 7 Fprop+W/place 8 Fprop+F/place // 6 Fprop 7 Fprop+W/place 8 Fprop+F/place
Interface_IntList list; // = thegraph->Graph().SharingNums(0); Interface_IntList list; // = thegraph->Graph().SharingNums(0);
// deux passes : d abord Warning, puis Fail // two passes : first Warning, then Fail
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
{ {
char val = thecheckana.Value(i); char val = thecheckana.Value(i);
@@ -2652,8 +2652,8 @@ Standard_Integer IFSelect_WorkSession::QueryParent(const Handle(Standard_Transie
return -1; return -1;
if (ndad == nson) if (ndad == nson)
return 0; return 0;
// on va calculer : pour chaque pere immediat, de <son>, status avec <dad> + 1 // we will calculate: for each immediate parent, of <son>, status with <dad> + 1
// nb : pas protege contre les boucles ... // nb: not protected against loops ...
Handle(TColStd_HSequenceOfTransient) list = thegraph->Graph().Sharings(entson).Content(); Handle(TColStd_HSequenceOfTransient) list = thegraph->Graph().Sharings(entson).Content();
if (list.IsNull()) if (list.IsNull())
return -1; return -1;
@@ -2670,7 +2670,7 @@ Standard_Integer IFSelect_WorkSession::QueryParent(const Handle(Standard_Transie
} }
// ########################################################################### // ###########################################################################
// .... Dumps et Evaluations, pas faciles a passer en arguments .... // .... Dumps and Evaluations, not easy to pass as arguments ....
// #### #### #### #### #### #### #### #### #### // #### #### #### #### #### #### #### #### ####
// .... DumpShare .... // .... DumpShare ....
@@ -2691,11 +2691,11 @@ void IFSelect_WorkSession::SetParams(const NCollection_Vector<Handle(Standard_Tr
editor->AddValue(val); editor->AddValue(val);
} }
AddNamedItem("xst-params-edit", editor); AddNamedItem("xst-params-edit", editor);
// Les EditForm // The EditForm
Handle(IFSelect_EditForm) paramsall = editor->Form(Standard_False); Handle(IFSelect_EditForm) paramsall = editor->Form(Standard_False);
AddNamedItem("xst-params-all", paramsall); AddNamedItem("xst-params-all", paramsall);
// On attaque les EditForms partielles // We tackle the partial EditForms
TColStd_SequenceOfInteger listgen, listload, listsend, listsplit, listread, listwrite; TColStd_SequenceOfInteger listgen, listload, listsend, listsplit, listread, listwrite;
for (i = uselist.Lower(); i <= uselist.Upper(); i++) for (i = uselist.Lower(); i <= uselist.Upper(); i++)
{ {
@@ -2845,8 +2845,8 @@ void IFSelect_WorkSession::TraceStatics(const Standard_Integer use,
} }
} }
// LISTER LES STATICS // LIST THE STATICS
// Passer par les ParamEditor ... // Go through the ParamEditor ...
// Fin // Fin
if (use > 0) if (use > 0)
@@ -3040,8 +3040,8 @@ Handle(IFSelect_Selection) IFSelect_WorkSession::GiveSelection(const Standard_CS
} }
Handle(Standard_Transient) item = NamedItem(nomsel); Handle(Standard_Transient) item = NamedItem(nomsel);
// Parentheses ? essayer Signature (plus tard : Selection parametree) // Parentheses? try Signature (later: parameterized Selection)
// NB : on compte les niveaux de parentheses (imbrications repercutees) // NB: we count the levels of parentheses (reflected nesting)
if (np > 0 && nf > 0) if (np > 0 && nf > 0)
{ {
Handle(IFSelect_SelectSignature) selsign; Handle(IFSelect_SelectSignature) selsign;
@@ -3059,7 +3059,7 @@ Handle(IFSelect_Selection) IFSelect_WorkSession::GiveSelection(const Standard_CS
return sel; return sel;
} }
selsign->SetInput(new IFSelect_SelectModelEntities); // par defaut selsign->SetInput(new IFSelect_SelectModelEntities); // by default
sel = selsign; sel = selsign;
} }
@@ -3074,16 +3074,16 @@ Handle(IFSelect_Selection) IFSelect_WorkSession::GiveSelection(const Standard_CS
Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveList( Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveList(
const Handle(Standard_Transient)& obj) const const Handle(Standard_Transient)& obj) const
{ {
// Deja une liste // Already a list
DeclareAndCast(TColStd_HSequenceOfTransient, list, obj); DeclareAndCast(TColStd_HSequenceOfTransient, list, obj);
if (!list.IsNull()) if (!list.IsNull())
return list; return list;
// Rien du tout : retourne rien du tout // Nothing at all: returns nothing at all
if (obj.IsNull()) if (obj.IsNull())
return list; return list;
// Une selection : son resultat (standard) // A selection: its result (standard)
DeclareAndCast(IFSelect_Selection, sel, obj); DeclareAndCast(IFSelect_Selection, sel, obj);
if (!sel.IsNull()) if (!sel.IsNull())
{ {
@@ -3091,7 +3091,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveList(
return iter.Content(); return iter.Content();
} }
// Le modele : son contenu // The model: its content
list = new TColStd_HSequenceOfTransient(); list = new TColStd_HSequenceOfTransient();
if (obj == myModel) if (obj == myModel)
{ {
@@ -3100,11 +3100,11 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveList(
list->Append(myModel->Value(i)); list->Append(myModel->Value(i));
} }
// Une entite du modele : cette entite // A model entity: this entity
else if (StartingNumber(obj) > 0) else if (StartingNumber(obj) > 0)
list->Append(obj); list->Append(obj);
// Un Texte : son interpretation // A Text: its interpretation
else else
{ {
DeclareAndCast(TCollection_HAsciiString, str, obj); DeclareAndCast(TCollection_HAsciiString, str, obj);
@@ -3112,7 +3112,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveList(
return GiveList(str->ToCString()); return GiveList(str->ToCString());
} }
// Si c est pas tout ca : une liste vide // If it's not all that: an empty list
return list; return list;
} }
@@ -3130,8 +3130,8 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveList(
if (second && second[0] == ' ') if (second && second[0] == ' ')
return GiveList(first, &second[1]); return GiveList(first, &second[1]);
// list NULLE sera interpretee comme SelectionResult (selection toute crue) // NULL list will be interpreted as SelectionResult (raw selection)
// sinon comme SelectionResultFromList // otherwise as SelectionResultFromList
if (second && second[0] != '\0') if (second && second[0] != '\0')
list = GiveList(second, ""); list = GiveList(second, "");
@@ -3148,10 +3148,10 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveListFromList(
Handle(TColStd_HSequenceOfTransient) list; Handle(TColStd_HSequenceOfTransient) list;
Standard_Integer num; Standard_Integer num;
// LISTE DEFINIE D OFFICE (en ce cas, la liste d entree est ignoree) // LIST DEFINED BY DEFAULT (in this case, the input list is ignored)
if (selname[0] == '(') if (selname[0] == '(')
{ {
// liste d entites donnees a la queue leu leu : (ID,ID,ID...) // list of entities given one after another: (ID,ID,ID...)
char entid[50]; char entid[50];
Standard_Integer i, j = 0; Standard_Integer i, j = 0;
TColStd_MapOfInteger numap; TColStd_MapOfInteger numap;
@@ -3185,11 +3185,11 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveListFromList(
if (num > 0) if (num > 0)
return GiveList(StartingEntity(num)); return GiveList(StartingEntity(num));
// Autres cas : y atil une liste d entree. // Other cases: is there an input list.
// Si OUI -> SelectionResultFromList. Si NON -> SelectionResult // Si OUI -> SelectionResultFromList. Si NON -> SelectionResult
// Si une entite isolee -> on en fait une liste // If an isolated entity -> we make it a list
list = GiveList(ent); // ent NULL -> list NULL sinon intreprete list = GiveList(ent); // ent NULL -> list NULL otherwise interpreted
// Decomposition term1 term2 ... // Decomposition term1 term2 ...
@@ -3254,7 +3254,7 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveListCombined(
list->Append(ent); list->Append(ent);
} }
// ents de l1 pas deja dans l2 // entities from l1 not already in l2
n = l1->Length(); n = l1->Length();
for (i = n; i > 0; i--) for (i = n; i > 0; i--)
{ {
@@ -3264,13 +3264,13 @@ Handle(TColStd_HSequenceOfTransient) IFSelect_WorkSession::GiveListCombined(
if (numap.Contains(ent)) if (numap.Contains(ent))
{ {
// dans l1 et dans l2 // in l1 and in l2
if (mode == 0) if (mode == 0)
list->Append(ent); list->Append(ent);
} }
else else
{ {
// dans l1 mais pas dans l2 // in l1 but not in l2
if (mode != 0) if (mode != 0)
list->Append(ent); list->Append(ent);
} }
@@ -3361,7 +3361,7 @@ void IFSelect_WorkSession::DumpModel(const Standard_Integer level, Standard_OStr
catch (Standard_Failure const&) catch (Standard_Failure const&)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption DumpModel (Check) par Exception ****\n"; sout << " **** DumpModel (Check) Interrupted by Exception ****\n";
S << " ** ** Exception Raised during Check ! ** **\n"; S << " ** ** Exception Raised during Check ! ** **\n";
S << " --> what could be determined is listed" << std::endl; S << " --> what could be determined is listed" << std::endl;
} }
@@ -3371,7 +3371,7 @@ void IFSelect_WorkSession::DumpModel(const Standard_Integer level, Standard_OStr
else else
C = CT.CompleteCheckList(); C = CT.CompleteCheckList();
// Check List : si vide (pas demandee), naturellement passee // Check List: if empty (not requested), naturally passed
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
@@ -3380,7 +3380,7 @@ void IFSelect_WorkSession::DumpModel(const Standard_Integer level, Standard_OStr
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
Message_Messenger::StreamBuffer sout = Message::SendInfo(); Message_Messenger::StreamBuffer sout = Message::SendInfo();
sout << " **** Interruption DumpModel par Exception : ****\n"; sout << " **** DumpModel Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
} }
@@ -3563,11 +3563,11 @@ void IFSelect_WorkSession::EvaluateSelection(const Handle(IFSelect_Selection)& s
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
EvaluateSelection(sel); // appel normal (->code unique) EvaluateSelection(sel); // normal call (->unique code)
} }
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
sout << " **** Interruption EvaluateSelection par Exception **** Intitule\n"; sout << " **** EvaluateSelection Interrupted by Exception **** Title\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
} }
@@ -3605,11 +3605,11 @@ void IFSelect_WorkSession::EvaluateDispatch(const Handle(IFSelect_Dispatch)& dis
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
EvaluateDispatch(disp, mode); // appel normal (->code unique) EvaluateDispatch(disp, mode); // normal call (->unique code)
} }
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
sout << " **** Interruption EvaluateDispatch par Exception **** Intitule\n"; sout << " **** EvaluateDispatch Interrupted by Exception **** Title\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
} }
@@ -3699,11 +3699,11 @@ void IFSelect_WorkSession::EvaluateComplete(const Standard_Integer mode) const
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
EvaluateComplete(mode); // appel normal (donc, code pas duplique) EvaluateComplete(mode); // normal call (therefore, code not duplicated)
} }
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
sout << " **** Interruption EvaluateComplete par Exception : ****\n"; sout << " **** EvaluateComplete Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
} }
@@ -3877,7 +3877,7 @@ void IFSelect_WorkSession::ListEntities(const Interface_EntityIterator& iter,
} }
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
sout << " **** Interruption ListEntities par Exception : ****\n"; sout << " **** ListEntities Interrupted by Exception : ****\n";
sout << anException.GetMessageString(); sout << anException.GetMessageString();
sout << "\n Abandon" << std::endl; sout << "\n Abandon" << std::endl;
} }

View File

@@ -61,7 +61,7 @@ void Interface_BitMap::Initialize(const Interface_BitMap& other, const Standard_
void Interface_BitMap::Reservate(const Standard_Integer moreflags) void Interface_BitMap::Reservate(const Standard_Integer moreflags)
{ {
Standard_Integer nb = theflags->Upper(); Standard_Integer nb = theflags->Upper();
Standard_Integer nbflags = nb / thenbwords - 1; // flag 0 non compte ... Standard_Integer nbflags = nb / thenbwords - 1; // flag 0 not counted ...
if (nbflags >= thenbflags + moreflags) if (nbflags >= thenbflags + moreflags)
return; return;
Standard_Integer nbw = thenbwords * (thenbflags + moreflags + 2); Standard_Integer nbw = thenbwords * (thenbflags + moreflags + 2);
@@ -187,7 +187,7 @@ Standard_Integer Interface_BitMap::FlagNumber(const Standard_CString name) const
return 0; return 0;
} }
// Les valeurs ... // Values ...
Standard_Boolean Interface_BitMap::Value(const Standard_Integer item, Standard_Boolean Interface_BitMap::Value(const Standard_Integer item,
const Standard_Integer flag) const const Standard_Integer flag) const

View File

@@ -22,8 +22,8 @@
IMPLEMENT_STANDARD_RTTIEXT(Interface_Check, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Interface_Check, Standard_Transient)
// Un Check est cree au depart sans liste de message : celle ci est creee // A Check is created initially without a message list: this is created
// seulement si au moins une erreur doit y etre enregitree (Fail-Warning) // only if at least one error must be recorded (Fail-Warning)
//================================================================================================= //=================================================================================================
Interface_Check::Interface_Check() {} // construit a vide Interface_Check::Interface_Check() {} // construit a vide
@@ -35,7 +35,7 @@ Interface_Check::Interface_Check(const Handle(Standard_Transient)& anentity)
theent = anentity; theent = anentity;
} }
// .... Ajout de message d Erreur vraie (Fail) // .... Adding a true Error message (Fail)
//================================================================================================= //=================================================================================================
@@ -133,7 +133,7 @@ Handle(TColStd_HSequenceOfHAsciiString) Interface_Check::Fails(const Standard_Bo
return (final ? thefails : thefailo); return (final ? thefails : thefailo);
} }
// .... Ajout de message de Warning // .... Adding a Warning message
//================================================================================================= //=================================================================================================
@@ -232,7 +232,7 @@ Handle(TColStd_HSequenceOfHAsciiString) Interface_Check::Warnings(
return (final ? thewarns : thewarno); return (final ? thewarns : thewarno);
} }
// .... Ajout de message d Info simple (not yet completed) // .... Adding a simple Info message (not yet completed)
//================================================================================================= //=================================================================================================
@@ -286,7 +286,7 @@ Handle(TColStd_HSequenceOfHAsciiString) Interface_Check::InfoMsgs(
return (final ? theinfos : theinfoo); return (final ? theinfos : theinfoo);
} }
// .... Gestion generale // .... General management
//================================================================================================= //=================================================================================================
@@ -530,7 +530,7 @@ Standard_Boolean Interface_Check::Mend(const Standard_CString pref, const Standa
return Standard_True; return Standard_True;
} }
} }
// Cas courant // Common case
if (num == 0) if (num == 0)
{ {
n1 = 1; n1 = 1;
@@ -541,7 +541,7 @@ Standard_Boolean Interface_Check::Mend(const Standard_CString pref, const Standa
} }
else if (num < 0 || num > NbFails()) else if (num < 0 || num > NbFails())
return Standard_False; return Standard_False;
// Un message // A message
Handle(TCollection_HAsciiString) strf = thefails->Value(num); Handle(TCollection_HAsciiString) strf = thefails->Value(num);
Handle(TCollection_HAsciiString) stro = thefailo->Value(num); Handle(TCollection_HAsciiString) stro = thefailo->Value(num);
if (pref && pref[0] != '\0') if (pref && pref[0] != '\0')
@@ -578,11 +578,11 @@ void Interface_Check::GetEntity(const Handle(Standard_Transient)& anentity)
SetEntity(anentity); SetEntity(anentity);
} }
// .. GetMessages, reprend les messages en les cumulant aux siens propres // .. GetMessages, takes messages by accumulating them with its own
// .. GetAsWarning, reprend les messages en les cumulant et en les // .. GetAsWarning, takes messages by accumulating them and
// considerant tous comme "Warning" . En outre, selon <failsonly> // considering them all as "Warning". Furthermore, according to <failsonly>
// failsonly True : ne pas reprendre les Warnings originaux // failsonly True : do not take original Warnings
// failsonly False : les prendre aussi // failsonly False : take them as well
//================================================================================================= //=================================================================================================
@@ -694,7 +694,7 @@ void Interface_Check::Print(Standard_OStream& S,
} }
} }
// InfoMsg : regle causant (user message) // InfoMsg : causal rule (user message)
if (level >= 0) if (level >= 0)
{ {
nb = NbInfoMsgs(); nb = NbInfoMsgs();

View File

@@ -93,7 +93,7 @@ void Interface_CheckIterator::Merge(Interface_CheckIterator& other)
void Interface_CheckIterator::Add(const Handle(Interface_Check)& ach, const Standard_Integer num) void Interface_CheckIterator::Add(const Handle(Interface_Check)& ach, const Standard_Integer num)
{ {
// Add <meme num que le dernier> -> cumul des Checks // Add <same num as the last> -> accumulate Checks
if (ach->NbWarnings() + ach->NbFails() == 0) if (ach->NbWarnings() + ach->NbFails() == 0)
return; return;
Standard_Integer nm = num; Standard_Integer nm = num;
@@ -122,14 +122,14 @@ void Interface_CheckIterator::Add(const Handle(Interface_Check)& ach, const Stan
Handle(Interface_Check) lch = thelist->ChangeValue(numpos); Handle(Interface_Check) lch = thelist->ChangeValue(numpos);
lch->GetMessages(ach); lch->GetMessages(ach);
} }
// Cas normal : on ajoute en fin de liste // Normal case: add at end of list
else else
{ {
thelist->Append(ach); thelist->Append(ach);
thenums->Append(nm); thenums->Append(nm);
} }
} }
// Pas encore vu passe : inutile de chercher // Not yet seen passed: no need to search
else else
{ {
thelist->Append(ach); thelist->Append(ach);

View File

@@ -55,9 +55,9 @@ static void raisecheck(Standard_Failure& theException, Handle(Interface_Check)&
} }
} }
// thestat : evite a CheckSuccess de refaire un calcul prealablement fait : // thestat : avoids CheckSuccess redoing a previously done calculation :
// bit valeur 1 : Verify fait, valeur 4 : et ilya des erreurs // bit value 1 : Verify done, value 4 : and there are errors
// bit valeur 2 : Analyse fait, valeur 8 : et ilya des erreurs // bit value 2 : Analysis done, value 8 : and there are errors
//================================================================================================= //=================================================================================================
@@ -105,13 +105,13 @@ void Interface_CheckTool::FillCheck(const Handle(Standard_Transient)& ent,
Standard_Integer CN; Standard_Integer CN;
if (thegtool->Select(ent, module, CN)) if (thegtool->Select(ent, module, CN))
{ {
// Sans try/catch (fait par l appelant, evite try/catch en boucle) // Without try/catch (done by caller, avoids try/catch in loop)
if (!errh) if (!errh)
{ {
module->CheckCase(CN, ent, sh, ach); module->CheckCase(CN, ent, sh, ach);
return; return;
} }
// Avec try/catch // With try/catch
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
@@ -162,9 +162,9 @@ void Interface_CheckTool::Print(const Interface_CheckIterator& list, Standard_OS
list.Print(S, model, Standard_False); list.Print(S, model, Standard_False);
} }
// .... Check General sur un Modele .... // .... General Check on a Model ....
// Check : Une Entite d un Modele, designee par son rang // Check: An Entity of a Model, designated by its rank
//================================================================================================= //=================================================================================================
@@ -172,13 +172,13 @@ Handle(Interface_Check) Interface_CheckTool::Check(const Standard_Integer num)
{ {
Handle(Interface_InterfaceModel) model = theshare.Model(); Handle(Interface_InterfaceModel) model = theshare.Model();
Handle(Standard_Transient) ent = model->Value(num); Handle(Standard_Transient) ent = model->Value(num);
Handle(Interface_Check) ach = new Interface_Check(ent); // non filtre par "Warning" : tel quel Handle(Interface_Check) ach = new Interface_Check(ent); // not filtered by "Warning": as is
errh = 1; errh = 1;
FillCheck(ent, theshare, ach); FillCheck(ent, theshare, ach);
return ach; return ach;
} }
// CheckSuccess : test passe-passe pas, sur CheckList(Fail) des Entites // CheckSuccess: test passes-doesn't pass, on CheckList(Fail) of Entities
//================================================================================================= //=================================================================================================
@@ -187,7 +187,7 @@ void Interface_CheckTool::CheckSuccess(const Standard_Boolean reset)
if (reset) if (reset)
thestat = 0; thestat = 0;
if (thestat > 3) if (thestat > 3)
throw Interface_CheckFailure // deja teste avec erreur throw Interface_CheckFailure // already tested with error
("Interface Model : Global Check"); ("Interface Model : Global Check");
Handle(Interface_InterfaceModel) model = theshare.Model(); Handle(Interface_InterfaceModel) model = theshare.Model();
if (model->GlobalCheck()->NbFails() > 0) if (model->GlobalCheck()->NbFails() > 0)
@@ -199,9 +199,9 @@ void Interface_CheckTool::CheckSuccess(const Standard_Boolean reset)
if (modchk->HasFailed()) if (modchk->HasFailed())
throw Interface_CheckFailure("Interface Model : Verify Check"); throw Interface_CheckFailure("Interface Model : Verify Check");
if (thestat == 3) if (thestat == 3)
return; // tout teste et ca passe return; // everything tested and it passes
errh = 0; // Pas de try/catch, car justement on raise errh = 0; // No try/catch, because we precisely raise
Standard_Integer nb = model->NbEntities(); Standard_Integer nb = model->NbEntities();
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
{ {
@@ -211,12 +211,12 @@ void Interface_CheckTool::CheckSuccess(const Standard_Boolean reset)
if (thestat & 1) if (thestat & 1)
{ {
if (!model->IsErrorEntity(i)) if (!model->IsErrorEntity(i))
continue; // deja verify, reste analyse continue; // already verify, remains analyse
} }
if (thestat & 2) if (thestat & 2)
{ {
if (model->IsErrorEntity(i)) if (model->IsErrorEntity(i))
continue; // deja analyse, reste verify continue; // already analyse, remains verify
} }
Handle(Interface_Check) ach = new Interface_Check(ent); Handle(Interface_Check) ach = new Interface_Check(ent);
@@ -226,8 +226,8 @@ void Interface_CheckTool::CheckSuccess(const Standard_Boolean reset)
} }
} }
// CompleteCheckList : Tous Tests : GlobalCheck, Analyse-Verify en Fail ou en // CompleteCheckList: All Tests: GlobalCheck, Analyse-Verify in Fail or in
// Warning; plus les Unknown Entities (par Check vide) // Warning; plus the Unknown Entities (by empty Check)
//================================================================================================= //=================================================================================================
@@ -263,7 +263,7 @@ Interface_CheckIterator Interface_CheckTool::CompleteCheckList()
if (model->IsReportEntity(i)) if (model->IsReportEntity(i))
{ {
ach = model->ReportEntity(i)->Check(); // INCLUT Unknown ach = model->ReportEntity(i)->Check(); // INCLUT Unknown
if (ach->HasFailed()) // FAIL : pas de Check semantique if (ach->HasFailed()) // FAIL : no semantic Check
{ {
res.Add(ach, i); res.Add(ach, i);
ach = new Interface_Check; ach = new Interface_Check;
@@ -296,7 +296,7 @@ Interface_CheckIterator Interface_CheckTool::CompleteCheckList()
return res; return res;
} }
// CheckList : Check Fail sur Entites, en Analyse (Read time) ou Verify // CheckList: Check Fail on Entities, in Analysis (Read time) or Verify
//================================================================================================= //=================================================================================================
@@ -365,7 +365,7 @@ Interface_CheckIterator Interface_CheckTool::CheckList()
return res; return res;
} }
// AnalyseCheckList : Fail au chargement des Entites (Read time) // AnalyseCheckList: Fail during loading of Entities (Read time)
//================================================================================================= //=================================================================================================
@@ -409,7 +409,7 @@ Interface_CheckIterator Interface_CheckTool::AnalyseCheckList()
return res; return res;
} }
// VerifyCheckList : Fail/Warning sur Analyse (Entites chargees OK. Valides ?) // VerifyCheckList: Fail/Warning on Analysis (Entities loaded OK. Valid?)
//================================================================================================= //=================================================================================================
@@ -459,7 +459,7 @@ Interface_CheckIterator Interface_CheckTool::VerifyCheckList()
return res; return res;
} }
// Warnings sur Entites (Read time ou apres) // Warnings on Entities (Read time or after)
//================================================================================================= //=================================================================================================

View File

@@ -19,7 +19,7 @@
IMPLEMENT_STANDARD_RTTIEXT(Interface_CopyMap, Interface_CopyControl) IMPLEMENT_STANDARD_RTTIEXT(Interface_CopyMap, Interface_CopyControl)
// CopyMap : rien de plus qu une Map passive // CopyMap : nothing more than a passive Map
Interface_CopyMap::Interface_CopyMap(const Handle(Interface_InterfaceModel)& amodel) Interface_CopyMap::Interface_CopyMap(const Handle(Interface_InterfaceModel)& amodel)
: theres(0, amodel->NbEntities()) : theres(0, amodel->NbEntities())
{ {

View File

@@ -24,17 +24,17 @@
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
#include <TCollection_HAsciiString.hxx> #include <TCollection_HAsciiString.hxx>
// Se souvenir qu une version plus riche de CopyTool existe : c est // Remember that a richer version of CopyTool exists: it is
// TransferDispatch (package Transfer). Cette classe offre beaucoup plus de // TransferDispatch (package Transfer). This class offers much more
// possibilite (parametrage des actions, gestion du Mapping ...) // possibilities (parameterization of actions, Mapping management ...)
// Mais le principe (transfert en 2 passes) reste le meme, a savoir : // But the principle (transfer in 2 passes) remains the same, namely:
// Passe 1 normale : les entites a transferer sont designees, elles entrainent // Pass 1 normal: the entities to transfer are designated, they involve
// leurs sous-references vraies // their true sub-references
// Passe 2 : une fois tous les transferts faits, les relations "Imply" sont // Pass 2: once all transfers are done, the "Imply" relations are
// mises, pour les entites designees ET QUI ONT ETE AUSSI TRANSFEREES, la // set, for the designated entities AND WHICH HAVE ALSO BEEN TRANSFERRED, the
// relation est reconduite (pas de nouveau Share) // relation is continued (no new Share)
// ##################################################################### // #####################################################################
// .... CONSTRUCTEURS .... // .... CONSTRUCTORS ....
Interface_CopyTool::Interface_CopyTool(const Handle(Interface_InterfaceModel)& amodel, Interface_CopyTool::Interface_CopyTool(const Handle(Interface_InterfaceModel)& amodel,
const Interface_GeneralLib& lib) const Interface_GeneralLib& lib)
: thelib(lib), : thelib(lib),
@@ -92,7 +92,7 @@ Handle(Interface_CopyControl) Interface_CopyTool::Control() const
} }
// ##################################################################### // #####################################################################
// .... Actions Individuelles .... // .... Individual Actions ....
void Interface_CopyTool::Clear() void Interface_CopyTool::Clear()
{ {
@@ -152,16 +152,16 @@ Standard_Boolean Interface_CopyTool::Copy(const Handle(Standard_Transient)& entf
} }
return res; return res;
} }
// On cree l Entite vide (NewVoid), la Copie reste a faire // Create the empty Entity (NewVoid), the Copy remains to be done
res = NewVoid(entfrom, entto); res = NewVoid(entfrom, entto);
if (mapped) if (mapped)
themap->Bind(entfrom, entto); // Mapper avant de continuer ... themap->Bind(entfrom, entto); // Map before continuing ...
// A present, on effectue la Copie (selon cas; si ShallowCopy ne suffit pas : // Now, perform the Copy (depending on case; if ShallowCopy is not enough:
// c est <themdu> qui decide) // it is <themdu> who decides)
// Une Entite en Erreur n est pas copiee (pas de sens et c est risque ...) // An Entity in Error is not copied (no sense and it's risky ...)
// Cependant, elle est "Copiee a Vide (NewVoid)" donc referencable // However, it is "Copied Empty (NewVoid)" so referenceable
if (!errstat) if (!errstat)
themdu->CopyCase(theCN, entfrom, entto, *this); themdu->CopyCase(theCN, entfrom, entto, *this);
return res; return res;
@@ -176,25 +176,25 @@ void Interface_CopyTool::Implied(const Handle(Standard_Transient)& entfrom,
module->RenewImpliedCase(CN, entfrom, entto, *this); module->RenewImpliedCase(CN, entfrom, entto, *this);
} }
// .... Alimentation de la Map .... // .... Feeding the Map ....
Handle(Standard_Transient) Interface_CopyTool::Transferred(const Handle(Standard_Transient)& ent) Handle(Standard_Transient) Interface_CopyTool::Transferred(const Handle(Standard_Transient)& ent)
{ {
Handle(Standard_Transient) res; Handle(Standard_Transient) res;
if (ent.IsNull()) if (ent.IsNull())
return res; // Copie d un Null : tres simple ... return res; // Copy of a Null : very simple ...
Standard_Integer nument = themod->Number(ent); Standard_Integer nument = themod->Number(ent);
// <nument> == 0 -> Peut etre une sous-partie non partagee ... // <nument> == 0 -> May be a non-shared sub-part ...
// On accepte mais on se protege contre un bouclage // We accept but we protect against a loop
if (nument == 0 && thelev > 100) if (nument == 0 && thelev > 100)
throw Interface_InterfaceError( throw Interface_InterfaceError(
"CopyTool : Transferred, Entity is not contained in Starting Model"); "CopyTool : Transferred, Entity is not contained in Starting Model");
if (!themap->Search(ent, res)) if (!themap->Search(ent, res))
{ // deja transfere ? sinon, le faire { // already transferred ? if not, do it
// On opere la Copie (enfin, on tente) // We perform the Copy (finally, we try)
// En cas d echec, rien n est enregistre // In case of failure, nothing is recorded
if (!Copy(ent, res, (nument != 0), themod->IsRedefinedContent(nument))) if (!Copy(ent, res, (nument != 0), themod->IsRedefinedContent(nument)))
return res; return res;
@@ -206,8 +206,8 @@ Handle(Standard_Transient) Interface_CopyTool::Transferred(const Handle(Standard
rep = themod->ReportEntity(nument); rep = themod->ReportEntity(nument);
if (!rep.IsNull()) if (!rep.IsNull())
{ {
// ATTENTION ATTENTION, si ReportEntity : Copier aussi Content et refaire une // WARNING WARNING, if ReportEntity : Also copy Content and remake a
// ReportEntity avec les termes initiaux // ReportEntity with the initial terms
if (rep->IsUnknown()) if (rep->IsUnknown())
therep->Bind(ent, new Interface_ReportEntity(res)); therep->Bind(ent, new Interface_ReportEntity(res));
else else
@@ -226,7 +226,7 @@ Handle(Standard_Transient) Interface_CopyTool::Transferred(const Handle(Standard
therep->Bind(ent, repto); therep->Bind(ent, repto);
} }
} }
// Gerer le niveau d imbrication (0 = racine du transfert) // Manage the nesting level (0 = root of transfer)
thelev--; thelev--;
} }
if (thelev == 0 && nument > 0) if (thelev == 0 && nument > 0)
@@ -274,7 +274,7 @@ Standard_Integer Interface_CopyTool::LastCopiedAfter(const Standard_Integer
} }
// ######################################################################### // #########################################################################
// .... Actions Generales .... // .... General Actions ....
void Interface_CopyTool::TransferEntity(const Handle(Standard_Transient)& ent) void Interface_CopyTool::TransferEntity(const Handle(Standard_Transient)& ent)
{ {
@@ -284,13 +284,13 @@ void Interface_CopyTool::TransferEntity(const Handle(Standard_Transient)& ent)
void Interface_CopyTool::RenewImpliedRefs() void Interface_CopyTool::RenewImpliedRefs()
{ {
if (theimp) if (theimp)
return; // deja fait return; // already done
theimp = Standard_True; theimp = Standard_True;
// Transfert Passe 2 : recuperation des relations non "Share" (mais "Imply") // Transfer Pass 2 : recovery of non "Share" relations (but "Imply")
// c-a-d portant sur des entites qui ont pu ou non etre transferees // i.e. concerning entities that may or may not have been transferred
// (Et que la 1re passe n a pas copie mais laisse en Null) // (And that the 1st pass did not copy but left as Null)
// N.B. : on devrait interdire de commander des nouveaux transferts ... // N.B. : we should forbid commanding new transfers ...
Standard_Integer nb = themod->NbEntities(); Standard_Integer nb = themod->NbEntities();
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
@@ -298,8 +298,8 @@ void Interface_CopyTool::RenewImpliedRefs()
Handle(Standard_Transient) ent = themod->Value(i); Handle(Standard_Transient) ent = themod->Value(i);
Handle(Standard_Transient) res; Handle(Standard_Transient) res;
if (!themap->Search(ent, res)) if (!themap->Search(ent, res))
continue; // entite pas transferee continue; // entity not transferred
// Reconduction des references "Imply". Attention, ne pas copier si non chargee // Renewal of "Imply" references. Warning, do not copy if not loaded
Handle(Standard_Transient) aRep; Handle(Standard_Transient) aRep;
if (!therep->Search(ent, aRep)) if (!therep->Search(ent, aRep))
{ {
@@ -316,16 +316,16 @@ void Interface_CopyTool::RenewImpliedRefs()
void Interface_CopyTool::FillModel(const Handle(Interface_InterfaceModel)& bmodel) void Interface_CopyTool::FillModel(const Handle(Interface_InterfaceModel)& bmodel)
{ {
// Travaux preparatoires concernant les modeles // Preparatory work concerning the models
// On commence : cela implique le Header // We start : this involves the Header
bmodel->Clear(); bmodel->Clear();
bmodel->GetFromAnother(themod); bmodel->GetFromAnother(themod);
// Transfert Passe 1 : On prend les Entites prealablement copiees // Transfer Pass 1 : We take the Entities previously copied
Interface_EntityIterator list = CompleteResult(Standard_True); Interface_EntityIterator list = CompleteResult(Standard_True);
bmodel->GetFromTransfer(list); bmodel->GetFromTransfer(list);
// Transfert Passe 2 : recuperation des relations non "Share" (mais "Imply") // Transfer Pass 2 : recovery of non "Share" relations (but "Imply")
RenewImpliedRefs(); RenewImpliedRefs();
} }

View File

@@ -21,12 +21,12 @@
IMPLEMENT_STANDARD_RTTIEXT(Interface_EntityCluster, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Interface_EntityCluster, Standard_Transient)
// Un Cluster, ce sont 4 entites qui se suivent (dans le principe, nombre fixe, // A Cluster is 4 entities that follow each other (in principle, fixed number,
// meme si pas 4). Elles sont remplies depuis 0. Il y a donc autant d Entites // even if not 4). They are filled from 0. There are therefore as many Entities
// que de Handles non Nuls, plus le fait qu ils sont remplis dans l ordre // as there are non-Null Handles, plus the fact that they are filled in order
// Ainsi (avec Next), on consomme 5 Handles pour 4 Entites, avec une pointe // Thus (with Next), we consume 5 Handles for 4 Entities, with a spike
// pour 1 et 2 Entites (on reste a 5 Handles) // for 1 and 2 Entities (we stay at 5 Handles)
// Suppression : On retasse le Cluster pour que les Nulls soient tjrs a la fin // Deletion: We compact the Cluster so that the Nulls are always at the end
// .... CONSTRUCTEURS .... // .... CONSTRUCTEURS ....
Interface_EntityCluster::Interface_EntityCluster() {} Interface_EntityCluster::Interface_EntityCluster() {}
@@ -62,7 +62,7 @@ void Interface_EntityCluster::Append(const Handle(Standard_Transient)& ent)
else if (theents[3].IsNull()) else if (theents[3].IsNull())
theents[3] = ent; theents[3] = ent;
else else
{ // Si celui-ci est plein ... { // If this one is full ...
if (thenext.IsNull()) if (thenext.IsNull())
thenext = new Interface_EntityCluster(ent); thenext = new Interface_EntityCluster(ent);
else else
@@ -80,7 +80,7 @@ Standard_Boolean Interface_EntityCluster::Remove(const Handle(Standard_Transient
if (ent.IsNull()) if (ent.IsNull())
throw Standard_NullObject("Interface_EntityCluster Remove"); throw Standard_NullObject("Interface_EntityCluster Remove");
Standard_Integer i; Standard_Integer i;
// <ent> est-il ici ? si oui, on a son rang // Is <ent> here? if yes, we have its rank
if (ent == theents[0]) if (ent == theents[0])
i = 1; i = 1;
else if (ent == theents[1]) else if (ent == theents[1])
@@ -90,10 +90,10 @@ Standard_Boolean Interface_EntityCluster::Remove(const Handle(Standard_Transient
else if (ent == theents[3]) else if (ent == theents[3])
i = 4; i = 4;
// Sinon, passer au suivant, qui peut du coup devenir vide -> // Otherwise, go to the next one, which can then become empty ->
// On enleve le cluster vide de la liste (en principe cest le dernier) // We remove the empty cluster from the list (in principle it's the last one)
else else
{ // Pas trouve dans celui-ci ... { // Not found in this one ...
if (thenext.IsNull()) if (thenext.IsNull())
return Standard_False; return Standard_False;
Standard_Integer res = thenext->Remove(ent); Standard_Integer res = thenext->Remove(ent);
@@ -120,11 +120,11 @@ Standard_Boolean Interface_EntityCluster::Remove(const Standard_Integer num)
} }
for (Standard_Integer j = num; j < n; j--) for (Standard_Integer j = num; j < n; j--)
theents[j - 1] = theents[j]; theents[j - 1] = theents[j];
theents[3].Nullify(); // On Nullify par la fin theents[3].Nullify(); // We Nullify at the end
return (n == 1); // Ancien NbLocal == 1 -> devient nul return (n == 1); // Old NbLocal == 1 -> becomes null
} }
// .... ACCES AUX DONNEES .... // .... DATA ACCESS ....
Standard_Integer Interface_EntityCluster::NbEntities() const Standard_Integer Interface_EntityCluster::NbEntities() const
{ {
@@ -152,7 +152,7 @@ const Handle(Standard_Transient)& Interface_EntityCluster::Value(const Standard_
} }
return aCurEntClust->theents[aLocalNum - 1]; return aCurEntClust->theents[aLocalNum - 1];
} }
return theents[num - 1]; // numerotation a partir de 0 return theents[num - 1]; // numbering from 0
} }
void Interface_EntityCluster::SetValue(const Standard_Integer num, void Interface_EntityCluster::SetValue(const Standard_Integer num,
@@ -177,7 +177,7 @@ void Interface_EntityCluster::SetValue(const Standard_Integer num,
aCurEntClust->theents[aLocalNum - 1] = ent; aCurEntClust->theents[aLocalNum - 1] = ent;
} }
else else
theents[num - 1] = ent; // numerotation a partir de 0 theents[num - 1] = ent; // numbering from 0
} }
void Interface_EntityCluster::FillIterator(Interface_EntityIterator& iter) const void Interface_EntityCluster::FillIterator(Interface_EntityIterator& iter) const

View File

@@ -17,15 +17,15 @@
#include <Standard_NoSuchObject.hxx> #include <Standard_NoSuchObject.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
// Iterateur pour ecriture for, ou while avec Next en fin : // Iterator for for writing, or while with Next at the end :
// for (creer iterateur; iter.More(); iter.Next()) { val = iter.Value(); ... } // for (create iterator; iter.More(); iter.Next()) { val = iter.Value(); ... }
// .... Definitions initiales : en particulier celles requises pour // .... Initial definitions : in particular those required for
// les outils de graphe (construction avec le graphe, avec un vertex) // graph tools (construction with graph, with a vertex)
Interface_EntityIterator::Interface_EntityIterator() Interface_EntityIterator::Interface_EntityIterator()
{ {
// thecurr = new Interface_IntVal; // thecurr = new Interface_IntVal;
// thecurr->CValue() = 0; // thecurr->CValue() = 0;
// thelist = new TColStd_HSequenceOfTransient(); // constructeur vide // thelist = new TColStd_HSequenceOfTransient(); // empty constructor
// thelist sera construit au premier Add (quelquefois, il nyena pas) // thelist sera construit au premier Add (quelquefois, il nyena pas)
} }
@@ -71,10 +71,10 @@ void Interface_EntityIterator::Reset()
thelist = new TColStd_HSequenceOfTransient(); thelist = new TColStd_HSequenceOfTransient();
} }
// .... Fonctionnalites de tri prealable a l'iteration .... // .... Pre-iteration sorting functionalities ....
// Facon "bete" : supprimer les termes qui ne conviennent pas : lent ! // "Dumb" way : remove terms that don't fit : slow !
// Mieux vaut refaire une autre sequence a cote // Better to make another sequence alongside
void Interface_EntityIterator::SelectType(const Handle(Standard_Type)& atype, void Interface_EntityIterator::SelectType(const Handle(Standard_Type)& atype,
const Standard_Boolean keep) const Standard_Boolean keep)
@@ -134,14 +134,14 @@ void Interface_EntityIterator::Start() const
{ {
if (!thecurr.IsNull()) if (!thecurr.IsNull())
thecurr->CValue() = 1; thecurr->CValue() = 1;
} // peut etre redefini ... } // can be redefined ...
Standard_Boolean Interface_EntityIterator::More() const Standard_Boolean Interface_EntityIterator::More() const
{ {
if (thecurr.IsNull()) if (thecurr.IsNull())
return Standard_False; return Standard_False;
if (thecurr->Value() == 0) if (thecurr->Value() == 0)
Start(); // preparation de l iteration Start(); // iteration preparation
if (thelist.IsNull()) if (thelist.IsNull())
return Standard_False; return Standard_False;
return (thecurr->Value() <= thelist->Length()); return (thecurr->Value() <= thelist->Length());
@@ -154,7 +154,7 @@ void Interface_EntityIterator::Next() const
const Handle(Standard_Transient)& Interface_EntityIterator::Value() const const Handle(Standard_Transient)& Interface_EntityIterator::Value() const
{ {
// NbEntity pas const (on ne sait pas comment il est implemente apres tout) // NbEntity not const (we don't know how it is implemented after all)
if (thelist.IsNull()) if (thelist.IsNull())
throw Standard_NoSuchObject("Interface_EntityIterator"); throw Standard_NoSuchObject("Interface_EntityIterator");
if (thecurr->Value() < 1 || thecurr->Value() > thelist->Length()) if (thecurr->Value() < 1 || thecurr->Value() > thelist->Length())
@@ -167,14 +167,14 @@ Handle(TColStd_HSequenceOfTransient) Interface_EntityIterator::Content() const
if (!thecurr.IsNull() && thecurr->Value() == 0) if (!thecurr.IsNull() && thecurr->Value() == 0)
Start(); Start();
if (thelist.IsNull()) if (thelist.IsNull())
return new TColStd_HSequenceOfTransient(); // vide return new TColStd_HSequenceOfTransient(); // empty
return thelist; return thelist;
} }
void Interface_EntityIterator::Destroy() void Interface_EntityIterator::Destroy()
{ {
thecurr.Nullify(); thecurr.Nullify();
} // redevient vide ! } // becomes empty again !
Interface_EntityIterator::~Interface_EntityIterator() Interface_EntityIterator::~Interface_EntityIterator()
{ {

View File

@@ -19,11 +19,11 @@
#include <Standard_OutOfRange.hxx> #include <Standard_OutOfRange.hxx>
#include <Standard_Transient.hxx> #include <Standard_Transient.hxx>
// Une EntityList, c est au fond un "Handle" bien entoure : // An EntityList is basically a well-wrapped "Handle":
// S il est nul, la liste est vide // If it is null, the list is empty
// Si c est une Entite, la liste comprend cette entite et rien d autre // If it is an Entity, the list includes this entity and nothing else
// Si c est un EntityCluster, il definit (avec ses Next eventuels) le contenu // If it is an EntityCluster, it defines (with its possible Next) the content
// de la liste // of the list
Interface_EntityList::Interface_EntityList() {} Interface_EntityList::Interface_EntityList() {}
void Interface_EntityList::Clear() void Interface_EntityList::Clear()
@@ -31,7 +31,7 @@ void Interface_EntityList::Clear()
theval.Nullify(); theval.Nullify();
} }
// .... EDITIONS (ajout-suppression) .... // .... EDITIONS (add-remove) ....
void Interface_EntityList::Append(const Handle(Standard_Transient)& ent) void Interface_EntityList::Append(const Handle(Standard_Transient)& ent)
{ {
@@ -53,10 +53,10 @@ void Interface_EntityList::Append(const Handle(Standard_Transient)& ent)
} }
} }
// Difference avec Append : on optimise, en evitant la recursivite // Difference with Append : we optimize, avoiding recursion
// En effet, quand un EntityCluster est plein, Append transmet au Next // Indeed, when an EntityCluster is full, Append transmits to Next
// Ici, EntityList garde le controle, le temps de traitement reste le meme // Here, EntityList keeps control, the processing time remains the same
// Moyennant quoi, l ordre n est pas garanti // With which, the order is not guaranteed
void Interface_EntityList::Add(const Handle(Standard_Transient)& ent) void Interface_EntityList::Add(const Handle(Standard_Transient)& ent)
{ {
@@ -83,9 +83,9 @@ void Interface_EntityList::Add(const Handle(Standard_Transient)& ent)
} }
} }
// Remove : Par Identification d Item a supprimer, ou par Rang // Remove : By Identification of Item to remove, or by Rank
// Identification : Item supprime ou qu il soit // Identification : Item removed wherever it is
// N.B.: La liste peut devenir vide ... cf retour Remove de Cluster // N.B.: The list can become empty ... cf return Remove from Cluster
void Interface_EntityList::Remove(const Handle(Standard_Transient)& ent) void Interface_EntityList::Remove(const Handle(Standard_Transient)& ent)
{ {
@@ -100,13 +100,13 @@ void Interface_EntityList::Remove(const Handle(Standard_Transient)& ent)
} }
Handle(Interface_EntityCluster) ec = Handle(Interface_EntityCluster)::DownCast(theval); Handle(Interface_EntityCluster) ec = Handle(Interface_EntityCluster)::DownCast(theval);
if (ec.IsNull()) if (ec.IsNull())
return; // Une seule Entite et pas la bonne return; // A single Entity and not the right one
Standard_Boolean res = ec->Remove(ent); Standard_Boolean res = ec->Remove(ent);
if (res) if (res)
theval.Nullify(); theval.Nullify();
} }
// Remove par rang : tester OutOfRange // Remove by rank : test OutOfRange
void Interface_EntityList::Remove(const Standard_Integer num) void Interface_EntityList::Remove(const Standard_Integer num)
{ {
@@ -125,7 +125,7 @@ void Interface_EntityList::Remove(const Standard_Integer num)
theval.Nullify(); theval.Nullify();
} }
// .... ACCES Unitaire AUX DONNEES .... // .... UNIT ACCESS TO DATA ....
Standard_Boolean Interface_EntityList::IsEmpty() const Standard_Boolean Interface_EntityList::IsEmpty() const
{ {
@@ -138,7 +138,7 @@ Standard_Integer Interface_EntityList::NbEntities() const
return 0; return 0;
Handle(Interface_EntityCluster) ec = Handle(Interface_EntityCluster)::DownCast(theval); Handle(Interface_EntityCluster) ec = Handle(Interface_EntityCluster)::DownCast(theval);
if (ec.IsNull()) if (ec.IsNull())
return 1; // Une seuke Entite return 1; // A single Entity
return ec->NbEntities(); return ec->NbEntities();
} }

View File

@@ -37,7 +37,7 @@ void Interface_FileParameter::Init(const TCollection_AsciiString& val,
void Interface_FileParameter::Init(const Standard_CString val, const Interface_ParamType typ) void Interface_FileParameter::Init(const Standard_CString val, const Interface_ParamType typ)
{ {
theval = (Standard_PCharacter)val; // Principe : Allocation geree par contenant (ParamSet) theval = (Standard_PCharacter)val; // Principle: Allocation managed by container (ParamSet)
thetype = typ; thetype = typ;
thenum = 0; thenum = 0;
} }
@@ -75,7 +75,7 @@ Standard_Integer Interface_FileParameter::EntityNumber() const
void Interface_FileParameter::Clear() void Interface_FileParameter::Clear()
{ {
theval = NULL; theval = NULL;
} // delete theval; pas si gere par ParamSet } // delete theval; not if managed by ParamSet
//================================================================================================= //=================================================================================================

View File

@@ -28,13 +28,13 @@
IMPLEMENT_STANDARD_RTTIEXT(Interface_FileReaderData, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Interface_FileReaderData, Standard_Transient)
// Stoque les Donnees issues d un Fichier (Conservees sous forme Litterale) // Stores Data from a File (Preserved in Literal form)
// Chaque norme peut s en servir comme base (listes de parametres litteraux, // Each standard can use it as a base (literal parameter lists,
// entites associees) et y ajoute ses donnees propres. // associated entities) and add its own data to it.
// Travaille sous le controle de FileReaderTool // Works under the control of FileReaderTool
// Optimisation : Champs pas possibles, car Param est const. Dommage // Optimization : Fields not possible, because Param is const. Too bad
// Donc, on suppose qu on lit un fichier a la fois (hypothese raisonnable) // So, we assume that we read one file at a time (reasonable assumption)
// On note en champ un numero de fichier, par rapport auquel on optimise // We note in field a file number, relative to which we optimize
static Standard_Integer thefic = 0; static Standard_Integer thefic = 0;
static Standard_Integer thenm0 = -1; static Standard_Integer thenm0 = -1;
static Standard_Integer thenp0 = -1; static Standard_Integer thenp0 = -1;
@@ -65,7 +65,7 @@ Standard_Integer Interface_FileReaderData::NbEntities() const
return nb; return nb;
} }
// .... Gestion des Parametres attaches aux Records .... // .... Management of Parameters attached to Records ....
void Interface_FileReaderData::InitParams(const Standard_Integer num) void Interface_FileReaderData::InitParams(const Standard_Integer num)
{ {
@@ -228,7 +228,7 @@ Standard_Boolean Interface_FileReaderData::ResetErrorLoad()
return res; return res;
} }
// .... Gestion des Entites Associees aux Donnees du Fichier .... // .... Management of Entities Associated with File Data ....
const Handle(Standard_Transient)& Interface_FileReaderData::BoundEntity( const Handle(Standard_Transient)& Interface_FileReaderData::BoundEntity(
const Standard_Integer num) const const Standard_Integer num) const

View File

@@ -43,11 +43,11 @@
// To use TCollectionHAsciiString // To use TCollectionHAsciiString
#include <TCollection_HAsciiString.hxx> #include <TCollection_HAsciiString.hxx>
// Failure pour recuperer erreur en lecture fichier, // Failure to recover error when reading file,
// TypeMismatch pour message d erreur circonstancie (cas particulier important) // TypeMismatch for detailed error message (important special case)
// Gere le chargement d un Fichier, prealablement transforme en FileReaderData // Manages the loading of a File, previously transformed into FileReaderData
// (de la bonne norme), dans un Modele // (of the right standard), into a Model
//================================================================================================= //=================================================================================================
@@ -141,13 +141,13 @@ Standard_Boolean Interface_FileReaderTool::ErrorHandle() const
return theerrhand; return theerrhand;
} }
// .... Actions Connexes au CHARGEMENT DU MODELE .... // .... Actions Related to MODEL LOADING ....
// SetEntities fait appel a des methodes a fournir : // SetEntities calls methods to be provided :
// s appuyant sur un Recognizer adapte a l interface : // based on a Recognizer adapted to the interface :
// - Recognize fait reco->Evaluate(... : selon record no num) // - Recognize makes reco->Evaluate(... : according to record no num)
// et recupere le resultat // and retrieves the result
// ainsi que la definition de l entite inconnue de l interface // as well as the definition of the unknown entity of the interface
//================================================================================================= //=================================================================================================
@@ -194,7 +194,7 @@ Standard_Boolean Interface_FileReaderTool::RecognizeByLib(const Standard_Integer
Handle(Interface_ReaderModule) rmod; Handle(Interface_ReaderModule) rmod;
Handle(Interface_Protocol) proto; Handle(Interface_Protocol) proto;
Standard_Integer CN = 0; Standard_Integer CN = 0;
// Chercher dans ReaderLib : Reconnaissance de cas -> CN , proto // Search in ReaderLib : Case recognition -> CN , proto
for (rlib.Start(); rlib.More(); rlib.Next()) for (rlib.Start(); rlib.More(); rlib.Next())
{ {
rmod = rlib.Module(); rmod = rlib.Module();
@@ -209,7 +209,7 @@ Standard_Boolean Interface_FileReaderTool::RecognizeByLib(const Standard_Integer
} }
if (CN <= 0 || proto.IsNull()) if (CN <= 0 || proto.IsNull())
return Standard_False; return Standard_False;
// Se recaler dans GeneralLib : Creation de l entite vide // Recalibrate in GeneralLib : Creation of empty entity
Handle(Standard_Type) typrot = proto->DynamicType(); Handle(Standard_Type) typrot = proto->DynamicType();
for (glib.Start(); glib.More(); glib.Next()) for (glib.Start(); glib.More(); glib.Next())
{ {
@@ -245,7 +245,7 @@ Handle(Interface_InterfaceModel) Interface_FileReaderTool::NewModel() const
//================================================================================================= //=================================================================================================
void Interface_FileReaderTool::EndRead(const Handle(Interface_InterfaceModel)&) { void Interface_FileReaderTool::EndRead(const Handle(Interface_InterfaceModel)&) {
} // par defaut, ne fait rien; redefinissable selon besoin } // by default, does nothing; redefinable as needed
// .... (Sa Majeste le) CHARGEMENT DU MODELE .... // .... (Sa Majeste le) CHARGEMENT DU MODELE ....
@@ -253,9 +253,9 @@ void Interface_FileReaderTool::EndRead(const Handle(Interface_InterfaceModel)&)
void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)& amodel) void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)& amodel)
// //
// Methode generale de lecture d un fichier : il est lu via un FileReaderData // General method for reading a file : it is read via a FileReaderData
// qui doit y donner acces de la facon la plus performante possible // which must provide access in the most efficient way possible
// chaque interface definit son FileHeader avec ses methodes, appelees ici // each interface defines its FileHeader with its methods, called here
{ {
// MGE 16/06/98 // MGE 16/06/98
// Building of Messages // Building of Messages
@@ -266,13 +266,13 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
SetModel(amodel); SetModel(amodel);
// .. Demarrage : Lecture du Header .. // .. Startup : Header Reading ..
if (theerrhand) if (theerrhand)
{ {
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
BeginRead(amodel); // selon la norme BeginRead(amodel); // according to the standard
} }
catch (Standard_Failure const&) catch (Standard_Failure const&)
{ {
@@ -287,7 +287,7 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
else else
BeginRead(amodel); // selon la norme BeginRead(amodel); // selon la norme
// .. Lecture des Entites .. // .. Reading Entities ..
amodel->Reservate(thereader->NbEntities()); amodel->Reservate(thereader->NbEntities());
@@ -296,7 +296,7 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
while (num > 0) while (num > 0)
{ {
Standard_Integer ierr = 0; // erreur sur analyse d une entite Standard_Integer ierr = 0; // error on analysis of an entity
Handle(Standard_Transient) anent; Handle(Standard_Transient) anent;
try try
{ {
@@ -305,15 +305,15 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
{ {
num0 = num; num0 = num;
// Lecture sous protection contre crash // Reading under crash protection
// (fait aussi AddEntity mais pas SetReportEntity) // (also does AddEntity but not SetReportEntity)
anent = LoadedEntity(num); anent = LoadedEntity(num);
// Lecture non protegee : utile pour travailler avec dbx // Unprotected reading : useful for working with dbx
//// else //// else
//// anent = LoadedEntity(num); //// anent = LoadedEntity(num);
// .. Fin Lecture .. // .. End Reading ..
if (anent.IsNull()) if (anent.IsNull())
{ {
// Sending of message : Number of ignored Null Entities // Sending of message : Number of ignored Null Entities
@@ -325,17 +325,17 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
} }
continue; continue;
} }
// LoadedEntity fait AddEntity MAIS PAS SetReport (en bloc a la fin) // LoadedEntity does AddEntity BUT NOT SetReport (in block at the end)
} // ---- fin boucle sur entites } // ---- end loop on entities
num0 = 0; // plus rien num0 = 0; // nothing more
} // ---- fin du try, le catch suit } // ---- fin du try, le catch suit
// En cas d erreur NON PREVUE par l analyse, recuperation par defaut // In case of UNFORESEEN error by the analysis, default recovery
// Attention : la recuperation peut elle-meme planter ... (cf ierr) // Warning : the recovery can itself crash ... (cf ierr)
catch (Standard_Failure const& anException) catch (Standard_Failure const& anException)
{ {
// Au passage suivant, on attaquera le record suivant // On the next pass, we will attack the next record
// clang-format off // clang-format off
num0 = thereader->FindNextRecord(num); //:g9 abv 28 May 98: tr8_as2_ug.stp - infinite cycle: (0); num0 = thereader->FindNextRecord(num); //:g9 abv 28 May 98: tr8_as2_ug.stp - infinite cycle: (0);
// clang-format on // clang-format on
@@ -387,7 +387,7 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
{ {
// char mess[100]; svv #2 // char mess[100]; svv #2
ierr = 1; ierr = 1;
// ce qui serait bien ici serait de recuperer le texte de l erreur pour ach ... // what would be good here would be to recover the error text for ach ...
if (thetrace > 0) if (thetrace > 0)
{ {
// Sending of message : recovered entity // Sending of message : recovered entity
@@ -399,7 +399,7 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
} }
} }
// Finalement, on charge une Entite Inconnue // Finally, we load an Unknown Entity
thenbreps++; thenbreps++;
Handle(Interface_ReportEntity) rep = new Interface_ReportEntity(ach, anent); Handle(Interface_ReportEntity) rep = new Interface_ReportEntity(ach, anent);
Handle(Standard_Transient) undef = UnknownEntity(); Handle(Standard_Transient) undef = UnknownEntity();
@@ -411,7 +411,7 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
thenbreps++; thenbreps++;
thereports->SetValue(num, rep); thereports->SetValue(num, rep);
// if(isValid) // if(isValid)
amodel->AddEntity(anent); // pas fait par LoadedEntity ... amodel->AddEntity(anent); // not done by LoadedEntity ...
} }
else else
{ {
@@ -425,14 +425,14 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
TF->Send(Msg22, Message_Info); TF->Send(Msg22, Message_Info);
} }
} }
// On garde <rep> telle quelle : pas d analyse fichier supplementaire, // We keep <rep> as is : no additional file analysis,
// Mais la phase preliminaire eventuelle est conservee // But the eventual preliminary phase is preserved
// (en particulier, on garde trace du Type lu du fichier, etc...) // (in particular, we keep trace of the Type read from the file, etc...)
} }
} // ----- fin complete du try/catch } // ----- fin complete du try/catch
} // ----- fin du while } // ----- fin du while
// .. Ajout des Reports, silya // .. Adding Reports, if any
if (!thereports.IsNull()) if (!thereports.IsNull())
{ {
if (thetrace > 0) if (thetrace > 0)
@@ -458,13 +458,13 @@ void Interface_FileReaderTool::LoadModel(const Handle(Interface_InterfaceModel)&
} }
} }
// Conclusion : peut ne rien faire : selon necessite // Conclusion : may do nothing : according to necessity
if (theerrhand) if (theerrhand)
{ {
try try
{ {
OCC_CATCH_SIGNALS OCC_CATCH_SIGNALS
EndRead(amodel); // selon la norme EndRead(amodel); // according to the standard
} }
catch (Standard_Failure const&) catch (Standard_Failure const&)
{ {
@@ -499,7 +499,7 @@ Handle(Standard_Transient) Interface_FileReaderTool::LoadedEntity(const Standard
} }
} }
// Trace Entite Inconnue // Trace Unknown Entity
if (thetrace >= 2 && theproto->IsUnknownEntity(anent)) if (thetrace >= 2 && theproto->IsUnknownEntity(anent))
{ {
Handle(Message_Messenger) TF = Messenger(); Handle(Message_Messenger) TF = Messenger();
@@ -511,18 +511,18 @@ Handle(Standard_Transient) Interface_FileReaderTool::LoadedEntity(const Standard
TF->Send(Msg22, Message_Info); TF->Send(Msg22, Message_Info);
} }
} }
// .. Chargement proprement dit : Specifique de la Norme .. // .. Actual Loading : Standard Specific ..
AnalyseRecord(num, anent, ach); AnalyseRecord(num, anent, ach);
// .. Ajout dans le modele de l entite telle quelle .. // .. Adding to the model the entity as is ..
// ATTENTION, ReportEntity traitee en bloc apres les Load // WARNING, ReportEntity processed in block after Load
themodel->AddEntity(anent); themodel->AddEntity(anent);
// Erreur ou Correction : On cree une ReportEntity qui memorise le Check, // Error or Correction : We create a ReportEntity that memorizes the Check,
// l Entite, et en cas d Erreur une UndefinedEntity pour les Parametres // the Entity, and in case of Error an UndefinedEntity for the Parameters
// On exploite ici le flag IsLoadError : s il a ete defini (a vrai ou faux) // We exploit here the IsLoadError flag: if it has been defined (true or false)
// il a priorite sur les fails du check. Sinon, ce sont les fails qui parlent // it has priority over check fails. Otherwise, it's the fails that speak
Standard_Integer nbf = ach->NbFails(); Standard_Integer nbf = ach->NbFails();
Standard_Integer nbw = ach->NbWarnings(); Standard_Integer nbw = ach->NbWarnings();
@@ -547,7 +547,7 @@ Handle(Standard_Transient) Interface_FileReaderTool::LoadedEntity(const Standard
} }
} }
// Rechargement ? si oui, dans une UnknownEntity fournie par le protocole // Reloading ? if yes, in an UnknownEntity provided by the protocol
if (thereader->IsErrorLoad()) if (thereader->IsErrorLoad())
nbf = (thereader->ResetErrorLoad() ? 1 : 0); nbf = (thereader->ResetErrorLoad() ? 1 : 0);
if (nbf > 0) if (nbf > 0)
@@ -557,7 +557,7 @@ Handle(Standard_Transient) Interface_FileReaderTool::LoadedEntity(const Standard
rep->SetContent(undef); rep->SetContent(undef);
} }
// Conclusion (Unknown : traite en externe because traitement Raise) // Conclusion (Unknown : treated externally because Raise treatment)
//// if (irep > 0) themodel->SetReportEntity (nbe,rep); en bloc a la fin //// if (irep > 0) themodel->SetReportEntity (nbe,rep); en bloc a la fin
return anent; return anent;

View File

@@ -20,7 +20,7 @@ Interface_FloatWriter::Interface_FloatWriter(const Standard_Integer chars)
SetDefaults(chars); SetDefaults(chars);
} }
// .... Controle d Envoi des Flottants .... // .... Control of Float Transmission ....
void Interface_FloatWriter::SetFormat(const Standard_CString form, const Standard_Boolean reset) void Interface_FloatWriter::SetFormat(const Standard_CString form, const Standard_Boolean reset)
{ {
@@ -107,7 +107,7 @@ Standard_Integer Interface_FloatWriter::Convert(const Standard_Real val,
const Standard_CString mainform, const Standard_CString mainform,
const Standard_CString rangeform) const Standard_CString rangeform)
{ {
// Valeur flottante, expurgee de "0000" qui trainent et de "E+00" // Float value, purged of trailing "0000" and "E+00"
const Standard_Integer anMasSize = 5; // change 6 to 5: index 5 is not used below const Standard_Integer anMasSize = 5; // change 6 to 5: index 5 is not used below
char lxp[anMasSize], *pText; char lxp[anMasSize], *pText;
int i0 = 0, j0 = 0; int i0 = 0, j0 = 0;

View File

@@ -79,20 +79,20 @@ void Interface_GeneralModule::RenewImpliedCase(const Standard_Integer /*casenum*
const Handle(Standard_Transient)& /*entto*/, const Handle(Standard_Transient)& /*entto*/,
const Interface_CopyTool& /*TC*/) const const Interface_CopyTool& /*TC*/) const
{ {
} // Par defaut, ne fait rien } // By default, does nothing
void Interface_GeneralModule::WhenDeleteCase(const Standard_Integer /*casenum*/, void Interface_GeneralModule::WhenDeleteCase(const Standard_Integer /*casenum*/,
const Handle(Standard_Transient)& /*ent*/, const Handle(Standard_Transient)& /*ent*/,
const Standard_Boolean /*dispatched*/) const const Standard_Boolean /*dispatched*/) const
{ {
} // par defaut, ne fait rien } // by default, does nothing
Standard_Integer Interface_GeneralModule::CategoryNumber(const Standard_Integer, Standard_Integer Interface_GeneralModule::CategoryNumber(const Standard_Integer,
const Handle(Standard_Transient)&, const Handle(Standard_Transient)&,
const Interface_ShareTool&) const const Interface_ShareTool&) const
{ {
return 0; return 0;
} // par defaut, non specifie } // by default, not specified
Handle(TCollection_HAsciiString) Interface_GeneralModule::Name(const Standard_Integer, Handle(TCollection_HAsciiString) Interface_GeneralModule::Name(const Standard_Integer,
const Handle(Standard_Transient)&, const Handle(Standard_Transient)&,
@@ -100,4 +100,4 @@ Handle(TCollection_HAsciiString) Interface_GeneralModule::Name(const Standard_In
{ {
Handle(TCollection_HAsciiString) str; Handle(TCollection_HAsciiString) str;
return str; return str;
} // par defaut, non specifie } // by default, not specified

View File

@@ -35,7 +35,7 @@
// .... CONSTRUCTEURS .... // .... CONSTRUCTEURS ....
// .... Construction a partir de la connaissance des Entites .... // .... Construction from Entity knowledge ....
Interface_Graph::Interface_Graph(const Handle(Interface_InterfaceModel)& amodel, Interface_Graph::Interface_Graph(const Handle(Interface_InterfaceModel)& amodel,
const Interface_GeneralLib& /*lib*/, const Interface_GeneralLib& /*lib*/,
@@ -81,7 +81,7 @@ Interface_Graph::Interface_Graph(const Handle(Interface_InterfaceModel)& amodel,
Evaluate(); Evaluate();
} }
// .... Construction depuis un autre Graph .... // .... Construction from another Graph ....
Interface_Graph::Interface_Graph(const Interface_Graph& agraph, const Standard_Boolean /*copied*/) Interface_Graph::Interface_Graph(const Interface_Graph& agraph, const Standard_Boolean /*copied*/)
: themodel(agraph.Model()), : themodel(agraph.Model()),
@@ -211,11 +211,11 @@ void Interface_Graph::Evaluate()
} }
} }
// .... Construction depuis un autre Graph .... // .... Construction from another Graph ....
// ########################################################################### // ###########################################################################
// .... ACCES UNITAIRES AUX DONNEES DE BASE .... // .... UNITARY ACCESS TO BASE DATA ....
void Interface_Graph::Reset() void Interface_Graph::Reset()
{ {
@@ -318,7 +318,7 @@ Interface_BitMap& Interface_Graph::CBitMap()
// ########################################################################### // ###########################################################################
// .... Chargements Elementaires avec Propagation de "Share" .... // // .... Elementary Loadings with "Share" Propagation .... //
const Handle(Interface_InterfaceModel)& Interface_Graph::Model() const const Handle(Interface_InterfaceModel)& Interface_Graph::Model() const
{ {
@@ -328,7 +328,7 @@ const Handle(Interface_InterfaceModel)& Interface_Graph::Model() const
void Interface_Graph::GetFromModel() void Interface_Graph::GetFromModel()
{ {
if (themodel.IsNull() || thestats.IsNull()) if (themodel.IsNull() || thestats.IsNull())
return; // no model ... (-> on n ira pas loin) return; // no model ... (-> we won't go far)
theflags.Init(Standard_True, Graph_Present); theflags.Init(Standard_True, Graph_Present);
thestats->Init(0); thestats->Init(0);
} }
@@ -343,11 +343,11 @@ void Interface_Graph::GetFromEntity(const Handle(Standard_Transient)& ent,
if (!num) if (!num)
return; return;
if (theflags.CTrue(num, Graph_Present)) if (theflags.CTrue(num, Graph_Present))
return; // deja pris : on passe return; // already taken : we skip
thestats->SetValue(num, newstat); thestats->SetValue(num, newstat);
if (!shared) if (!shared)
return; return;
// Attention a la redefinition ! // Watch out for redefinition !
Interface_EntityIterator aIter = GetShareds(ent); Interface_EntityIterator aIter = GetShareds(ent);
for (; aIter.More(); aIter.Next()) for (; aIter.More(); aIter.Next())
@@ -370,25 +370,25 @@ void Interface_Graph::GetFromEntity(const Handle(Standard_Transient)& ent,
if (pasla) if (pasla)
{ {
/// theflags.SetTrue (num, Graph_Present); // nouveau : noter avec newstat /// theflags.SetTrue (num, Graph_Present); // new : note with newstat
thestats->SetValue(num, newstat); thestats->SetValue(num, newstat);
} }
else else
{ {
Standard_Integer overstat = stat; Standard_Integer overstat = stat;
if (stat != newstat) if (stat != newstat)
{ // deja pris, meme statut : passer { // already taken, same status : skip
if (cumul) if (cumul)
overstat += overlapstat; // nouveau statut : avec cumul ... overstat += overlapstat; // new status : with cumulation ...
else else
overstat = overlapstat; // ... ou sans (statut force) overstat = overlapstat; // ... or without (forced status)
if (stat != overstat) // si repasse deja faite, passer if (stat != overstat) // if repass already done, skip
thestats->SetValue(num, overstat); thestats->SetValue(num, overstat);
} }
} }
if (!shared) if (!shared)
return; return;
// Attention a la redefinition ! // Watch out for redefinition !
Interface_EntityIterator aIter = GetShareds(ent); Interface_EntityIterator aIter = GetShareds(ent);
for (; aIter.More(); aIter.Next()) for (; aIter.More(); aIter.Next())
@@ -457,7 +457,7 @@ void Interface_Graph::GetFromGraph(const Interface_Graph& agraph, const Standard
// ##################################################################### // #####################################################################
// .... Listage des Entites Partagees .... // .... Listing of Shared Entities ....
Standard_Boolean Interface_Graph::HasShareErrors(const Handle(Standard_Transient)& ent) const Standard_Boolean Interface_Graph::HasShareErrors(const Handle(Standard_Transient)& ent) const
{ {

View File

@@ -79,4 +79,4 @@ void Interface_GraphContent::Begin()
Interface_EntityIterator::Start(); Interface_EntityIterator::Start();
} }
void Interface_GraphContent::Evaluate() {} // par defaut, Evaluate ne fait rien void Interface_GraphContent::Evaluate() {} // by default, Evaluate does nothing

View File

@@ -15,20 +15,20 @@
#include <Interface_IntList.hxx> #include <Interface_IntList.hxx>
// Organisation des donnees : // Data organization :
// theents vaut : 0 pas de reference // theents value : 0 no reference
// > 0 : une reference, dont voici la valeur; pas de liste // > 0 : one reference, here is the value; no list
// < 0 : une liste de references; on stocke <rank>, elle debute a <rank>+1 // < 0 : a list of references; we store <rank>, it starts at <rank>+1
// la liste est dans therefs et est ainsi constitue : // the list is in therefs and is thus constituted :
// liste de valeurs negatives, se terminant pas une valeur positive : // list of negative values, ending with a positive value :
// de <rank>+1 a <rank>+nb , <rank>+1 a <rank>+nb-1 sont negatifs et // from <rank>+1 to <rank>+nb , <rank>+1 to <rank>+nb-1 are negative and
// <rank>+nb est negatif // <rank>+nb is negative
// un zero signifie : place libre // a zero means : free space
// Pre-reservation : <rank> note le nombre courant, en positif strict // Pre-reservation : <rank> notes the current number, in strict positive
// Il faut alors l incrementer a chaque ajout // It must then be incremented at each addition
// Usage contextuel, il faut demander SetNumber(num < 0) pour exploiter cette // Contextual usage, you must call SetNumber(num < 0) to exploit this
// info et Add(ref < 0) pour la gerer. // info and Add(ref < 0) to manage it.
// Si elle n est pas presente, on bascule en mode courant // If it is not present, we switch to current mode
Interface_IntList::Interface_IntList() Interface_IntList::Interface_IntList()
{ {
thenbe = thenbr = thenum = thecount = therank = 0; thenbe = thenbr = thenum = thecount = therank = 0;
@@ -98,8 +98,8 @@ void Interface_IntList::SetNbEntities(const Standard_Integer nbe)
void Interface_IntList::SetNumber(const Standard_Integer number) void Interface_IntList::SetNumber(const Standard_Integer number)
{ {
// Usage en pre-reservation : a demander specifiquement ! -> optimisation // Pre-reservation usage : to be requested specifically ! -> optimization
// <preres> verifie que la pre-reservation est valide // <preres> verifies that the pre-reservation is valid
if (number < 0) if (number < 0)
{ {
if (thenum == -number || number < -thenbe) if (thenum == -number || number < -thenbe)
@@ -127,7 +127,7 @@ void Interface_IntList::SetNumber(const Standard_Integer number)
if (preres) if (preres)
return; return;
} }
// Usage courant. La suite en usage courant ou si pas de pre-reservation // Current usage. The following in current usage or if no pre-reservation
else if (number > 0) else if (number > 0)
{ {
if (thenum == number || number > thenbe) if (thenum == number || number > thenbe)
@@ -222,14 +222,14 @@ void Interface_IntList::SetRedefined(const Standard_Boolean mode)
void Interface_IntList::Reservate(const Standard_Integer count) void Interface_IntList::Reservate(const Standard_Integer count)
{ {
// Reservate (-count) = Reservate (count) + allocation sur entite courante + 1 // Reservate (-count) = Reservate (count) + allocation on current entity + 1
if (count < 0) if (count < 0)
{ {
Reservate(-count - 1); Reservate(-count - 1);
if (thenum == 0) if (thenum == 0)
return; return;
thenbr++; thenbr++;
therefs->SetValue(thenbr, 0); // contiendra le nombre ... therefs->SetValue(thenbr, 0); // will contain the number ...
therank = thenbr; therank = thenbr;
theents->SetValue(thenum, -thenbr); theents->SetValue(thenum, -thenbr);
thenbr -= count; thenbr -= count;
@@ -237,7 +237,7 @@ void Interface_IntList::Reservate(const Standard_Integer count)
} }
Standard_Integer up, oldup = 0; Standard_Integer up, oldup = 0;
if (thenbr == 0) if (thenbr == 0)
{ // c-a-d pas encore allouee ... { // i.e. not yet allocated ...
up = thenbe / 2 + 1; up = thenbe / 2 + 1;
if (up < 2) if (up < 2)
up = 2; up = 2;
@@ -245,7 +245,7 @@ void Interface_IntList::Reservate(const Standard_Integer count)
up = count * 3 / 2; up = count * 3 / 2;
therefs = new TColStd_HArray1OfInteger(0, up); therefs = new TColStd_HArray1OfInteger(0, up);
therefs->Init(0); therefs->Init(0);
thenbr = 2; // on commence apres (commodite d adressage) thenbr = 2; // we start after (convenience of addressing)
} }
oldup = therefs->Upper(); oldup = therefs->Upper();
if (thenbr + count < oldup) if (thenbr + count < oldup)
@@ -297,20 +297,20 @@ void Interface_IntList::Add(const Standard_Integer ref)
thecount++; thecount++;
} }
else if (thenbr == therank + thecount) else if (thenbr == therank + thecount)
{ // place libre en fin { // free space at end
therefs->SetValue(thenbr, -therefs->Value(thenbr)); therefs->SetValue(thenbr, -therefs->Value(thenbr));
therefs->SetValue(thenbr + 1, ref); therefs->SetValue(thenbr + 1, ref);
thenbr++; thenbr++;
thecount++; thecount++;
} }
else if (therefs->Value(therank + thecount + 1) == 0) else if (therefs->Value(therank + thecount + 1) == 0)
{ // place libre apres { // free space after
therefs->SetValue(therank + thecount, -therefs->Value(therank + thecount)); therefs->SetValue(therank + thecount, -therefs->Value(therank + thecount));
therefs->SetValue(therank + thecount + 1, ref); therefs->SetValue(therank + thecount + 1, ref);
thecount++; thecount++;
} }
else else
{ // recopier plus loin ! { // copy further !
Reservate(thecount + 2); Reservate(thecount + 2);
Standard_Integer rank = therank; Standard_Integer rank = therank;
therank = thenbr; therank = thenbr;
@@ -367,7 +367,7 @@ Standard_Boolean Interface_IntList::Remove(const Standard_Integer)
void Interface_IntList::Clear() void Interface_IntList::Clear()
{ {
if (thenbr == 0) if (thenbr == 0)
return; // deja clear return; // already clear
Standard_Integer i, low, up; Standard_Integer i, low, up;
low = theents->Lower(); low = theents->Lower();
up = theents->Upper(); up = theents->Upper();

View File

@@ -34,12 +34,12 @@
IMPLEMENT_STANDARD_RTTIEXT(Interface_InterfaceModel, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Interface_InterfaceModel, Standard_Transient)
// Un Modele d`Interface est un ensemble ferme d`Entites d`interface : chacune // An Interface Model is a closed set of interface Entities: each one
// est dans un seul modele a la fois; elle y a un numero (Number) qui permet de // is in a single model at a time; it has a number (Number) which allows to
// verifier qu`une entite est bien dans un seul modele, de definir des Map tres // verify that an entity is indeed in a single model, to define very
// performantes, de fournir un identifieur numerique // efficient Maps, to provide a numerical identifier
// Il est a meme d`etre utilise dans des traitements de Graphe // It is able to be used in Graph processing
// STATICS : les TEMPLATES // STATICS : the TEMPLATES
static NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)> atemp; static NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)> atemp;
static const Handle(Standard_Type)& typerep() static const Handle(Standard_Type)& typerep()
@@ -65,9 +65,9 @@ Interface_InterfaceModel::Interface_InterfaceModel()
//================================================================================================= //=================================================================================================
void Interface_InterfaceModel::Destroy() // on fait un mimumum void Interface_InterfaceModel::Destroy() // we do a minimum
{ {
// Moins que Clear que, lui, est adapte a chaque norme // Less than Clear which, itself, is adapted to each standard
ClearEntities(); ClearEntities();
thecheckstx->Clear(); thecheckstx->Clear();
thechecksem->Clear(); thechecksem->Clear();
@@ -148,7 +148,7 @@ void Interface_InterfaceModel::ClearEntities()
theentities.Clear(); theentities.Clear();
} }
// .... ACCES AUX ENTITES .... // .... ENTITY ACCESS ....
//================================================================================================= //=================================================================================================
@@ -204,7 +204,7 @@ Standard_Integer Interface_InterfaceModel::DENumber
} }
*/ */
// .. Acces Speciaux (Report, etc...) .. // .. Special Access (Report, etc...) ..
//================================================================================================= //=================================================================================================
@@ -434,7 +434,7 @@ void Interface_InterfaceModel::FillSemanticChecks(const Interface_CheckIterator&
{ {
const Handle(Interface_Check)& ach = checks.Value(); const Handle(Interface_Check)& ach = checks.Value();
Standard_Integer num = checks.Number(); Standard_Integer num = checks.Number();
// global check : ok si MEME MODELE // global check : ok if SAME MODEL
if (num == 0) if (num == 0)
thechecksem->GetMessages(ach); thechecksem->GetMessages(ach);
else else
@@ -480,7 +480,7 @@ const Handle(Interface_Check)& Interface_InterfaceModel::Check(
return rep->Check(); return rep->Check();
} }
// .... Chargement des donnees du Modele .... // // .... Loading of Model data .... //
//================================================================================================= //=================================================================================================
@@ -499,7 +499,7 @@ void Interface_InterfaceModel::AddEntity(const Handle(Standard_Transient)& anent
// Standard_Integer newnum; svv #2 // Standard_Integer newnum; svv #2
if (!anentity->IsKind(typerep())) if (!anentity->IsKind(typerep()))
theentities.Add(anentity); theentities.Add(anentity);
// Report : Ajouter Concerned, mais noter presence Report et sa valeur // Report : Add Concerned, but note presence Report and its value
else else
{ {
Handle(Interface_ReportEntity) rep = Handle(Interface_ReportEntity)::DownCast(anentity); Handle(Interface_ReportEntity) rep = Handle(Interface_ReportEntity)::DownCast(anentity);
@@ -511,8 +511,8 @@ void Interface_InterfaceModel::AddEntity(const Handle(Standard_Transient)& anent
} }
} }
// AddWithRefs itere sur les Entities referencees pour charger une Entite // AddWithRefs iterates on referenced Entities to load an Entity
// au complet, avec tout ce dont elle a besoin // completely, with everything it needs
//================================================================================================= //=================================================================================================
@@ -569,13 +569,13 @@ void Interface_InterfaceModel::AddWithRefs(const Handle(Standard_Transient)& ane
if (lib.Select(anent, module, CN)) if (lib.Select(anent, module, CN))
{ {
module->FillSharedCase(CN, anent, iter); module->FillSharedCase(CN, anent, iter);
// FillShared tout court : supposerait que le modele soit deja pret // FillShared simply : would suppose that the model is already ready
// or justement, on est en train de le construire ... // or precisely, we are in the process of building it ...
module->ListImpliedCase(CN, anent, iter); module->ListImpliedCase(CN, anent, iter);
} }
Standard_Integer lev1 = level - 1; Standard_Integer lev1 = level - 1;
if (lev1 == 0) if (lev1 == 0)
return; // level = 0 -> tous niveaux; sinon encore n-1 return; // level = 0 -> all levels; otherwise still n-1
for (iter.Start(); iter.More(); iter.Next()) for (iter.Start(); iter.More(); iter.Next())
AddWithRefs(iter.Value(), lib, lev1, listall); AddWithRefs(iter.Value(), lib, lev1, listall);
} }
@@ -588,9 +588,9 @@ void Interface_InterfaceModel::ReplaceEntity(const Standard_Integer n
theentities.Substitute(nument, anent); theentities.Substitute(nument, anent);
} }
// ReverseOrders permet de mieux controler la numeration des Entites : // ReverseOrders allows better control of Entity numbering :
// Souvent, les fichiers mettent les racines en fin, tandis que AddWithRefs // Often, files put the roots at the end, while AddWithRefs
// les met en tete. // puts them at the head.
//================================================================================================= //=================================================================================================
@@ -603,15 +603,15 @@ void Interface_InterfaceModel::ReverseOrders(const Standard_Integer after)
Standard_Integer i; // svv #1 Standard_Integer i; // svv #1
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
ents.SetValue(i, theentities.FindKey(i)); ents.SetValue(i, theentities.FindKey(i));
// On va vider la Map, puis la recharger : dans l ordre jusqua after // We will empty the Map, then reload it : in order until after
// en ordre inverse apres // in reverse order after
theentities.Clear(); theentities.Clear();
Reservate(nb); Reservate(nb);
for (i = 1; i <= after; i++) for (i = 1; i <= after; i++)
theentities.Add(ents(i)); // svv #2 theentities.Add(ents(i)); // svv #2
for (i = nb; i > after; i--) for (i = nb; i > after; i--)
theentities.Add(ents(i)); theentities.Add(ents(i));
// Faudra aussi s occuper des Reports // Will also have to take care of the Reports
for (i = nb; i > after; i--) for (i = nb; i > after; i--)
{ {
Standard_Integer i2 = nb + after - i; Standard_Integer i2 = nb + after - i;
@@ -643,7 +643,7 @@ void Interface_InterfaceModel::ChangeOrder(
if (nb < 2 || newnum >= nb || cnt <= 0) if (nb < 2 || newnum >= nb || cnt <= 0)
return; return;
TColStd_Array1OfTransient ents(1, nb); TColStd_Array1OfTransient ents(1, nb);
// On va preparer le changement // We will prepare the change
Standard_Integer minum = (oldnum > newnum ? newnum : oldnum); Standard_Integer minum = (oldnum > newnum ? newnum : oldnum);
Standard_Integer mxnum = (oldnum < newnum ? newnum : oldnum); Standard_Integer mxnum = (oldnum < newnum ? newnum : oldnum);
Standard_Integer kount = (oldnum > newnum ? cnt : -cnt); Standard_Integer kount = (oldnum > newnum ? cnt : -cnt);
@@ -682,8 +682,8 @@ void Interface_InterfaceModel::ChangeOrder(
} }
} }
// GetFromTransfer permet de recuperer un resultat prepare par ailleurs // GetFromTransfer allows to recover a result prepared elsewhere
// Le Modele demarre a zero. Les entites doivent etre libres (cf AddEntity) // The Model starts at zero. Entities must be free (cf AddEntity)
//================================================================================================= //=================================================================================================
@@ -883,7 +883,7 @@ Standard_Integer Interface_InterfaceModel::NextNumberForLabel(const Standard_CSt
} }
} }
// En "non exact", on admet de recevoir le numero entre 1 et n // In "non exact", we admit to receive the number between 1 and n
if (exact) if (exact)
return 0; return 0;
i = 0; i = 0;

View File

@@ -112,10 +112,10 @@ void Interface_LineBuffer::Prepare()
myLine.SetValue(i, ' '); myLine.SetValue(i, ' ');
} }
} }
// GERER KEEP : est-il jouable ? sinon, annuler. sioui, noter la jointure // MANAGE KEEP: is it playable? otherwise, cancel. if yes, note the junction
if (myKeep > 0) if (myKeep > 0)
{ {
myKeep += (myInit + 1); // myInit, et +1 car Keep INCLUS myKeep += (myInit + 1); // myInit, and +1 because Keep INCLUDED
} }
if (myKeep > 0) if (myKeep > 0)
{ {
@@ -133,7 +133,7 @@ void Interface_LineBuffer::Prepare()
void Interface_LineBuffer::Keep() void Interface_LineBuffer::Keep()
{ {
// Si Keep, sauver de myKeep + 1 a myLen (+1 pour 0 final) // If Keep, save from myKeep + 1 to myLen (+1 for final 0)
if (myKeep > 0) if (myKeep > 0)
{ {
myLine.SetValue(1, myKept); myLine.SetValue(1, myKept);

View File

@@ -273,7 +273,7 @@ void Interface_MSG::PrintTrace(Standard_OStream& S)
} }
} }
// ########### ARRONDIS DE FLOTTANTS ############ // ########### FLOATING POINT ROUNDING ############
Standard_Real Interface_MSG::Intervalled(const Standard_Real val, Standard_Real Interface_MSG::Intervalled(const Standard_Real val,
const Standard_Integer order, const Standard_Integer order,
@@ -352,7 +352,7 @@ Standard_Real Interface_MSG::Intervalled(const Standard_Real val,
rst = (upper ? 10. : 7.); rst = (upper ? 10. : 7.);
} }
else else
{ // n a de sens que jusqu a 10 ... { // only makes sense up to 10 ...
if (rst <= 1.2) if (rst <= 1.2)
rst = (upper ? 1.2 : 1.); rst = (upper ? 1.2 : 1.);
else if (rst <= 1.5) else if (rst <= 1.5)
@@ -388,9 +388,9 @@ void Interface_MSG::TDate(const Standard_CString text,
const Standard_Integer ss, const Standard_Integer ss,
const Standard_CString format) const Standard_CString format)
{ {
// valeurs nulles : en tete (avec au moins une non nulle, la derniere) // null values : at the beginning (with at least one non-null, the last one)
// -> completees avec les valeurs actuelle (system date) // -> completed with current values (system date)
// tout nul on laisse // all null we leave
// svv #2 Standard_Integer y1 , m1 , d1 , h1 , n1 , s1; // svv #2 Standard_Integer y1 , m1 , d1 , h1 , n1 , s1;
Standard_Integer y2 = yy, m2 = mm, d2 = dd, h2 = hh, n2 = mn, s2 = ss; Standard_Integer y2 = yy, m2 = mm, d2 = dd, h2 = hh, n2 = mn, s2 = ss;

View File

@@ -26,21 +26,21 @@ Interface_ParamSet::Interface_ParamSet(const Standard_Integer nres, const Standa
themxpar = nres; themxpar = nres;
thenbpar = 0; thenbpar = 0;
thelnval = 0; thelnval = 0;
thelnres = 100; // *20; // 10 caracteres par Param (\0 inclus) : raisonnable thelnres = 100; // *20; // 10 characters per Param (\0 included): reasonable
theval = new char[thelnres]; // szv#4:S4163:12Mar99 `thelnres+1` chars was wrong theval = new char[thelnres]; // szv#4:S4163:12Mar99 `thelnres+1` chars was wrong
} }
// Append(CString) : Gestion des caracteres selon <lnval> // Append(CString): Character management according to <lnval>
// Si lnval < 0, ParamSet passif, memoire geree de l exterieur, ParamSet // If lnval < 0, ParamSet passive, memory managed externally, ParamSet
// se contente de s y referer // just refers to it
// Sinon, recopie dans une page locale // Otherwise, copy to a local page
Standard_Integer Interface_ParamSet::Append(const Standard_CString val, Standard_Integer Interface_ParamSet::Append(const Standard_CString val,
const Standard_Integer lnval, const Standard_Integer lnval,
const Interface_ParamType typ, const Interface_ParamType typ,
const Standard_Integer nument) const Standard_Integer nument)
{ {
// Ici, gestion locale de String // Here, local String management
thenbpar++; thenbpar++;
if (thenbpar > themxpar) if (thenbpar > themxpar)
{ {
@@ -49,7 +49,7 @@ Standard_Integer Interface_ParamSet::Append(const Standard_CString val,
} }
else if (lnval < 0) else if (lnval < 0)
{ {
// .. Gestion externe des caracteres .. // .. External character management ..
Interface_FileParameter& FP = thelist->ChangeValue(thenbpar); Interface_FileParameter& FP = thelist->ChangeValue(thenbpar);
FP.Init(val, typ); FP.Init(val, typ);
if (nument != 0) if (nument != 0)
@@ -57,19 +57,19 @@ Standard_Integer Interface_ParamSet::Append(const Standard_CString val,
} }
else else
{ {
// .. Gestion locale des caracteres .. // .. Local character management ..
Standard_Integer i; Standard_Integer i;
if (thelnval + lnval + 1 > thelnres) if (thelnval + lnval + 1 > thelnres)
{ {
// Reservation de caracteres insuffisante : d abord augmenter // Insufficient character reservation: first increase
Standard_Integer newres = (Standard_Integer)(thelnres * 2 + lnval); Standard_Integer newres = (Standard_Integer)(thelnres * 2 + lnval);
char* newval = new char[newres]; char* newval = new char[newres];
for (i = 0; i < thelnval; i++) for (i = 0; i < thelnval; i++)
newval[i] = theval[i]; // szv#4:S4163:12Mar99 `<= thelnres` was wrong newval[i] = theval[i]; // szv#4:S4163:12Mar99 `<= thelnres` was wrong
// et cepatou : il faut realigner les Params deja enregistres sur // and that's not all: must realign Params already recorded on
// l ancienne reservation de caracteres ... // the old character reservation ...
// Standard_Integer delta = (Standard_Integer) (newval - theval); // Standard_Integer delta = (Standard_Integer) (newval - theval);
// difference a appliquer // difference to apply
char* poldVal = &theval[0]; char* poldVal = &theval[0];
char* pnewVal = &newval[0]; char* pnewVal = &newval[0];
for (i = 1; i < thenbpar; i++) for (i = 1; i < thenbpar; i++)
@@ -81,16 +81,16 @@ Standard_Integer Interface_ParamSet::Append(const Standard_CString val,
// if (oval < theval || oval >= (theval+thelnres)) // if (oval < theval || oval >= (theval+thelnres))
// continue; //hors reserve //szv#4:S4163:12Mar99 `oval >` was wrong // continue; //hors reserve //szv#4:S4163:12Mar99 `oval >` was wrong
Standard_Integer onum = OFP.EntityNumber(); Standard_Integer onum = OFP.EntityNumber();
OFP.Init(pnewVal + delta, otyp); // et voila; on remet dans la boite OFP.Init(pnewVal + delta, otyp); // and there we go; we put back in the box
if (onum != 0) if (onum != 0)
OFP.SetEntityNumber(onum); OFP.SetEntityNumber(onum);
} }
// Enteriner la nouvelle reservation // Confirm the new reservation
delete[] theval; delete[] theval;
theval = newval; theval = newval;
thelnres = newres; thelnres = newres;
} }
// Enregistrer ce parametre // Register this parameter
for (i = 0; i < lnval; i++) for (i = 0; i < lnval; i++)
theval[thelnval + i] = val[i]; theval[thelnval + i] = val[i];
theval[thelnval + lnval] = '\0'; theval[thelnval + lnval] = '\0';
@@ -106,7 +106,7 @@ Standard_Integer Interface_ParamSet::Append(const Standard_CString val,
Standard_Integer Interface_ParamSet::Append(const Interface_FileParameter& FP) Standard_Integer Interface_ParamSet::Append(const Interface_FileParameter& FP)
{ {
// Ici, FP tout pret : pas de gestion memoire sur String (dommage) // Here, FP ready: no memory management on String (too bad)
thenbpar++; thenbpar++;
if (thenbpar > themxpar) if (thenbpar > themxpar)
@@ -158,7 +158,7 @@ Handle(Interface_ParamList) Interface_ParamSet::Params(const Standard_Integer nu
n0 = 0; n0 = 0;
nbp = thenbpar; nbp = thenbpar;
if (thenbpar <= themxpar) if (thenbpar <= themxpar)
return thelist; // et zou return thelist; // and there you go
} }
Handle(Interface_ParamList) list = new Interface_ParamList; Handle(Interface_ParamList) list = new Interface_ParamList;
if (nb == 0) if (nb == 0)
@@ -173,7 +173,7 @@ void Interface_ParamSet::Destroy()
{ {
// if (!thenext.IsNull()) thenext->Destroy(); // if (!thenext.IsNull()) thenext->Destroy();
thenext.Nullify(); thenext.Nullify();
// Destruction "manuelle" (gestion memoire directe) // "Manual" destruction (direct memory management)
if (theval) if (theval)
delete[] theval; delete[] theval;
theval = NULL; theval = NULL;

View File

@@ -20,7 +20,7 @@
IMPLEMENT_STANDARD_RTTIEXT(Interface_Protocol, Standard_Transient) IMPLEMENT_STANDARD_RTTIEXT(Interface_Protocol, Standard_Transient)
// Gestion du Protocol actif : tres simple, une variable statique // Management of active Protocol: very simple, a static variable
static Handle(Interface_Protocol)& theactive() static Handle(Interface_Protocol)& theactive()
{ {
static Handle(Interface_Protocol) theact; static Handle(Interface_Protocol) theact;
@@ -48,7 +48,7 @@ void Interface_Protocol::ClearActive()
theactive().Nullify(); theactive().Nullify();
} }
// === Typage (formules fournies par defaut) // === Typing (formulas provided by default)
//================================================================================================= //=================================================================================================

View File

@@ -14,21 +14,21 @@
//#include <Interface_Recognizer.ixx> //#include <Interface_Recognizer.ixx>
#include <Standard_NoSuchObject.hxx> #include <Standard_NoSuchObject.hxx>
// ATTENTION : TransRecognizer a exactement le meme code ... // WARNING: TransRecognizer has exactly the same code ...
// Mais produit un Transient au lieu d un Persistent // But produces a Transient instead of a Persistent
// Principe : a un objet de depart (cle), un Recognizer tente d'associer un // Principle: from a starting object (key), a Recognizer attempts to associate a
// resultat. La classe Recognizer offre le mecanisme general gerant cela // result. The Recognizer class provides the general mechanism managing this
// Chaque classe particuliere (une fois definie l'instanciation) doit fournir // Each particular class (once the instantiation is defined) must provide
// une methode specifique Eval, qui opere la correspondance // a specific Eval method, which performs the correspondence
// Eval considere l'objet par tous moyens appropries, et en cas de succes, // Eval considers the object by all appropriate means, and in case of success,
// appelle SetOK(result) puis sort (return) // calls SetOK(result) then exits (return)
// en cas d'echec, suite au retour d'Eval, Recognizer sait que SetOK n'a pas // in case of failure, following the return from Eval, Recognizer knows that SetOK was not
// ete appele // called
Interface_Recognizer::Interface_Recognizer () Interface_Recognizer::Interface_Recognizer ()
{ hasnext = Standard_False; } { hasnext = Standard_False; }
//thekey.Nullify(); inutile, fait par le constructeur ... //thekey.Nullify(); useless, done by the constructor ...
Standard_Boolean Interface_Recognizer::Evaluate Standard_Boolean Interface_Recognizer::Evaluate
(const TheKey& akey, Handle(TheResul)& res) (const TheKey& akey, Handle(TheResul)& res)

View File

@@ -51,7 +51,7 @@ void Interface_STAT::AddPhase(const Standard_Real weight, const Standard_CString
{ {
if (thephw.IsNull()) if (thephw.IsNull())
{ {
// 1re fois : vider les steps deja notees // 1st time : empty the already noted steps
thetotal = 0.; thetotal = 0.;
thephnam = new TColStd_HSequenceOfAsciiString(); thephnam = new TColStd_HSequenceOfAsciiString();
thephw = new TColStd_HSequenceOfReal(); thephw = new TColStd_HSequenceOfReal();
@@ -71,7 +71,7 @@ void Interface_STAT::AddStep(const Standard_Real weight)
{ {
if (thephdeb.IsNull()) if (thephdeb.IsNull())
{ {
// 1re fois : pour default phase, au moins creer receptacle des steps // 1st time : for default phase, at least create receptacle for steps
thephdeb = new TColStd_HSequenceOfInteger(); thephdeb = new TColStd_HSequenceOfInteger();
thephfin = new TColStd_HSequenceOfInteger(); thephfin = new TColStd_HSequenceOfInteger();
thestw = new TColStd_HSequenceOfReal(); thestw = new TColStd_HSequenceOfReal();
@@ -79,11 +79,11 @@ void Interface_STAT::AddStep(const Standard_Real weight)
thephfin->Append(1); thephfin->Append(1);
thestw->Append(0.); thestw->Append(0.);
} }
// A present, ajouter cette etape // Now, add this step
Standard_Integer n0 = thephdeb->Value(thephdeb->Length()); Standard_Integer n0 = thephdeb->Value(thephdeb->Length());
// Ceci donne dans thestw le numero du cumul des etapes // This gives in thestw the number of the cumulative steps
thestw->ChangeValue(n0) += weight; thestw->ChangeValue(n0) += weight;
thestw->Append(weight); // on ajoute cette etape thestw->Append(weight); // we add this step
thephfin->ChangeValue(thephfin->Length())++; thephfin->ChangeValue(thephfin->Length())++;
} }
@@ -104,7 +104,7 @@ void Interface_STAT::Phase(const Standard_Integer num,
{ {
if (thephdeb.IsNull()) if (thephdeb.IsNull())
{ {
// Pas de phase, pas d etape ... donc une seule ... // No phase, no step ... so only one ...
n0step = -1; n0step = -1;
nbstep = 1; nbstep = 1;
weight = 1.; weight = 1.;
@@ -112,7 +112,7 @@ void Interface_STAT::Phase(const Standard_Integer num,
} }
if (thephw.IsNull()) if (thephw.IsNull())
{ {
// Pas de phase mais des etapes // No phase but steps
weight = 1.; weight = 1.;
name = voidname; name = voidname;
} }
@@ -127,7 +127,7 @@ void Interface_STAT::Phase(const Standard_Integer num,
nbstep = thephfin->Value(num); nbstep = thephfin->Value(num);
} }
// Voyons pour cette phase // Let's see for this phase
} }
Standard_Real Interface_STAT::Step(const Standard_Integer num) const Standard_Real Interface_STAT::Step(const Standard_Integer num) const
@@ -141,35 +141,35 @@ Standard_Real Interface_STAT::Step(const Standard_Integer num) const
// ############### COMPTAGE ################ // ############### COMPTAGE ################
// Le comptage se fait sur la base suivante : // The counting is done on the following basis :
// TOTAL : total des poids des phases par rapport auquel calculer // TOTAL : total of phase weights against which to calculate
// PHASES : poids des phases passees et poids de la phase en cours // PHASES : weight of past phases and weight of current phase
// Ces poids sont a ramener au TOTAL // These weights are to be brought back to TOTAL
// PHASE COURANTE : nb d items et nb de cycles declares // CURRENT PHASE : nb of items and nb of declared cycles
// Nb d items deja passes (cycle complet) // Nb of items already passed (complete cycle)
// CYCLE COURANT : nb d items de ce cycle, total des poids des etapes // CURRENT CYCLE : nb of items of this cycle, total of step weights
// Poids des etapes deja passees, de l etape en cours, n0 etape en cours // Weight of steps already passed, of the current step, n0 current step
// ETAPE COURANTE : nb d items deja passes // CURRENT STEP : nb of items already passed
static struct zestat static struct zestat
{ {
Standard_CString itle, name; Standard_CString itle, name;
Standard_Real otal, // total des poids des phases Standard_Real otal, // total of phase weights
oldph, // poids des phases deja passes oldph, // weight of phases already passed
phw, // poids de la phase en cours phw, // weight of the current phase
otph, // poids des etapes de la phase en cours (cycle en cours) otph, // weight of steps in the current phase (current cycle)
oldst, // poids des etapes deja passees (cycle en cours) oldst, // weight of steps already passed (current cycle)
stw; // poids etape en cours stw; // weight of current step
Standard_Integer nbph, // total nb de phases Standard_Integer nbph, // total nb of phases
numph, // n0 phase en cours numph, // n0 current phase
n0, n1, // n0 et nb etapes dans phase en cours n0, n1, // n0 and nb steps in current phase
nbitp, // nb items total phase nbitp, // nb items total phase
nbcyc, // nb cycles total phase nbcyc, // nb cycles total phase
olditp, // nb items deja passes (cycles passes) / phase olditp, // nb items already passed (cycles passed) / phase
numcyc, // n0 cycle en cours / phase numcyc, // n0 current cycle / phase
nbitc, // nb items cycle en cours nbitc, // nb items current cycle
numst, // n0 etape en cours / cycle numst, // n0 current step / cycle
numitem; // nb items deja passes / etape courante numitem; // nb items already passed / current step
} TheStat; } TheStat;
void Interface_STAT::Start(const Standard_Integer items, const Standard_Integer cycles) const void Interface_STAT::Start(const Standard_Integer items, const Standard_Integer cycles) const
@@ -189,7 +189,7 @@ void Interface_STAT::StartCount(const Standard_Integer items, const Standard_CSt
void Interface_STAT::NextPhase(const Standard_Integer items, const Standard_Integer cycles) void Interface_STAT::NextPhase(const Standard_Integer items, const Standard_Integer cycles)
{ {
// On cumule la phase precedente au total, on efface les donnees "locales" // We accumulate the previous phase to the total, we clear the "local" data
TheStat.numcyc = TheStat.numst = TheStat.olditp = 0; TheStat.numcyc = TheStat.numst = TheStat.olditp = 0;
TheStat.oldst = TheStat.stw = 0.; TheStat.oldst = TheStat.stw = 0.;
if (TheStat.numph >= TheStat.nbph) if (TheStat.numph >= TheStat.nbph)
@@ -199,12 +199,12 @@ void Interface_STAT::NextPhase(const Standard_Integer items, const Standard_Inte
} }
TheStat.numph++; TheStat.numph++;
TheStat.oldph += TheStat.phw; // cumule sur cette phase TheStat.oldph += TheStat.phw; // accumulate on this phase
TheStat.nbitp = items; TheStat.nbitp = items;
TheStat.nbcyc = cycles; TheStat.nbcyc = cycles;
statact.Phase(TheStat.numph, TheStat.n0, TheStat.n1, TheStat.phw, TheStat.name); statact.Phase(TheStat.numph, TheStat.n0, TheStat.n1, TheStat.phw, TheStat.name);
TheStat.otph = (TheStat.n1 > 1 ? statact.Step(TheStat.n0) : 1.); TheStat.otph = (TheStat.n1 > 1 ? statact.Step(TheStat.n0) : 1.);
// si un seul cycle, on le demarre; sinon, attendre NextCycle // if a single cycle, we start it; otherwise, wait NextCycle
TheStat.nbitc = 0; TheStat.nbitc = 0;
if (cycles == 1) if (cycles == 1)
NextCycle(items); NextCycle(items);
@@ -218,7 +218,7 @@ void Interface_STAT::SetPhase(const Standard_Integer items, const Standard_Integ
void Interface_STAT::NextCycle(const Standard_Integer items) void Interface_STAT::NextCycle(const Standard_Integer items)
{ {
// cumul de ce cycle sur les cycles deja passes, raz etapes // accumulation of this cycle on cycles already passed, reset steps
TheStat.numcyc++; TheStat.numcyc++;
TheStat.olditp += TheStat.nbitc; TheStat.olditp += TheStat.nbitc;
// if (stat.olditem > stat.nbitp) return; // if (stat.olditem > stat.nbitp) return;
@@ -262,18 +262,18 @@ Standard_Integer Interface_STAT::Percent(const Standard_Boolean phase)
{ {
if (TheStat.numitem > TheStat.nbitc) if (TheStat.numitem > TheStat.nbitc)
TheStat.numitem = TheStat.nbitc; TheStat.numitem = TheStat.nbitc;
// on compte les items deja passes // we count the items already passed
Standard_Real enphase = TheStat.olditp * TheStat.otph + // cycles complets passes Standard_Real enphase = TheStat.olditp * TheStat.otph + // complete cycles passed
TheStat.nbitc * TheStat.oldst + // cycle courant, etapes completes passees TheStat.nbitc * TheStat.oldst + // current cycle, complete steps passed
TheStat.numitem * TheStat.stw; // etape courante TheStat.numitem * TheStat.stw; // current step
// proportion pour cette phase // proportion for this phase
Standard_Real prophase = enphase / (TheStat.nbitp * TheStat.otph); Standard_Real prophase = enphase / (TheStat.nbitp * TheStat.otph);
Standard_Integer res = Standard_Integer(prophase * 100.); Standard_Integer res = Standard_Integer(prophase * 100.);
if (phase) if (phase)
return res; return res;
// voila pour cette phase // that's it for this phase
// comptage dans les phases // counting in the phases
Standard_Real encours = (TheStat.oldph + TheStat.phw * prophase) / TheStat.otal; Standard_Real encours = (TheStat.oldph + TheStat.phw * prophase) / TheStat.otal;
res = Standard_Integer(encours * 100.); res = Standard_Integer(encours * 100.);
return res; return res;

View File

@@ -67,7 +67,7 @@ Interface_ShareFlags::Interface_ShareFlags(const Interface_Graph& agraph)
theroots = new TColStd_HSequenceOfTransient(); theroots = new TColStd_HSequenceOfTransient();
for (Standard_Integer i = 1; i <= nb; i++) for (Standard_Integer i = 1; i <= nb; i++)
{ {
// Resultat obtenu depuis le Graph // Result obtained from the Graph
Handle(Standard_Transient) ent = themodel->Value(i); Handle(Standard_Transient) ent = themodel->Value(i);
Handle(TColStd_HSequenceOfTransient) list = agraph.GetSharings(ent); Handle(TColStd_HSequenceOfTransient) list = agraph.GetSharings(ent);
@@ -90,13 +90,13 @@ void Interface_ShareFlags::Evaluate(const Interface_GeneralLib& lib,
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
{ {
// ATTENTION : Si Entite non chargee donc illisible, basculer sur son // WARNING: If Entity not loaded hence unreadable, switch to its
// "Contenu" equivalent // equivalent "Content"
Handle(Standard_Transient) ent = themodel->Value(i); Handle(Standard_Transient) ent = themodel->Value(i);
if (themodel->IsRedefinedContent(i)) if (themodel->IsRedefinedContent(i))
ent = themodel->ReportEntity(i)->Content(); ent = themodel->ReportEntity(i)->Content();
// Resultat obtenu via GeneralLib // Result obtained via GeneralLib
Interface_EntityIterator iter; Interface_EntityIterator iter;
Handle(Interface_GeneralModule) module; Handle(Interface_GeneralModule) module;
Standard_Integer CN; Standard_Integer CN;
@@ -111,7 +111,7 @@ void Interface_ShareFlags::Evaluate(const Interface_GeneralLib& lib,
module->FillShared(themodel, CN, ent, iter); module->FillShared(themodel, CN, ent, iter);
} }
// Entites partagees par <ent> : reste a noter chacune comme "Shared" // Entities shared by <ent>: need to mark each one as "Shared"
for (iter.Start(); iter.More(); iter.Next()) for (iter.Start(); iter.More(); iter.Next())
{ {
Standard_Integer num = themodel->Number(iter.Value()); Standard_Integer num = themodel->Number(iter.Value());

View File

@@ -56,7 +56,7 @@ Interface_ShareTool::Interface_ShareTool(const Handle(Interface_HGraph)& ahgraph
theHGraph = ahgraph; theHGraph = ahgraph;
} }
// Ajout des "Implied" sur toutes les Entites du Graphe // Addition of "Implied" on all Entities of the Graph
/*void Interface_ShareTool::AddImplied (const Handle(Interface_GTool)& gtool) /*void Interface_ShareTool::AddImplied (const Handle(Interface_GTool)& gtool)
{ {
Interface_Graph& thegraph = theHGraph->CGraph(); Interface_Graph& thegraph = theHGraph->CGraph();
@@ -171,7 +171,7 @@ Interface_EntityIterator Interface_ShareTool::All(const Handle(Standard_Transien
fl->Init(0); fl->Init(0);
if (ent == model) if (ent == model)
{ {
// On passe les racines en revue (l ordre de base est conserve) // We review the roots (the base order is preserved)
Interface_EntityIterator roots = RootEntities(); Interface_EntityIterator roots = RootEntities();
for (roots.Start(); roots.More(); roots.Next()) for (roots.Start(); roots.More(); roots.Next())
{ {
@@ -185,7 +185,7 @@ Interface_EntityIterator Interface_ShareTool::All(const Handle(Standard_Transien
fl->SetValue(nm, n0); fl->SetValue(nm, n0);
} }
} }
// Attention, y a t il des oublis ? // Warning, are there any omissions?
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)
if (fl->Value(i) == 0) if (fl->Value(i) == 0)
{ {
@@ -197,20 +197,20 @@ Interface_EntityIterator Interface_ShareTool::All(const Handle(Standard_Transien
{ {
Handle(TColStd_HSequenceOfTransient) sq = new TColStd_HSequenceOfTransient(); Handle(TColStd_HSequenceOfTransient) sq = new TColStd_HSequenceOfTransient();
sq->Append(ent); sq->Append(ent);
// processus de type file // file type process
for (i = 1; i <= sq->Length(); i++) for (i = 1; i <= sq->Length(); i++)
{ // Length croit { // Length croit
Handle(Standard_Transient) en = sq->Value(i); Handle(Standard_Transient) en = sq->Value(i);
Standard_Integer num = model->Number(en); Standard_Integer num = model->Number(en);
if (fl->Value(num) != 0) if (fl->Value(num) != 0)
continue; // deja vu continue; // already seen
n0++; n0++;
fl->SetValue(num, n0); fl->SetValue(num, n0);
Interface_EntityIterator sh = Shareds(en); Interface_EntityIterator sh = Shareds(en);
sq->Append(sh.Content()); sq->Append(sh.Content());
} }
} }
// Reste a constituer la liste, retourner si necessaire // Remains to constitute the list, return if necessary
Handle(TColStd_HArray1OfInteger) ord = new TColStd_HArray1OfInteger(0, nb); Handle(TColStd_HArray1OfInteger) ord = new TColStd_HArray1OfInteger(0, nb);
ord->Init(0); ord->Init(0);
for (i = 1; i <= nb; i++) for (i = 1; i <= nb; i++)

View File

@@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Interface_Static, Interface_TypedValue)
static char defmess[31]; static char defmess[31];
// Fonctions Satisfies offertes en standard ... // Satisfies functions offered as standard ...
// svv #2 // svv #2
// static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val) // static Standard_Boolean StaticPath(const Handle(TCollection_HAsciiString)& val)
@@ -133,7 +133,7 @@ Standard_Boolean Interface_Static::UpdatedStatus() const
} }
// ####################################################################### // #######################################################################
// ######### DICTIONNAIRE DES STATICS (static sur Static) ########## // ######### STATICS DICTIONARY (static on Static) ##########
Standard_Boolean Interface_Static::Init(const Standard_CString family, Standard_Boolean Interface_Static::Init(const Standard_CString family,
const Standard_CString name, const Standard_CString name,
@@ -193,14 +193,14 @@ Standard_Boolean Interface_Static::Init(const Standard_CString family,
Handle(Interface_Static) unstat = Interface_Static::Static(name); Handle(Interface_Static) unstat = Interface_Static::Static(name);
if (unstat.IsNull()) if (unstat.IsNull())
return Standard_False; return Standard_False;
// Editions : init donne un petit texte d edition, en 2 termes "cmd var" : // Editions : init gives a small edition text, in 2 terms "cmd var" :
// imin <ival> imax <ival> rmin <rval> rmax <rval> unit <def> // imin <ival> imax <ival> rmin <rval> rmax <rval> unit <def>
// enum <from> ematch <from> eval <cval> // enum <from> ematch <from> eval <cval>
Standard_Integer i, iblc = 0; Standard_Integer i, iblc = 0;
for (i = 0; init[i] != '\0'; i++) for (i = 0; init[i] != '\0'; i++)
if (init[i] == ' ') if (init[i] == ' ')
iblc = i + 1; iblc = i + 1;
// Reconnaissance du sous-cas et aiguillage // Recognition of the sub-case and routing
if (init[0] == 'i' && init[2] == 'i') if (init[0] == 'i' && init[2] == 'i')
unstat->SetIntegerLimit(Standard_False, atoi(&init[iblc])); unstat->SetIntegerLimit(Standard_False, atoi(&init[iblc]));
else if (init[0] == 'i' && init[2] == 'a') else if (init[0] == 'i' && init[2] == 'a')
@@ -335,7 +335,7 @@ Standard_Integer Interface_Static::IDef(const Standard_CString name, const Stand
return 0; return 0;
} }
// ########## VALEUR COURANTE ########### // ########## CURRENT VALUE ###########
Standard_Boolean Interface_Static::IsSet(const Standard_CString name, const Standard_Boolean proper) Standard_Boolean Interface_Static::IsSet(const Standard_CString name, const Standard_Boolean proper)
{ {
@@ -459,7 +459,7 @@ Handle(TColStd_HSequenceOfHAsciiString) Interface_Static::Items(const Standard_I
ok = Standard_True; ok = Standard_True;
} }
else else
{ // tous ... sauf famille a $ { // all ... except family with $
if (item->Family()[0] == '$') if (item->Family()[0] == '$')
continue; continue;
} }

View File

@@ -47,11 +47,11 @@ void Interface_Static::Standards()
Interface_Static::Init("XSTEP", "read.maxprecision.val", 'r', "1."); Interface_Static::Init("XSTEP", "read.maxprecision.val", 'r', "1.");
// encode regularity // encode regularity
// negatif ou nul : ne rien faire. positif : on y va // negative or null : do nothing. positive : let's go
Interface_Static::Init("XSTEP", "read.encoderegularity.angle", 'r', "0.01"); Interface_Static::Init("XSTEP", "read.encoderegularity.angle", 'r', "0.01");
// compute surface curves // compute surface curves
// 0 : par defaut. 2 : ne garder que le 2D. 3 : ne garder que le 3D // 0 : by default. 2 : keep only 2D. 3 : keep only 3D
// gka S4054 // gka S4054
Interface_Static::Init("XSTEP", "read.surfacecurve.mode", 'e', ""); Interface_Static::Init("XSTEP", "read.surfacecurve.mode", 'e', "");
Interface_Static::Init("XSTEP", "read.surfacecurve.mode", '&', "ematch -3"); Interface_Static::Init("XSTEP", "read.surfacecurve.mode", '&', "ematch -3");
@@ -84,8 +84,8 @@ void Interface_Static::Standards()
// Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"eval NoAnalytic"); // Interface_Static::Init("XSTEP" ,"write.surfacecurve.mode", '&',"eval NoAnalytic");
Interface_Static::SetIVal("write.surfacecurve.mode", 1); Interface_Static::SetIVal("write.surfacecurve.mode", 1);
// lastpreci : pour recuperer la derniere valeur codee (cf XSControl) // lastpreci : to recover the last encoded value (cf XSControl)
// (0 pour dire : pas codee) // (0 to say : not encoded)
//: S4136 Interface_Static::Init("std" ,"lastpreci", 'r',"0."); //: S4136 Interface_Static::Init("std" ,"lastpreci", 'r',"0.");
// load messages if needed // load messages if needed

View File

@@ -42,9 +42,9 @@ Interface_ParamType Interface_TypedValue::Type() const
MoniTool_ValueType Interface_TypedValue::ParamTypeToValueType(const Interface_ParamType type) MoniTool_ValueType Interface_TypedValue::ParamTypeToValueType(const Interface_ParamType type)
{ {
return (MoniTool_ValueType)type; return (MoniTool_ValueType)type;
} // meme valeurs } // same values
Interface_ParamType Interface_TypedValue::ValueTypeToParamType(const MoniTool_ValueType type) Interface_ParamType Interface_TypedValue::ValueTypeToParamType(const MoniTool_ValueType type)
{ {
return (Interface_ParamType)type; return (Interface_ParamType)type;
} // meme valeurs } // same values

View File

@@ -27,8 +27,8 @@ IMPLEMENT_STANDARD_RTTIEXT(Interface_UndefinedContent, Standard_Transient)
#define Content_LocalShift 5 #define Content_LocalShift 5
#define Content_NumberShift 8 #define Content_NumberShift 8
// Cette classe donne les services de base pour definir des entites // This class provides basic services for defining entities
// Unknown (ceci, a defaut d'un double heritage) : description litterale // Unknown (this, for lack of double inheritance) : literal description
Interface_UndefinedContent::Interface_UndefinedContent() // Unknown Interface_UndefinedContent::Interface_UndefinedContent() // Unknown
{ {
@@ -36,18 +36,18 @@ Interface_UndefinedContent::Interface_UndefinedContent() // Unknown
thenbstr = 0; thenbstr = 0;
} }
// .... Les Parametres .... // .... The Parameters ....
// Les parametres sont organises comme suit (pas de FileParameter) : // The parameters are organized as follows (no FileParameter) :
// - une liste de descripteurs (tenant sur un entier chacun) en tableau, avec // - a list of descriptors (each fitting in an integer) in array, with
// la localisation (Entity/literal), le type (ParamType), le rang dans la // the location (Entity/literal), the type (ParamType), the rank in the
// la liste ad hoc (Entity ou literal) // the ad hoc list (Entity or literal)
// (5 bits droits pour type; 3 bits pour localisation; restant pouradresse) // (5 right bits for type; 3 bits for location; remaining for address)
// - pour les litteraux, une liste de String (tableau) // - for literals, a list of String (array)
// - pour les Entity, une liste d Entites (EntityList) // - for Entity, a list of Entities (EntityList)
// L aspect "place memoire" fait preferer des Tableaux a des Sequences, bien // The "memory space" aspect makes Arrays preferable to Sequences, even though
// que ces dernieres soient plus simples a gerer // the latter are simpler to manage
// En effet, il faut reserver et etendre si necessaire ... // Indeed, we must reserve and extend if necessary ...
Standard_Integer Interface_UndefinedContent::NbParams() const Standard_Integer Interface_UndefinedContent::NbParams() const
{ {
@@ -104,18 +104,18 @@ Handle(TCollection_HAsciiString) Interface_UndefinedContent::ParamValue(
return thevalues->Value(desc >> Content_NumberShift); return thevalues->Value(desc >> Content_NumberShift);
} }
// .... Remplissage des parametres .... // .... Parameter filling ....
void Interface_UndefinedContent::Reservate(const Standard_Integer nb, const Standard_Integer nblit) void Interface_UndefinedContent::Reservate(const Standard_Integer nb, const Standard_Integer nblit)
{ {
// Reservation : Si agrandissement, recopier ancien dans nouveau ... // Reservation: If enlargement, copy old to new ...
if (nb > thenbparams) if (nb > thenbparams)
{ // Reservation en total { // Total reservation
if (theparams.IsNull()) if (theparams.IsNull())
theparams = new TColStd_HArray1OfInteger(1, nb); theparams = new TColStd_HArray1OfInteger(1, nb);
else if (nb > theparams->Length()) else if (nb > theparams->Length())
{ {
Standard_Integer nbnew = 2 * thenbparams; // on reserve un peu large Standard_Integer nbnew = 2 * thenbparams; // reserve a bit more
if (nbnew < nb) if (nbnew < nb)
nbnew = nb; nbnew = nb;
Handle(TColStd_HArray1OfInteger) newparams = new TColStd_HArray1OfInteger(1, nbnew); Handle(TColStd_HArray1OfInteger) newparams = new TColStd_HArray1OfInteger(1, nbnew);
@@ -126,12 +126,12 @@ void Interface_UndefinedContent::Reservate(const Standard_Integer nb, const Stan
} }
if (nblit > thenbstr) if (nblit > thenbstr)
{ // Reservation en Litteraux { // Literal reservation
if (thevalues.IsNull()) if (thevalues.IsNull())
thevalues = new Interface_HArray1OfHAsciiString(1, nblit); thevalues = new Interface_HArray1OfHAsciiString(1, nblit);
else if (nblit > thevalues->Length()) else if (nblit > thevalues->Length())
{ {
Standard_Integer nbnew = 2 * thenbstr; // on reserve un peu large Standard_Integer nbnew = 2 * thenbstr; // reserve a bit more
if (nbnew < nblit) if (nbnew < nblit)
nbnew = nblit; nbnew = nblit;
Handle(Interface_HArray1OfHAsciiString) newvalues = Handle(Interface_HArray1OfHAsciiString) newvalues =
@@ -141,7 +141,7 @@ void Interface_UndefinedContent::Reservate(const Standard_Integer nb, const Stan
thevalues = newvalues; thevalues = newvalues;
} }
} }
// Entites : Parametres - Litteraux. En fait, EntityList est dynamique // Entities: Parameters - Literals. In fact, EntityList is dynamic
} }
void Interface_UndefinedContent::AddLiteral(const Interface_ParamType ptype, void Interface_UndefinedContent::AddLiteral(const Interface_ParamType ptype,
@@ -162,13 +162,13 @@ void Interface_UndefinedContent::AddEntity(const Interface_ParamType pty
Reservate(thenbparams + 1, 0); Reservate(thenbparams + 1, 0);
Standard_Integer desc = Standard_Integer(ptype); Standard_Integer desc = Standard_Integer(ptype);
theentities.Append(ent); theentities.Append(ent);
desc += Content_LocalRef << Content_LocalShift; // "C est une Entite" desc += Content_LocalRef << Content_LocalShift; // "It is an Entity"
thenbparams++; // Rang : thenbparams - thenbstr thenbparams++; // Rank: thenbparams - thenbstr
desc += ((thenbparams - thenbstr) << Content_NumberShift); desc += ((thenbparams - thenbstr) << Content_NumberShift);
theparams->SetValue(thenbparams, desc); theparams->SetValue(thenbparams, desc);
} }
// .... Edition des parametres .... // .... Parameter editing ....
void Interface_UndefinedContent::RemoveParam(const Standard_Integer num) void Interface_UndefinedContent::RemoveParam(const Standard_Integer num)
{ {
@@ -176,25 +176,25 @@ void Interface_UndefinedContent::RemoveParam(const Standard_Integer num)
Standard_Integer rang = desc >> Content_NumberShift; Standard_Integer rang = desc >> Content_NumberShift;
Standard_Integer local = ((desc >> Content_LocalShift) & Content_LocalField); Standard_Integer local = ((desc >> Content_LocalShift) & Content_LocalField);
Standard_Boolean c1ent = (local == Content_LocalRef); Standard_Boolean c1ent = (local == Content_LocalRef);
// Supprimer une Entite // Remove an Entity
if (c1ent) if (c1ent)
theentities.Remove(rang); theentities.Remove(rang);
// Supprimer un Literal // Remove a Literal
else else
{ // thevalues->Remove(rang) mais c est un tableau { // thevalues->Remove(rang) but it is an array
for (Standard_Integer i = rang + 1; i <= thenbstr; i++) for (Standard_Integer i = rang + 1; i <= thenbstr; i++)
thevalues->SetValue(i - 1, thevalues->Value(i)); thevalues->SetValue(i - 1, thevalues->Value(i));
Handle(TCollection_HAsciiString) nulstr; Handle(TCollection_HAsciiString) nulstr;
thevalues->SetValue(thenbstr, nulstr); thevalues->SetValue(thenbstr, nulstr);
thenbstr--; thenbstr--;
} }
// Supprimer ce parametre de la liste (qui est un tableau) // Remove this parameter from the list (which is an array)
Standard_Integer np; // svv Jan11 2000 : porting on DEC Standard_Integer np; // svv Jan11 2000 : porting on DEC
for (np = num + 1; np <= thenbparams; np++) for (np = num + 1; np <= thenbparams; np++)
theparams->SetValue(np - 1, theparams->Value(np)); theparams->SetValue(np - 1, theparams->Value(np));
theparams->SetValue(thenbparams, 0); theparams->SetValue(thenbparams, 0);
thenbparams--; thenbparams--;
// Renumeroter, Entite ou Literal, selon // Renumber, Entity or Literal, depending
for (np = 1; np <= thenbparams; np++) for (np = 1; np <= thenbparams; np++)
{ {
desc = theparams->Value(np); desc = theparams->Value(np);
@@ -208,15 +208,15 @@ void Interface_UndefinedContent::SetLiteral(const Standard_Integer
const Interface_ParamType ptype, const Interface_ParamType ptype,
const Handle(TCollection_HAsciiString)& val) const Handle(TCollection_HAsciiString)& val)
{ {
// On change un parametre. Si deja literal, simple substitution // Change a parameter. If already literal, simple substitution
// Si Entite, supprimer l entite et renumeroter les Parametres "Entite" // If Entity, remove the entity and renumber the "Entity" Parameters
Standard_Integer desc = theparams->Value(num); Standard_Integer desc = theparams->Value(num);
Standard_Integer rang = desc >> Content_NumberShift; Standard_Integer rang = desc >> Content_NumberShift;
Standard_Integer local = ((desc >> Content_LocalShift) & Content_LocalField); Standard_Integer local = ((desc >> Content_LocalShift) & Content_LocalField);
Standard_Boolean c1ent = (local == Content_LocalRef); Standard_Boolean c1ent = (local == Content_LocalRef);
if (c1ent) if (c1ent)
{ {
// Entite : la supprimer et renumeroter les Parametres de type "Entity" // Entity: remove it and renumber the "Entity" type Parameters
theentities.Remove(rang); theentities.Remove(rang);
for (Standard_Integer i = 1; i <= thenbparams; i++) for (Standard_Integer i = 1; i <= thenbparams; i++)
{ {
@@ -225,12 +225,12 @@ void Interface_UndefinedContent::SetLiteral(const Standard_Integer
&& (desc >> Content_NumberShift) > rang) && (desc >> Content_NumberShift) > rang)
theparams->SetValue(i, desc - (1 << Content_NumberShift)); theparams->SetValue(i, desc - (1 << Content_NumberShift));
} }
// Et Preparer arrivee d un Literal supplementaire // And prepare arrival of an additional Literal
Reservate(thenbparams, thenbstr + 1); Reservate(thenbparams, thenbstr + 1);
thenbstr++; thenbstr++;
rang = thenbstr; rang = thenbstr;
} }
// Mettre en place la nouvelle valeur et reconstruire le descripteur du Param // Put the new value in place and rebuild the Param descriptor
thevalues->SetValue(rang, val); thevalues->SetValue(rang, val);
desc = Standard_Integer(ptype) + (rang << Content_NumberShift); desc = Standard_Integer(ptype) + (rang << Content_NumberShift);
theparams->SetValue(num, desc); theparams->SetValue(num, desc);
@@ -240,16 +240,16 @@ void Interface_UndefinedContent::SetEntity(const Standard_Integer num
const Interface_ParamType ptype, const Interface_ParamType ptype,
const Handle(Standard_Transient)& ent) const Handle(Standard_Transient)& ent)
{ {
// On change un Parametre. Si deja Entity, simple substitution // Change a Parameter. If already Entity, simple substitution
// Si Literal, supprimer sa valeur et renumeroter les parametres Litteraux // If Literal, remove its value and renumber the Literal parameters
Standard_Integer desc = theparams->Value(num); Standard_Integer desc = theparams->Value(num);
Standard_Integer rang = desc >> Content_NumberShift; Standard_Integer rang = desc >> Content_NumberShift;
Standard_Integer local = ((desc >> Content_LocalShift) & Content_LocalField); Standard_Integer local = ((desc >> Content_LocalShift) & Content_LocalField);
Standard_Boolean c1ent = (local == Content_LocalRef); Standard_Boolean c1ent = (local == Content_LocalRef);
if (!c1ent) if (!c1ent)
{ {
// Literal : le supprimer et renumeroter les Parametres de type "Entity" // Literal: remove it and renumber the "Entity" type Parameters
// (Remove Literal mais dans un tableau) // (Remove Literal but in an array)
Standard_Integer i; // svv Jan11 2000 : porting on DEC Standard_Integer i; // svv Jan11 2000 : porting on DEC
for (i = rang + 1; i <= thenbstr; i++) for (i = rang + 1; i <= thenbstr; i++)
thevalues->SetValue(i - 1, thevalues->Value(i)); thevalues->SetValue(i - 1, thevalues->Value(i));
@@ -263,10 +263,10 @@ void Interface_UndefinedContent::SetEntity(const Standard_Integer num
&& (desc >> Content_NumberShift) > rang) && (desc >> Content_NumberShift) > rang)
theparams->SetValue(i, desc - (1 << Content_NumberShift)); theparams->SetValue(i, desc - (1 << Content_NumberShift));
} }
// Et Preparer arrivee d une Entite supplementaire // And prepare arrival of an additional Entity
thenbstr--; thenbstr--;
rang = thenbparams - thenbstr; rang = thenbparams - thenbstr;
// Mettre en place la nouvelle valeur et reconstruire le descripteur du Param // Put the new value in place and rebuild the Param descriptor
theentities.Append(ent); theentities.Append(ent);
} }
else else
@@ -280,8 +280,8 @@ void Interface_UndefinedContent::SetEntity(const Standard_Integer num
void Interface_UndefinedContent::SetEntity(const Standard_Integer num, void Interface_UndefinedContent::SetEntity(const Standard_Integer num,
const Handle(Standard_Transient)& ent) const Handle(Standard_Transient)& ent)
{ {
// On change l Entite definie par un Parametre, toutes autres choses egales, // Change the Entity defined by a Parameter, all other things being equal,
// A CONDITION que ce soit deja un Parametre de type "Entity" // PROVIDED that it is already an "Entity" type Parameter
Standard_Integer desc = theparams->Value(num); Standard_Integer desc = theparams->Value(num);
Standard_Integer rang = desc >> Content_NumberShift; Standard_Integer rang = desc >> Content_NumberShift;
Standard_Integer local = ((desc >> Content_LocalShift) & Content_LocalField); Standard_Integer local = ((desc >> Content_LocalShift) & Content_LocalField);
@@ -296,7 +296,7 @@ Interface_EntityList Interface_UndefinedContent::EntityList() const
return theentities; return theentities;
} }
// toutes les recopies de UndefinedEntity se ressemblent ... Partie commune // all copies of UndefinedEntity are similar ... Common part
void Interface_UndefinedContent::GetFromAnother(const Handle(Interface_UndefinedContent)& other, void Interface_UndefinedContent::GetFromAnother(const Handle(Interface_UndefinedContent)& other,
Interface_CopyTool& TC) Interface_CopyTool& TC)
{ {

View File

@@ -14,15 +14,15 @@
//#include <LibCtl_GlobalNode.ixx> //#include <LibCtl_GlobalNode.ixx>
// Classe generique imbriquee dans Library : utilisee pour construire les // Generic class nested in Library: used to build the
// listes globales de Modules attaches a une classe instanciee de Library // global lists of Modules attached to an instantiated class of Library
// (cf Library pour plus de details) // (see Library for more details)
LibCtl_GlobalNode::LibCtl_GlobalNode () { } LibCtl_GlobalNode::LibCtl_GlobalNode () { }
// ATTENTION, Add agit en substitution : pour un Protocol donne, c est le // WARNING, Add acts as substitution: for a given Protocol, it is the
// dernier appel qui l emporte // last call wins
void LibCtl_GlobalNode::Add void LibCtl_GlobalNode::Add
(const Handle(TheModule)& amodule, const Handle(TheProtocol)& aprotocol) (const Handle(TheModule)& amodule, const Handle(TheProtocol)& aprotocol)
{ {

View File

@@ -16,19 +16,19 @@
#include <Standard_NoSuchObject.hxx> #include <Standard_NoSuchObject.hxx>
// Liste Globale des Modules, dans laquelle on va se servir // Global List of Modules, from which we will be served
static Handle(LibCtl_GlobalNode) theglobal; static Handle(LibCtl_GlobalNode) theglobal;
// Donnees pour optimisation (dernier Protocole demande) // Data for optimization (last Protocol requested)
static Handle(TheProtocol) theprotocol; static Handle(TheProtocol) theprotocol;
static Handle(LibCtl_Node) thelast; static Handle(LibCtl_Node) thelast;
// Alimentation de la liste globale // Feeding the global list
// ATTENTION : SetGlobal fait de la substitution, c-a-d que c est le dernier // WARNING: SetGlobal performs substitution, i.e. it's the last one
// qui a raison pour un Protocol donne // that is right for a given Protocol
void LibCtl_Library::SetGlobal void LibCtl_Library::SetGlobal
(const Handle(TheModule)& amodule, const Handle(TheProtocol)& aprotocol) (const Handle(TheModule)& amodule, const Handle(TheProtocol)& aprotocol)
{ {
@@ -36,19 +36,19 @@ static Handle(LibCtl_Node) thelast;
theglobal->Add(amodule,aprotocol); theglobal->Add(amodule,aprotocol);
} }
// Constructeur d apres Protocole // Constructor from Protocol
LibCtl_Library::LibCtl_Library (const Handle(TheProtocol)& aprotocol) LibCtl_Library::LibCtl_Library (const Handle(TheProtocol)& aprotocol)
{ {
Standard_Boolean last = Standard_False; Standard_Boolean last = Standard_False;
if (aprotocol.IsNull()) return; // PAS de protocole = Lib VIDE if (aprotocol.IsNull()) return; // NO protocol = EMPTY Lib
if (!theprotocol.IsNull()) last = if (!theprotocol.IsNull()) last =
(theprotocol == aprotocol); (theprotocol == aprotocol);
if (last) thelist = thelast; if (last) thelist = thelast;
// Si Pas d optimisation disponible : construire la liste // If no optimization available: build the list
else { else {
AddProtocol(aprotocol); AddProtocol(aprotocol);
// Ceci definit l optimisation (pour la fois suivante) // This defines the optimization (for the next time)
thelast = thelist; thelast = thelist;
theprotocol = aprotocol; theprotocol = aprotocol;
} }
@@ -58,16 +58,16 @@ static Handle(LibCtl_Node) thelast;
LibCtl_Library::LibCtl_Library () { } LibCtl_Library::LibCtl_Library () { }
// Ajout d un Protocol : attention, desoptimise (sinon risque de confusion !) // Adding a Protocol: beware, deoptimizes (otherwise risk of confusion!)
void LibCtl_Library::AddProtocol void LibCtl_Library::AddProtocol
(const Handle(Standard_Transient)& aprotocol) (const Handle(Standard_Transient)& aprotocol)
{ {
// DownCast car Protocol->Resources, meme redefini et utilise dans d autres // DownCast because Protocol->Resources, even redefined and used in other
// librairies, doit toujours renvoyer le type le plus haut // libraries, must always return the highest type
Handle(TheProtocol) aproto = Handle(TheProtocol)::DownCast(aprotocol); Handle(TheProtocol) aproto = Handle(TheProtocol)::DownCast(aprotocol);
if (aproto.IsNull()) return; if (aproto.IsNull()) return;
// D abord, ajouter celui-ci a la liste : chercher le Node // First, add this one to the list: search for the Node
Handle(LibCtl_GlobalNode) curr; Handle(LibCtl_GlobalNode) curr;
for (curr = theglobal; !curr.IsNull(); ) { // curr->Next : plus loin for (curr = theglobal; !curr.IsNull(); ) { // curr->Next : plus loin
const Handle(TheProtocol)& protocol = curr->Protocol(); const Handle(TheProtocol)& protocol = curr->Protocol();
@@ -79,14 +79,14 @@ static Handle(LibCtl_Node) thelast;
break; // UN SEUL MODULE PAR PROTOCOLE break; // UN SEUL MODULE PAR PROTOCOLE
} }
} }
curr = curr->Next(); // cette formule est refusee dans "for" curr = curr->Next(); // this formula is refused in "for"
} }
// Ensuite, Traiter les ressources // Then, process the resources
Standard_Integer nb = aproto->NbResources(); Standard_Integer nb = aproto->NbResources();
for (Standard_Integer i = 1; i <= nb; i ++) { for (Standard_Integer i = 1; i <= nb; i ++) {
AddProtocol (aproto->Resource(i)); AddProtocol (aproto->Resource(i));
} }
// Ne pas oublier de desoptimiser // Don't forget to deoptimize
theprotocol.Nullify(); theprotocol.Nullify();
thelast.Nullify(); thelast.Nullify();
} }
@@ -97,25 +97,25 @@ static Handle(LibCtl_Node) thelast;
void LibCtl_Library::SetComplete () void LibCtl_Library::SetComplete ()
{ {
thelist = new LibCtl_Node; thelist = new LibCtl_Node;
// On prend chacun des Protocoles de la Liste Globale et on l ajoute // We take each of the Protocols from the Global List and add it
Handle(LibCtl_GlobalNode) curr; Handle(LibCtl_GlobalNode) curr;
for (curr = theglobal; !curr.IsNull(); ) { // curr->Next : plus loin for (curr = theglobal; !curr.IsNull(); ) { // curr->Next : plus loin
const Handle(TheProtocol)& protocol = curr->Protocol(); const Handle(TheProtocol)& protocol = curr->Protocol();
// Comme on prend tout tout tout, on ne se preoccupe pas des Ressources ! // Since we take everything, we don't worry about Resources!
if (!protocol.IsNull()) thelist->AddNode(curr); if (!protocol.IsNull()) thelist->AddNode(curr);
curr = curr->Next(); // cette formule est refusee dans "for" curr = curr->Next(); // this formula is refused in "for"
} }
} }
// Selection : Tres fort, on retourne le Module correspondant a un Type // Selection: Very powerful, we return the Module corresponding to a Type
// (ainsi que le CaseNumber retourne par le protocole correspondant) // (as well as the CaseNumber returned by the corresponding protocol)
Standard_Boolean LibCtl_Library::Select Standard_Boolean LibCtl_Library::Select
(const TheObject& obj, (const TheObject& obj,
Handle(TheModule)& module, Standard_Integer& CN) const Handle(TheModule)& module, Standard_Integer& CN) const
{ {
module.Nullify(); CN = 0; // Reponse "pas trouve" module.Nullify(); CN = 0; // Response "not found"
if (thelist.IsNull()) return Standard_False; if (thelist.IsNull()) return Standard_False;
Handle(LibCtl_Node) curr = thelist; Handle(LibCtl_Node) curr = thelist;
for (curr = thelist; !curr.IsNull(); ) { // curr->Next : plus loin for (curr = thelist; !curr.IsNull(); ) { // curr->Next : plus loin
@@ -127,9 +127,9 @@ static Handle(LibCtl_Node) thelast;
return Standard_True; return Standard_True;
} }
} }
curr = curr->Next(); // cette formule est refusee dans "for" curr = curr->Next(); // this formula is refused in "for"
} }
return Standard_False; // ici, pas trouce return Standard_False; // here, not found
} }

View File

@@ -15,9 +15,9 @@
//#include <LibCtl_Node.ixx> //#include <LibCtl_Node.ixx>
// Classe generique imbriquee dans Library : utilisee pour construire la // Generic class nested in Library: used to build the
// listes de Modules d une librairie (cf Library pour plus de details) // lists of Modules of a library (see Library for more details)
// (En fait : Liste de Global Nodes -> Module + Protocol) // (In fact: List of Global Nodes -> Module + Protocol)
LibCtl_Node::LibCtl_Node () { } LibCtl_Node::LibCtl_Node () { }

View File

@@ -35,7 +35,7 @@ static NCollection_DataMap<TCollection_AsciiString, Handle(Standard_Transient)>
static Standard_Boolean stachr = Standard_False; static Standard_Boolean stachr = Standard_False;
// static OSD_Timer chrono; // static OSD_Timer chrono;
// because merdouille link dynamique & perf, ne creer le static qu au 1er usage // because mess of dynamic link & perf, only create the static on 1st usage
static OSD_Timer& chrono() static OSD_Timer& chrono()
{ {
static OSD_Timer chr; static OSD_Timer chr;
@@ -124,7 +124,7 @@ void MoniTool_CaseData::AddData(const Handle(Standard_Transient)& val,
TCollection_AsciiString aname(name); TCollection_AsciiString aname(name);
Standard_Integer subs = thesubst; Standard_Integer subs = thesubst;
// SetChange (calculer la position d apres Name) // SetChange (calculate position from Name)
if (thesubst < 0) if (thesubst < 0)
{ {
if (name[0] != '\0') if (name[0] != '\0')
@@ -393,7 +393,7 @@ Standard_Integer MoniTool_CaseData::NameNum(const Standard_CString name) const
return 0; return 0;
} }
// #### RETOUR DES VALEURS #### // #### RETURN OF VALUES ####
TopoDS_Shape MoniTool_CaseData::Shape(const Standard_Integer nd) const TopoDS_Shape MoniTool_CaseData::Shape(const Standard_Integer nd) const
{ {
@@ -463,7 +463,7 @@ Standard_Boolean MoniTool_CaseData::Integer(const Standard_Integer nd, Standard_
return Standard_True; return Standard_True;
} }
// #### MESSAGES ET DEFINITIONS #### // #### MESSAGES AND DEFINITIONS ####
Message_Msg MoniTool_CaseData::Msg() const Message_Msg MoniTool_CaseData::Msg() const
{ {

View File

@@ -145,7 +145,7 @@ MoniTool_TypedValue::MoniTool_TypedValue(const Handle(MoniTool_TypedValue)& othe
theeadds.Bind(itad.Key(), itad.Value()); theeadds.Bind(itad.Key(), itad.Value());
} }
// on duplique la string // we duplicate the string
if (!thehval.IsNull()) if (!thehval.IsNull())
thehval = new TCollection_HAsciiString(other->CStringValue()); thehval = new TCollection_HAsciiString(other->CStringValue());
} }
@@ -323,14 +323,14 @@ void MoniTool_TypedValue::PrintValue(Standard_OStream& S) const
Standard_Boolean MoniTool_TypedValue::AddDef(const Standard_CString init) Standard_Boolean MoniTool_TypedValue::AddDef(const Standard_CString init)
{ {
// Editions : init donne un petit texte d edition, en 2 termes "cmd var" : // Editions : init gives a small edition text, in 2 terms "cmd var" :
Standard_Integer i, iblc = 0; Standard_Integer i, iblc = 0;
for (i = 0; init[i] != '\0'; i++) for (i = 0; init[i] != '\0'; i++)
if (init[i] == ' ') if (init[i] == ' ')
iblc = i + 1; iblc = i + 1;
if (iblc == 0) if (iblc == 0)
return Standard_False; return Standard_False;
// Reconnaissance du sous-cas et aiguillage // Recognition of sub-case and routing
if (init[0] == 'i' && init[2] == 'i') // imin ival if (init[0] == 'i' && init[2] == 'i') // imin ival
SetIntegerLimit(Standard_False, atoi(&init[iblc])); SetIntegerLimit(Standard_False, atoi(&init[iblc]));
else if (init[0] == 'i' && init[2] == 'a') // imax ival else if (init[0] == 'i' && init[2] == 'a') // imax ival
@@ -458,7 +458,7 @@ Standard_CString MoniTool_TypedValue::UnitDef() const
return theunidef.ToCString(); return theunidef.ToCString();
} }
// ****** les enums ****** // ****** the enums ******
void MoniTool_TypedValue::StartEnum(const Standard_Integer start, const Standard_Boolean match) void MoniTool_TypedValue::StartEnum(const Standard_Integer start, const Standard_Boolean match)
{ {
@@ -583,7 +583,7 @@ void MoniTool_TypedValue::AddEnumValue(const Standard_CString val, const Standar
{ {
theenums->SetValue(num, TCollection_AsciiString(val)); theenums->SetValue(num, TCollection_AsciiString(val));
} }
// On met AUSSI dans le dictionnaire // We ALSO put in the dictionary
// else { // else {
theeadds.Bind(val, num); theeadds.Bind(val, num);
// } // }
@@ -678,7 +678,7 @@ Standard_CString MoniTool_TypedValue::SatisfiesName() const
return thesatisn.ToCString(); return thesatisn.ToCString();
} }
// ########### VALEUR DU STATIC ############ // ########### STATIC VALUE ############
Standard_Boolean MoniTool_TypedValue::IsSetValue() const Standard_Boolean MoniTool_TypedValue::IsSetValue() const
{ {
@@ -714,7 +714,7 @@ Handle(TCollection_HAsciiString) MoniTool_TypedValue::Interpret(
return theinterp(this, hval, native); return theinterp(this, hval, native);
if (thetype == MoniTool_ValueEnum) if (thetype == MoniTool_ValueEnum)
{ {
// On admet les deux formes : Enum de preference, sinon Integer // We accept both forms : Enum preferably, otherwise Integer
Standard_Integer startcase, endcase; Standard_Integer startcase, endcase;
Standard_Boolean match; Standard_Boolean match;
EnumDef(startcase, endcase, match); EnumDef(startcase, endcase, match);
@@ -767,7 +767,7 @@ Standard_Boolean MoniTool_TypedValue::Satisfies(const Handle(TCollection_HAsciiS
return Standard_True; return Standard_True;
} }
case MoniTool_ValueEnum: { case MoniTool_ValueEnum: {
// On admet les deux formes : Enum de preference, sinon Integer // We accept both forms : Enum preferably, otherwise Integer
Standard_Integer startcase, endcase; // unused ival; Standard_Integer startcase, endcase; // unused ival;
Standard_Boolean match; Standard_Boolean match;
EnumDef(startcase, endcase, match); EnumDef(startcase, endcase, match);
@@ -775,7 +775,7 @@ Standard_Boolean MoniTool_TypedValue::Satisfies(const Handle(TCollection_HAsciiS
return Standard_True; return Standard_True;
if (EnumCase(val->ToCString()) >= startcase) if (EnumCase(val->ToCString()) >= startcase)
return Standard_True; return Standard_True;
// Ici, on admet un entier dans la fourchette // Here, we accept an integer in the range
//// if (val->IsIntegerValue()) ival = atoi (val->ToCString()); //// if (val->IsIntegerValue()) ival = atoi (val->ToCString());
// PTV 16.09.2000 The if is comment, cause this check is never been done (You can see the // PTV 16.09.2000 The if is comment, cause this check is never been done (You can see the

View File

@@ -69,7 +69,7 @@ void Transfer_FinderProcess::PrintStats(const Standard_Integer mode, Standard_OS
{ {
S << "\n*******************************************************************\n"; S << "\n*******************************************************************\n";
if (mode == 1) if (mode == 1)
{ // Statistiques de base { // Basic statistics
S << "******** Basic Statistics ********" << std::endl; S << "******** Basic Statistics ********" << std::endl;
Standard_Integer nbr = 0, nbe = 0, nbw = 0; Standard_Integer nbr = 0, nbe = 0, nbw = 0;

View File

@@ -19,10 +19,10 @@
IMPLEMENT_STANDARD_RTTIEXT(Transfer_MultipleBinder, Transfer_Binder) IMPLEMENT_STANDARD_RTTIEXT(Transfer_MultipleBinder, Transfer_Binder)
// Resultat Multiple // Multiple Result
// Possibilite de definir un Resultat Multiple : plusieurs objets resultant // Possibility to define a Multiple Result : several objects resulting
// d un Transfert, sans pouvoir les distinguer // from a Transfer, without being able to distinguish them
// N.B. : Pour l heure, tous Transients (pourra evoluer) // N.B. : For now, all Transients (may evolve)
Transfer_MultipleBinder::Transfer_MultipleBinder() {} Transfer_MultipleBinder::Transfer_MultipleBinder() {}
Standard_Boolean Transfer_MultipleBinder::IsMultiple() const Standard_Boolean Transfer_MultipleBinder::IsMultiple() const
@@ -42,7 +42,7 @@ Standard_CString Transfer_MultipleBinder::ResultTypeName() const
return "(list)"; return "(list)";
} }
// .... Gestion du Resultat Multiple .... // .... Multiple Result Management ....
void Transfer_MultipleBinder::AddResult(const Handle(Standard_Transient)& res) void Transfer_MultipleBinder::AddResult(const Handle(Standard_Transient)& res)
{ {

View File

@@ -482,7 +482,7 @@ void Transfer_ProcessForFinder::Mend(const Handle(Transfer_Finder)& start,
{ {
Handle(Transfer_Binder) binder = FindAndMask(start); Handle(Transfer_Binder) binder = FindAndMask(start);
if (binder.IsNull()) if (binder.IsNull())
return; // rien a faire ... return; // nothing to do ...
Handle(Interface_Check) ach = binder->CCheck(); Handle(Interface_Check) ach = binder->CCheck();
ach->Mend(pref); ach->Mend(pref);
} }
@@ -510,7 +510,7 @@ void Transfer_ProcessForFinder::BindTransient(const Handle(Transfer_Finder)&
Handle(Transfer_Binder) former = Find(start); Handle(Transfer_Binder) former = Find(start);
Handle(Transfer_SimpleBinderOfTransient) binder = Handle(Transfer_SimpleBinderOfTransient) binder =
Handle(Transfer_SimpleBinderOfTransient)::DownCast(former); Handle(Transfer_SimpleBinderOfTransient)::DownCast(former);
// Binding sur place ? // Binding in place?
if (!binder.IsNull()) if (!binder.IsNull())
{ {
if (binder->Status() == Transfer_StatusVoid) if (binder->Status() == Transfer_StatusVoid)

View File

@@ -871,7 +871,7 @@ Handle(Transfer_Binder) Transfer_ProcessForTransient::Transferring(
{ {
if (!former.IsNull()) if (!former.IsNull())
former->SetStatusExec(Transfer_StatusDone); //+ former->SetStatusExec(Transfer_StatusDone); //+
return Handle(Transfer_Binder)(); // Binder Null ... que faire d autre ? return Handle(Transfer_Binder)(); // Null Binder ... what else to do?
} }
if (therootl >= thelevel) if (therootl >= thelevel)

View File

@@ -64,8 +64,8 @@ Standard_Boolean Transfer_ResultFromModel::Fill(const Handle(Transfer_TransientP
themain->SetStart(ent); themain->SetStart(ent);
themain->SetBinder(binder); themain->SetBinder(binder);
themain->Fill(TP); themain->Fill(TP);
// Substitution de resultat pour la Shape (-> HShape) : pas ici, on est // Result substitution for the Shape (-> HShape): not here, we are
// dans le pk Transfer qui est general et ne sait pas ce qu est une Shape ... // in the Transfer package which is general and doesn't know what a Shape is ...
if (!TP->Model().IsNull()) if (!TP->Model().IsNull())
themodel = TP->Model(); themodel = TP->Model();
if (themodel.IsNull()) if (themodel.IsNull())

View File

@@ -18,7 +18,7 @@
IMPLEMENT_STANDARD_RTTIEXT(Transfer_SimpleBinderOfTransient, Transfer_Binder) IMPLEMENT_STANDARD_RTTIEXT(Transfer_SimpleBinderOfTransient, Transfer_Binder)
// "Handle(Standard_Transient)" : la classe de base pour le Resultat // "Handle(Standard_Transient)": the base class for the Result
Transfer_SimpleBinderOfTransient::Transfer_SimpleBinderOfTransient() {} Transfer_SimpleBinderOfTransient::Transfer_SimpleBinderOfTransient() {}
// Standard_Boolean Transfer_SimpleBinderOfTransient::IsMultiple() const // Standard_Boolean Transfer_SimpleBinderOfTransient::IsMultiple() const

View File

@@ -59,7 +59,7 @@ Standard_Boolean Transfer_TransferDispatch::Copy(const Handle(Standard_Transient
return Interface_CopyTool::Copy(entfrom, entto, mapped, errstat); return Interface_CopyTool::Copy(entfrom, entto, mapped, errstat);
if (!result->IsKind(STANDARD_TYPE(Transfer_SimpleBinderOfTransient))) if (!result->IsKind(STANDARD_TYPE(Transfer_SimpleBinderOfTransient)))
return Standard_False; // Produit qq chose, mais quoi ? return Standard_False; // Produces something, but what ?
entto = GetCasted(Transfer_SimpleBinderOfTransient, result)->Result(); entto = GetCasted(Transfer_SimpleBinderOfTransient, result)->Result();
return Standard_True; return Standard_True;
} }

View File

@@ -28,7 +28,7 @@
Transfer_TransferInput::Transfer_TransferInput() {} Transfer_TransferInput::Transfer_TransferInput() {}
// Resultats : Pour le Modele ... // Results : For the Model ...
Interface_EntityIterator Transfer_TransferInput::Entities(Transfer_TransferIterator& list) const Interface_EntityIterator Transfer_TransferInput::Entities(Transfer_TransferIterator& list) const
{ {
@@ -41,7 +41,7 @@ Interface_EntityIterator Transfer_TransferInput::Entities(Transfer_TransferItera
if (binder->IsKind(STANDARD_TYPE(Transfer_VoidBinder))) if (binder->IsKind(STANDARD_TYPE(Transfer_VoidBinder)))
continue; continue;
// Vrai resultat : doit etre transient (simple ou liste) // True result : must be transient (simple or list)
DeclareAndCast(Transfer_SimpleBinderOfTransient, transb, binder); DeclareAndCast(Transfer_SimpleBinderOfTransient, transb, binder);
DeclareAndCast(Transfer_MultipleBinder, multi, binder); DeclareAndCast(Transfer_MultipleBinder, multi, binder);
if (!transb.IsNull()) if (!transb.IsNull())

View File

@@ -17,7 +17,7 @@
#include <Transfer_SimpleBinderOfTransient.hxx> #include <Transfer_SimpleBinderOfTransient.hxx>
#include <Transfer_TransferIterator.hxx> #include <Transfer_TransferIterator.hxx>
static Handle(Standard_Transient) nultrans; // pour retour const&(Null) static Handle(Standard_Transient) nultrans; // for const&(Null) return
Transfer_TransferIterator::Transfer_TransferIterator() Transfer_TransferIterator::Transfer_TransferIterator()
{ {
@@ -150,7 +150,7 @@ const Handle(Transfer_Binder)& Transfer_TransferIterator::Value() const
return theitems->Value(thecurr); return theitems->Value(thecurr);
} }
// .... Acces aux Donnees du Binder Courant .... // .... Access to Current Binder Data ....
Standard_Boolean Transfer_TransferIterator::HasResult() const Standard_Boolean Transfer_TransferIterator::HasResult() const
{ {
@@ -172,7 +172,7 @@ Handle(Standard_Type) Transfer_TransferIterator::ResultType() const
Handle(Transfer_Binder) atr = Value(); Handle(Transfer_Binder) atr = Value();
if (!atr->IsMultiple()) if (!atr->IsMultiple())
btype = atr->ResultType(); btype = atr->ResultType();
// ResultType de Binder prend en compte le Type Dynamique pour les Handle // Binder's ResultType takes into account the Dynamic Type for Handles
return btype; return btype;
} }

View File

@@ -84,9 +84,9 @@ void Transfer_TransferOutput::Transfer(const Handle(Standard_Transient)& obj,
*/ */
} }
// Resultats : // Results :
// Pour transferer tout simplement toutes les racines d'un modele d'interface // To transfer quite simply all roots of an interface model
// Chacune est notee "Root" dans le Process final // Each one is noted "Root" in the final Process
void Transfer_TransferOutput::TransferRoots(const Message_ProgressRange& theProgress) void Transfer_TransferOutput::TransferRoots(const Message_ProgressRange& theProgress)
{ {

View File

@@ -187,7 +187,7 @@ void Transfer_TransientProcess::PrintStats(const Standard_Integer /*mode*/,
Standard_OStream& S) const Standard_OStream& S) const
{ {
S << "\n*******************************************************************\n"; S << "\n*******************************************************************\n";
// if (mode == 1) { // Statistiques de base // if (mode == 1) { // Basic statistics
S << "******** Basic Statistics ********" << std::endl; S << "******** Basic Statistics ********" << std::endl;
Handle(Interface_InterfaceModel) model = Model(); Handle(Interface_InterfaceModel) model = Model();

View File

@@ -159,7 +159,7 @@ TopAbs_Orientation TransferBRep::ShapeState(const Handle(Transfer_FinderProcess)
if (sm.IsNull()) if (sm.IsNull())
return TopAbs_EXTERNAL; return TopAbs_EXTERNAL;
const TopoDS_Shape& mapped = sm->Value(); const TopoDS_Shape& mapped = sm->Value();
// l egalite est assumee, on ne teste que l orientation // equality is assumed, we only test the orientation
if (mapped.Orientation() != shape.Orientation()) if (mapped.Orientation() != shape.Orientation())
return TopAbs_REVERSED; return TopAbs_REVERSED;
return TopAbs_FORWARD; return TopAbs_FORWARD;

View File

@@ -95,7 +95,7 @@ Handle(TColStd_HSequenceOfTransient) XSControl_ConnectedShapes::AdjacentEntities
if (vtx.Contains(avtx)) if (vtx.Contains(avtx))
{ {
li->Append(TP->Mapped(i)); li->Append(TP->Mapped(i));
break; // break de ce for interieur, entite suivante break; // break from this inner for, next entity
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More