0029915: Porting to VC 2017 : Regressions in Modeling Algorithms on VC 2017
[occt.git] / src / StepBasic / StepBasic_ProductDefinitionWithAssociatedDocuments.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 5// This library is free software; you can redistribute it and/or modify it under
6// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 7// by the Free Software Foundation, with special exception defined in the file
8// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9// distribution for complete text of the license and disclaimer of any warranty.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
b311480e 13
42cf5bc1 14
15#include <Standard_Type.hxx>
16#include <StepBasic_Document.hxx>
17#include <StepBasic_ProductDefinitionContext.hxx>
18#include <StepBasic_ProductDefinitionFormation.hxx>
19#include <StepBasic_ProductDefinitionWithAssociatedDocuments.hxx>
20#include <TCollection_HAsciiString.hxx>
7fd59977 21
92efcf78 22IMPLEMENT_STANDARD_RTTIEXT(StepBasic_ProductDefinitionWithAssociatedDocuments,StepBasic_ProductDefinition)
23
7fd59977 24StepBasic_ProductDefinitionWithAssociatedDocuments::StepBasic_ProductDefinitionWithAssociatedDocuments () { }
25
26void StepBasic_ProductDefinitionWithAssociatedDocuments::Init
27 (const Handle(TCollection_HAsciiString)& aId,
28 const Handle(TCollection_HAsciiString)& aDescription,
29 const Handle(StepBasic_ProductDefinitionFormation)& aFormation,
30 const Handle(StepBasic_ProductDefinitionContext)& aFrame,
31 const Handle(StepBasic_HArray1OfDocument)& aDocIds)
32{
33 StepBasic_ProductDefinition::Init (aId,aDescription,aFormation,aFrame);
34 theDocIds = aDocIds;
35}
36
37Handle(StepBasic_HArray1OfDocument) StepBasic_ProductDefinitionWithAssociatedDocuments::DocIds () const
38{ return theDocIds; }
39
40void StepBasic_ProductDefinitionWithAssociatedDocuments::SetDocIds (const Handle(StepBasic_HArray1OfDocument)& aDocIds)
41{ theDocIds = aDocIds; }
42
43Standard_Integer StepBasic_ProductDefinitionWithAssociatedDocuments::NbDocIds () const
44{ return (theDocIds.IsNull() ? 0 : theDocIds->Length()); }
45
46Handle(StepBasic_Document) StepBasic_ProductDefinitionWithAssociatedDocuments::DocIdsValue (const Standard_Integer num) const
47{ return theDocIds->Value(num); }
48
49void StepBasic_ProductDefinitionWithAssociatedDocuments::SetDocIdsValue (const Standard_Integer num, const Handle(StepBasic_Document)& adoc)
50{ theDocIds->SetValue (num,adoc); }