0030773: Application Framework - To allow to inherit existing attributes to reuse...
[occt.git] / src / TDataXtd / TDataXtd_Axis.hxx
CommitLineData
42cf5bc1 1// Created on: 2009-04-06
2// Created by: Sergey ZARITCHNY
3// Copyright (c) 2009-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
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
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.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _TDataXtd_Axis_HeaderFile
17#define _TDataXtd_Axis_HeaderFile
18
c99ad5d7 19#include <TDataStd_GenericEmpty.hxx>
42cf5bc1 20class TDF_Label;
21class gp_Lin;
42cf5bc1 22
23class TDataXtd_Axis;
c99ad5d7 24DEFINE_STANDARD_HANDLE(TDataXtd_Axis, TDataStd_GenericEmpty)
42cf5bc1 25
26//! The basis to define an axis attribute.
27//!
28//! Warning: Use TDataXtd_Geometry attribute to retrieve the
29//! gp_Lin of the Axis attribute
c99ad5d7 30class TDataXtd_Axis : public TDataStd_GenericEmpty
42cf5bc1 31{
32
33public:
34
35
36 //! class methods
37 //! =============
38 //! Returns the GUID for an axis.
39 Standard_EXPORT static const Standard_GUID& GetID();
40
41 //! Finds or creates an axis attribute defined by the label.
42 //! In the case of a creation of an axis, a compatible
43 //! named shape should already be associated with label.
44 //! Exceptions
45 //! Standard_NullObject if no compatible named
46 //! shape is associated with the label.
47 Standard_EXPORT static Handle(TDataXtd_Axis) Set (const TDF_Label& label);
48
49 //! Find, or create, an Axis attribute and set <P> as
50 //! generated in the associated NamedShape.
51 //! Axis methods
52 //! ============
53 Standard_EXPORT static Handle(TDataXtd_Axis) Set (const TDF_Label& label, const gp_Lin& L);
54
55 Standard_EXPORT TDataXtd_Axis();
56
79104795 57 Standard_EXPORT const Standard_GUID& ID() const Standard_OVERRIDE;
42cf5bc1 58
42cf5bc1 59 Standard_EXPORT virtual Standard_OStream& Dump (Standard_OStream& anOS) const Standard_OVERRIDE;
60
61
c99ad5d7 62 DEFINE_DERIVED_ATTRIBUTE(TDataXtd_Axis, TDataStd_GenericEmpty)
42cf5bc1 63
64protected:
65
66
67
68
69private:
70
71
72
73
74};
75
76
77
78
79
80
81
82#endif // _TDataXtd_Axis_HeaderFile