0027232: Configuration - fix mblen missing building issue on Android
[occt.git] / src / IGESDraw / IGESDraw_Planar.cxx
CommitLineData
b311480e 1// Created by: CKY / Contract Toubro-Larsen
2// Copyright (c) 1993-1999 Matra Datavision
973c2be1 3// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
7fd59977 6//
d5f74e42 7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
7fd59977 12//
973c2be1 13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
b311480e 15
16//--------------------------------------------------------------------
7fd59977 17//--------------------------------------------------------------------
18
42cf5bc1 19#include <IGESData_IGESEntity.hxx>
20#include <IGESDraw_Planar.hxx>
21#include <IGESGeom_TransformationMatrix.hxx>
7fd59977 22#include <Standard_DimensionMismatch.hxx>
42cf5bc1 23#include <Standard_OutOfRange.hxx>
24#include <Standard_Type.hxx>
7fd59977 25
92efcf78 26IMPLEMENT_STANDARD_RTTIEXT(IGESDraw_Planar,IGESData_IGESEntity)
27
b311480e 28IGESDraw_Planar::IGESDraw_Planar () { }
7fd59977 29
30
31 void IGESDraw_Planar::Init
32 (const Standard_Integer nbMats,
33 const Handle(IGESGeom_TransformationMatrix)& aTransformationMatrix,
34 const Handle(IGESData_HArray1OfIGESEntity)& allEntities)
35{
36 if (!allEntities.IsNull())
37 if (allEntities->Lower() != 1)
38 Standard_DimensionMismatch::Raise("IGESDraw_Planar : Init");
39 theNbMatrices = nbMats;
40 theTransformationMatrix = aTransformationMatrix;
41 theEntities = allEntities;
42 InitTypeAndForm(402,16);
43}
44
45
46 Standard_Integer IGESDraw_Planar::NbMatrices () const
47{
48 return theNbMatrices;
49}
50
51 Standard_Integer IGESDraw_Planar::NbEntities () const
52{
53 return ( theEntities.IsNull()? 0 : theEntities->Length() );
54}
55
56 Standard_Boolean IGESDraw_Planar::IsIdentityMatrix () const
57{
58 return ( theTransformationMatrix.IsNull() );
59}
60
61 Handle(IGESGeom_TransformationMatrix) IGESDraw_Planar::TransformMatrix () const
62{
63 return theTransformationMatrix;
64}
65
66 Handle(IGESData_IGESEntity) IGESDraw_Planar::Entity
67 (const Standard_Integer EntityIndex) const
68{
69 return (theEntities->Value(EntityIndex));
70}