summaryrefslogtreecommitdiff
path: root/src/IGESBasic/IGESBasic_ExternalRefFileIndex.cxx
blob: 83fedd7ddbcd3ea422bd98995567b9715e54f646 (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
//--------------------------------------------------------------------
//
//  File Name : IGESBasic_ExternalRefFileIndex.cxx
//  Date      :
//  Author    : CKY / Contract Toubro-Larsen
//  Copyright : MATRA-DATAVISION 1993
//
//--------------------------------------------------------------------

#include <IGESBasic_ExternalRefFileIndex.ixx>


    IGESBasic_ExternalRefFileIndex::IGESBasic_ExternalRefFileIndex ()    {  }

    void  IGESBasic_ExternalRefFileIndex::Init
  (const Handle(Interface_HArray1OfHAsciiString)& aNameArray,
   const Handle(IGESData_HArray1OfIGESEntity)& allEntities)
{
  if (aNameArray->Lower()  != 1 || allEntities->Lower() != 1 ||
      aNameArray->Length() != allEntities->Length())
    Standard_DimensionMismatch::Raise("IGESBasic_ExternalRefFileIndex: Init");

  theNames = aNameArray;
  theEntities = allEntities;
  InitTypeAndForm(402,12);
}

    Standard_Integer  IGESBasic_ExternalRefFileIndex::NbEntries () const
{
  return theNames->Length();
}

    Handle(TCollection_HAsciiString)  IGESBasic_ExternalRefFileIndex::Name
  (const Standard_Integer Index) const
{
  return theNames->Value(Index);
}

    Handle(IGESData_IGESEntity)  IGESBasic_ExternalRefFileIndex::Entity
  (const Standard_Integer Index) const
{
  return theEntities->Value(Index);
}