本文整理汇总了C++中TCollection_AsciiString::Token方法的典型用法代码示例。如果您正苦于以下问题:C++ TCollection_AsciiString::Token方法的具体用法?C++ TCollection_AsciiString::Token怎么用?C++ TCollection_AsciiString::Token使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TCollection_AsciiString
的用法示例。
在下文中一共展示了TCollection_AsciiString::Token方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetOperators
Standard_Boolean ShHealOper_ShapeProcess::GetOperators(TColStd_SequenceOfAsciiString& theSeqOperators)
{
TCollection_AsciiString nameSeq(myPrefix);
nameSeq +=".exec.op";
if(!myOperations.Context()->ResourceManager()->Find(nameSeq.ToCString()))
return Standard_False;
TCollection_AsciiString seqoper = myOperations.Context()->ResourceManager()->Value(nameSeq.ToCString());
Standard_Integer i;
for ( i=1; ; i++ ) {
TCollection_AsciiString anOper = seqoper.Token ( " \t,;", i );
if ( anOper.Length() <=0 ) break;
theSeqOperators.Append(anOper);
}
return (theSeqOperators.Length());
}
示例2: DummyHP
//=======================================================================
// profile
// command to build a profile
//=======================================================================
Sketcher_Profile::Sketcher_Profile(const char* aCmd)
{
enum {line, circle, point, none} move;
Standard_Integer i = 1;
Standard_Real x0, y0, x, y, dx, dy;
x0 = y0 = x = y = dy = 0;
dx = 1;
Standard_Boolean first, stayfirst, face, close;
first = Standard_True;
stayfirst = face = close = Standard_False;
Standard_Integer reversed = 0;
Standard_Integer control_Tolerance = 0;
TopoDS_Shape S;
TopoDS_Vertex MP;
BRepBuilderAPI_MakeWire MW;
gp_Ax3 DummyHP(gp::XOY());
gp_Pln P(DummyHP);
TopLoc_Location TheLocation;
Handle(Geom_Surface) Surface;
myOK = Standard_False;
myError = 0;
//TCollection_AsciiString aCommand(CORBA::string_dup(aCmd));
TCollection_AsciiString aCommand ((char*)aCmd);
TCollection_AsciiString aToken = aCommand.Token(":", 1);
int n = 0;
// porting to WNT
TColStd_Array1OfAsciiString aTab (0, aCommand.Length() - 1);
if ( aCommand.Length() )
{
while(aToken.Length() != 0) {
if(aCommand.Token(":", n + 1).Length() > 0)
aTab(n) = aCommand.Token(":", n + 1);
aToken = aCommand.Token(":", ++n);
}
n = n - 1;
}
if ( aTab.Length() && aTab(0).Length() )
while(i < n) {
Standard_Real length = 0, radius = 0, angle = 0;
move = point;
int n1 = 0;
TColStd_Array1OfAsciiString a (0, aTab(0).Length());
aToken = aTab(i).Token(" ", 1);
while (aToken.Length() != 0) {
if (aTab(i).Token(" ", n1 + 1).Length() > 0)
a(n1) = aTab(i).Token(" ", n1 + 1);
aToken = aTab(i).Token(" ", ++n1);
}
n1 = n1 - 1;
switch(a(0).Value(1))
{
case 'F':
{
if (n1 != 3) goto badargs;
if (!first) {
MESSAGE("profile : The F instruction must precede all moves");
return;
}
x0 = x = a(1).RealValue();
y0 = y = a(2).RealValue();
stayfirst = Standard_True;
break;
}
case 'O':
{
if (n1 != 4) goto badargs;
P.SetLocation(gp_Pnt(a(1).RealValue(), a(2).RealValue(), a(3).RealValue()));
stayfirst = Standard_True;
break;
}
case 'P':
{
if (n1 != 7) goto badargs;
gp_Vec vn(a(1).RealValue(), a(2).RealValue(), a(3).RealValue());
gp_Vec vx(a(4).RealValue(), a(5).RealValue(), a(6).RealValue());
if (vn.Magnitude() <= Precision::Confusion() || vx.Magnitude() <= Precision::Confusion()) {
MESSAGE("profile : null direction");
return;
}
gp_Ax2 ax(P.Location(), vn, vx);
P.SetPosition(ax);
stayfirst = Standard_True;
break;
}
case 'X':
{
if (n1 != 2) goto badargs;
length = a(1).RealValue();
//.........这里部分代码省略.........