summaryrefslogtreecommitdiff
path: root/src/IGESData/IGESData_ParamCursor.cxx
blob: abee892b1cff2e7857aa3932d4ae750495ea6be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#include <IGESData_ParamCursor.ixx>
#include <Interface_InterfaceError.hxx>



    IGESData_ParamCursor::IGESData_ParamCursor (const Standard_Integer num)
{
  thestart = num;  thelimit = thestart+1;
  thecount = 1;    theadv   = Standard_True;
  theisize = 1;    theoffst = 0;   thetsize = 1;
}

    IGESData_ParamCursor::IGESData_ParamCursor
  (const Standard_Integer num,
   const Standard_Integer nb, const Standard_Integer size)
{
  thestart = num;  thelimit = num + (nb*size);
  thecount = nb;   theadv   = Standard_True;
  theisize = size; theoffst = 0;   thetsize = size;
}

    void  IGESData_ParamCursor::SetTerm
  (const Standard_Integer size, const Standard_Boolean autoadv)
{
  theoffst += thetsize;
  thetsize  = size;
  if (autoadv) theadv = (theoffst + thetsize == theisize);
  if (theoffst + thetsize > theisize) Interface_InterfaceError::Raise
    ("IGESDAta ParamCursor : required Term size overpass whole Item size");
}

    void  IGESData_ParamCursor::SetOne (const Standard_Boolean autoadv)
      {  SetTerm (1, autoadv);  }

    void  IGESData_ParamCursor::SetXY  (const Standard_Boolean autoadv)
      {  SetTerm (2, autoadv);  }

    void  IGESData_ParamCursor::SetXYZ (const Standard_Boolean autoadv)
      {  SetTerm (3, autoadv);  }

    void  IGESData_ParamCursor::SetAdvance(const Standard_Boolean advance)
      {  theadv = advance;  }

//  LA SUITE : inline , cf lxx
//     (Start,Limit,Count,ItemSize,TermSize,Offset,Advance)