0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / TNaming / TNaming_Name.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-03-19
2// Created by: Yves FRICAUD
3// Copyright (c) 1997-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _TNaming_Name_HeaderFile
18#define _TNaming_Name_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <TNaming_NameType.hxx>
25#include <TopAbs_ShapeEnum.hxx>
26#include <TNaming_ListOfNamedShape.hxx>
27#include <Standard_Integer.hxx>
28#include <TopoDS_Shape.hxx>
29#include <TDF_Label.hxx>
30#include <TopAbs_Orientation.hxx>
31#include <Standard_Boolean.hxx>
32#include <TDF_LabelMap.hxx>
33class TNaming_NamedShape;
34class TopoDS_Shape;
35class TDF_Label;
36class TDF_RelocationTable;
37
38
39//! store the arguments of Naming.
40class TNaming_Name
41{
42public:
43
44 DEFINE_STANDARD_ALLOC
45
46
47 Standard_EXPORT TNaming_Name();
48
49 Standard_EXPORT void Type (const TNaming_NameType aType);
50
51 Standard_EXPORT void ShapeType (const TopAbs_ShapeEnum aType);
52
53 Standard_EXPORT void Shape (const TopoDS_Shape& theShape);
54
55 Standard_EXPORT void Append (const Handle(TNaming_NamedShape)& arg);
56
57 Standard_EXPORT void StopNamedShape (const Handle(TNaming_NamedShape)& arg);
58
59 Standard_EXPORT void Index (const Standard_Integer I);
60
61 Standard_EXPORT void ContextLabel (const TDF_Label& theLab);
62
63 Standard_EXPORT void Orientation (const TopAbs_Orientation theOrientation);
64
65 Standard_EXPORT TNaming_NameType Type() const;
66
67 Standard_EXPORT TopAbs_ShapeEnum ShapeType() const;
68
69 Standard_EXPORT TopoDS_Shape Shape() const;
70
71 Standard_EXPORT const TNaming_ListOfNamedShape& Arguments() const;
72
73 Standard_EXPORT Handle(TNaming_NamedShape) StopNamedShape() const;
74
75 Standard_EXPORT Standard_Integer Index() const;
76
77 Standard_EXPORT const TDF_Label& ContextLabel() const;
78
487bf1ce 79 TopAbs_Orientation Orientation() const
80 {
81 return myOrientation;
82 }
42cf5bc1 83
84 Standard_EXPORT Standard_Boolean Solve (const TDF_Label& aLab, const TDF_LabelMap& Valid) const;
85
86 Standard_EXPORT void Paste (TNaming_Name& into, const Handle(TDF_RelocationTable)& RT) const;
87
42cf5bc1 88private:
42cf5bc1 89 TNaming_NameType myType;
90 TopAbs_ShapeEnum myShapeType;
91 TNaming_ListOfNamedShape myArgs;
92 Handle(TNaming_NamedShape) myStop;
93 Standard_Integer myIndex;
94 TopoDS_Shape myShape;
95 TDF_Label myContextLabel;
96 TopAbs_Orientation myOrientation;
42cf5bc1 97};
98
42cf5bc1 99#endif // _TNaming_Name_HeaderFile