0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BOPDS / BOPDS_ShapeInfo.cxx
CommitLineData
b311480e 1// Created by: Peter KURNEV
973c2be1 2// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 3//
973c2be1 4// This file is part of Open CASCADE Technology software library.
b311480e 5//
d5f74e42 6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
b311480e 11//
973c2be1 12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
7fd59977 14
15
42cf5bc1 16#include <Bnd_Box.hxx>
4e57c75e 17#include <BOPCol_ListOfInteger.hxx>
42cf5bc1 18#include <BOPDS_ShapeInfo.hxx>
19#include <TopoDS_Shape.hxx>
7fd59977 20
42cf5bc1 21#include <stdio.h>
4e57c75e 22static
23 void DumpType(const TopAbs_ShapeEnum aTS);
7fd59977 24
25//=======================================================================
4e57c75e 26//function : Dump
7fd59977 27//purpose :
28//=======================================================================
4e57c75e 29 void BOPDS_ShapeInfo::Dump()const
7fd59977 30{
4e57c75e 31 Standard_Integer n;
32 TopAbs_ShapeEnum aTS;
33 BOPCol_ListIteratorOfListOfInteger aIt;
7fd59977 34 //
4e57c75e 35 aTS=ShapeType();
36 DumpType(aTS);
37 //
38 printf(" {");
39 aIt.Initialize(mySubShapes);
40 for (; aIt.More(); aIt.Next()) {
41 n=aIt.Value();
42 printf(" %d", n);
43 }
44 printf(" }");
7fd59977 45}
7fd59977 46//=======================================================================
4e57c75e 47//function : DumpType
7fd59977 48//purpose :
49//=======================================================================
4e57c75e 50void DumpType(const TopAbs_ShapeEnum aTS)
7fd59977 51{
4e57c75e 52 const char *pT[]={
53 "COMPOUND",
54 "COMPSOLID",
55 "SOLID",
56 "SHELL",
57 "FACE",
58 "WIRE",
59 "EDGE",
60 "VERTEX",
61 "SHAPE"
62 };
63 printf(" %s", pT[(int)aTS]);
7fd59977 64}