0022627: Change OCCT memory management defaults
[occt.git] / src / IGESBasic / IGESBasic_SubfigureDef.cxx
CommitLineData
7fd59977 1//--------------------------------------------------------------------
2//
3// File Name : IGESBasic_SubfigureDef.cxx
4// Date :
5// Author : CKY / Contract Toubro-Larsen
6// Copyright : MATRA-DATAVISION 1993
7//
8//--------------------------------------------------------------------
9
10#include <IGESBasic_SubfigureDef.ixx>
11#include <Standard_DimensionMismatch.hxx>
12
13
14 IGESBasic_SubfigureDef::IGESBasic_SubfigureDef () { }
15
16
17 void IGESBasic_SubfigureDef::Init
18 (const Standard_Integer aDepth,
19 const Handle(TCollection_HAsciiString)& aName,
20 const Handle(IGESData_HArray1OfIGESEntity)& allAssocEntities)
21{
22 if (!allAssocEntities.IsNull() && allAssocEntities->Lower() != 1)
23 Standard_DimensionMismatch::Raise("IGESBasic_SubfigureDef : Init");
24 theDepth = aDepth;
25 theName = aName;
26 theAssocEntities = allAssocEntities;
27 InitTypeAndForm(308,0);
28}
29
30 Standard_Integer IGESBasic_SubfigureDef::Depth () const
31{
32 return theDepth;
33}
34
35 Handle(TCollection_HAsciiString) IGESBasic_SubfigureDef::Name () const
36{
37 return theName;
38}
39
40 Standard_Integer IGESBasic_SubfigureDef::NbEntities () const
41{
42 return (theAssocEntities.IsNull() ? 0 : theAssocEntities->Length());
43}
44
45 Handle(IGESData_IGESEntity) IGESBasic_SubfigureDef::AssociatedEntity
46 (const Standard_Integer Index) const
47{
48 return theAssocEntities->Value(Index);
49}
50
51 Handle(Standard_Transient) IGESBasic_SubfigureDef::Value
52 (const Standard_Integer Index) const
53{
54 return theAssocEntities->Value(Index);
55}