0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation
[occt.git] / src / IGESGraph / IGESGraph_Protocol.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
7fd59977 14
42cf5bc1 15#include <IGESBasic.hxx>
16#include <IGESBasic_Protocol.hxx>
7fd59977 17#include <IGESGraph_Color.hxx>
7fd59977 18#include <IGESGraph_DefinitionLevel.hxx>
7fd59977 19#include <IGESGraph_DrawingSize.hxx>
7fd59977 20#include <IGESGraph_DrawingUnits.hxx>
42cf5bc1 21#include <IGESGraph_HighLight.hxx>
22#include <IGESGraph_IntercharacterSpacing.hxx>
23#include <IGESGraph_LineFontDefPattern.hxx>
24#include <IGESGraph_LineFontDefTemplate.hxx>
25#include <IGESGraph_LineFontPredefined.hxx>
26#include <IGESGraph_NominalSize.hxx>
7fd59977 27#include <IGESGraph_Pick.hxx>
42cf5bc1 28#include <IGESGraph_Protocol.hxx>
7fd59977 29#include <IGESGraph_TextDisplayTemplate.hxx>
7fd59977 30#include <IGESGraph_TextFontDef.hxx>
7fd59977 31#include <IGESGraph_UniformRectGrid.hxx>
42cf5bc1 32#include <Interface_Protocol.hxx>
33#include <Standard_Type.hxx>
7fd59977 34
92efcf78 35IMPLEMENT_STANDARD_RTTIEXT(IGESGraph_Protocol,IGESData_Protocol)
36
c48e2889 37static int THE_IGESGraph_Protocol_deja = 0;
7fd59977 38static Handle(Standard_Type) atype01,atype02,atype03,atype04,atype05,atype06,
39 atype07,atype08,atype09,atype10,atype11,atype12,atype13,atype14;
40
c48e2889 41IGESGraph_Protocol::IGESGraph_Protocol()
7fd59977 42{
c48e2889 43 if (THE_IGESGraph_Protocol_deja)
44 {
45 return;
46 }
47 THE_IGESGraph_Protocol_deja = 1;
7fd59977 48 atype01 = STANDARD_TYPE(IGESGraph_Color);
49 atype02 = STANDARD_TYPE(IGESGraph_DefinitionLevel);
50 atype03 = STANDARD_TYPE(IGESGraph_DrawingSize);
51 atype04 = STANDARD_TYPE(IGESGraph_DrawingUnits);
52 atype05 = STANDARD_TYPE(IGESGraph_HighLight);
53 atype06 = STANDARD_TYPE(IGESGraph_IntercharacterSpacing);
54 atype07 = STANDARD_TYPE(IGESGraph_LineFontDefPattern);
55 atype08 = STANDARD_TYPE(IGESGraph_LineFontPredefined);
56 atype09 = STANDARD_TYPE(IGESGraph_LineFontDefTemplate);
57 atype10 = STANDARD_TYPE(IGESGraph_NominalSize);
58 atype11 = STANDARD_TYPE(IGESGraph_Pick);
59 atype12 = STANDARD_TYPE(IGESGraph_TextDisplayTemplate);
60 atype13 = STANDARD_TYPE(IGESGraph_TextFontDef);
61 atype14 = STANDARD_TYPE(IGESGraph_UniformRectGrid);
62}
63
64 Standard_Integer IGESGraph_Protocol::NbResources () const
65 { return 1; }
66
67 Handle(Interface_Protocol) IGESGraph_Protocol::Resource
35e08fe8 68 (const Standard_Integer /*num*/) const
7fd59977 69{
70 Handle(Interface_Protocol) res = IGESBasic::Protocol();;
71 return res;
72}
73
74 Standard_Integer IGESGraph_Protocol::TypeNumber
75 (const Handle(Standard_Type)& atype) const
76{
77 if (atype == atype01) return 1;
78 else if (atype == atype02) return 2;
79 else if (atype == atype03) return 3;
80 else if (atype == atype04) return 4;
81 else if (atype == atype05) return 5;
82 else if (atype == atype06) return 6;
83 else if (atype == atype07) return 7;
84 else if (atype == atype08) return 8;
85 else if (atype == atype09) return 9;
86 else if (atype == atype10) return 10;
87 else if (atype == atype11) return 11;
88 else if (atype == atype12) return 12;
89 else if (atype == atype13) return 13;
90 else if (atype == atype14) return 14;
91 return 0;
92}