summaryrefslogtreecommitdiff
path: root/src/StepData/StepData_ReadWriteModule.cxx
blob: e71df97a534379619990a0a37e0ab253424921fa (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
46
47
48
49
50
51
52
53
54
55
#include <StepData_ReadWriteModule.ixx>
#include <StepData_StepReaderData.hxx>
#include <Interface_Macros.hxx>



    Standard_Integer  StepData_ReadWriteModule::CaseNum
  (const Handle(Interface_FileReaderData)& data,
   const Standard_Integer num) const
{
  DeclareAndCast(StepData_StepReaderData,stepdat,data);
  if (stepdat.IsNull()) return 0;
  if (stepdat->IsComplex(num)) {
    TColStd_SequenceOfAsciiString types;
    stepdat->ComplexType (num,types);
    if (types.IsEmpty()) return 0;
    if (types.Length() == 1) return CaseStep (types.Value(1));
    else return CaseStep (types);
  }
  return CaseStep (stepdat->RecordType(num));
}

    Standard_Integer  StepData_ReadWriteModule::CaseStep
  (const TColStd_SequenceOfAsciiString& types) const
      {  return 0;  }        // par defaut

    Standard_Boolean  StepData_ReadWriteModule::IsComplex
  (const Standard_Integer CN) const
      {  return Standard_False;  }  // par defaut

    TCollection_AsciiString  StepData_ReadWriteModule::ShortType
  (const Standard_Integer ) const
      {  return TCollection_AsciiString("");  }  // par defaut vide

    Standard_Boolean  StepData_ReadWriteModule::ComplexType
  (const Standard_Integer ,
   TColStd_SequenceOfAsciiString& ) const
      {  return Standard_False;  }


//=======================================================================
//function : Read
//purpose  : 
//=======================================================================

void StepData_ReadWriteModule::Read(const Standard_Integer CN,
                                    const Handle(Interface_FileReaderData)& data,
                                    const Standard_Integer num,
                                    Handle(Interface_Check)& ach,
                                    const Handle(Standard_Transient)& ent) const 
{
  DeclareAndCast(StepData_StepReaderData,stepdat,data);
  if (stepdat.IsNull()) return;
  ReadStep (CN,stepdat,num,ach,ent);
}