1 // Created on: 2004-11-23
2 // Created by: Pavel TELKOV
3 // Copyright (c) 2004-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // The original implementation Copyright: (C) RINA S.p.A
18 #ifndef TObj_TXYZ_HeaderFile
19 #define TObj_TXYZ_HeaderFile
21 #include <TObj_Common.hxx>
24 #include <TDF_Attribute.hxx>
27 class Handle(TObj_TXYZ);
30 class Handle(TDF_RelocationTable);
33 * Attribute for storing gp_XYZ
36 class TObj_TXYZ : public TDF_Attribute
39 //! Standard methods of OCAF attribute
42 Standard_EXPORT TObj_TXYZ();
44 //! This method is used in implementation of ID()
45 static Standard_EXPORT const Standard_GUID& GetID();
47 //! Returns the ID of TObj_TXYZ attribute.
48 Standard_EXPORT const Standard_GUID& ID() const;
51 //! Method for create TObj_TXYZ object
53 //! Creates attribute and sets the XYZ
54 static Standard_EXPORT Handle(TObj_TXYZ) Set (const TDF_Label& theLabel,
55 const gp_XYZ& theXYZ);
57 //! Methods for setting and obtaining XYZ
60 Standard_EXPORT void Set(const gp_XYZ& theXYZ);
63 Standard_EXPORT gp_XYZ Get() const;
66 //! Redefined OCAF abstract methods
68 //! Returns an new empty TObj_TXYZ attribute. It is used by the
70 Standard_EXPORT Handle(TDF_Attribute) NewEmpty() const;
72 //! Restores the backuped contents from <theWith> into this one. It is used
73 //! when aborting a transaction.
74 Standard_EXPORT void Restore(const Handle(TDF_Attribute)& theWith);
76 //! This method is used when copying an attribute from a source structure
77 //! into a target structure.
78 Standard_EXPORT void Paste(const Handle(TDF_Attribute)& theInto,
79 const Handle(TDF_RelocationTable)& theRT) const;
81 //! This method dumps the attribute value into the stream
82 Standard_EXPORT virtual Standard_OStream& Dump(Standard_OStream& theOS) const;
86 gp_XYZ myXYZ; //!< The object interface stored by the attribute
90 DEFINE_STANDARD_RTTI(TObj_TXYZ, TDF_Attribute)
93 //! Define handle class for TObj_TXYZ
94 DEFINE_STANDARD_HANDLE(TObj_TXYZ,TDF_Attribute)